��	o��	         data���{"AccountOrderController":{"hiddenAccountList":[],"pinnedAccountList":[]},"AccountTracker":{"accounts":{},"accountsByChainId":{},"currentBlockGasLimit":"","currentBlockGasLimitByChainId":{}},"AccountsController":{"internalAccounts":{"accounts":{},"selectedAccount":""}},"AddressBookController":{"addressBook":{}},"AlertController":{"alertEnabledness":{"smartTransactionsMigration":true,"unconnectedAccount":true,"web3ShimUsage":true},"unconnectedAccountAlertShownOrigins":{},"web3ShimUsageOrigins":{"https://challenges.cloudflare.com":1,"https://newassets.hcaptcha.com":1,"https://www.tiktok.com":1}},"AnnouncementController":{"announcements":{"26":{"date":null,"id":26,"isShown":false}}},"AppMetadataController":{"currentAppVersion":"12.20.0","currentMigrationVersion":161.1,"previousAppVersion":"","previousMigrationVersion":0},"AppStateController":{"browserEnvironment":{"browser":"chrome","os":"win"},"connectedStatusPopoverHasBeenShown":true,"defaultHomeActiveTabName":null,"hadAdvancedGasFeesSetPriorToMigration92_3":false,"isRampCardClosed":false,"lastViewedUserSurvey":null,"newPrivacyPolicyToastClickedOrClosed":null,"newPrivacyPolicyToastShownDate":1.750696484541e+12,"nftsDetectionNoticeDismissed":false,"onboardingDate":1.750696484632e+12,"outdatedBrowserWarningLastShown":null,"recoveryPhraseReminderHasBeenShown":false,"recoveryPhraseReminderLastShown":1.750696483382e+12,"showAccountBanner":true,"showBetaHeader":false,"showNetworkBanner":true,"showPermissionsTour":true,"showTestnetMessageInDropdown":true,"slides":[],"surveyLinkLastClickedOrClosed":null,"switchedNetworkNeverShowMessage":false,"timeoutMinutes":0,"trezorModel":null},"ApprovalController":{},"AuthenticationController":{"isSignedIn":false},"BridgeController":{},"BridgeStatusController":{"txHistory":{}},"CronjobController":{"events":{},"jobs":{"npm:@metamask/institutional-wallet-snap-0":{"lastRun":1.750756850006e+12},"npm:@metamask/institutional-wallet-snap-1":{"lastRun":1.75075680001e+12},"npm:@metamask/solana-wallet-snap-0":{"lastRun":1.750756800008e+12},"npm:@metamask/solana-wallet-snap-1":{"lastRun":1.750756800013e+12},"npm:@metamask/solana-wallet-snap-2":{"lastRun":1.750756800015e+12}}},"CurrencyController":{"currencyRates":{"ETH":{"conversionDate":0,"conversionRate":0,"usdConversionRate":null}},"currentCurrency":"usd"},"DeFiPositionsController":{},"DecryptMessageController":{},"DelegationController":{"delegations":{}},"EncryptionPublicKeyController":{},"EnsController":{"ensEntries":{"0x1":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0x1","ensName":"."}},"0x3":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0x3","ensName":"."}},"0x4":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0x4","ensName":"."}},"0x4268":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0x4268","ensName":"."}},"0x5":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0x5","ensName":"."}},"0xaa36a7":{".":{"address":"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e","chainId":"0xaa36a7","ensName":"."}}},"ensResolutionsByAddress":{}},"GasFeeController":{"estimatedGasFeeTimeBounds":{},"gasEstimateType":"none","gasFeeEstimates":{},"gasFeeEstimatesByChainId":{},"nonRPCGasFeeApisDisabled":false},"InstitutionalSnapController":{},"KeyringController":{},"LoggingController":{"logs":{}},"MetaMetricsController":{"dataCollectionForMarketing":null,"eventsBeforeMetricsOptIn":[{"category":"App","event":"App Installed","properties":{}}],"fragments":{},"latestNonAnonymousEventTimestamp":0,"marketingCampaignCookieId":null,"metaMetricsId":"0x7760fc7a3ca3639552858946957dc388430c83c2c2be08c1f20c8f53e9d32849","participateInMetaMetrics":null,"segmentApiCalls":{},"traits":{"install_date_ext":"2025-06-23"}},"MetaMetricsDataDeletionController":{"metaMetricsDataDeletionId":null,"metaMetricsDataDeletionTimestamp":0},"MultichainAssetsController":{"accountsAssets":{},"assetsMetadata":{}},"MultichainAssetsRatesController":{"conversionRates":{}},"MultichainBalancesController":{"balances":{}},"MultichainNetworkController":{"isEvmSelected":true,"multichainNetworkConfigurationsByChainId":{"bip122:000000000019d6689c085ae165831e93":{"chainId":"bip122:000000000019d6689c085ae165831e93","isEvm":false,"name":"Bitcoin","nativeCurrency":"bip122:000000000019d6689c085ae165831e93/slip44:0"},"bip122:000000000933ea01ad0ee984209779ba":{"chainId":"bip122:000000000933ea01ad0ee984209779ba","isEvm":false,"name":"Bitcoin Testnet","nativeCurrency":"bip122:000000000933ea01ad0ee984209779ba/slip44:0"},"bip122:00000008819873e925422c1ff0f99f7c":{"chainId":"bip122:00000008819873e925422c1ff0f99f7c","isEvm":false,"name":"Bitcoin Signet","nativeCurrency":"bip122:00000008819873e925422c1ff0f99f7c/slip44:0"},"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":{"chainId":"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","isEvm":false,"name":"Solana Testnet","nativeCurrency":"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z/slip44:501"},"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":{"chainId":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","isEvm":false,"name":"Solana","nativeCurrency":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501"},"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":{"chainId":"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1","isEvm":false,"name":"Solana Devnet","nativeCurrency":"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/slip44:501"}},"networksWithTransactionActivity":{},"selectedMultichainNetworkChainId":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"},"MultichainRatesController":{"cryptocurrencies":["btc","sol"],"fiatCurrency":"usd","rates":{"btc":{"conversionDate":0,"conversionRate":0},"sol":{"conversionDate":0,"conversionRate":0}}},"MultichainTransactionsController":{"nonEvmTransactions":{}},"NameController":{"nameSources":{},"names":{"ethereumAddress":{}}},"NetworkController":{"networkConfigurationsByChainId":{"0x1":{"blockExplorerUrls":["https://etherscan.io"],"chainId":"0x1","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Ethereum Mainnet","nativeCurrency":"ETH","rpcEndpoints":[{"failoverUrls":["https://dimensional-special-breeze.quiknode.pro/d5e2d185c1561ef5ecb9aadf1ae7cc58863f4fa4/"],"networkClientId":"mainnet","type":"infura","url":"https://mainnet.infura.io/v3/{infuraProjectId}"}]},"0x18c6":{"blockExplorerUrls":["https://megaexplorer.xyz"],"chainId":"0x18c6","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Mega Testnet","nativeCurrency":"MegaETH","rpcEndpoints":[{"failoverUrls":[],"networkClientId":"megaeth-testnet","type":"custom","url":"https://carrot.megaeth.com/rpc"}]},"0x279f":{"blockExplorerUrls":["https://testnet.monadexplorer.com"],"chainId":"0x279f","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Monad Testnet","nativeCurrency":"MON","rpcEndpoints":[{"failoverUrls":[],"networkClientId":"monad-testnet","type":"custom","url":"https://testnet-rpc.monad.xyz"}]},"0xaa36a7":{"blockExplorerUrls":["https://sepolia.etherscan.io"],"chainId":"0xaa36a7","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Sepolia","nativeCurrency":"SepoliaETH","rpcEndpoints":[{"failoverUrls":[],"networkClientId":"sepolia","type":"infura","url":"https://sepolia.infura.io/v3/{infuraProjectId}"}]},"0xe705":{"blockExplorerUrls":["https://sepolia.lineascan.build"],"chainId":"0xe705","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Linea Sepolia","nativeCurrency":"LineaETH","rpcEndpoints":[{"failoverUrls":[],"networkClientId":"linea-sepolia","type":"infura","url":"https://linea-sepolia.infura.io/v3/{infuraProjectId}"}]},"0xe708":{"blockExplorerUrls":["https://lineascan.build"],"chainId":"0xe708","defaultBlockExplorerUrlIndex":0,"defaultRpcEndpointIndex":0,"name":"Linea","nativeCurrency":"ETH","rpcEndpoints":[{"failoverUrls":["https://patient-sleek-daylight.linea-mainnet.quiknode.pro/d0e608bf5f231ef9ae6756de4d7876cb0f5ece55/"],"networkClientId":"linea-mainnet","type":"infura","url":"https://linea-mainnet.infura.io/v3/{infuraProjectId}"}]}},"networksMetadata":{"mainnet":{"EIPS":{},"status":"unknown"}},"selectedNetworkClientId":"mainnet"},"NetworkOrderController":{"orderedNetworkList":[]},"NftController":{"allNftContracts":{},"allNfts":{},"ignoredNfts":[]},"NftDetectionController":{},"NotificationServicesController":{"isFeatureAnnouncementsEnabled":false,"isMetamaskNotificationsFeatureSeen":false,"isNotificationServicesEnabled":false,"metamaskNotificationsList":[],"metamaskNotificationsReadList":[],"subscriptionAccountsSeen":[]},"NotificationServicesPushController":{"fcmToken":"","isPushEnabled":true},"OnboardingController":{"completedOnboarding":false,"firstTimeFlowType":null,"seedPhraseBackedUp":null},"PPOMController":{"storageMetadata":[],"versionInfo":[]},"PermissionController":{"subjects":{"http://localhost:3000":{"origin":"http://localhost:3000","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.75069648345e+12,"id":"Fc4CNgDor1flW2v_9YqA5","invoker":"http://localhost:3000","parentCapability":"wallet_snap"}}},"http://localhost:8000":{"origin":"http://localhost:8000","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483451e+12,"id":"ZVTS6EqmaoFqgsUEYhlSl","invoker":"http://localhost:8000","parentCapability":"wallet_snap"}}},"https://alpha.mycactus.io":{"origin":"https://alpha.mycactus.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483459e+12,"id":"LiKale9E6s8XWyXxHgjl9","invoker":"https://alpha.mycactus.io","parentCapability":"wallet_snap"}}},"https://app.bitgo-test.com":{"origin":"https://app.bitgo-test.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483458e+12,"id":"6v1gh4m_woECjE2kdtFr1","invoker":"https://app.bitgo-test.com","parentCapability":"wallet_snap"}}},"https://app.bitgo.com":{"origin":"https://app.bitgo.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483458e+12,"id":"sNodqVxQ7XZxpGjOEsE9J","invoker":"https://app.bitgo.com","parentCapability":"wallet_snap"}}},"https://apps-portal.safe.global":{"origin":"https://apps-portal.safe.global","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483458e+12,"id":"Tj3jJ-bXM-FgkA8fTXbP8","invoker":"https://apps-portal.safe.global","parentCapability":"wallet_snap"}}},"https://console.dev.mpcvault.com":{"origin":"https://console.dev.mpcvault.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483457e+12,"id":"IhyRIHGhfIm4IBSbeq2Fw","invoker":"https://console.dev.mpcvault.com","parentCapability":"wallet_snap"}}},"https://console.fireblocks.io":{"origin":"https://console.fireblocks.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483455e+12,"id":"400muZQndAy_smK2PBxj7","invoker":"https://console.fireblocks.io","parentCapability":"wallet_snap"}}},"https://console.mpcvault.com":{"origin":"https://console.mpcvault.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483457e+12,"id":"nOTIfuv3JsTYLPJJCyO2l","invoker":"https://console.mpcvault.com","parentCapability":"wallet_snap"}}},"https://debug.mycactus.dev:1443":{"origin":"https://debug.mycactus.dev:1443","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.75069648346e+12,"id":"zjxId4yc-Bbt3uBp_43sp","invoker":"https://debug.mycactus.dev:1443","parentCapability":"wallet_snap"}}},"https://dev10-console.waterballoons.xyz":{"origin":"https://dev10-console.waterballoons.xyz","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483456e+12,"id":"lh6SU5Qs857ahzFCRuGoM","invoker":"https://dev10-console.waterballoons.xyz","parentCapability":"wallet_snap"}}},"https://dev4-console.waterballoons.xyz":{"origin":"https://dev4-console.waterballoons.xyz","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483456e+12,"id":"ReCwUWe7zmK_WUojTSshz","invoker":"https://dev4-console.waterballoons.xyz","parentCapability":"wallet_snap"}}},"https://developer.metamask.io":{"origin":"https://developer.metamask.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/message-signing-snap":{}}}],"date":1.750696483418e+12,"id":"eTIam224QIyWnxU1a0mTt","invoker":"https://developer.metamask.io","parentCapability":"wallet_snap"}}},"https://docs.metamask.io":{"origin":"https://docs.metamask.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/message-signing-snap":{}}}],"date":1.750696483417e+12,"id":"Pam4pG5Cl_lwne0wn7M24","invoker":"https://docs.metamask.io","parentCapability":"wallet_snap"}}},"https://local.waterballoons.xyz:4200":{"origin":"https://local.waterballoons.xyz:4200","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483456e+12,"id":"55hkifgiX5pQNb1IRgnyy","invoker":"https://local.waterballoons.xyz:4200","parentCapability":"wallet_snap"}}},"https://localhost:3000":{"origin":"https://localhost:3000","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483451e+12,"id":"pHWGIdgEEklk1Pzx373Ex","invoker":"https://localhost:3000","parentCapability":"wallet_snap"}}},"https://neptune-custody-ui.metamask-institutional.io":{"origin":"https://neptune-custody-ui.metamask-institutional.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483452e+12,"id":"iyaGmqte4rrI7WOPetNU4","invoker":"https://neptune-custody-ui.metamask-institutional.io","parentCapability":"wallet_snap"}}},"https://portfolio-builds.metafi-dev.codefi.network":{"origin":"https://portfolio-builds.metafi-dev.codefi.network","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/message-signing-snap":{}}}],"date":1.750696483417e+12,"id":"f9rwb627hXRtNBKRBr_WU","invoker":"https://portfolio-builds.metafi-dev.codefi.network","parentCapability":"wallet_snap"}}},"https://portfolio.metamask.io":{"origin":"https://portfolio.metamask.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/message-signing-snap":{},"npm:@metamask/solana-wallet-snap":{}}}],"date":1.750696483416e+12,"id":"cc9Uaa9MlkuauUZcnHYgX","invoker":"https://portfolio.metamask.io","parentCapability":"wallet_snap"}}},"https://pre.mycactus.com":{"origin":"https://pre.mycactus.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483459e+12,"id":"bal-ZaXyZcbTwqAYx1pGe","invoker":"https://pre.mycactus.com","parentCapability":"wallet_snap"}}},"https://saturn-custody-ui.metamask-institutional.io":{"origin":"https://saturn-custody-ui.metamask-institutional.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483457e+12,"id":"hTIN9NhX_TXgaq7FbJc-_","invoker":"https://saturn-custody-ui.metamask-institutional.io","parentCapability":"wallet_snap"}}},"https://ui-preprod-v2.qa.zodia.io":{"origin":"https://ui-preprod-v2.qa.zodia.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483453e+12,"id":"4mxB9JoU4031pr3uw6Tlg","invoker":"https://ui-preprod-v2.qa.zodia.io","parentCapability":"wallet_snap"}}},"https://ui-preprod-v2.uat.zodia.io":{"origin":"https://ui-preprod-v2.uat.zodia.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483454e+12,"id":"aoZdW0qbvgHN_aLED62bu","invoker":"https://ui-preprod-v2.uat.zodia.io","parentCapability":"wallet_snap"}}},"https://ui-v2.qa.zodia.io":{"origin":"https://ui-v2.qa.zodia.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483453e+12,"id":"dtqu6dFXnOR7T3ZvbFxB5","invoker":"https://ui-v2.qa.zodia.io","parentCapability":"wallet_snap"}}},"https://ui-v2.sit.zodia.io":{"origin":"https://ui-v2.sit.zodia.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483453e+12,"id":"PsAFVxJIYEyg9HEfY1TNI","invoker":"https://ui-v2.sit.zodia.io","parentCapability":"wallet_snap"}}},"https://v2.custody.zodia.io":{"origin":"https://v2.custody.zodia.io","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483454e+12,"id":"ChxIW4KJGcuCk_gAABvGn","invoker":"https://v2.custody.zodia.io","parentCapability":"wallet_snap"}}},"https://www.mycactus.com":{"origin":"https://www.mycactus.com","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.75069648346e+12,"id":"kykRwnEGW34ikAi54DjUo","invoker":"https://www.mycactus.com","parentCapability":"wallet_snap"}}},"https://www.mycactus.dev":{"origin":"https://www.mycactus.dev","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.750696483459e+12,"id":"TIYwCRLoMpuUfa7Ocojnh","invoker":"https://www.mycactus.dev","parentCapability":"wallet_snap"}}},"localhost:8000":{"origin":"localhost:8000","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/institutional-wallet-snap":{}}}],"date":1.75069648345e+12,"id":"tmYs8V-vzzmWpm4bTi3NN","invoker":"localhost:8000","parentCapability":"wallet_snap"}}},"npm:@metamask/ens-resolver-snap":{"origin":"npm:@metamask/ens-resolver-snap","permissions":{"endowment:caip25":{"caveats":[{"type":"authorizedScopes","value":{"isMultichainOrigin":false,"optionalScopes":{"eip155:1":{"accounts":[]}},"requiredScopes":{},"sessionProperties":{}}}],"date":1.750696483422e+12,"id":"OUhyd3TbFs1bsssA6oyHA","invoker":"npm:@metamask/ens-resolver-snap","parentCapability":"endowment:caip25"},"endowment:ethereum-provider":{"caveats":null,"date":1.750696483421e+12,"id":"TtLVUG7oTgHYV9-cdIHqW","invoker":"npm:@metamask/ens-resolver-snap","parentCapability":"endowment:ethereum-provider"},"endowment:name-lookup":{"caveats":null,"date":1.750696483421e+12,"id":"uEswaUeuPBgIUpf7XIenI","invoker":"npm:@metamask/ens-resolver-snap","parentCapability":"endowment:name-lookup"},"endowment:network-access":{"caveats":null,"date":1.750696483421e+12,"id":"vgEYOfYTP0JOOWOV55_Gq","invoker":"npm:@metamask/ens-resolver-snap","parentCapability":"endowment:network-access"}}},"npm:@metamask/gator-permissions-snap":{"origin":"npm:@metamask/gator-permissions-snap","permissions":{"wallet_snap":{"caveats":[{"type":"snapIds","value":{"npm:@metamask/message-signing-snap":{}}}],"date":1.750696483419e+12,"id":"fGjbwmzf2wmRMxMg-kg9E","invoker":"npm:@metamask/gator-permissions-snap","parentCapability":"wallet_snap"}}},"npm:@metamask/institutional-wallet-snap":{"origin":"npm:@metamask/institutional-wallet-snap","permissions":{"endowment:caip25":{"caveats":[{"type":"authorizedScopes","value":{"isMultichainOrigin":false,"optionalScopes":{"eip155:1":{"accounts":[]}},"requiredScopes":{},"sessionProperties":{}}}],"date":1.750696483448e+12,"id":"ZNPSCqew-87qdkagQJPXW","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:caip25"},"endowment:cronjob":{"caveats":[{"type":"snapCronjob","value":{"jobs":[{"expression":"5/15 * * * * *","request":{"method":"execute"}},{"expression":"* * * * *","request":{"method":"manageSleepState"}}]}}],"date":1.750696483447e+12,"id":"h0Q0PtmdzOj7gUBr6mT8N","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:cronjob"},"endowment:ethereum-provider":{"caveats":null,"date":1.750696483445e+12,"id":"OM6QiPIfoGRzSbdIrVQua","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:ethereum-provider"},"endowment:keyring":{"caveats":[{"type":"keyringOrigin","value":{"allowedOrigins":["localhost:8000","http://localhost:8000"]}}],"date":1.750696483445e+12,"id":"asFsr5eTMG5DoYmYZLM7t","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:keyring"},"endowment:network-access":{"caveats":null,"date":1.750696483445e+12,"id":"wSdjWZWUU-WLVQT6mzMUO","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:network-access"},"endowment:page-home":{"caveats":null,"date":1.750696483448e+12,"id":"SZor6n_ZavQsXGoIcsrFp","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:page-home"},"endowment:rpc":{"caveats":[{"type":"rpcOrigin","value":{"allowedOrigins":["localhost:8000","http://localhost:8000","localhost:3000","https://localhost:3000","http://localhost:3000","https://neptune-custody-ui.metamask-institutional.io","https://zodia.io","https://ui-v2.sit.zodia.io","https://ui-v2.qa.zodia.io","https://ui-preprod-v2.qa.zodia.io","https://ui-preprod-v2.uat.zodia.io","https://v2.custody.zodia.io","https://console.fireblocks.io","https://local.waterballoons.xyz:4200","https://dev4-console.waterballoons.xyz","https://dev10-console.waterballoons.xyz","https://console.dev.mpcvault.com","https://saturn-custody-ui.metamask-institutional.io","https://console.mpcvault.com","https://app.bitgo.com","https://app.bitgo-test.com","https://apps-portal.safe.global","https://alpha.mycactus.io","https://pre.mycactus.com","https://www.mycactus.dev","https://debug.mycactus.dev:1443","https://www.mycactus.com"]}}],"date":1.750696483445e+12,"id":"c_Npw9nTSQyPNOGrXKy5p","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"endowment:rpc"},"snap_dialog":{"caveats":null,"date":1.750696483448e+12,"id":"zq3FCXbaLRH3yKh1gi3Ca","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"snap_dialog"},"snap_manageAccounts":{"caveats":null,"date":1.750696483448e+12,"id":"RkVMxz4AkzFLRymVFGlMN","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"snap_manageAccounts"},"snap_manageState":{"caveats":null,"date":1.750696483448e+12,"id":"5fJN42pH8cs_52nJDCv1E","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"snap_manageState"},"snap_notify":{"caveats":null,"date":1.750696483445e+12,"id":"n6VhjCylrKY0v6XOlafY8","invoker":"npm:@metamask/institutional-wallet-snap","parentCapability":"snap_notify"}}},"npm:@metamask/message-signing-snap":{"origin":"npm:@metamask/message-signing-snap","permissions":{"endowment:rpc":{"caveats":[{"type":"rpcOrigin","value":{"dapps":true,"snaps":true}}],"date":1.750696483414e+12,"id":"rUxHc5lWHsmXpwwQ96UVW","invoker":"npm:@metamask/message-signing-snap","parentCapability":"endowment:rpc"},"snap_getEntropy":{"caveats":null,"date":1.750696483414e+12,"id":"V9sb0JyR1svawAmufkhFN","invoker":"npm:@metamask/message-signing-snap","parentCapability":"snap_getEntropy"}}},"npm:@metamask/solana-wallet-snap":{"origin":"npm:@metamask/solana-wallet-snap","permissions":{"endowment:assets":{"caveats":[{"type":"chainIds","value":["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"]}],"date":1.750696483467e+12,"id":"o-Xc_pVfSLvFSnD1mXIhf","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:assets"},"endowment:cronjob":{"caveats":[{"type":"snapCronjob","value":{"jobs":[{"expression":"* * * * *","request":{"method":"refreshSend","params":{}}},{"expression":"* * * * *","request":{"method":"refreshConfirmationEstimation","params":{}}},{"expression":"*/2 * * * *","request":{"method":"scheduleRefreshAccounts","params":{}}}]}}],"date":1.750696483467e+12,"id":"xUOhvsSnhR7fxj3wSNY3L","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:cronjob"},"endowment:keyring":{"caveats":[{"type":"keyringOrigin","value":{"allowedOrigins":["https://portfolio.metamask.io"]}}],"date":1.750696483465e+12,"id":"zhVLi-WhsHFVO3GJ7ElX1","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:keyring"},"endowment:network-access":{"caveats":null,"date":1.750696483466e+12,"id":"QOOTaZdry8oFghgKjJ6tp","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:network-access"},"endowment:protocol":{"caveats":[{"type":"protocolSnapScopes","value":{"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]},"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]}}}],"date":1.750696483467e+12,"id":"MvnyDVe8onML6lSvYTt-6","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:protocol"},"endowment:rpc":{"caveats":[{"type":"rpcOrigin","value":{"dapps":true,"snaps":false}}],"date":1.750696483465e+12,"id":"8XQmVvhB0auMzkPYOO7Q7","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"endowment:rpc"},"snap_dialog":{"caveats":null,"date":1.750696483467e+12,"id":"CDKdicx8DzA59gCpwxlTj","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"snap_dialog"},"snap_getBip32Entropy":{"caveats":[{"type":"permittedDerivationPaths","value":[{"curve":"ed25519","path":["m","44'","501'"]}]}],"date":1.750696483465e+12,"id":"LdDbrXf7tYDTjIPCJlDSp","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"snap_getBip32Entropy"},"snap_getPreferences":{"caveats":null,"date":1.750696483467e+12,"id":"bYDFFu05pPlazW6Bfkm6G","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"snap_getPreferences"},"snap_manageAccounts":{"caveats":null,"date":1.750696483467e+12,"id":"ma-EaS41znvPcvxHACZzk","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"snap_manageAccounts"},"snap_manageState":{"caveats":null,"date":1.750696483467e+12,"id":"0j48b4njPNRTjw3b1wQYx","invoker":"npm:@metamask/solana-wallet-snap","parentCapability":"snap_manageState"}}}}},"PermissionLogController":{"permissionActivityLog":[],"permissionHistory":{}},"PhishingController":{"c2DomainBlocklistLastFetched":0,"hotlistLastFetched":0,"phishingLists":[],"stalelistLastFetched":0,"urlScanCache":{},"whitelist":[]},"PreferencesController":{"addSnapAccountEnabled":false,"advancedGasFee":{},"currentLocale":"en","dismissSeedBackUpReminder":false,"enableMV3TimestampSave":true,"featureFlags":{},"forgottenPassword":false,"identities":{},"ipfsGateway":"dweb.link","isIpfsGatewayEnabled":true,"isMultiAccountBalancesEnabled":true,"knownMethodData":{},"ledgerTransportType":"webhid","lostIdentities":{},"manageInstitutionalWallets":false,"openSeaEnabled":true,"overrideContentSecurityPolicyHeader":true,"preferences":{"dismissSmartAccountSuggestionEnabled":false,"featureNotificationsEnabled":false,"hideZeroBalanceTokens":false,"petnamesEnabled":true,"privacyMode":false,"showConfirmationAdvancedDetails":false,"showExtensionInFullSizeView":false,"showFiatInTestnets":false,"showMultiRpcModal":false,"showNativeTokenAsMainBalance":false,"showTestNetworks":false,"smartTransactionsMigrationApplied":false,"smartTransactionsOptInStatus":true,"tokenNetworkFilter":{},"tokenSortConfig":{"key":"tokenFiatAmount","order":"dsc","sortCallback":"stringNumeric"},"useNativeCurrencyAsPrimaryCurrency":true},"securityAlertsEnabled":true,"selectedAddress":"","showIncomingTransactions":{"0x1":true,"0x13881":true,"0x38":true,"0x5":true,"0x504":true,"0x505":true,"0x507":true,"0x61":true,"0x64":true,"0x89":true,"0xa":true,"0xa869":true,"0xa86a":true,"0xaa36a7":true,"0xaa37dc":true,"0xe704":true,"0xe705":true,"0xe708":true,"0xfa":true,"0xfa2":true},"snapRegistryList":{},"snapsAddSnapAccountModalDismissed":false,"theme":"os","use4ByteResolution":true,"useAddressBarEnsResolution":true,"useBlockie":false,"useCurrencyRateCheck":true,"useExternalNameSources":true,"useExternalServices":true,"useMultiAccountBalanceChecker":true,"useNftDetection":true,"usePhishDetect":true,"useSafeChainsListValidation":true,"useTokenDetection":true,"useTransactionSimulations":true,"watchEthereumAccountEnabled":false},"RemoteFeatureFlagController":{"cacheTimestamp":0,"remoteFeatureFlags":{}},"SelectedNetworkController":{"domains":{"http://localhost:3000":"mainnet","http://localhost:8000":"mainnet","https://alpha.mycactus.io":"mainnet","https://app.bitgo-test.com":"mainnet","https://app.bitgo.com":"mainnet","https://apps-portal.safe.global":"mainnet","https://console.dev.mpcvault.com":"mainnet","https://console.fireblocks.io":"mainnet","https://console.mpcvault.com":"mainnet","https://debug.mycactus.dev:1443":"mainnet","https://dev10-console.waterballoons.xyz":"mainnet","https://dev4-console.waterballoons.xyz":"mainnet","https://developer.metamask.io":"mainnet","https://docs.metamask.io":"mainnet","https://local.waterballoons.xyz:4200":"mainnet","https://localhost:3000":"mainnet","https://neptune-custody-ui.metamask-institutional.io":"mainnet","https://portfolio-builds.metafi-dev.codefi.network":"mainnet","https://portfolio.metamask.io":"mainnet","https://pre.mycactus.com":"mainnet","https://saturn-custody-ui.metamask-institutional.io":"mainnet","https://ui-preprod-v2.qa.zodia.io":"mainnet","https://ui-preprod-v2.uat.zodia.io":"mainnet","https://ui-v2.qa.zodia.io":"mainnet","https://ui-v2.sit.zodia.io":"mainnet","https://v2.custody.zodia.io":"mainnet","https://www.mycactus.com":"mainnet","https://www.mycactus.dev":"mainnet","localhost:8000":"mainnet","npm:@metamask/ens-resolver-snap":"mainnet","npm:@metamask/gator-permissions-snap":"mainnet","npm:@metamask/institutional-wallet-snap":"mainnet","npm:@metamask/message-signing-snap":"mainnet","npm:@metamask/solana-wallet-snap":"mainnet"}},"SignatureController":{},"SmartTransactionsController":{"smartTransactionsState":{"fees":{"approvalTxFees":null,"tradeTxFees":null},"feesByChainId":{"0x1":{"approvalTxFees":null,"tradeTxFees":null},"0xaa36a7":{"approvalTxFees":null,"tradeTxFees":null}},"liveness":true,"livenessByChainId":{"0x1":true,"0xaa36a7":true},"smartTransactions":{"0x1":[]},"userOptIn":null,"userOptInV2":null}},"SnapController":{"snapStates":{},"snaps":{"npm:@metamask/ens-resolver-snap":{"auxiliaryFiles":[],"blocked":false,"enabled":true,"id":"npm:@metamask/ens-resolver-snap","initialPermissions":{"endowment:ethereum-provider":{},"endowment:name-lookup":{},"endowment:network-access":{}},"localizationFiles":[],"manifest":{"description":"A Snap used for ENS name resolution","initialPermissions":{"endowment:ethereum-provider":{},"endowment:name-lookup":{},"endowment:network-access":{}},"manifestVersion":"0.1","proposedName":"Ethereum Name Service resolver","repository":{"type":"git","url":"https://github.com/MetaMask/ens-resolver-snap.git"},"source":{"location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/ens-resolver-snap","registry":"https://registry.npmjs.org/"}},"shasum":"BizRmzfV+oKEIlvph12McsIqzzDECIw/Td7Lx+/cios="},"version":"0.1.2"},"preinstalled":true,"removable":false,"sourceCode":"(()=>{\"use strict\";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})}},e={};t.r(e),t.d(e,{onNameLookup:()=>ol});var n={};t.r(n),t.d(n,{OG:()=>po,My:()=>so,bytesToNumberBE:()=>ao,lX:()=>co,Id:()=>fo,fg:()=>yo,qj:()=>ho,hexToBytes:()=>oo,lq:()=>lo,z:()=>uo,Q5:()=>bo});const r=\"6.13.1\";function s(t,e,n){const r=e.split(\"|\").map((t=>t.trim()));for(let n=0;n\u003Cr.length;n++)switch(e){case\"any\":return;case\"bigint\":case\"boolean\":case\"number\":case\"string\":if(typeof t===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code=\"INVALID_ARGUMENT\",s.argument=`value.${n}`,s.value=t,s}async function i(t){const e=Object.keys(t);return(await Promise.all(e.map((e=>Promise.resolve(t[e]))))).reduce(((t,n,r)=>(t[e[r]]=n,t)),{})}function o(t,e,n){for(let r in e){let i=e[r];const o=n?n[r]:null;o&&s(i,o,r),Object.defineProperty(t,r,{enumerable:!0,value:i,writable:!1})}}function a(t){if(null==t)return\"null\";if(Array.isArray(t))return\"[ \"+t.map(a).joind�
�(\", \")+\" ]\";if(t instanceof Uint8Array){const e=\"0123456789abcdef\";let n=\"0x\";for(let r=0;r\u003Ct.length;r++)n+=e[t[r]>>4],n+=e[15&t[r]];return n}if(\"object\"==typeof t&&\"function\"==typeof t.toJSON)return a(t.toJSON());switch(typeof t){case\"boolean\":case\"symbol\":case\"number\":return t.toString();case\"bigint\":return BigInt(t).toString();case\"string\":return JSON.stringify(t);case\"object\":{const e=Object.keys(t);return e.sort(),\"{ \"+e.map((e=>`${a(e)}: ${a(t[e])}`)).join(\", \")+\" }\"}}return\"[ COULD NOT SERIALIZE ]\"}function c(t,e){return t&&t.code===e}function l(t){return c(t,\"CALL_EXCEPTION\")}function u(t,e,n){let s,i=t;{const s=[];if(n){if(\"message\"in n||\"code\"in n||\"name\"in n)throw new Error(`value will overwrite populated values: ${a(n)}`);for(const t in n){if(\"shortMessage\"===t)continue;const e=n[t];s.push(t+\"=\"+a(e))}}s.push(`code=${e}`),s.push(`version=${r}`),s.length&&(t+=\" (\"+s.join(\", \")+\")\")}switch(e){case\"INVALID_ARGUMENT\":s=new TypeError(t);break;case\"NUMERIC_FAULT\":case\"BUFFER_OVERRUN\":s=new RangeError(t);break;default:s=new Error(t)}return o(s,{code:e}),n&&Object.assign(s,n),null==s.shortMessage&&o(s,{shortMessage:i}),s}function h(t,e,n,r){if(!t)throw u(e,n,r)}function f(t,e,n,r){h(t,e,\"INVALID_ARGUMENT\",{argument:n,value:r})}function d(t,e,n){null==n&&(n=\"\"),n&&(n=\": \"+n),h(t>=e,\"missing arguemnt\"+n,\"MISSING_ARGUMENT\",{count:t,expectedCount:e}),h(t\u003C=e,\"too many arguments\"+n,\"UNEXPECTED_ARGUMENT\",{count:t,expectedCount:e})}const p=[\"NFD\",\"NFC\",\"NFKD\",\"NFKC\"].reduce(((t,e)=>{try{if(\"test\"!==\"test\".normalize(e))throw new Error(\"bad\");if(\"NFD\"===e){const t=String.fromCharCode(233).normalize(\"NFD\");if(t!==String.fromCharCode(101,769))throw new Error(\"broken\")}t.push(e)}catch(t){}return t}),[]);function g(t,e,n){if(null==n&&(n=\"\"),t!==e){let t=n,e=\"new\";n&&(t+=\".\",e+=\" \"+n),h(!1,`private constructor; use ${t}from* methods`,\"UNSUPPORTED_OPERATION\",{operation:e})}}function m(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if(\"string\"==typeof t&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const e=new Uint8Array((t.length-2)/2);let n=2;for(let r=0;r\u003Ce.length;r++)e[r]=parseInt(t.substring(n,n+2),16),n+=2;return e}f(!1,\"invalid BytesLike value\",e||\"value\",t)}function y(t,e){return m(t,e,!1)}function w(t,e){return m(t,e,!0)}function b(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&((\"number\"!=typeof e||t.length===2+2*e)&&(!0!==e||t.length%2==0))}function A(t){return b(t,!0)||t instanceof Uint8Array}const v=\"0123456789abcdef\";function E(t){const e=y(t);let n=\"0x\";for(let t=0;t\u003Ce.length;t++){const r=e[t];n+=v[(240&r)>>4]+v[15&r]}return n}function k(t){return\"0x\"+t.map((t=>E(t).substring(2))).join(\"\")}function P(t){return b(t,!0)?(t.length-2)/2:y(t).length}function x(t,e,n){const r=y(t);return null!=n&&n>r.length&&h(!1,\"cannot slice beyond data bounds\",\"BUFFER_OVERRUN\",{buffer:r,length:r.length,offset:n}),E(r.slice(null==e?0:e,null==n?r.length:n))}function N(t,e,n){const r=y(t);h(e>=r.length,\"padding exceeds data length\",\"BUFFER_OVERRUN\",{buffer:new Uint8Array(r),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),n?s.set(r,e-r.length):s.set(r,0),E(s)}function B(t,e){return N(t,e,!0)}const I=BigInt(0),C=BigInt(1),O=9007199254740991;function R(t,e){let n=S(t,\"value\");const r=BigInt(L(e,\"width\")),s=C\u003C\u003Cr-C;if(n\u003CI){n=-n,h(n\u003C=s,\"too low\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:t});return(~n&(C\u003C\u003Cr)-C)+C}return h(n\u003Cs,\"too high\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:t}),n}function T(t,e){const n=F(t,\"value\"),r=BigInt(L(e,\"bits\"));return n&(C\u003C\u003Cr)-C}function S(t,e){switch(typeof t){case\"bigint\":return t;case\"number\":return f(Number.isInteger(t),\"underflow\",e||\"value\",t),f(t>=-O&&t\u003C=O,\"overflow\",e||\"value\",t),BigInt(t);case\"string\":try{if(\"\"===t)throw new Error(\"empty string\");return\"-\"===t[0]&&\"-\"!==t[1]?-BigInt(t.substring(1)):BigInt(t)}catch(n){f(!1,`invalid BigNumberish string: ${n.message}`,e||\"value\",t)}}f(!1,\"invalid BigNumberish value\",e||\"value\",t)}function F(t,e){const n=S(t,e);return h(n>=I,\"unsigned value cannot be negative\",\"NUMERIC_FAULT\",{fault:\"overflow\",operation:\"getUint\",value:t}),n}const U=\"0123456789abcdef\";function D(t){if(t instanceof Uint8Array){let e=\"0x0\";for(const n of t)e+=U[n>>4],e+=U[15&n];return BigInt(e)}return S(t)}function L(t,e){switch(typeof t){case\"bigint\":return f(t>=-O&&t\u003C=O,\"overflow\",e||\"value\",t),Number(t);case\"number\":return f(Number.isInteger(t),\"underflow\",e||\"value\",t),f(t>=-O&&t\u003C=O,\"overflow\",e||\"value\",t),t;case\"string\":try{if(\"\"===t)throw new Error(\"empty string\");return L(BigInt(t),e)}catch(n){f(!1,`invalid numeric string: ${n.message}`,e||\"value\",t)}}f(!1,\"invalid numeric value\",e||\"value\",t)}function M(t,e){let n=F(t,\"value\").toString(16);if(null==e)n.length%2&&(n=\"0\"+n);else{const r=L(e,\"width\");for(h(2*r>=n.length,`value exceeds width (${r} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeHex\",fault:\"overflow\",value:t});n.length\u003C2*r;)n=\"0\"+n}return\"0x\"+n}function G(t){const e=F(t,\"value\");if(e===I)return new Uint8Array([]);let n=e.toString(16);n.length%2&&(n=\"0\"+n);const r=new Uint8Array(n.length/2);for(let t=0;t\u003Cr.length;t++){const e=2*t;r[t]=parseInt(n.substring(e,e+2),16)}return r}function H(t){let e=E(A(t)?t:G(t)).substring(2);for(;e.startsWith(\"0\");)e=e.substring(1);return\"\"===e&&(e=\"0\"),\"0x\"+e}const Q=32,j=new Uint8Array(Q),V=[\"then\"],J={},z=new WeakMap;function K(t){return z.get(t)}function q(t,e){z.set(t,e)}function _(t,e){const n=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}function Z(t,e,n){return t.indexOf(null)>=0?e.map(((t,e)=>t instanceof W?Z(K(t),t,n):t)):t.reduce(((t,r,s)=>{let i=e.getValue(r);return r in t||(n&&i instanceof W&&(i=Z(K(i),i,n)),t[r]=i),t}),{})}class W extends Array{#t;constructor(...t){const e=t[0];let n=t[1],r=(t[2]||[]).slice(),s=!0;e!==J&&(n=t,r=[],s=!1),super(n.length),n.forEach(((t,e)=>{this[e]=t}));const i=r.reduce(((t,e)=>(\"string\"==typeof e&&t.set(e,(t.get(e)||0)+1),t)),new Map);if(q(this,Object.freeze(n.map(((t,e)=>{const n=r[e];return null!=n&&1===i.get(n)?n:null})))),this.#t=[],null==this.#t&&this.#t,!s)return;Object.freeze(this);const o=new Proxy(this,{get:(t,e,n)=>{if(\"string\"==typeof e){if(e.match(/^[0-9]+$/)){const n=L(e,\"%index\");if(n\u003C0||n>=this.length)throw new RangeError(\"out of result range\");const r=t[n];return r instanceof Error&&_(`index ${n}`,r),r}if(V.indexOf(e)>=0)return Reflect.get(t,e,n);const r=t[e];if(r instanceof Function)return function(...e){return r.apply(this===n?t:this,e)};if(!(e in t))return t.getValue.apply(this===n?t:this,[e])}return Reflect.get(t,e,n)}});return q(o,K(this)),o}toArray(t){const e=[];return this.forEach(((n,r)=>{n instanceof Error&&_(`index ${r}`,n),t&&n instanceof W&&(n=n.toArray(t)),e.push(n)})),e}toObject(t){const e=K(this);return e.reduce(((n,r,s)=>(h(null!=r,`value at index ${s} unnamed`,\"UNSUPPORTED_OPERATION\",{operation:\"toObject()\"}),Z(e,this,t))),{})}slice(t,e){null==t&&(t=0),t\u003C0&&(t+=this.length)\u003C0&&(t=0),null==e&&(e=this.length),e\u003C0&&(e+=this.length)\u003C0&&(e=0),e>this.length&&(e=this.length);const n=K(this),r=[],s=[];for(let i=t;i\u003Ce;i++)r.push(this[i]),s.push(n[i]);return new W(J,r,s)}filter(t,e){const n=K(this),r=[],s=[];for(let i=0;i\u003Cthis.length;i++){const o=this[i];o instanceof Error&&_(`index ${i}`,o),t.call(e,o,i,this)&&(r.push(o),s.push(n[i]))}return new W(J,r,s)}map(t,e){const n=[];for(let r=0;r\u003Cthis.length;r++){const s=this[r];s instanceof Error&&_(`index ${r}`,s),n.push(t.call(e,s,r,this))}return n}getValue(t){const e=K(this).indexOf(t);if(-1===e)return;const n=this[e];return n instanceof Error&&_(`property ${JSON.stringify(t)}`,n.error),n}static fromItems(t,e){return new W(J,t,e)}}function Y(t){let e=G(t);return h(e.length\u003C=Q,\"value out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:e,length:Q,offset:e.length}),e.length!==Q&&(e=w(k([j.slice(e.length%Q),e]))),e}class X{name;type;localName;dynamic;constructor(t,e,n,r){o(this,{name:t,type:e,localName:n,dynamic:r},{name:\"string\",type:\"string\",localName:\"string\",dynamic:\"boolean\"})}_throwError(t,e){f(!1,t,this.localName,e)}}class ${#e;#n;constructor(){this.#e=[],this.#n=0}get data(){return k(this.#e)}get length(){return this.#n}#r(t){return this.#e.push(t),this.#n+=t.length,t.length}appendWriter(t){return this.#r(w(t.data))}writeBytes(t){let e=w(t);const n=e.length%Q;return n&&(e=w(k([e,j.slice(n)]))),this.#r(e)}writeValue(t){return this.#r(Y(t))}writeUpdatableValue(){const t=this.#e.length;return this.#e.push(j),this.#n+=Q,e=>{this.#e[t]=Y(e)}}}class tt{allowLoose;#e;#s;#i;#o;#a;constructor(t,e,n){o(this,{allowLoose:!!e}),this.#e=w(t),this.#i=0,this.#o=null,this.#a=null!=n?n:1024,this.#s=0}get data(){return E(this.#e)}get dataLength(){return this.#e.length}get consumed(){return this.#s}get bytes(){return new Uint8Array(this.#e)}#c(t){if(this.#o)return this.#o.#c(t);this.#i+=t,h(this.#a\u003C1||this.#i\u003C=this.#a*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#a} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,\"BUFFER_OVERRUN\",{buffer:w(this.#e),offset:this.#s,length:t,info:{bytesRead:this.#i,dataLength:this.dataLength}})}#l(t,e,n){let r=Math.ceil(e/Q)*Q;return this.#s+r>this.#e.length&&(this.allowLoose&&n&&this.#s+e\u003C=this.#e.length?r=e:h(!1,\"data out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:w(this.#e),length:this.#e.length,offset:this.#s+r})),this.#e.slice(this.#s,this.#s+r)}subReader(t){const e=new tt(this.#e.slice(this.#s+t),this.allowLoose,this.#a);return e.#o=this,e}readBytes(t,e){let n=this.#l(0,t,!!e);return this.#c(t),this.#s+=n.length,n.slice(0,t)}readValue(){return D(this.readBytes(Q))}readIndex(){return L(D(this.readBytes(Q)))}}function et(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`Wrong positive integer: ${t}`)}function nt(t,...e){if(!(t instanceof Uint8Array))throw new Error(\"Expected Uint8Array\");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function rt(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");et(t.outputLen),et(t.blockLen)}function st(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function it(t,e){nt(t);const n=e.outputLen;if(t.length\u003Cn)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const ot=BigInt(2**32-1),at=BigInt(32);function ct(t,e=!1){return e?{h:Number(t&ot),l:Number(t>>at&ot)}:{h:0|Number(t>>at&ot),l:0|Number(t&ot)}}function lt(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let s=0;s\u003Ct.length;s++){const{h:i,l:o}=ct(t[s],e);[n[s],r[s]]=[i,o]}return[n,r]}const ut=(t,e,n)=>t\u003C\u003Cn|e>>>32-n,ht=(t,e,n)=>e\u003C\u003Cn|t>>>32-n,ft=(t,e,n)=>e\u003C\u003Cn-32|t>>>64-n,dt=(t,e,n)=>t\u003C\u003Cn-32|e>>>64-n;const pt={fromBig:ct,split:lt,toBig:(t,e)=>BigInt(t>>>0)\u003C\u003Cat|BigInt(e>>>0),shrSH:(t,e,n)=>t>>>n,shrSL:(t,e,n)=>t\u003C\u003C32-n|e>>>n,rotrSH:(t,e,n)=>t>>>n|e\u003C\u003C32-n,rotrSL:(t,e,n)=>t\u003C\u003C32-n|e>>>n,rotrBH:(t,e,n)=>t\u003C\u003C64-n|e>>>n-32,rotrBL:(t,e,n)=>t>>>n-32|e\u003C\u003C64-n,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:ut,rotlSL:ht,rotlBH:ft,rotlBL:dt,add:function(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:0|s}},add3L:(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),add3H:(t,e,n,r)=>e+n+r+(t/2**32|0)|0,add4L:(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),add4H:(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,add5H:(t,e,n,r,s,i)=>e+n+r+s+i+(t/2**32|0)|0,add5L:(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0)},gt=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,mt=t=>t instanceof Uint8Array,yt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),wt=(t,e)=>t\u003C\u003C32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function bt(t){if(\"string\"==typeof t&&(t=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!mt(t))throw new Error(\"expected Uint8Array, got \"+typeof t);return t}class At{clone(){return this._cloneInto()}}function vt(t){const e=e=>t().update(bt(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function Et(t=32){if(gt&&\"function\"==typeof gt.getRandomValues)return gt.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}const[kt,Pt,xt]=[[],[],[]],Nt=BigInt(0),Bt=BigInt(1),It=BigInt(2),Ct=BigInt(7),Ot=BigInt(256),Rt=BigInt(113);for(let t=0,e=Bt,n=1,r=0;t\u003C24;t++){[n,r]=[r,(2*n+3*r)%5],kt.push(2*(5*r+n)),Pt.push((t+1)*(t+2)/2%64);let s=Nt;for(let t=0;t\u003C7;t++)e=(e\u003C\u003CBt^(e>>Ct)*Rt)%Ot,e&It&&(s^=Bt\u003C\u003C(Bt\u003C\u003CBigInt(t))-Bt);xt.push(s)}const[Tt,St]=lt(xt,!0),Ft=(t,e,n)=>n>32?ft(t,e,n):ut(t,e,n),Ut=(t,e,n)=>n>32?dt(t,e,n):ht(t,e,n);class Dt extends At{constructor(t,e,n,r=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,et(n),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}keccak(){!function(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r\u003C24;r++){for(let e=0;e\u003C10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e\u003C10;e+=2){const r=(e+8)%10,s=(e+2)%10,i=n[s],o=n[s+1],a=Ft(i,o,1)^n[r],c=Ut(i,o,1)^n[r+1];for(let n=0;n\u003C50;n+=10)t[e+n]^=a,t[e+n+1]^=c}let e=t[2],s=t[3];for(let n=0;n\u003C24;n++){const r=Pt[n],i=Ft(e,s,r),o=Ut(e,s,r),a=kt[n];e=t[a],s=t[a+1],t[a]=i,t[a+1]=o}for(let e=0;e\u003C50;e+=10){for(let r=0;r\u003C10;r++)n[r]=t[e+r];for(let r=0;r\u003C10;r++)t[e+r]^=~n[(r+2)%10]&n[(r+4)%10]}t[0]^=Tt[r],t[1]^=St[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){st(this);const{blockLen:e,state:n}=this,r=(t=bt(t)).length;for(let s=0;s\u003Cr;){const i=Math.min(e-this.pos,r-s);for(let e=0;e\u003Ci;e++)n[this.pos++]^=t[s++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:n,blockLen:r}=this;t[n]^=e,0!=(128&e)&&n===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){st(this,!1),nt(t),this.finish();const e=this.state,{blockLen:n}=this;for(let r=0,s=t.length;r\u003Cs;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,s-r);t.set(e.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return et(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(it(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:n,outputLen:r,rounds:s,enableXOF:i}=this;return t||(t=new Dt(e,n,r,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=n,t.outputLen=r,t.enableXOF=i,t.destroyed=this.destroyed,t}}const Lt=(t,e,n)=>vt((()=>new Dt(e,t,n))),Mt=Lt(1,136,32);let Gt=!1;const Ht=function(t){return Mt(t)};let Qt=Ht;function jt(t){const e=y(t,\"data\");return E(Qt(e))}jt._=Ht,jt.lock=function(){Gt=!0},jt.register=function(t){if(Gt)throw new TypeError(\"keccak256 is locked\");Qt=t},Object.freeze(jt);const Vt=BigInt(0),Jt=BigInt(36);function zt(t){const e=(t=t.toLowerCase()).substring(2).split(\"\"),n=new Uint8Array(40);for(let t=0;t\u003C40;t++)n[t]=e[t].charCodeAt(0);const r=y(jt(n));for(let t=0;t\u003C40;t+=2)r[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&r[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return\"0x\"+e.join(\"\")}const Kt={};for(let t=0;t\u003C10;t++)Kt[String(t)]=String(t);for(let t=0;t\u003C26;t++)Kt[String.fromCharCode(65+t)]=String(10+t);const qt=15;function _t(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+\"00\").split(\"\").map((t=>Kt[t])).join(\"\");for(;e.length>=qt;){let t=e.substring(0,qt);e=parseInt(t,10)%97+e.substring(t.length)}let n=String(98-parseInt(e,10)%97);for(;n.length\u003C2;)n=\"0\"+n;return n}const Zt=function(){const t={};for(let e=0;e\u003C36;e++){t[\"0123456789abcdefghijklmnopqrstuvwxyz\"[e]]=BigInt(e)}return t}();function Wt(t){if(f(\"string\"==typeof t,\"invalid address\",\"address\",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith(\"0x\")||(t=\"0x\"+t);const e=zt(t);return f(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,\"bad address checksum\",\"address\",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){f(t.substring(2,4)===_t(t),\"bad icap checksum\",\"address\",t);let e=function(t){t=t.toLowerCase();let e=Vt;for(let n=0;n\u003Ct.length;n++)e=e*Jt+Zt[t[n]];return e}(t.substring(4)).toString(16);for(;e.length\u003C40;)e=\"0\"+e;return zt(\"0x\"+e)}f(!1,\"invalid address\",\"address\",t)}const Yt={};function Xt(t,e){let n=!1;return e\u003C0&&(n=!0,e*=-1),new ee(Yt,`${n?\"\":\"u\"}int${e}`,t,{signed:n,width:e})}function $t(t,e){return new ee(Yt,`bytes${e||\"\"}`,t,{size:e})}const te=Symbol.for(\"_ethers_typed\");class ee{type;value;#u;_typedSymbol;constructor(t,e,n,r){null==r&&(r=null),g(Yt,t,\"Typed\"),o(this,{_typedSymbol:te,type:e,value:n}),this.#u=r,this.format()}format(){if(\"array\"===this.type)throw new Error(\"\");if(\"dynamicArray\"===this.type)throw new Error(\"\");return\"tuple\"===this.type?`tuple(${this.value.map((t=>t.format())).join(\",\")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith(\"bytes\")}isString(){return\"string\"===this.type}get tupleName(){if(\"tuple\"!==this.type)throw TypeError(\"not a tuple\");return this.#u}get arrayLength(){if(\"array\"!==this.type)throw TypeError(\"not an array\");return!0===this.#u?-1:!1===this.#u?this.value.length:null}static from(t,e){return new ee(Yt,t,e)}static uint8(t){return Xt(t,8)}static uint16(t){return Xt(t,16)}static uint24(t){return Xt(t,24)}static uint32(t){return Xt(t,32)}static uint40(t){return Xt(t,40)}static uint48(t){return Xt(t,48)}static uint56(t){return Xt(t,56)}static uint64(t){return Xt(t,64)}static uint72(t){return Xt(t,72)}static uint80(t){return Xt(t,80)}static uint88(t){return Xt(t,88)}static uint96(t){return Xt(t,96)}static uint104(t){return Xt(t,104)}static uint112(t){return Xt(t,112)}static uint120(t){return Xt(t,120)}static uint128(t){return Xt(t,128)}static uint136(t){return Xt(t,136)}static uint144(t){return Xt(t,144)}static uint152(t){return Xt(t,152)}static uint160(t){return Xt(t,160)}static uint168(t){return Xt(t,168)}static uint176(t){return Xt(t,176)}static uint184(t){return Xt(t,184)}static uint192(t){return Xt(t,192)}static uint200(t){return Xt(t,200)}static uint208(t){return Xt(t,208)}static uint216(t){return Xt(t,216)}static uint224(t){return Xt(t,224)}static uint232(t){return Xt(t,232)}static uint240(t){return Xt(t,240)}static uint248(t){return Xt(t,248)}static uint256(t){return Xt(t,256)}static uint(t){return Xt(t,256)}static int8(t){return Xt(t,-8)}static int16(t){return Xt(t,-16)}static int24(t){return Xt(t,-24)}static int32(t){return Xt(t,-32)}static int40(t){return Xt(t,-40)}static int48(t){return Xt(t,-48)}static int56(t){return Xt(t,-56)}static int64(t){return Xt(t,-64)}static int72(t){return Xt(t,-72)}static int80(t){return Xt(t,-80)}static int88(t){return Xt(t,-88)}static int96(t){return Xt(t,-96)}static int104(t){return Xt(t,-104)}static int112(t){return Xt(t,-112)}static int120(t){return Xt(t,-120)}static int128(t){return Xt(t,-128)}static int136(t){return Xt(t,-136)}static int144(t){return Xt(t,-144)}static int152(t){return Xt(t,-152)}static int160(t){return Xt(t,-160)}static int168(t){return Xt(t,-168)}static int176(t){return Xt(t,-176)}static int184(t){return Xt(t,-184)}static int192(t){return Xt(t,-192)}static int200(t){return Xt(t,-200)}static int208(t){return Xt(t,-208)}static int216(t){return Xt(t,-216)}static int224(t){return Xt(t,-224)}static int232(t){return Xt(t,-232)}static int240(t){return Xt(t,-240)}static int248(t){return Xt(t,-248)}static int256(t){return Xt(t,-256)}static int(t){return Xt(t,-256)}static bytes1(t){return $t(t,1)}static bytes2(t){return $t(t,2)}static bytes3(t){return $t(t,3)}static bytes4(t){return $t(t,4)}static bytes5(t){return $t(t,5)}static bytes6(t){return $t(t,6)}static bytes7(t){return $t(t,7)}static bytes8(t){return $t(t,8)}static bytes9(t){return $t(t,9)}static bytes10(t){return $t(t,10)}static bytes11(t){return $t(t,11)}static bytes12(t){return $t(t,12)}static bytes13(t){return $t(t,13)}static bytes14(t){return $t(t,14)}static bytes15(t){return $t(t,15)}static bytes16(t){return $t(t,16)}static bytes17(t){return $t(t,17)}static bytes18(t){return $t(t,18)}static bytes19(t){return $t(t,19)}static bytes20(t){return $t(t,20)}static bytes21(t){return $t(t,21)}static bytes22(t){return $t(t,22)}static bytes23(t){return $t(t,23)}static bytes24(t){return $t(t,24)}static bytes25(t){return $t(t,25)}static bytes26(t){return $t(t,26)}static bytes27(t){return $t(t,27)}static bytes28(t){return $t(t,28)}static bytes29(t){return $t(t,29)}static bytes30(t){return $t(t,30)}static bytes31(t){return $t(t,31)}static bytes32(t){return $t(t,32)}static address(t){return new ee(Yt,\"address\",t)}static bool(t){return new ee(Yt,\"bool\",!!t)}static bytes(t){return new ee(Yt,\"bytes\",t)}static string(t){return new ee(Yt,\"string\",t)}static array(t,e){throw new Error(\"not implemented yet\")}static tuple(t,e){throw new Error(\"not implemented yet\")}static overrides(t){return new ee(Yt,\"overrides\",Object.assign({},t))}static isTyped(t){return t&&\"object\"==typeof t&&\"_typedSymbol\"in t&&t._typedSymbol===te}static dereference(t,e){if(ee.isTyped(t)){if(t.type!==e)throw new Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}class ne extends X{constructor(t){super(\"address\",\"address\",t,!1)}defaultValue(){return\"0x0000000000000000000000000000000000000000\"}encode(t,e){let n=ee.dereference(e,\"string\");try{n=Wt(n)}catch(t){return this._throwError(t.message,e)}return t.writeValue(n)}decode(t){return Wt(M(t.readValue(),20))}}class re extends X{coder;constructor(t){super(t.name,t.type,\"_\",t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}function se(t,e,n){let r=[];if(Array.isArray(n))r=n;else if(n&&\"object\"==typeof n){let t={};r=e.map((e=>{const r=e.localName;return h(r,\"cannot encode object for signature with missing names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:e},value:n}),h(!t[r],\"cannot encode object for signature with duplicate names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:e},value:n}),t[r]=!0,n[r]}))}else f(!1,\"invalid tuple value\",\"tuple\",n);f(e.length===r.length,\"types/value length mismatch\",\"tuple\",n);let s=new $,i=new $,o=[];e.forEach(((t,e)=>{let n=r[e];if(t.dynamic){let e=i.length;t.encode(i,n);let r=s.writeUpdatableValue();o.push((t=>{r(t+e)}))}else t.encode(s,n)})),o.forEach((t=>{t(s.length)}));let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function ie(t,e){let n=[],r=[],s=t.subReader(0);return e.forEach((e=>{let i=null;if(e.dynamic){let n=t.readIndex(),r=s.subReader(n);try{i=e.decode(r)}catch(t){if(c(t,\"BUFFER_OVERRUN\"))throw t;i=t,i.baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(t){if(c(t,\"BUFFER_OVERRUN\"))throw t;i=t,i.baseType=e.name,i.name=e.localName,i.type=e.type}if(null==i)throw new Error(\"investigate\");n.push(i),r.push(e.localName||null)})),W.fromItems(n,r)}class oe extends X{coder;length;constructor(t,e,n){super(\"array\",t.type+\"[\"+(e>=0?e:\"\")+\"]\",n,-1===e||t.dynamic),o(this,{coder:t,length:e})}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let n=0;n\u003Cthis.length;n++)e.push(t);return e}encode(t,e){const n=ee.dereference(e,\"array\");Array.isArray(n)||this._throwError(\"expected array value\",n);let r=this.length;-1===r&&(r=n.length,t.writeValue(n.length)),d(n.length,r,\"coder array\"+(this.localName?\" \"+this.localName:\"\"));let s=[];for(let t=0;t\u003Cn.length;t++)s.push(this.coder);return se(t,s,n)}decode(t){let e=this.length;-1===e&&(e=t.readIndex(),h(e*Q\u003C=t.dataLength,\"insufficient data length\",\"BUFFER_OVERRUN\",{buffer:t.bytes,offset:e*Q,length:t.dataLength}));let n=[];for(let t=0;t\u003Ce;t++)n.push(new re(this.coder));return ie(t,n)}}class ae extends X{constructor(t){super(\"bool\",\"bool\",t,!1)}defaultValue(){return!1}encode(t,e){const n=ee.dereference(e,\"bool\");return t.writeValue(n?1:0)}decode(t){return!!t.readValue()}}class ce extends X{constructor(t,e){super(t,t,e,!0)}defaultValue(){return\"0x\"}encode(t,e){e=w(e);let n=t.writeValue(e.length);return n+=t.writeBytes(e),n}decode(t){return t.readBytes(t.readIndex(),!0)}}class le extends ce{constructor(t){super(\"bytes\",t)}decode(t){return E(super.decode(t))}}class ue extends X{size;constructor(t,e){let n=\"bytes\"+String(t);super(n,n,e,!1),o(this,{size:t},{size:\"number\"})}defaultValue(){return\"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0,2+2*this.size)}encode(t,e){let n=w(ee.dereference(e,this.type));return n.length!==this.size&&this._throwError(\"incorrect data length\",e),t.writeBytes(n)}decode(t){return E(t.readBytes(this.size))}}const he=new Uint8Array([]);class fe extends X{constructor(t){super(\"null\",\"\",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError(\"not null\",e),t.writeBytes(he)}decode(t){return t.readBytes(0),null}}const de=BigInt(0),pe=BigInt(1),ge=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");class me extends X{size;signed;constructor(t,e,n){const r=(e?\"int\":\"uint\")+8*t;super(r,r,n,!1),o(this,{size:t,signed:e},{size:\"number\",signed:\"boolean\"})}defaultValue(){return 0}encode(t,e){let n=S(ee.dereference(e,this.type)),r=T(ge,256);if(this.signed){let t=T(r,8*this.size-1);(n>t||n\u003C-(t+pe))&&this._throwError(\"value out-of-bounds\",e),n=R(n,256)}else(n\u003Cde||n>T(r,8*this.size))&&this._throwError(\"value out-of-bounds\",e);return t.writeValue(n)}decode(t){let e=T(t.readValue(),8*this.size);return this.signed&&(e=function(t,e){const n=F(t,\"value\"),r=BigInt(L(e,\"width\"));if(h(n>>r===I,\"overflow\",\"NUMERIC_FAULT\",{operation:\"fromTwos\",fault:\"overflow\",value:t}),n>>r-C)return-((~n&(C\u003C\u003Cr)-C)+C);return n}(e,8*this.size)),e}}function ye(t,e,n,r,s){if(\"BAD_PREFIX\"===t||\"UNEXPECTED_CONTINUE\"===t){let t=0;for(let r=e+1;r\u003Cn.length&&n[r]>>6==2;r++)t++;return t}return\"OVERRUN\"===t?n.length-e-1:0}const we=Object.freeze({error:function(t,e,n,r,s){f(!1,`invalid codepoint at offset ${e}; ${t}`,\"bytes\",n)},ignore:ye,replace:function(t,e,n,r,s){return\"OVERLONG\"===t?(f(\"number\"==typeof s,\"invalid bad code point for replacement\",\"badCodepoint\",s),r.push(s),0):(r.push(65533),ye(t,e,n))}});function be(t,e){null==e&&(e=we.error);const n=y(t,\"bytes\"),r=[];let s=0;for(;s\u003Cn.length;){const t=n[s++];if(t>>7==0){r.push(t);continue}let i=null,o=null;if(192==(224&t))i=1,o=127;else if(224==(240&t))i=2,o=2047;else{if(240!=(248&t)){s+=e(128==(192&t)?\"UNEXPECTED_CONTINUE\":\"BAD_PREFIX\",s-1,n,r);continue}i=3,o=65535}if(s-1+i>=n.length){s+=e(\"OVERRUN\",s-1,n,r);continue}let a=t&(1\u003C\u003C8-i-1)-1;for(let t=0;t\u003Ci;t++){let t=n[s];if(128!=(192&t)){s+=e(\"MISSING_CONTINUE\",s,n,r),a=null;break}a=a\u003C\u003C6|63&t,s++}null!==a&&(a>1114111?s+=e(\"OUT_OF_RANGE\",s-1-i,n,r,a):a>=55296&&a\u003C=57343?s+=e(\"UTF16_SURROGATE\",s-1-i,n,r,a):a\u003C=o?s+=e(\"OVERLONG\",s-1-i,n,r,a):r.push(a))}return r}function Ae(t,e){f(\"string\"==typeof t,\"invalid string value\",\"str\",t),null!=e&&(!function(t){h(p.indexOf(t)>=0,\"platform missing String.prototype.normalize\",\"UNSUPPORTED_OPERATION\",{operation:\"String.prototype.normalize\",info:{form:t}})}(e),t=t.normalize(e));let n=[];for(let e=0;e\u003Ct.length;e++){const r=t.charCodeAt(e);if(r\u003C128)n.push(r);else if(r\u003C2048)n.push(r>>6|192),n.push(63&r|128);else if(55296==(64512&r)){e++;const s=t.charCodeAt(e);f(e\u003Ct.length&&56320==(64512&s),\"invalid surrogate pair\",\"str\",t);const i=65536+((1023&r)\u003C\u003C10)+(1023&s);n.push(i>>18|240),n.push(i>>12&63|128),n.push(i>>6&63|128),n.push(63&i|128)}else n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)}return new Uint8Array(n)}function ve(t,e){return be(t,e).map((t=>t\u003C=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10&1023),56320+(1023&t))))).join(\"\")}class Ee extends ce{constructor(t){super(\"string\",t)}defaultValue(){return\"\"}encode(t,e){return super.encode(t,Ae(ee.dereference(e,\"string\")))}decode(t){return ve(super.decode(t))}}class ke extends X{coders;constructor(t,e){let n=!1;const r=[];t.forEach((t=>{t.dynamic&&(n=!0),r.push(t.type)}));super(\"tuple\",\"tuple(\"+r.join(\",\")+\")\",e,n),o(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const n=e.localName;return n&&(t[n]||(t[n]=0),t[n]++),t}),{});return this.coders.forEach(((n,r)=>{let s=n.localName;s&&1===e[s]&&(\"length\"===s&&(s=\"_length\"),null==t[s]&&(t[s]=t[r]))})),Object.freeze(t)}encode(t,e){const n=ee.dereference(e,\"tuple\");return se(t,this.coders,n)}decode(t){return ie(t,this.coders)}}function Pe(t){return jt(Ae(t))}function xe(t){const e=new Set;return t.forEach((t=>e.add(t))),Object.freeze(e)}const Ne=xe(\"external public payable override\".split(\" \")),Be=\"constant external internal payable private public pure view override\",Ie=xe(Be.split(\" \")),Ce=\"constructor error event fallback function receive struct\",Oe=xe(Ce.split(\" \")),Re=\"calldata memory storage payable indexed\",Te=xe(Re.split(\" \")),Se=xe([Ce,Re,\"tuple returns\",Be].join(\" \").split(\" \")),Fe={\"(\":\"OPEN_PAREN\",\")\":\"CLOSE_PAREN\",\"[\":\"OPEN_BRACKET\",\"]\":\"CLOSE_BRACKET\",\",\":\"COMMA\",\"@\":\"AT\"},Ue=new RegExp(\"^(\\\\s*)\"),De=new RegExp(\"^([0-9]+)\"),Le=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\"),Me=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\"),Ge=new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");class He{#s;#h;get offset(){return this.#s}get length(){return this.#h.length-this.#s}constructor(t){this.#s=0,this.#h=t.slice()}clone(){return new He(this.#h)}reset(){this.#s=0}#f(t=0,e=0){return new He(this.#h.slice(t,e).map((e=>Object.freeze(Object.assign({},e,{match:e.match-t,linkBack:e.linkBack-t,linkNext:e.linkNext-t})))))}popKeyword(t){const e=this.peek();if(\"KEYWORD\"!==e.type||!t.has(e.text))throw new Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){const e=this.peek();throw new Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){const t=this.peek();if(\"OPEN_PAREN\"!==t.type)throw new Error(\"bad start\");const e=this.#f(this.#s+1,t.match+1);return this.#s=t.match+1,e}popParams(){const t=this.peek();if(\"OPEN_PAREN\"!==t.type)throw new Error(\"bad start\");const e=[];for(;this.#s\u003Ct.match-1;){const t=this.peek().linkNext;e.push(this.#f(this.#s+1,t)),this.#s=t}return this.#s=t.match+1,e}peek(){if(this.#s>=this.#h.length)throw new Error(\"out-of-bounds\");return this.#h[this.#s]}peekKeyword(t){const e=this.peekType(\"KEYWORD\");return null!=e&&t.has(e)?e:null}peekType(t){if(0===this.length)return null;const e=this.peek();return e.type===t?e.text:null}pop(){const t=this.peek();return this.#s++,t}toString(){const t=[];for(let e=this.#s;e\u003Cthis.#h.length;e++){const n=this.#h[e];t.push(`${n.type}:${n.text}`)}return`\u003CTokenString ${t.join(\" \")}>`}}function Qe(t){const e=[],n=e=>{const n=i\u003Ct.length?JSON.stringify(t[i]):\"$EOI\";throw new Error(`invalid token ${n} at ${i}: ${e}`)};let r=[],s=[],i=0;for(;i\u003Ct.length��^��;){let o=t.substring(i),a=o.match(Ue);a&&(i+=a[1].length,o=t.substring(i));const c={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:\"\",text:\"\",offset:i,value:-1};e.push(c);let l=Fe[o[0]]||\"\";if(l){if(c.type=l,c.text=o[0],i++,\"OPEN_PAREN\"===l)r.push(e.length-1),s.push(e.length-1);else if(\"CLOSE_PAREN\"==l)0===r.length&&n(\"no matching open bracket\"),c.match=r.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=s.pop(),e[c.linkBack].linkNext=e.length-1;else if(\"COMMA\"===l)c.linkBack=s.pop(),e[c.linkBack].linkNext=e.length-1,s.push(e.length-1);else if(\"OPEN_BRACKET\"===l)c.type=\"BRACKET\";else if(\"CLOSE_BRACKET\"===l){let t=e.pop().text;if(e.length>0&&\"NUMBER\"===e[e.length-1].type){const n=e.pop().text;t=n+t,e[e.length-1].value=L(n)}if(0===e.length||\"BRACKET\"!==e[e.length-1].type)throw new Error(\"missing opening bracket\");e[e.length-1].text+=t}}else if(a=o.match(Le),a){if(c.text=a[1],i+=c.text.length,Se.has(c.text)){c.type=\"KEYWORD\";continue}if(c.text.match(Ge)){c.type=\"TYPE\";continue}c.type=\"ID\"}else{if(a=o.match(De),!a)throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`);c.text=a[1],c.type=\"NUMBER\",i+=c.text.length}}return new He(e.map((t=>Object.freeze(t))))}function je(t,e){let n=[];for(const r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw new Error(`conflicting types: ${n.join(\", \")}`)}function Ve(t,e){if(e.peekKeyword(Oe)){const n=e.pop().text;if(n!==t)throw new Error(`expected ${t}, got ${n}`)}return e.popType(\"ID\")}function Je(t,e){const n=new Set;for(;;){const r=t.peekType(\"KEYWORD\");if(null==r||e&&!e.has(r))break;if(t.pop(),n.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function ze(t){let e=Je(t,Ie);return je(e,xe(\"constant payable nonpayable\".split(\" \"))),je(e,xe(\"pure view payable nonpayable\".split(\" \"))),e.has(\"view\")?\"view\":e.has(\"pure\")?\"pure\":e.has(\"payable\")?\"payable\":e.has(\"nonpayable\")?\"nonpayable\":e.has(\"constant\")?\"view\":\"nonpayable\"}function Ke(t,e){return t.popParams().map((t=>an.from(t,e)))}function qe(t){if(t.peekType(\"AT\")){if(t.pop(),t.peekType(\"NUMBER\"))return S(t.pop().text);throw new Error(\"invalid gas\")}return null}function _e(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Ze=new RegExp(/^(.*)\\[([0-9]*)\\]$/);function We(t){const e=t.match(Ge);if(f(e,\"invalid type\",\"type\",t),\"uint\"===t)return\"uint256\";if(\"int\"===t)return\"int256\";if(e[2]){const n=parseInt(e[2]);f(0!==n&&n\u003C=32,\"invalid bytes length\",\"type\",t)}else if(e[3]){const n=parseInt(e[3]);f(0!==n&&n\u003C=256&&n%8==0,\"invalid numeric width\",\"type\",t)}return t}const Ye={},Xe=Symbol.for(\"_ethers_internal\"),$e=\"_ParamTypeInternal\",tn=\"_ErrorInternal\",en=\"_EventInternal\",nn=\"_ConstructorInternal\",rn=\"_FallbackInternal\",sn=\"_FunctionInternal\",on=\"_StructInternal\";class an{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,n,r,s,i,a,c){if(g(t,Ye,\"ParamType\"),Object.defineProperty(this,Xe,{value:$e}),i&&(i=Object.freeze(i.slice())),\"array\"===r){if(null==a||null==c)throw new Error(\"\")}else if(null!=a||null!=c)throw new Error(\"\");if(\"tuple\"===r){if(null==i)throw new Error(\"\")}else if(null!=i)throw new Error(\"\");o(this,{name:e,type:n,baseType:r,indexed:s,components:i,arrayLength:a,arrayChildren:c})}format(t){if(null==t&&(t=\"sighash\"),\"json\"===t){const e=this.name||\"\";if(this.isArray()){const t=JSON.parse(this.arrayChildren.format(\"json\"));return t.name=e,t.type+=`[${this.arrayLength\u003C0?\"\":String(this.arrayLength)}]`,JSON.stringify(t)}const n={type:\"tuple\"===this.baseType?\"tuple\":this.type,name:e};return\"boolean\"==typeof this.indexed&&(n.indexed=this.indexed),this.isTuple()&&(n.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(n)}let e=\"\";return this.isArray()?(e+=this.arrayChildren.format(t),e+=`[${this.arrayLength\u003C0?\"\":String(this.arrayLength)}]`):this.isTuple()?e+=\"(\"+this.components.map((e=>e.format(t))).join(\"full\"===t?\", \":\",\")+\")\":e+=this.type,\"sighash\"!==t&&(!0===this.indexed&&(e+=\" indexed\"),\"full\"===t&&this.name&&(e+=\" \"+this.name)),e}isArray(){return\"array\"===this.baseType}isTuple(){return\"tuple\"===this.baseType}isIndexable(){return null!=this.indexed}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error(\"array is wrong length\");const n=this;return t.map((t=>n.arrayChildren.walk(t,e)))}if(this.isTuple()){if(!Array.isArray(t))throw new Error(\"invalid tuple value\");if(t.length!==this.components.length)throw new Error(\"array is wrong length\");const n=this;return t.map(((t,r)=>n.components[r].walk(t,e)))}return e(this.type,t)}#d(t,e,n,r){if(this.isArray()){if(!Array.isArray(e))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error(\"array is wrong length\");const s=this.arrayChildren,i=e.slice();return i.forEach(((e,r)=>{s.#d(t,e,n,(t=>{i[r]=t}))})),void r(i)}if(this.isTuple()){const s=this.components;let i;if(Array.isArray(e))i=e.slice();else{if(null==e||\"object\"!=typeof e)throw new Error(\"invalid tuple value\");i=s.map((t=>{if(!t.name)throw new Error(\"cannot use object value with unnamed components\");if(!(t.name in e))throw new Error(`missing value for component ${t.name}`);return e[t.name]}))}if(i.length!==this.components.length)throw new Error(\"array is wrong length\");return i.forEach(((e,r)=>{s[r].#d(t,e,n,(t=>{i[r]=t}))})),void r(i)}const s=n(this.type,e);s.then?t.push(async function(){r(await s)}()):r(s)}async walkAsync(t,e){const n=[],r=[t];return this.#d(n,t,e,(t=>{r[0]=t})),n.length&&await Promise.all(n),r[0]}static from(t,e){if(an.isParamType(t))return t;if(\"string\"==typeof t)try{return an.from(Qe(t),e)}catch(e){f(!1,\"invalid param type\",\"obj\",t)}else if(t instanceof He){let n=\"\",r=\"\",s=null;Je(t,xe([\"tuple\"])).has(\"tuple\")||t.peekType(\"OPEN_PAREN\")?(r=\"tuple\",s=t.popParams().map((t=>an.from(t))),n=`tuple(${s.map((t=>t.format())).join(\",\")})`):(n=We(t.popType(\"TYPE\")),r=n);let i=null,o=null;for(;t.length&&t.peekType(\"BRACKET\");){const e=t.pop();i=new an(Ye,\"\",n,r,null,s,o,i),o=e.value,n+=e.text,r=\"array\",s=null}let a=null;if(Je(t,Te).has(\"indexed\")){if(!e)throw new Error(\"\");a=!0}const c=t.peekType(\"ID\")?t.pop().text:\"\";if(t.length)throw new Error(\"leftover tokens\");return new an(Ye,c,n,r,a,s,o,i)}const n=t.name;f(!n||\"string\"==typeof n&&n.match(Me),\"invalid name\",\"obj.name\",n);let r=t.indexed;null!=r&&(f(e,\"parameter cannot be indexed\",\"obj.indexed\",t.indexed),r=!!r);let s=t.type,i=s.match(Ze);if(i){const e=parseInt(i[2]||\"-1\"),o=an.from({type:i[1],components:t.components});return new an(Ye,n||\"\",s,\"array\",r,null,e,o)}if(\"tuple\"===s||s.startsWith(\"tuple(\")||s.startsWith(\"(\")){const e=null!=t.components?t.components.map((t=>an.from(t))):null;return new an(Ye,n||\"\",s,\"tuple\",r,e,null,null)}return s=We(t.type),new an(Ye,n||\"\",s,s,r,null,null,null)}static isParamType(t){return t&&t[Xe]===$e}}class cn{type;inputs;constructor(t,e,n){g(t,Ye,\"Fragment\"),o(this,{type:e,inputs:n=Object.freeze(n.slice())})}static from(t){if(\"string\"==typeof t){try{cn.from(JSON.parse(t))}catch(t){}return cn.from(Qe(t))}if(t instanceof He){switch(t.peekKeyword(Oe)){case\"constructor\":return dn.from(t);case\"error\":return hn.from(t);case\"event\":return fn.from(t);case\"fallback\":case\"receive\":return pn.from(t);case\"function\":return gn.from(t);case\"struct\":return mn.from(t)}}else if(\"object\"==typeof t){switch(t.type){case\"constructor\":return dn.from(t);case\"error\":return hn.from(t);case\"event\":return fn.from(t);case\"fallback\":case\"receive\":return pn.from(t);case\"function\":return gn.from(t);case\"struct\":return mn.from(t)}h(!1,`unsupported type: ${t.type}`,\"UNSUPPORTED_OPERATION\",{operation:\"Fragment.from\"})}f(!1,\"unsupported frgament object\",\"obj\",t)}static isConstructor(t){return dn.isFragment(t)}static isError(t){return hn.isFragment(t)}static isEvent(t){return fn.isFragment(t)}static isFunction(t){return gn.isFragment(t)}static isStruct(t){return mn.isFragment(t)}}class ln extends cn{name;constructor(t,e,n,r){super(t,e,r),f(\"string\"==typeof n&&n.match(Me),\"invalid identifier\",\"name\",n),r=Object.freeze(r.slice()),o(this,{name:n})}}function un(t,e){return\"(\"+e.map((e=>e.format(t))).join(\"full\"===t?\", \":\",\")+\")\"}class hn extends ln{constructor(t,e,n){super(t,\"error\",e,n),Object.defineProperty(this,Xe,{value:tn})}get selector(){return Pe(this.format(\"sighash\")).substring(0,10)}format(t){if(null==t&&(t=\"sighash\"),\"json\"===t)return JSON.stringify({type:\"error\",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});const e=[];return\"sighash\"!==t&&e.push(\"error\"),e.push(this.name+un(t,this.inputs)),e.join(\" \")}static from(t){if(hn.isFragment(t))return t;if(\"string\"==typeof t)return hn.from(Qe(t));if(t instanceof He){const e=Ve(\"error\",t),n=Ke(t);return _e(t),new hn(Ye,e,n)}return new hn(Ye,t.name,t.inputs?t.inputs.map(an.from):[])}static isFragment(t){return t&&t[Xe]===tn}}class fn extends ln{anonymous;constructor(t,e,n,r){super(t,\"event\",e,n),Object.defineProperty(this,Xe,{value:en}),o(this,{anonymous:r})}get topicHash(){return Pe(this.format(\"sighash\"))}format(t){if(null==t&&(t=\"sighash\"),\"json\"===t)return JSON.stringify({type:\"event\",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});const e=[];return\"sighash\"!==t&&e.push(\"event\"),e.push(this.name+un(t,this.inputs)),\"sighash\"!==t&&this.anonymous&&e.push(\"anonymous\"),e.join(\" \")}static getTopicHash(t,e){e=(e||[]).map((t=>an.from(t)));return new fn(Ye,t,e,!1).topicHash}static from(t){if(fn.isFragment(t))return t;if(\"string\"==typeof t)try{return fn.from(Qe(t))}catch(e){f(!1,\"invalid event fragment\",\"obj\",t)}else if(t instanceof He){const e=Ve(\"event\",t),n=Ke(t,!0),r=!!Je(t,xe([\"anonymous\"])).has(\"anonymous\");return _e(t),new fn(Ye,e,n,r)}return new fn(Ye,t.name,t.inputs?t.inputs.map((t=>an.from(t,!0))):[],!!t.anonymous)}static isFragment(t){return t&&t[Xe]===en}}class dn extends cn{payable;gas;constructor(t,e,n,r,s){super(t,e,n),Object.defineProperty(this,Xe,{value:nn}),o(this,{payable:r,gas:s})}format(t){if(h(null!=t&&\"sighash\"!==t,\"cannot format a constructor for sighash\",\"UNSUPPORTED_OPERATION\",{operation:\"format(sighash)\"}),\"json\"===t)return JSON.stringify({type:\"constructor\",stateMutability:this.payable?\"payable\":\"undefined\",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});const e=[`constructor${un(t,this.inputs)}`];return this.payable&&e.push(\"payable\"),null!=this.gas&&e.push(`@${this.gas.toString()}`),e.join(\" \")}static from(t){if(dn.isFragment(t))return t;if(\"string\"==typeof t)try{return dn.from(Qe(t))}catch(e){f(!1,\"invalid constuctor fragment\",\"obj\",t)}else if(t instanceof He){Je(t,xe([\"constructor\"]));const e=Ke(t),n=!!Je(t,Ne).has(\"payable\"),r=qe(t);return _e(t),new dn(Ye,\"constructor\",e,n,r)}return new dn(Ye,\"constructor\",t.inputs?t.inputs.map(an.from):[],!!t.payable,null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[Xe]===nn}}class pn extends cn{payable;constructor(t,e,n){super(t,\"fallback\",e),Object.defineProperty(this,Xe,{value:rn}),o(this,{payable:n})}format(t){const e=0===this.inputs.length?\"receive\":\"fallback\";if(\"json\"===t){const t=this.payable?\"payable\":\"nonpayable\";return JSON.stringify({type:e,stateMutability:t})}return`${e}()${this.payable?\" payable\":\"\"}`}static from(t){if(pn.isFragment(t))return t;if(\"string\"==typeof t)try{return pn.from(Qe(t))}catch(e){f(!1,\"invalid fallback fragment\",\"obj\",t)}else if(t instanceof He){const e=t.toString();f(t.peekKeyword(xe([\"fallback\",\"receive\"])),\"type must be fallback or receive\",\"obj\",e);if(\"receive\"===t.popKeyword(xe([\"fallback\",\"receive\"]))){const e=Ke(t);return f(0===e.length,\"receive cannot have arguments\",\"obj.inputs\",e),Je(t,xe([\"payable\"])),_e(t),new pn(Ye,[],!0)}let n=Ke(t);n.length?f(1===n.length&&\"bytes\"===n[0].type,\"invalid fallback inputs\",\"obj.inputs\",n.map((t=>t.format(\"minimal\"))).join(\", \")):n=[an.from(\"bytes\")];const r=ze(t);if(f(\"nonpayable\"===r||\"payable\"===r,\"fallback cannot be constants\",\"obj.stateMutability\",r),Je(t,xe([\"returns\"])).has(\"returns\")){const e=Ke(t);f(1===e.length&&\"bytes\"===e[0].type,\"invalid fallback outputs\",\"obj.outputs\",e.map((t=>t.format(\"minimal\"))).join(\", \"))}return _e(t),new pn(Ye,n,\"payable\"===r)}if(\"receive\"===t.type)return new pn(Ye,[],!0);if(\"fallback\"===t.type){const e=[an.from(\"bytes\")],n=\"payable\"===t.stateMutability;return new pn(Ye,e,n)}f(!1,\"invalid fallback description\",\"obj\",t)}static isFragment(t){return t&&t[Xe]===rn}}class gn extends ln{constant;outputs;stateMutability;payable;gas;constructor(t,e,n,r,s,i){super(t,\"function\",e,r),Object.defineProperty(this,Xe,{value:sn});o(this,{constant:\"view\"===n||\"pure\"===n,gas:i,outputs:s=Object.freeze(s.slice()),payable:\"payable\"===n,stateMutability:n})}get selector(){return Pe(this.format(\"sighash\")).substring(0,10)}format(t){if(null==t&&(t=\"sighash\"),\"json\"===t)return JSON.stringify({type:\"function\",name:this.name,constant:this.constant,stateMutability:\"nonpayable\"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});const e=[];return\"sighash\"!==t&&e.push(\"function\"),e.push(this.name+un(t,this.inputs)),\"sighash\"!==t&&(\"nonpayable\"!==this.stateMutability&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push(\"returns\"),e.push(un(t,this.outputs))),null!=this.gas&&e.push(`@${this.gas.toString()}`)),e.join(\" \")}static getSelector(t,e){e=(e||[]).map((t=>an.from(t)));return new gn(Ye,t,\"view\",e,[],null).selector}static from(t){if(gn.isFragment(t))return t;if(\"string\"==typeof t)try{return gn.from(Qe(t))}catch(e){f(!1,\"invalid function fragment\",\"obj\",t)}else if(t instanceof He){const e=Ve(\"function\",t),n=Ke(t),r=ze(t);let s=[];Je(t,xe([\"returns\"])).has(\"returns\")&&(s=Ke(t));const i=qe(t);return _e(t),new gn(Ye,e,r,n,s,i)}let e=t.stateMutability;return null==e&&(e=\"payable\",\"boolean\"==typeof t.constant?(e=\"view\",t.constant||(e=\"payable\",\"boolean\"!=typeof t.payable||t.payable||(e=\"nonpayable\"))):\"boolean\"!=typeof t.payable||t.payable||(e=\"nonpayable\")),new gn(Ye,t.name,e,t.inputs?t.inputs.map(an.from):[],t.outputs?t.outputs.map(an.from):[],null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[Xe]===sn}}class mn extends ln{constructor(t,e,n){super(t,\"struct\",e,n),Object.defineProperty(this,Xe,{value:on})}format(){throw new Error(\"@TODO\")}static from(t){if(\"string\"==typeof t)try{return mn.from(Qe(t))}catch(e){f(!1,\"invalid struct fragment\",\"obj\",t)}else if(t instanceof He){const e=Ve(\"struct\",t),n=Ke(t);return _e(t),new mn(Ye,e,n)}return new mn(Ye,t.name,t.inputs?t.inputs.map(an.from):[])}static isFragment(t){return t&&t[Xe]===on}}const yn=new Map;yn.set(0,\"GENERIC_PANIC\"),yn.set(1,\"ASSERT_FALSE\"),yn.set(17,\"OVERFLOW\"),yn.set(18,\"DIVIDE_BY_ZERO\"),yn.set(33,\"ENUM_RANGE_ERROR\"),yn.set(34,\"BAD_STORAGE_DATA\"),yn.set(49,\"STACK_UNDERFLOW\"),yn.set(50,\"ARRAY_RANGE_ERROR\"),yn.set(65,\"OUT_OF_MEMORY\"),yn.set(81,\"UNINITIALIZED_FUNCTION_CALL\");const wn=new RegExp(/^bytes([0-9]*)$/),bn=new RegExp(/^(u?int)([0-9]*)$/);let An=null,vn=1024;class En{#p(t){if(t.isArray())return new oe(this.#p(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new ke(t.components.map((t=>this.#p(t))),t.name);switch(t.baseType){case\"address\":return new ne(t.name);case\"bool\":return new ae(t.name);case\"string\":return new Ee(t.name);case\"bytes\":return new le(t.name);case\"\":return new fe(t.name)}let e=t.type.match(bn);if(e){let n=parseInt(e[2]||\"256\");return f(0!==n&&n\u003C=256&&n%8==0,\"invalid \"+e[1]+\" bit length\",\"param\",t),new me(n/8,\"int\"===e[1],t.name)}if(e=t.type.match(wn),e){let n=parseInt(e[1]);return f(0!==n&&n\u003C=32,\"invalid bytes length\",\"param\",t),new ue(n,t.name)}f(!1,\"invalid type\",\"type\",t.type)}getDefaultValue(t){const e=t.map((t=>this.#p(an.from(t))));return new ke(e,\"_\").defaultValue()}encode(t,e){d(e.length,t.length,\"types/values length mismatch\");const n=t.map((t=>this.#p(an.from(t)))),r=new ke(n,\"_\"),s=new $;return r.encode(s,e),s.data}decode(t,e,n){const r=t.map((t=>this.#p(an.from(t))));return new ke(r,\"_\").decode(new tt(e,n,vn))}static _setDefaultMaxInflation(t){f(\"number\"==typeof t&&Number.isInteger(t),\"invalid defaultMaxInflation factor\",\"value\",t),vn=t}static defaultAbiCoder(){return null==An&&(An=new En),An}static getBuiltinCallException(t,e,n){return function(t,e,n,r){let s=\"missing revert data\",i=null,o=null;if(n){s=\"execution reverted\";const t=y(n);if(n=E(n),0===t.length)s+=\" (no data present; likely require(false) occurred\",i=\"require(false)\";else if(t.length%32!=4)s+=\" (could not decode reason; invalid data length)\";else if(\"0x08c379a0\"===E(t.slice(0,4)))try{i=r.decode([\"string\"],t.slice(4))[0],o={signature:\"Error(string)\",name:\"Error\",args:[i]},s+=`: ${JSON.stringify(i)}`}catch(t){s+=\" (could not decode reason; invalid string data)\"}else if(\"0x4e487b71\"===E(t.slice(0,4)))try{const e=Number(r.decode([\"uint256\"],t.slice(4))[0]);o={signature:\"Panic(uint256)\",name:\"Panic\",args:[e]},i=`Panic due to ${yn.get(e)||\"UNKNOWN\"}(${e})`,s+=`: ${i}`}catch(t){s+=\" (could not decode panic code)\"}else s+=\" (unknown custom error)\"}const a={to:e.to?Wt(e.to):null,data:e.data||\"0x\"};return e.from&&(a.from=Wt(e.from)),u(s,\"CALL_EXCEPTION\",{action:t,data:n,reason:i,transaction:a,invocation:null,revert:o})}(t,e,n,En.defaultAbiCoder())}}function kn(t){return t&&\"function\"==typeof t.getAddress}async function Pn(t,e){const n=await e;return null!=n&&\"0x0000000000000000000000000000000000000000\"!==n||(h(\"string\"!=typeof t,\"unconfigured name\",\"UNCONFIGURED_NAME\",{value:t}),f(!1,\"invalid AddressLike value; did not resolve to a value address\",\"target\",t)),Wt(n)}function xn(t,e){return\"string\"==typeof t?t.match(/^0x[0-9a-f]{40}$/i)?Wt(t):(h(null!=e,\"ENS resolution requires a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\"}),Pn(t,e.resolveName(t))):kn(t)?Pn(t,t.getAddress()):t&&\"function\"==typeof t.then?Pn(t,t):void f(!1,\"unsupported addressable value\",\"target\",t)}const Nn=new Uint8Array(32);Nn.fill(0);const Bn=BigInt(-1),In=BigInt(0),Cn=BigInt(1),On=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");const Rn=M(Cn,32),Tn=M(In,32),Sn={name:\"string\",version:\"string\",chainId:\"uint256\",verifyingContract:\"address\",salt:\"bytes32\"},Fn=[\"name\",\"version\",\"chainId\",\"verifyingContract\",\"salt\"];function Un(t){return function(e){return f(\"string\"==typeof e,`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Dn={name:Un(\"name\"),version:Un(\"version\"),chainId:function(t){const e=S(t,\"domain.chainId\");return f(e>=0,\"invalid chain ID\",\"domain.chainId\",t),Number.isSafeInteger(e)?Number(e):H(e)},verifyingContract:function(t){try{return Wt(t).toLowerCase()}catch(t){}f(!1,'invalid domain value \"verifyingContract\"',\"domain.verifyingContract\",t)},salt:function(t){const e=y(t,\"domain.salt\");return f(32===e.length,'invalid domain value \"salt\"',\"domain.salt\",t),E(e)}};function Ln(t){{const e=t.match(/^(u?)int(\\d+)$/);if(e){const n=\"\"===e[1],r=parseInt(e[2]);f(r%8==0&&0!==r&&r\u003C=256&&e[2]===String(r),\"invalid numeric width\",\"type\",t);const s=T(On,n?r-1:r),i=n?(s+Cn)*Bn:In;return function(e){const r=S(e,\"value\");return f(r>=i&&r\u003C=s,`value out-of-bounds for ${t}`,\"value\",r),M(n?R(r,256):r,32)}}}{const e=t.match(/^bytes(\\d+)$/);if(e){const n=parseInt(e[1]);return f(0!==n&&n\u003C=32&&e[1]===String(n),\"invalid bytes width\",\"type\",t),function(e){return f(y(e).length===n,`invalid length for ${t}`,\"value\",e),function(t){const e=y(t),n=e.length%32;return n?k([e,Nn.slice(n)]):E(e)}(e)}}}switch(t){case\"address\":return function(t){return B(Wt(t),32)};case\"bool\":return function(t){return t?Rn:Tn};case\"bytes\":return function(t){return jt(t)};case\"string\":return function(t){return Pe(t)}}return null}function Mn(t,e){return`${t}(${e.map((({name:t,type:e})=>e+\" \"+t)).join(\",\")})`}function Gn(t){const e=t.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}class Hn{primaryType;#g;get types(){return JSON.parse(this.#g)}#m;#y;constructor(t){this.#m=new Map,this.#y=new Map;const e=new Map,n=new Map,r=new Map,s={};Object.keys(t).forEach((i=>{s[i]=t[i].map((({name:e,type:n})=>{let{base:r,index:s}=Gn(n);return\"int\"!==r||t.int||(r=\"int256\"),\"uint\"!==r||t.uint||(r=\"uint256\"),{name:e,type:r+(s||\"\")}})),e.set(i,new Set),n.set(i,[]),r.set(i,new Set)})),this.#g=JSON.stringify(s);for(const r in s){const i=new Set;for(const o of s[r]){f(!i.has(o.name),`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(r)}`,\"types\",t),i.add(o.name);const s=Gn(o.type).base;f(s!==r,`circular type reference to ${JSON.stringify(s)}`,\"types\",t);Ln(s)||(f(n.has(s),`unknown type ${JSON.stringify(s)}`,\"types\",t),n.get(s).push(r),e.get(r).add(s))}}const i=Array.from(n.keys()).filter((t=>0===n.get(t).length));f(0!==i.length,\"missing primary type\",\"types\",t),f(1===i.length,`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(\", \")}`,\"types\",t),o(this,{primaryType:i[0]}),function s(i,o){f(!o.has(i),`circular type reference to ${JSON.stringify(i)}`,\"types\",t),o.add(i);for(const t of e.get(i))if(n.has(t)){s(t,o);for(const e of o)r.get(e).add(t)}o.delete(i)}(this.primaryType,new Set);for(const[t,e]of r){const n=Array.from(e);n.sort(),this.#m.set(t,Mn(t,s[t])+n.map((t=>Mn(t,s[t]))).join(\"\"))}}getEncoder(t){let e=this.#y.get(t);return e||(e=this.#w(t),this.#y.set(t,e)),e}#w(t){{const e=Ln(t);if(e)return e}const e=Gn(t).array;if(e){const t=e.prefix,n=this.getEncoder(t);return r=>{f(-1===e.count||e.count===r.length,`array length mismatch; expected length ${e.count}`,\"value\",r);let s=r.map(n);return this.#m.has(t)&&(s=s.map(jt)),jt(k(s))}}const n=this.types[t];if(n){const e=Pe(this.#m.get(t));return t=>{const r=n.map((({name:e,type:n})=>{const r=this.getEncoder(n)(t[e]);return this.#m.has(n)?jt(r):r}));return r.unshift(e),k(r)}}f(!1,`unknown type: ${t}`,\"type\",t)}encodeType(t){const e=this.#m.get(t);return f(e,`unknown type: ${JSON.stringify(t)}`,\"name\",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return jt(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,n){if(Ln(t))return n(t,e);const r=Gn(t).array;if(r)return f(-1===r.count||r.count===e.length,`array length mismatch; expected length ${r.count}`,\"value\",e),e.map((t=>this._visit(r.prefix,t,n)));const s=this.types[t];if(s)return s.reduce(((t,{name:r,type:s})=>(t[r]=this._visit(s,e[r],n),t)),{});f(!1,`unknown type: ${t}`,\"type\",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new Hn(t)}static getPrimaryType(t){return Hn.from(t).primaryType}static hashStruct(t,e,n){return Hn.from(e).hashStruct(t,n)}static hashDomain(t){const e=[];for(const n in t){if(null==t[n])continue;const r=Sn[n];f(r,`invalid typed-data domain key: ${JSON.stringify(n)}`,\"domain\",t),e.push({name:n,type:r})}return e.sort(((t,e)=>Fn.indexOf(t.name)-Fn.indexOf(e.name))),Hn.hashStruct(\"EIP712Domain\",{EIP712Domain:e},t)}static encode(t,e,n){return k([\"0x1901\",Hn.hashDomain(t),Hn.from(e).hash(n)])}static hash(t,e,n){return jt(Hn.encode(t,e,n))}static async resolveNames(t,e,n,r){t=Object.assign({},t);for(const e in t)null==t[e]&&delete t[e];const s={};t.verifyingContract&&!b(t.verifyingContract,20)&&(s[t.verifyingContract]=\"0x\");const i=Hn.from(e);i.visit(n,((t,e)=>(\"address\"!==t||b(e,20)||(s[e]=\"0x\"),e)));for(const t in s)s[t]=await r(t);return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),{domain:t,value:n=i.visit(n,((t,e)=>\"address\"===t&&s[e]?s[e]:e))}}static getPayload(t,e,n){Hn.hashDomain(t);const r={},s=[];Fn.forEach((e=>{const n=t[e];null!=n&&(r[e]=Dn[e](n),s.push({name:e,type:Sn[e]}))}));const i=Hn.from(e);e=i.types;const o=Object.assign({},e);return f(null==o.EIP712Domain,\"types must not contain EIP712Domain type\",\"types.EIP712Domain\",e),o.EIP712Domain=s,i.encode(n),{types:o,domain:r,primaryType:i.primaryType,message:i.visit(n,((t,e)=>{if(t.match(/^bytes(\\d*)/))return E(y(e));if(t.match(/^u?int/))return S(e).toString();switch(t){case\"address\":return e.toLowerCase();case\"bool\":return!!e;case\"string\":return f(\"string\"==typeof e,\"invalid string\",\"value\",e),e}f(!1,\"unsupported type\",\"type\",t)}))}}}function Qn(t,e){return{address:Wt(t),storageKeys:e.map(((t,e)=>(f(b(t,32),\"invalid slot\",`storageKeys[${e}]`,t),t.toLowerCase())))}}function jn(t){if(Array.isArray(t))return t.map(((e,n)=>Array.isArray(e)?(f(2===e.length,\"invalid slot set\",`value[${n}]`,e),Qn(e[0],e[1])):(f(null!=e&&\"object\"==typeof e,\"invalid address-slot set\",\"value\",t),Qn(e.address,e.storageKeys))));f(null!=t&&\"object\"==typeof t,\"invalid access list\",\"value\",t);const e=Object.keys(t).map((e=>{const n=t[e].reduce(((t,e)=>(t[e]=!0,t)),{});return Qn(e,Object.keys(n).sort())}));return e.sort(((t,e)=>t.address.localeCompare(e.address))),e}function Vn(t){return async function(t,e){h(null==e||!e.cancelled,\"request cancelled before sending\",\"CANCELLED\");const n=t.url.split(\":\")[0].toLowerCase();h(\"http\"===n||\"https\"===n,`unsupported protocol ${n}`,\"UNSUPPORTED_OPERATION\",{info:{protocol:n},operation:\"request\"}),h(\"https\"===n||!t.credentials||t.allowInsecureAuthentication,\"insecure authorized connections unsupported\",\"UNSUPPORTED_OPERATION\",{operation:\"request\"});let r=null;const s=new AbortController,i=setTimeout((()=>{r=u(\"request timeout\",\"TIMEOUT\"),s.abort()}),t.timeout);e&&e.addListener((()=>{r=u(\"request cancelled\",\"CANCELLED\"),s.abort()}));const o={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal};let a;try{a=await fetch(t.url,o)}catch(t){if(clearTimeout(i),r)throw r;throw t}clearTimeout(i);const c={};a.headers.forEach(((t,e)=>{c[e.toLowerCase()]=t}));const l=await a.arrayBuffer(),f=null==l?null:new Uint8Array(l);return{statusCode:a.status,statusMessage:a.statusText,headers:c,body:f}}}Vn();let Jn=Vn();const zn=new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\",\"i\"),Kn=new RegExp(\"^ipfs://(ipfs/)?(.*)$\",\"i\");let qn=!1;async function _n(t,e){try{const e=t.match(zn);if(!e)throw new Error(\"invalid data\");return new er(200,\"OK\",{\"content-type\":e[1]||\"text/plain\"},e[2]?function(t){t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n\u003Ct.length;n++)e[n]=t.charCodeAt(n);return y(e)}(e[3]):Ae(e[3].replace(/%([0-9a-f][0-9a-f])/gi,((t,e)=>String.fromCharCode(parseInt(e,16))))))}catch(e){return new er(599,\"BAD REQUEST (invalid data: URI)\",{},null,new tr(t))}}function Zn(t){return async function(e,n){try{const n=e.match(Kn);if(!n)throw new Error(\"invalid link\");return new tr(`${t}${n[2]}`)}catch(t){return new er(599,\"BAD REQUEST (invalid IPFS URI)\",{},null,new tr(e))}}}const Wn={data:_n,ipfs:Zn(\"https://gateway.ipfs.io/ipfs/\")},Yn=new WeakMap;class Xn{#b;#A;constructor(t){this.#b=[],this.#A=!1,Yn.set(t,(()=>{if(!this.#A){this.#A=!0;for(const t of this.#b)setTimeout((()=>{t()}),0);this.#b=[]}}))}addListener(t){h(!this.#A,\"singal already cancelled\",\"UNSUPPORTED_OPERATION\",{operation:\"fetchCancelSignal.addCancelListener\"}),this.#b.push(t)}get cancelled(){return this.#A}checkSignal(){h(!this.cancelled,\"cancelled\",\"CANCELLED\",{})}}function $n(t){if(null==t)throw new Error(\"missing signal; should not happen\");return t.checkSignal(),t}class tr{#v;#E;#k;#P;#x;#N;#B;#I;#C;#O;#R;#T;#S;#F;#U;get url(){return this.#N}set url(t){this.#N=String(t)}get body(){return null==this.#B?null:new Uint8Array(this.#B)}set body(t){if(null==t)this.#B=void 0,this.#I=void 0;else if(\"string\"==typeof t)this.#B=Ae(t),this.#I=\"text/plain\";else if(t instanceof Uint8Array)this.#B=t,this.#I=\"application/octet-stream\";else{if(\"object\"!=typeof t)throw new Error(\"invalid body\");this.#B=Ae(JSON.stringify(t)),this.#I=\"application/json\"}}hasBody(){return null!=this.#B}get method(){return this.#P?this.#P:this.hasBody()?\"POST\":\"GET\"}set method(t){null==t&&(t=\"\"),this.#P=String(t).toUpperCase()}get headers(){const t=Object.assign({},this.#k);return this.#C&&(t.authorization=`Basic ${function(t){const e=y(t);let n=\"\";for(let t=0;t\u003Ce.length;t++)n+=String.fromCharCode(e[t]);return btoa(n)}(Ae(this.#C))}`),this.allowGzip&&(t[\"accept-encoding\"]=\"gzip\"),null==t[\"content-type\"]&&this.#I&&(t[\"content-type\"]=this.#I),this.body&&(t[\"content-length\"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){this.#k[String(t).toLowerCase()]=String(e)}clearHeaders(){this.#k={}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n\u003Ce.length){const r=e[n++];return{value:[r,t[r]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#C||null}setCredentials(t,e){f(!t.match(/:/),\"invalid basic authentication username\",\"username\",\"[REDACTED]\"),this.#C=`${t}:${e}`}get allowGzip(){return this.#E}set allowGzip(t){this.#E=!!t}get allowInsecureAuthentication(){return!!this.#v}set allowInsecureAuthentication(t){this.#v=!!t}get timeout(){return this.#x}set timeout(t){f(t>=0,\"timeout must be non-zero\",\"timeout\",t),this.#x=t}get preflightFunc(){return this.#O||null}set preflightFunc(t){this.#O=t}get processFunc(){return this.#R||null}set processFunc(t){this.#R=t}get retryFunc(){return this.#T||null}set retryFunc(t){this.#T=t}get getUrlFunc(){return this.#U||Jn}set getUrlFunc(t){this.#U=t}constructor(t){this.#N=String(t),this.#v=!1,this.#E=!0,this.#k={},this.#P=\"\",this.#x=3e5,this.#F={slotInterval:250,maxAttempts:12},this.#U=null}toString(){return`\u003CFetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#B?E(this.#B):\"null\"}>`}setThrottleParams(t){null!=t.slotInterval&&(this.#F.slotInterval=t.slotInterval),null!=t.maxAttempts&&(this.#F.maxAttempts=t.maxAttempts)}async#D(t,e,n,r,s){if(t>=this.#F.maxAttempts)return s.makeServerError(\"exceeded maximum retry limit\");h(nr()\u003C=e,\"timeout\",\"TIMEOUT\",{operation:\"request.send\",reason:\"timeout\",request:r}),n>0&&await function(t){return new Promise((e=>setTimeout(e,t)))}(n);let i=this.clone();const o=(i.url.split(\":\")[0]||\"\").toLowerCase();if(o in Wn){const t=await Wn[o](i.url,$n(r.#S));if(t instanceof er){let e=t;if(this.processFunc){$n(r.#S);try{e=await this.processFunc(i,e)}catch(t){null!=t.throttle&&\"number\"==typeof t.stall||e.makeServerError(\"error in post-processing function\",t).assertOk()}}return e}i=t}this.preflightFunc&&(i=await this.preflightFunc(i));const a=await this.getUrlFunc(i,$n(r.#S));let c=new er(a.statusCode,a.statusMessage,a.headers,a.body,r);if(301===c.statusCode||302===c.statusCode){try{const n=c.headers.location||\"\";return i.redirect(n).#D(t+1,e,0,r,c)}catch(t){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(i,c,t))){const n=c.headers[\"retry-after\"];let s=this.#F.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return\"string\"==typeof n&&n.match(/^[1-9][0-9]*$/)&&(s=parseInt(n)),i.clone().#D(t+1,e,s,r,c)}if(this.processFunc){$n(r.#S);try{c=await this.processFunc(i,c)}catch(n){null!=n.throttle&&\"number\"==typeof n.stall||c.makeServerError(\"error in post-processing function\",n).assertOk();let s=this.#F.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return n.stall>=0&&(s=n.stall),i.clone().#D(t+1,e,s,r,c)}}return c}send(){return h(null==this.#S,\"request already sent\",\"UNSUPPORTED_OPERATION\",{operation:\"fetchRequest.send\"}),this.#S=new Xn(this),this.#D(0,nr()+this.timeout,0,this,new er(0,\"\",{},null,this))}cancel(){h(null!=this.#S,\"request has not been sent\",\"UNSUPPORTED_OPERATION\",{operation:\"fetchRequest.cancel\"});const t=Yn.get(this);if(!t)tײ?��hrow new Error(\"missing signal; should not happen\");t()}redirect(t){const e=this.url.split(\":\")[0].toLowerCase(),n=t.split(\":\")[0].toLowerCase();h(\"GET\"===this.method&&(\"https\"!==e||\"http\"!==n)&&t.match(/^https?:/),\"unsupported redirect\",\"UNSUPPORTED_OPERATION\",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const r=new tr(t);return r.method=\"GET\",r.allowGzip=this.allowGzip,r.timeout=this.timeout,r.#k=Object.assign({},this.#k),this.#B&&(r.#B=new Uint8Array(this.#B)),r.#I=this.#I,r}clone(){const t=new tr(this.url);return t.#P=this.#P,this.#B&&(t.#B=this.#B),t.#I=this.#I,t.#k=Object.assign({},this.#k),t.#C=this.#C,this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),t.#O=this.#O,t.#R=this.#R,t.#T=this.#T,t.#F=Object.assign({},this.#F),t.#U=this.#U,t}static lockConfig(){qn=!0}static getGateway(t){return Wn[t.toLowerCase()]||null}static registerGateway(t,e){if(\"http\"===(t=t.toLowerCase())||\"https\"===t)throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(qn)throw new Error(\"gateways locked\");Wn[t]=e}static registerGetUrl(t){if(qn)throw new Error(\"gateways locked\");Jn=t}static createGetUrlFunc(t){return Vn()}static createDataGateway(){return _n}static createIpfsGatewayFunc(t){return Zn(t)}}class er{#L;#M;#k;#B;#G;#H;toString(){return`\u003CFetchResponse status=${this.statusCode} body=${this.#B?E(this.#B):\"null\"}>`}get statusCode(){return this.#L}get statusMessage(){return this.#M}get headers(){return Object.assign({},this.#k)}get body(){return null==this.#B?null:new Uint8Array(this.#B)}get bodyText(){try{return null==this.#B?\"\":ve(this.#B)}catch(t){h(!1,\"response body is not valid UTF-8 data\",\"UNSUPPORTED_OPERATION\",{operation:\"bodyText\",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(t){h(!1,\"response body is not valid JSON\",\"UNSUPPORTED_OPERATION\",{operation:\"bodyJson\",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n\u003Ce.length){const r=e[n++];return{value:[r,t[r]],done:!1}}return{value:void 0,done:!0}}}}constructor(t,e,n,r,s){this.#L=t,this.#M=e,this.#k=Object.keys(n).reduce(((t,e)=>(t[e.toLowerCase()]=String(n[e]),t)),{}),this.#B=null==r?null:new Uint8Array(r),this.#G=s||null,this.#H={message:\"\"}}makeServerError(t,e){let n;n=t?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:`CLIENT ESCALATED SERVER ERROR (${t=`${this.statusCode} ${this.statusMessage}`})`;const r=new er(599,n,this.headers,this.body,this.#G||void 0);return r.#H={message:t,error:e},r}throwThrottleError(t,e){null==e?e=-1:f(Number.isInteger(e)&&e>=0,\"invalid stall timeout\",\"stall\",e);const n=new Error(t||\"throttling requests\");throw o(n,{stall:e,throttle:!0}),n}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return null!=this.#B}get request(){return this.#G}ok(){return\"\"===this.#H.message&&this.statusCode>=200&&this.statusCode\u003C300}assertOk(){if(this.ok())return;let{message:t,error:e}=this.#H;\"\"===t&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let r=null;try{this.#B&&(r=ve(this.#B))}catch(t){}h(!1,t,\"SERVER_ERROR\",{request:this.request||\"unknown request\",response:this,error:e,info:{requestUrl:n,responseBody:r,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function nr(){return(new Date).getTime()}const rr=\"0x0000000000000000000000000000000000000000\";class sr{fragment;name;signature;topic;args;constructor(t,e,n){const r=t.name,s=t.format();o(this,{fragment:t,name:r,signature:s,topic:e,args:n})}}class ir{fragment;name;args;signature;selector;value;constructor(t,e,n,r){const s=t.name,i=t.format();o(this,{fragment:t,name:s,args:n,signature:i,selector:e,value:r})}}class or{fragment;name;args;signature;selector;constructor(t,e,n){const r=t.name,s=t.format();o(this,{fragment:t,name:r,args:n,signature:s,selector:e})}}class ar{hash;_isIndexed;static isIndexed(t){return!(!t||!t._isIndexed)}constructor(t){o(this,{hash:t,_isIndexed:!0})}}const cr={0:\"generic panic\",1:\"assert(false)\",17:\"arithmetic overflow\",18:\"division or modulo by zero\",33:\"enum overflow\",34:\"invalid encoded storage byte array accessed\",49:\"out-of-bounds array access; popping on an empty array\",50:\"out-of-bounds access of an array or bytesN\",65:\"out of memory\",81:\"uninitialized function\"},lr={\"0x08c379a0\":{signature:\"Error(string)\",name:\"Error\",inputs:[\"string\"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},\"0x4e487b71\":{signature:\"Panic(uint256)\",name:\"Panic\",inputs:[\"uint256\"],reason:t=>{let e=\"unknown panic code\";return t>=0&&t\u003C=255&&cr[t.toString()]&&(e=cr[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};class ur{fragments;deploy;fallback;receive;#Q;#j;#V;#J;constructor(t){let e=[];e=\"string\"==typeof t?JSON.parse(t):t,this.#V=new Map,this.#Q=new Map,this.#j=new Map;const n=[];for(const t of e)try{n.push(cn.from(t))}catch(e){console.log(`[Warning] Invalid Fragment ${JSON.stringify(t)}:`,e.message)}o(this,{fragments:Object.freeze(n)});let r=null,s=!1;this.#J=this.getAbiCoder(),this.fragments.forEach(((t,e)=>{let n;switch(t.type){case\"constructor\":return this.deploy?void console.log(\"duplicate definition - constructor\"):void o(this,{deploy:t});case\"fallback\":return void(0===t.inputs.length?s=!0:(f(!r||t.payable!==r.payable,\"conflicting fallback fragments\",`fragments[${e}]`,t),r=t,s=r.payable));case\"function\":n=this.#V;break;case\"event\":n=this.#j;break;case\"error\":n=this.#Q;break;default:return}const i=t.format();n.has(i)||n.set(i,t)})),this.deploy||o(this,{deploy:dn.from(\"constructor()\")}),o(this,{fallback:r,receive:s})}format(t){const e=t?\"minimal\":\"full\";return this.fragments.map((t=>t.format(e)))}formatJson(){const t=this.fragments.map((t=>t.format(\"json\")));return JSON.stringify(t.map((t=>JSON.parse(t))))}getAbiCoder(){return En.defaultAbiCoder()}#z(t,e,n){if(b(t)){const e=t.toLowerCase();for(const t of this.#V.values())if(e===t.selector)return t;return null}if(-1===t.indexOf(\"(\")){const r=[];for(const[e,n]of this.#V)e.split(\"(\")[0]===t&&r.push(n);if(e){const t=e.length>0?e[e.length-1]:null;let n=e.length,s=!0;ee.isTyped(t)&&\"overrides\"===t.type&&(s=!1,n--);for(let t=r.length-1;t>=0;t--){const e=r[t].inputs.length;e===n||s&&e===n-1||r.splice(t,1)}for(let t=r.length-1;t>=0;t--){const n=r[t].inputs;for(let s=0;s\u003Ce.length;s++)if(ee.isTyped(e[s])){if(s>=n.length){if(\"overrides\"===e[s].type)continue;r.splice(t,1);break}if(e[s].type!==n[s].baseType){r.splice(t,1);break}}}}if(1===r.length&&e&&e.length!==r[0].inputs.length){const t=e[e.length-1];(null==t||Array.isArray(t)||\"object\"!=typeof t)&&r.splice(0,1)}if(0===r.length)return null;if(r.length>1&&n){f(!1,`ambiguous function description (i.e. matches ${r.map((t=>JSON.stringify(t.format()))).join(\", \")})`,\"key\",t)}return r[0]}const r=this.#V.get(gn.from(t).format());return r||null}getFunctionName(t){const e=this.#z(t,null,!1);return f(e,\"no matching function\",\"key\",t),e.name}hasFunction(t){return!!this.#z(t,null,!1)}getFunction(t,e){return this.#z(t,e||null,!0)}forEachFunction(t){const e=Array.from(this.#V.keys());e.sort(((t,e)=>t.localeCompare(e)));for(let n=0;n\u003Ce.length;n++){const r=e[n];t(this.#V.get(r),n)}}#K(t,e,n){if(b(t)){const e=t.toLowerCase();for(const t of this.#j.values())if(e===t.topicHash)return t;return null}if(-1===t.indexOf(\"(\")){const r=[];for(const[e,n]of this.#j)e.split(\"(\")[0]===t&&r.push(n);if(e){for(let t=r.length-1;t>=0;t--)r[t].inputs.length\u003Ce.length&&r.splice(t,1);for(let t=r.length-1;t>=0;t--){const n=r[t].inputs;for(let s=0;s\u003Ce.length;s++)if(ee.isTyped(e[s])&&e[s].type!==n[s].baseType){r.splice(t,1);break}}}if(0===r.length)return null;if(r.length>1&&n){f(!1,`ambiguous event description (i.e. matches ${r.map((t=>JSON.stringify(t.format()))).join(\", \")})`,\"key\",t)}return r[0]}const r=this.#j.get(fn.from(t).format());return r||null}getEventName(t){const e=this.#K(t,null,!1);return f(e,\"no matching event\",\"key\",t),e.name}hasEvent(t){return!!this.#K(t,null,!1)}getEvent(t,e){return this.#K(t,e||null,!0)}forEachEvent(t){const e=Array.from(this.#j.keys());e.sort(((t,e)=>t.localeCompare(e)));for(let n=0;n\u003Ce.length;n++){const r=e[n];t(this.#j.get(r),n)}}getError(t,e){if(b(t)){const e=t.toLowerCase();if(lr[e])return hn.from(lr[e].signature);for(const t of this.#Q.values())if(e===t.selector)return t;return null}if(-1===t.indexOf(\"(\")){const e=[];for(const[n,r]of this.#Q)n.split(\"(\")[0]===t&&e.push(r);if(0===e.length)return\"Error\"===t?hn.from(\"error Error(string)\"):\"Panic\"===t?hn.from(\"error Panic(uint256)\"):null;if(e.length>1){f(!1,`ambiguous error description (i.e. ${e.map((t=>JSON.stringify(t.format()))).join(\", \")})`,\"name\",t)}return e[0]}if(\"Error(string)\"===(t=hn.from(t).format()))return hn.from(\"error Error(string)\");if(\"Panic(uint256)\"===t)return hn.from(\"error Panic(uint256)\");const n=this.#Q.get(t);return n||null}forEachError(t){const e=Array.from(this.#Q.keys());e.sort(((t,e)=>t.localeCompare(e)));for(let n=0;n\u003Ce.length;n++){const r=e[n];t(this.#Q.get(r),n)}}_decodeParams(t,e){return this.#J.decode(t,e)}_encodeParams(t,e){return this.#J.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){if(\"string\"==typeof t){const e=this.getError(t);f(e,\"unknown error\",\"fragment\",t),t=e}return f(x(e,0,4)===t.selector,`data signature does not match error ${t.name}.`,\"data\",e),this._decodeParams(t.inputs,x(e,4))}encodeErrorResult(t,e){if(\"string\"==typeof t){const e=this.getError(t);f(e,\"unknown error\",\"fragment\",t),t=e}return k([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionData(t,e){if(\"string\"==typeof t){const e=this.getFunction(t);f(e,\"unknown function\",\"fragment\",t),t=e}return f(x(e,0,4)===t.selector,`data signature does not match function ${t.name}.`,\"data\",e),this._decodeParams(t.inputs,x(e,4))}encodeFunctionData(t,e){if(\"string\"==typeof t){const e=this.getFunction(t);f(e,\"unknown function\",\"fragment\",t),t=e}return k([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionResult(t,e){if(\"string\"==typeof t){const e=this.getFunction(t);f(e,\"unknown function\",\"fragment\",t),t=e}let n=\"invalid length for result data\";const r=w(e);if(r.length%32==0)try{return this.#J.decode(t.outputs,r)}catch(t){n=\"could not decode result data\"}h(!1,n,\"BAD_DATA\",{value:E(r),info:{method:t.name,signature:t.format()}})}makeError(t,e){const n=y(t,\"data\"),r=En.getBuiltinCallException(\"call\",e,n);if(r.message.startsWith(\"execution reverted (unknown custom error)\")){const t=E(n.slice(0,4)),e=this.getError(t);if(e)try{const t=this.#J.decode(e.inputs,n.slice(4));r.revert={name:e.name,signature:e.format(),args:t},r.reason=r.revert.signature,r.message=`execution reverted: ${r.reason}`}catch(t){r.message=\"execution reverted (coult not decode custom error)\"}}const s=this.parseTransaction(e);return s&&(r.invocation={method:s.name,signature:s.signature,args:s.args}),r}encodeFunctionResult(t,e){if(\"string\"==typeof t){const e=this.getFunction(t);f(e,\"unknown function\",\"fragment\",t),t=e}return E(this.#J.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){if(\"string\"==typeof t){const e=this.getEvent(t);f(e,\"unknown event\",\"eventFragment\",t),t=e}h(e.length\u003C=t.inputs.length,`too many arguments for ${t.format()}`,\"UNEXPECTED_ARGUMENT\",{count:e.length,expectedCount:t.inputs.length});const n=[];t.anonymous||n.push(t.topicHash);const r=(t,e)=>\"string\"===t.type?Pe(e):\"bytes\"===t.type?jt(E(e)):(\"bool\"===t.type&&\"boolean\"==typeof e?e=e?\"0x01\":\"0x00\":t.type.match(/^u?int/)?e=M(e):t.type.match(/^bytes/)?e=N(e,32,!1):\"address\"===t.type&&this.#J.encode([\"address\"],[e]),B(E(e),32));for(e.forEach(((e,s)=>{const i=t.inputs[s];i.indexed?null==e?n.push(null):\"array\"===i.baseType||\"tuple\"===i.baseType?f(!1,\"filtering with tuples or arrays not supported\",\"contract.\"+i.name,e):Array.isArray(e)?n.push(e.map((t=>r(i,t)))):n.push(r(i,e)):f(null==e,\"cannot filter non-indexed parameters; must be null\",\"contract.\"+i.name,e)}));n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(t,e){if(\"string\"==typeof t){const e=this.getEvent(t);f(e,\"unknown event\",\"eventFragment\",t),t=e}const n=[],r=[],s=[];return t.anonymous||n.push(t.topicHash),f(e.length===t.inputs.length,\"event arguments/values mismatch\",\"values\",e),t.inputs.forEach(((t,i)=>{const o=e[i];if(t.indexed)if(\"string\"===t.type)n.push(Pe(o));else if(\"bytes\"===t.type)n.push(jt(o));else{if(\"tuple\"===t.baseType||\"array\"===t.baseType)throw new Error(\"not implemented\");n.push(this.#J.encode([t.type],[o]))}else r.push(t),s.push(o)})),{data:this.#J.encode(r,s),topics:n}}decodeEventLog(t,e,n){if(\"string\"==typeof t){const e=this.getEvent(t);f(e,\"unknown event\",\"eventFragment\",t),t=e}if(null!=n&&!t.anonymous){const e=t.topicHash;f(b(n[0],32)&&n[0].toLowerCase()===e,\"fragment/topic mismatch\",\"topics[0]\",n[0]),n=n.slice(1)}const r=[],s=[],i=[];t.inputs.forEach(((t,e)=>{t.indexed?\"string\"===t.type||\"bytes\"===t.type||\"tuple\"===t.baseType||\"array\"===t.baseType?(r.push(an.from({type:\"bytes32\",name:t.name})),i.push(!0)):(r.push(t),i.push(!1)):(s.push(t),i.push(!1))}));const o=null!=n?this.#J.decode(r,k(n)):null,a=this.#J.decode(s,e,!0),c=[],l=[];let u=0,h=0;return t.inputs.forEach(((t,e)=>{let n=null;if(t.indexed)if(null==o)n=new ar(null);else if(i[e])n=new ar(o[h++]);else try{n=o[h++]}catch(t){n=t}else try{n=a[u++]}catch(t){n=t}c.push(n),l.push(t.name||null)})),W.fromItems(c,l)}parseTransaction(t){const e=y(t.data,\"tx.data\"),n=S(null!=t.value?t.value:0,\"tx.value\"),r=this.getFunction(E(e.slice(0,4)));if(!r)return null;const s=this.#J.decode(r.inputs,e.slice(4));return new ir(r,r.selector,s,n)}parseCallResult(t){throw new Error(\"@TODO\")}parseLog(t){const e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new sr(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){const e=E(t),n=this.getError(x(e,0,4));if(!n)return null;const r=this.#J.decode(n.inputs,x(e,4));return new or(n,n.selector,r)}static from(t){return t instanceof ur?t:\"string\"==typeof t?new ur(JSON.parse(t)):\"function\"==typeof t.formatJson?new ur(t.formatJson()):\"function\"==typeof t.format?new ur(t.format(\"json\")):new ur(t)}}const hr=BigInt(0);function fr(t){return null==t?null:t}function dr(t){return null==t?null:t.toString()}class pr{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(t,e,n){o(this,{gasPrice:fr(t),maxFeePerGas:fr(e),maxPriorityFeePerGas:fr(n)})}toJSON(){const{gasPrice:t,maxFeePerGas:e,maxPriorityFeePerGas:n}=this;return{_type:\"FeeData\",gasPrice:dr(t),maxFeePerGas:dr(e),maxPriorityFeePerGas:dr(n)}}}function gr(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=E(t.data));const n=\"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);for(const r of n)r in t&&null!=t[r]&&(e[r]=S(t[r],`request.${r}`));const r=\"type,nonce\".split(/,/);for(const n of r)n in t&&null!=t[n]&&(e[n]=L(t[n],`request.${n}`));return t.accessList&&(e.accessList=jn(t.accessList)),\"blockTag\"in t&&(e.blockTag=t.blockTag),\"enableCcipRead\"in t&&(e.enableCcipRead=!!t.enableCcipRead),\"customData\"in t&&(e.customData=t.customData),\"blobVersionedHashes\"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),\"kzg\"in t&&(e.kzg=t.kzg),\"blobs\"in t&&t.blobs&&(e.blobs=t.blobs.map((t=>A(t)?E(t):Object.assign({},t)))),e}class mr{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#q;constructor(t,e){this.#q=t.transactions.map((t=>\"string\"!=typeof t?new br(t,e):t)),o(this,{provider:e,hash:fr(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,parentBeaconBlockRoot:t.parentBeaconBlockRoot,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,blobGasUsed:t.blobGasUsed,excessBlobGas:t.excessBlobGas,miner:t.miner,prevRandao:fr(t.prevRandao),extraData:t.extraData,baseFeePerGas:fr(t.baseFeePerGas),stateRoot:t.stateRoot,receiptsRoot:t.receiptsRoot})}get transactions(){return this.#q.map((t=>\"string\"==typeof t?t:t.hash))}get prefetchedTransactions(){const t=this.#q.slice();return 0===t.length?[]:(h(\"object\"==typeof t[0],\"transactions were not prefetched with block request\",\"UNSUPPORTED_OPERATION\",{operation:\"transactionResponses()\"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:e,extraData:n,gasLimit:r,gasUsed:s,hash:i,miner:o,prevRandao:a,nonce:c,number:l,parentHash:u,parentBeaconBlockRoot:h,stateRoot:f,receiptsRoot:d,timestamp:p,transactions:g}=this;return{_type:\"Block\",baseFeePerGas:dr(t),difficulty:dr(e),extraData:n,gasLimit:dr(r),gasUsed:dr(s),blobGasUsed:dr(this.blobGasUsed),excessBlobGas:dr(this.excessBlobGas),hash:i,miner:o,prevRandao:a,nonce:c,number:l,parentHash:u,timestamp:p,parentBeaconBlockRoot:h,stateRoot:f,receiptsRoot:d,transactions:g}}[Symbol.iterator](){let t=0;const e=this.transactions;return{next:()=>t\u003Cthis.length?{value:e[t++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#q.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(t){let e;if(\"number\"==typeof t)e=this.#q[t];else{const n=t.toLowerCase();for(const t of this.#q){if(\"string\"==typeof t){if(t!==n)continue;e=t;break}if(t.hash!==n){e=t;break}}}if(null==e)throw new Error(\"no such tx\");return\"string\"==typeof e?await this.provider.getTransaction(e):e}getPrefetchedTransaction(t){const e=this.prefetchedTransactions;if(\"number\"==typeof t)return e[t];t=t.toLowerCase();for(const n of e)if(n.hash===t)return n;f(!1,\"no matching transaction\",\"indexOrHash\",t)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error(\"\");return{orphan:\"drop-block\",hash:(t=this).hash,number:t.number};var t}}class yr{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;const n=Object.freeze(t.topics.slice());o(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:n,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){const{address:t,blockHash:e,blockNumber:n,data:r,index:s,removed:i,topics:o,transactionHash:a,transactionIndex:c}=this;return{_type:\"log\",address:t,blockHash:e,blockNumber:n,data:r,index:s,removed:i,topics:o,transactionHash:a,transactionIndex:c}}async getBlock(){const t=await this.provider.getBlock(this.blockHash);return h(!!t,\"failed to find transaction\",\"UNKNOWN_ERROR\",{}),t}async getTransaction(){const t=await this.provider.getTransaction(this.transactionHash);return h(!!t,\"failed to find transaction\",\"UNKNOWN_ERROR\",{}),t}async getTransactionReceipt(){const t=await this.provider.getTransactionReceipt(this.transactionHash);return h(!!t,\"failed to find transaction receipt\",\"UNKNOWN_ERROR\",{}),t}removedEvent(){return{orphan:\"drop-log\",log:{transactionHash:(t=this).transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}};var t}}class wr{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#_;constructor(t,e){this.#_=Object.freeze(t.logs.map((t=>new yr(t,e))));let n=hr;null!=t.effectiveGasPrice?n=t.effectiveGasPrice:null!=t.gasPrice&&(n=t.gasPrice),o(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:n,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#_}toJSON(){const{to:t,from:e,contractAddress:n,hash:r,index:s,blockHash:i,blockNumber:o,logsBloom:a,logs:c,status:l,root:u}=this;return{_type:\"TransactionReceipt\",blockHash:i,blockNumber:o,contractAddress:n,cumulativeGasUsed:dr(this.cumulativeGasUsed),from:e,gasPrice:dr(this.gasPrice),blobGasUsed:dr(this.blobGasUsed),blobGasPrice:dr(this.blobGasPrice),gasUsed:dr(this.gasUsed),hash:r,index:s,logs:c,logsBloom:a,root:u,status:l,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t\u003Cthis.length?{value:this.logs[t++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const t=await this.provider.getBlock(this.blockHash);if(null==t)throw new Error(\"TODO\");return t}async getTransaction(){const t=await this.provider.getTransaction(this.hash);if(null==t)throw new Error(\"TODO\");return t}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return vr(this)}reorderedEvent(t){return h(!t||t.isMined(),\"unmined 'other' transction cannot be orphaned\",\"UNSUPPORTED_OPERATION\",{operation:\"reorderedEvent(other)\"}),Ar(this,t)}}class br{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;#Z;constructor(t,e){this.provider=e,this.blockNumber=null!=t.blockNumber?t.blockNumber:null,this.blockHash=null!=t.blockHash?t.blockHash:null,this.hash=t.hash,this.index=t.index,this.type=t.type,this.from=t.from,this.to=t.to||null,this.gasLimit=t.gasLimit,this.nonce=t.nonce,this.data=t.data,this.value=t.value,this.gasPrice=t.gasPrice,this.maxPriorityFeePerGas=null!=t.maxPriorityFeePerGas?t.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=t.maxFeePerGas?t.maxFeePerGas:null,this.maxFeePerBlobGas=null!=t.maxFeePerBlobGas?t.maxFeePerBlobGas:null,this.chainId=t.chainId,this.signature=t.signature,this.accessList=null!=t.accessList?t.accessList:null,this.blobVersionedHashes=null!=t.blobVersionedHashes?t.blobVersionedHashes:null,this.#Z=-1}toJSON(){const{blockNumber:t,blockHash:e,index:n,hash:r,type:s,to:i,from:o,nonce:a,data:c,signature:l,accessList:u,blobVersionedHashes:h}=this;return{_type:\"TransactionResponse\",accessList:u,blockNumber:t,blockHash:e,blobVersionedHashes:h,chainId:dr(this.chainId),data:c,from:o,gasLimit:dr(this.gasLimit),gasPrice:dr(this.gasPrice),hash:r,maxFeePerGas:dr(this.maxFeePerGas),maxPriorityFeePerGas:dr(this.maxPriorityFeePerGas),maxFeePerBlobGas:dr(this.maxFeePerBlobGas),nonce:a,signature:l,to:i,index:n,type:s,value:dr(this.value)}}async getBlock(){let t=this.blockNumber;if(null==t){const e=await this.getTransaction();e&&(t=e.blockNumber)}if(null==t)return null;const e=this.provider.getBlock(t);if(null==e)throw new Error(\"TODO\");return e}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:t,blockNumber:e}=await i({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==t||null==t.blockNumber?0:e-t.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(t,e){const n=null==t?1:t,r=null==e?0:e;let s=this.#Z,o=-1,a=-1===s;const l=async()=>{if(a)return null;const{blockNumber:t,nonce:e}=await i({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(e\u003Cthis.nonce)return void(s=t);if(a)return null;const r=await this.getTransaction();if(!r||null==r.blockNumber)for(-1===o&&(o=s-3,o\u003Cthis.#Z&&(o=this.#Z));o\u003C=t;){if(a)return null;const e=await this.provider.getBlock(o,!0);if(null==e)return;for(const t of e)if(t===this.hash)return;for(let r=0;r\u003Ce.length;r++){const i=await e.getTransaction(r);if(i.from===this.from&&i.nonce===this.nonce){if(a)return null;const e=await this.provider.getTransactionReceipt(i.hash);if(null==e)return;if(t-e.blockNumber+1\u003Cn)return;let r=\"replaced\";i.data===this.data&&i.to===this.to&&i.value===this.value?r=\"repriced\":\"0x\"===i.data&&i.from===i.to&&i.value===hr&&(r=\"cancelled\"),h(!1,\"transaction was replaced\",\"TRANSACTION_REPLACED\",{cancelled:\"replaced\"===r||\"cancelled\"===r,reason:r,replacement:i.replaceableTransaction(s),hash:i.hash,receipt:e})}}o++}},f=t=>{if(null==t||0!==t.status)return t;h(!1,\"transaction execution reverted\",\"CALL_EXCEPTION\",{action:\"sendTransaction\",data:null,reason:null,invocation:null,revert:null,transaction:{to:t.to,from:t.from,data:\"\"},receipt:t})},d=await this.provider.getTransactionReceipt(this.hash);if(0===n)return f(d);if(d){if(await d.confirmations()>=n)return f(d)}else if(await l(),0===n)return null;const p=new Promise(((t,e)=>{const i=[],o=()=>{i.forEach((t=>t()))};if(i.push((()=>{a=!0})),r>0){const t=setTimeout((()=>{o(),e(u(\"wait for transaction timeout\",\"TIMEOUT\"))}),r);i.push((()=>{clearTimeout(t)}))}const h=async r=>{if(await r.confirmations()>=n){o();try{t(f(r))}catch(t){e(t)}}};if(i.push((()=>{this.provider.off(this.hash,h)})),this.provider.on(this.hash,h),s>=0){const t=async()=>{try{await l()}catch(t){if(c(t,\"TRANSACTION_REPLACED\"))return o(),void e(t)}a||this.provider.once(\"block\",t)};i.push((()=>{this.provider.off(\"block\",t)})),this.provider.once(\"block\",t)}}));return await p}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return h(this.isMined(),\"unmined transaction canot be orphaned\",\"UNSUPPORTED_OPERATION\",{operation:\"removeEvent()\"}),vr(this)}reorderedEvent(t){return h(this.isMined(),\"unmined transaction canot be orphaned\",\"UNSUPPORTED_OPERATION\",{operation:\"removeEvent()\"}),h(!t||t.isMined(),\"unmined 'other' transaction canot be orphaned\",\"UNSUPPORTED_OPERATION\",{operation:\"removeEvent()\"}),Ar(this,t)}replaceableTransaction(t){f(Number.isInteger(t)&&t>=0,\"invalid startBlock\",\"startBlock\",t);const e=new br(this,this.provider);return e.#Z=t,e}}function Ar(t,e){return{orphan:\"reorder-transaction\",tx:t,other:e}}function vr(t){return{orphan:\"drop-transaction\",tx:t}}class Er{filter;emitter;#W;constructor(t,e,n){this.#W=e,o(this,{emitter:t,filter:n})}async removeListener(){null!=this.#W&&await this.emitter.off(this.filter,this.#W)}}class kr extends yr{interface;fragment;args;constructor(t,e,n){super(t,t.provider);o(this,{args:e.decodeEventLog(n,t.data,t.topics),fragment:n,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class Pr extends yr{error;constructor(t,e){super(t,t.provider),o(this,{error:e})}}class xr extends wr{#Y;constructor(t,e,n){super(n,e),this.#Y=t}get logs(){return super.logs.map((t=>{const e=t.topics.length?this.#Y.getEvent(t.topics[0]):null;if(e)try{return new kr(t,this.#Y,e)}catch(e){return new Pr(t,e)}return t}))}}class Nr extends br{#Y;constructor(t,e,n){super(n,e),this.#Y=t}async wait(t,e){const n=await super.wait(t,e);return null==n?null:new xr(this.#Y,this.provider,n)}}class Br extends Er{log;constructor(t,e,n,r){super(t,e,n),o(this,{log:r})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Ir extends Br{constructor(t,e,n,r,s){super(t,e,n,new kr(s,t.interface,r));o(this,{args:t.interface.decodeEventLog(r,this.log.data,this.log.topics),fragment:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const Cr=BigInt(0);function Or(t){return t&&\"function\"==typeof t.call}function Rr(t){return t&&\"function\"==typeof t.estimateGas}function Tr(t){return t&&\"function\"==typeof t.resolveName}function Sr(t){return t&&\"function\"==typeof t.sendTransaction}function Fr(t){if(null!=t){if(Tr(t))return t;if(t.provider)return t.provider}}class Ur{#X;fragment;constructor(t,e,n){if(o(this,{fragment:e}),e.inputs.length\u003Cn.length)throw new Error(\"too many arguments\");const r=Dr(t.runner,\"resolveName\"),s=Tr(r)?r:null;this.#X=async function(){const r=await Promise.all(e.inputs.map(((t,e)=>null==n[e]?null:t.walkAsync(n[e],((t,e)=>\"address\"===t?Array.isArray(e)?Promise.all(e.map((t=>xn(t,s)))):xn(e,s):e)))));return t.interface.encodeFilterTopics(e,r)}()}getTopicFilter(){return this.#X}}function Dr(t,e){return null==t?null:\"function\"==typeof t[e]?t:t.provider&&\"function\"==typeof t.provider[e]?t.provider:null}function Lr(t){return null==t?null:t.provider||null}async function Mr(t,e){const n=ee.dereference(t,\"overrides\");f(\"object\"==typeof n,\"invalid overrides parameter\",\"overrides\",t);const r=gr(n);return f(null==r.to||(e||[]).indexOf(\"to\")>=0,\"cannot override to\",\"overrides.to\",r.to),f(null==r.data||(e||[]).indexOf(\"data\")>=0,\"cannot override data\",\"overrides.data\",r.data),r.from&&(r.from=r.from),r}function Gr(t){const e=async function(e){const n=await Mr(e,[\"data\"]);n.to=await t.getAddress(),n.from&&(n.from=await xn(n.from,Fr(t.runner)));const r=t.interface,s=S(n.value||Cr,\"overrides.value\")===Cr,i=\"0x\"===(n.data||\"0x\");!r.fallback||r.fallback.payable||!r.receive||i||s||f(!1,\"cannot send data to receive or send value to non-payable fallback\",\"overrides\",e),f(r.fallback||i,\"cannot send data to receive-only contract\",\"overrides.data\",n.data);return f(r.receive||r.fallback&&r.fallback.payable||s,\"cannot send value to non-payable fallback\",\"overrides.value\",n.value),f(r.fallback||i,\"cannot send data to receive-only contract\",\"overrides.data\",n.data),n},n=async function(n){const r=t.runner;h(Sr(r),\"contract runner does not support sending transactions\",\"UNSUPPORTED_OPERATION\",{operation:\"sendTransaction\"});const s=await r.sendTransaction(await e(n)),i=Lr(t.runner);return new Nr(t.interface,i,s)},r=async t=>await n(t);return o(r,{_contract:t,estimateGas:async function(n){const r=Dr(t.runner,\"estimateGas\");return h(Rr(r),\"contract runner does not support gas estimation\",\"UNSUPPORTED_OPERATION\",{operation:\"estimateGas\"}),await r.estimateGas(await e(n))},populateTransaction:e,send:n,staticCall:async function(n){const r=Dr(t.runner,\"call\");h(Or(r),\"contract runner does not support calling\",\"UNSUPPORTED_OPERATION\",{operation:\"call\"});const s=await e(n);try{return await r.call(s)}catch(e){if(l(e)&&e.data)throw t.interface.makeError(e.data,s);throw e}}}),r}function Hr(t,e){const n=function(...n){const r=t.interface.getFunction(e,n);return h(r,\"no matching fragment\",\"UNSUPPORTED_OPERATION\",{operation:\"fragment\",info:{key:e,args:n}}),r},r=async function(...e){const r=n(...e);let s={};if(r.inputs.length+1===e.length&&(s=await Mr(e.pop()),s.from&&(s.from=await xn(s.from,Fr(t.runner)))),r.inputs.length!==e.length)throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");const o=await async function(t,e,n){const r=Dr(t,\"resolveName\"),s=Tr(r)?r:null;return await Promise.all(e.map(((t,e)=>t.walkAsync(n[e],((t,e)=>(e=ee.dereference(e,t),\"address\"===t?xn(e,s):e))))))}(t.runner,r.inputs,e);return Object.assign({},s,await i({to:t.getAddress(),data:t.interface.encodeFunctionData(r,o)}))},s=async function(...t){const e=await c(...t);return 1===e.length?e[0]:e},a=async function(...e){const n=t.runner;h(Sr(n),\"contract runner does not support sending transactions\",\"UNSUPPORTED_OPERATION\",{operation:\"sendTransaction\"});const s=await n.sendTransaction(await r(...e)),i=Lr(t.runner);return new Nr(t.interface,i,s)},c=async function(...e){const s=Dr(t.runner,\"call\");h(Or(s),\"contract runner does not support calling\",\"UNSUPPORTED_OPERATION\",{operation:\"call\"});const i=await r(...e);let o=\"0x\";try{o=await s.call(i)}catch(e){if(l(e)&&e.data)throw t.interface.makeError(e.data,i);throw e}const a=n(...e);return t.interface.decodeFunctionResult(a,o)},u=async(...t)=>n(...t).constant?await s(...t):await a(...t);return o(u,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:async function(...e){const n=Dr(t.runner,\"estimateGas\");return h(Rr(n),\"contract runner does not support gas estimation\",\"UNSUPPORTED_OPERATION\",{operation:\"estimateGas\"}),await n.estimateGas(await r(...e))},populateTransaction:r,send:a,staticCall:s,staticCallResult:c}),Object.defineProperty(u,\"fragment\",{configurable:!1,enumerable:!0,get:�"�z�()=>{const n=t.interface.getFunction(e);return h(n,\"no matching fragment\",\"UNSUPPORTED_OPERATION\",{operation:\"fragment\",info:{key:e}}),n}}),u}const Qr=Symbol.for(\"_ethersInternal_contract\"),jr=new WeakMap;function Vr(t){return jr.get(t[Qr])}async function Jr(t,e){let n,r=null;if(Array.isArray(e)){const r=function(e){if(b(e,32))return e;const n=t.interface.getEvent(e);return f(n,\"unknown fragment\",\"name\",e),n.topicHash};n=e.map((t=>null==t?null:Array.isArray(t)?t.map(r):r(t)))}else\"*\"===e?n=[null]:\"string\"==typeof e?b(e,32)?n=[e]:(r=t.interface.getEvent(e),f(r,\"unknown fragment\",\"event\",e),n=[r.topicHash]):(s=e)&&\"object\"==typeof s&&\"getTopicFilter\"in s&&\"function\"==typeof s.getTopicFilter&&s.fragment?n=await e.getTopicFilter():\"fragment\"in e?(r=e.fragment,n=[r.topicHash]):f(!1,\"unknown event name\",\"event\",e);var s;n=n.map((t=>{if(null==t)return null;if(Array.isArray(t)){const e=Array.from(new Set(t.map((t=>t.toLowerCase()))).values());return 1===e.length?e[0]:(e.sort(),e)}return t.toLowerCase()}));return{fragment:r,tag:n.map((t=>null==t?\"null\":Array.isArray(t)?t.join(\"|\"):t)).join(\"&\"),topics:n}}async function zr(t,e){const{subs:n}=Vr(t);return n.get((await Jr(t,e)).tag)||null}async function Kr(t,e,n){const r=Lr(t.runner);h(r,\"contract runner does not support subscribing\",\"UNSUPPORTED_OPERATION\",{operation:e});const{fragment:s,tag:i,topics:o}=await Jr(t,n),{addr:a,subs:c}=Vr(t);let l=c.get(i);if(!l){const e={address:a||t,topics:o},u=e=>{let r=s;if(null==r)try{r=t.interface.getEvent(e.topics[0])}catch(t){}if(r){const i=r,o=s?t.interface.decodeEventLog(s,e.data,e.topics):[];_r(t,n,o,(r=>new Ir(t,r,n,i,e)))}else _r(t,n,[],(r=>new Br(t,r,n,e)))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(r.on(e,u))},stop:async()=>{if(0==h.length)return;let t=h;h=[],await Promise.all(t),r.off(e,u)}},c.set(i,l)}return l}let qr=Promise.resolve();async function _r(t,e,n,r){try{await qr}catch(t){}const s=async function(t,e,n,r){await qr;const s=await zr(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter((({listener:e,once:s})=>{const i=Array.from(n);r&&i.push(r(s?null:e));try{e.call(t,...i)}catch(t){}return!s})),0===s.listeners.length&&(s.stop(),Vr(t).subs.delete(s.tag)),i>0}(t,e,n,r);return qr=s,await s}const Zr=[\"then\"];class Wr{target;interface;runner;filters;[Qr];fallback;constructor(t,e,n,r){f(\"string\"==typeof t||kn(t),\"invalid value for Contract target\",\"target\",t),null==n&&(n=null);const s=ur.from(e);let i;o(this,{target:t,runner:n,interface:s}),Object.defineProperty(this,Qr,{value:{}});let a=null,l=null;if(r){const t=Lr(n);l=new Nr(this.interface,t,r)}let h=new Map;if(\"string\"==typeof t)if(b(t))a=t,i=Promise.resolve(t);else{const e=Dr(n,\"resolveName\");if(!Tr(e))throw u(\"contract runner does not support name resolution\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\"});i=e.resolveName(t).then((e=>{if(null==e)throw u(\"an ENS name used for a contract target must be correctly configured\",\"UNCONFIGURED_NAME\",{value:t});return Vr(this).addr=e,e}))}else i=t.getAddress().then((t=>{if(null==t)throw new Error(\"TODO\");return Vr(this).addr=t,t}));var d,p;d=this,p={addrPromise:i,addr:a,deployTx:l,subs:h},jr.set(d[Qr],p);const g=new Proxy({},{get:(t,e,n)=>{if(\"symbol\"==typeof e||Zr.indexOf(e)>=0)return Reflect.get(t,e,n);try{return this.getEvent(e)}catch(t){if(!c(t,\"INVALID_ARGUMENT\")||\"key\"!==t.argument)throw t}},has:(t,e)=>Zr.indexOf(e)>=0?Reflect.has(t,e):Reflect.has(t,e)||this.interface.hasEvent(String(e))});return o(this,{filters:g}),o(this,{fallback:s.receive||s.fallback?Gr(this):null}),new Proxy(this,{get:(t,e,n)=>{if(\"symbol\"==typeof e||e in t||Zr.indexOf(e)>=0)return Reflect.get(t,e,n);try{return t.getFunction(e)}catch(t){if(!c(t,\"INVALID_ARGUMENT\")||\"key\"!==t.argument)throw t}},has:(t,e)=>\"symbol\"==typeof e||e in t||Zr.indexOf(e)>=0?Reflect.has(t,e):t.interface.hasFunction(e)})}connect(t){return new Wr(this.target,this.interface,t)}attach(t){return new Wr(t,this.interface,this.runner)}async getAddress(){return await Vr(this).addrPromise}async getDeployedCode(){const t=Lr(this.runner);h(t,\"runner does not support .provider\",\"UNSUPPORTED_OPERATION\",{operation:\"getDeployedCode\"});const e=await t.getCode(await this.getAddress());return\"0x\"===e?null:e}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(null!=await this.getDeployedCode())return this;const e=Lr(this.runner);return h(null!=e,\"contract runner does not support .provider\",\"UNSUPPORTED_OPERATION\",{operation:\"waitForDeployment\"}),new Promise(((t,n)=>{const r=async()=>{try{if(null!=await this.getDeployedCode())return t(this);e.once(\"block\",r)}catch(t){n(t)}};r()}))}deploymentTransaction(){return Vr(this).deployTx}getFunction(t){\"string\"!=typeof t&&(t=t.format());return Hr(this,t)}getEvent(t){return\"string\"!=typeof t&&(t=t.format()),function(t,e){const n=function(...n){const r=t.interface.getEvent(e,n);return h(r,\"no matching fragment\",\"UNSUPPORTED_OPERATION\",{operation:\"fragment\",info:{key:e,args:n}}),r},r=function(...e){return new Ur(t,n(...e),e)};return o(r,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(r,\"fragment\",{configurable:!1,enumerable:!0,get:()=>{const n=t.interface.getEvent(e);return h(n,\"no matching fragment\",\"UNSUPPORTED_OPERATION\",{operation:\"fragment\",info:{key:e}}),n}}),r}(this,t)}async queryTransaction(t){throw new Error(\"@TODO\")}async queryFilter(t,e,n){null==e&&(e=0),null==n&&(n=\"latest\");const{addr:r,addrPromise:s}=Vr(this),i=r||await s,{fragment:o,topics:a}=await Jr(this,t),c={address:i,topics:a,fromBlock:e,toBlock:n},l=Lr(this.runner);return h(l,\"contract runner does not have a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"queryFilter\"}),(await l.getLogs(c)).map((t=>{let e=o;if(null==e)try{e=this.interface.getEvent(t.topics[0])}catch(t){}if(e)try{return new kr(t,this.interface,e)}catch(e){return new Pr(t,e)}return new yr(t,l)}))}async on(t,e){const n=await Kr(this,\"on\",t);return n.listeners.push({listener:e,once:!1}),n.start(),this}async once(t,e){const n=await Kr(this,\"once\",t);return n.listeners.push({listener:e,once:!0}),n.start(),this}async emit(t,...e){return await _r(this,t,e,null)}async listenerCount(t){if(t){const e=await zr(this,t);return e?e.listeners.length:0}const{subs:e}=Vr(this);let n=0;for(const{listeners:t}of e.values())n+=t.length;return n}async listeners(t){if(t){const e=await zr(this,t);return e?e.listeners.map((({listener:t})=>t)):[]}const{subs:e}=Vr(this);let n=[];for(const{listeners:t}of e.values())n=n.concat(t.map((({listener:t})=>t)));return n}async off(t,e){const n=await zr(this,t);if(!n)return this;if(e){const t=n.listeners.map((({listener:t})=>t)).indexOf(e);t>=0&&n.listeners.splice(t,1)}return null!=e&&0!==n.listeners.length||(n.stop(),Vr(this).subs.delete(n.tag)),this}async removeAllListeners(t){if(t){const e=await zr(this,t);if(!e)return this;e.stop(),Vr(this).subs.delete(e.tag)}else{const{subs:t}=Vr(this);for(const{tag:e,stop:n}of t.values())n(),t.delete(e)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){return class extends Wr{constructor(e,n=null){super(e,t,n)}}}static from(t,e,n){null==n&&(n=null);return new this(t,e,n)}}class Yr extends(function(){return Wr}()){}var Xr=\"AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI\";const $r=new Map([[8217,\"apostrophe\"],[8260,\"fraction slash\"],[12539,\"middle dot\"]]),ts=4;function es(t){return function(t){let e=0;return()=>t[e++]}(function(t){let e=0;function n(){return t[e++]\u003C\u003C8|t[e++]}let r=n(),s=1,i=[0,1];for(let t=1;t\u003Cr;t++)i.push(s+=n());let o=n(),a=e;e+=o;let c=0,l=0;function u(){return 0==c&&(l=l\u003C\u003C8|t[e++],c=8),l>>--c&1}const h=2**31,f=h>>>1,d=h-1;let p=0;for(let t=0;t\u003C31;t++)p=p\u003C\u003C1|u();let g=[],m=0,y=h;for(;;){let t=Math.floor(((p-m+1)*s-1)/y),e=0,n=r;for(;n-e>1;){let r=e+n>>>1;t\u003Ci[r]?n=r:e=r}if(0==e)break;g.push(e);let o=m+Math.floor(y*i[e]/s),a=m+Math.floor(y*i[e+1]/s)-1;for(;0==((o^a)&f);)p=p\u003C\u003C1&d|u(),o=o\u003C\u003C1&d,a=a\u003C\u003C1&d|1;for(;o&~a&536870912;)p=p&f|p\u003C\u003C1&d>>>1|u(),o=o\u003C\u003C1^f,a=(a^f)\u003C\u003C1|f|1;m=o,y=1+a-o}let w=r-4;return g.map((e=>{switch(e-w){case 3:return w+65792+(t[a++]\u003C\u003C16|t[a++]\u003C\u003C8|t[a++]);case 2:return w+256+(t[a++]\u003C\u003C8|t[a++]);case 1:return w+t[a++];default:return e-1}}))}(function(t){let e=[];[...\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"].forEach(((t,n)=>e[t.charCodeAt(0)]=n));let n=t.length,r=new Uint8Array(6*n>>3);for(let s=0,i=0,o=0,a=0;s\u003Cn;s++)a=a\u003C\u003C6|e[t.charCodeAt(s)],o+=6,o>=8&&(r[i++]=a>>(o-=8));return r}(t)))}function ns(t){return 1&t?~t>>1:t>>1}function rs(t,e){let n=Array(t);for(let r=0,s=0;r\u003Ct;r++)n[r]=s+=ns(e());return n}function ss(t,e=0){let n=[];for(;;){let r=t(),s=t();if(!s)break;e+=r;for(let t=0;t\u003Cs;t++)n.push(e+t);e+=s+1}return n}function is(t){return as((()=>{let e=ss(t);if(e.length)return e}))}function os(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(ls(n,t))}for(;;){let n=t()-1;if(n\u003C0)break;e.push(us(n,t))}return e.flat()}function as(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function cs(t,e,n){let r=Array(t).fill().map((()=>[]));for(let s=0;s\u003Ce;s++)rs(t,n).forEach(((t,e)=>r[e].push(t)));return r}function ls(t,e){let n=1+e(),r=e(),s=as(e);return cs(s.length,1+t,e).flatMap(((t,e)=>{let[i,...o]=t;return Array(s[e]).fill().map(((t,e)=>{let s=e*r;return[i+e*n,o.map((t=>t+s))]}))}))}function us(t,e){return cs(1+e(),1+t,e).map((t=>[t[0],t.slice(1)]))}function hs(t){return`{${function(t){return t.toString(16).toUpperCase().padStart(2,\"0\")}(t)}}`}function fs(t){let e=[];for(let n=0,r=t.length;n\u003Cr;){let r=t.codePointAt(n);n+=r\u003C65536?1:2,e.push(r)}return e}function ds(t){let e=t.length;if(e\u003C4096)return String.fromCodePoint(...t);let n=[];for(let r=0;r\u003Ce;)n.push(String.fromCodePoint(...t.slice(r,r+=4096)));return n.join(\"\")}function ps(t,e){let n=t.length,r=n-e.length;for(let s=0;0==r&&s\u003Cn;s++)r=t[s]-e[s];return r}var gs=\"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqĽ�'�oYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g\";const ms=44032,ys=4352,ws=4449,bs=4519,As=28,vs=21*As,Es=ms+19*vs,ks=ys+19,Ps=ws+21,xs=bs+As;function Ns(t){return t>>24&255}function Bs(t){return 16777215&t}let Is,Cs,Os,Rs;function Ts(t){return t>=ms&&t\u003CEs}function Ss(t,e){if(t>=ys&&t\u003Cks&&e>=ws&&e\u003CPs)return ms+(t-ys)*vs+(e-ws)*As;if(Ts(t)&&e>bs&&e\u003Cxs&&(t-ms)%As==0)return t+(e-bs);{let n=Rs.get(t);return n&&(n=n.get(e),n)?n:-1}}function Fs(t){Is||function(){let t=es(gs);Is=new Map(is(t).flatMap(((t,e)=>t.map((t=>[t,e+1\u003C\u003C24]))))),Cs=new Set(ss(t)),Os=new Map,Rs=new Map;for(let[e,n]of os(t)){if(!Cs.has(e)&&2==n.length){let[t,r]=n,s=Rs.get(t);s||(s=new Map,Rs.set(t,s)),s.set(r,e)}Os.set(e,n.reverse())}}();let e=[],n=[],r=!1;function s(t){let n=Is.get(t);n&&(r=!0,t|=n),e.push(t)}for(let r of t)for(;;){if(r\u003C128)e.push(r);else if(Ts(r)){let t=r-ms,e=t%vs/As|0,n=t%As;s(ys+(t/vs|0)),s(ws+e),n>0&&s(bs+n)}else{let t=Os.get(r);t?n.push(...t):s(r)}if(!n.length)break;r=n.pop()}if(r&&e.length>1){let t=Ns(e[0]);for(let n=1;n\u003Ce.length;n++){let r=Ns(e[n]);if(0==r||t\u003C=r){t=r;continue}let s=n-1;for(;;){let n=e[s+1];if(e[s+1]=e[s],e[s]=n,!s)break;if(t=Ns(e[--s]),t\u003C=r)break}t=Ns(e[n])}}return e}function Us(t){return Fs(t).map(Bs)}function Ds(t){return function(t){let e=[],n=[],r=-1,s=0;for(let i of t){let t=Ns(i),o=Bs(i);if(-1==r)0==t?r=o:e.push(o);else if(s>0&&s>=t)0==t?(e.push(r,...n),n.length=0,r=o):n.push(o),s=t;else{let i=Ss(r,o);i>=0?r=i:0==s&&0==t?(e.push(r),r=o):(n.push(o),s=t)}}return r>=0&&e.push(r,...n),e}(Fs(t))}const Ls=45,Ms=\".\",Gs=65039,Hs=1,Qs=t=>Array.from(t);function js(t,e){return t.P.has(e)||t.Q.has(e)}class Vs extends Array{get is_emoji(){return!0}}let Js,zs,Ks,qs,_s,Zs,Ws,Ys,Xs,$s,ti,ei;function ni(){if(Js)return;let t=es(Xr);const e=()=>ss(t),n=()=>new Set(e()),r=(t,e)=>e.forEach((e=>t.add(e)));Js=new Map(os(t)),zs=n(),Ks=e(),qs=new Set(e().map((t=>Ks[t]))),Ks=new Set(Ks),_s=n(),Zs=n();let s=is(t),i=t();const o=()=>{let t=new Set;return e().forEach((e=>r(t,s[e]))),r(t,e()),t};Ws=as((e=>{let n=as(t).map((t=>t+96));if(n.length){let r=e>=i;return n[0]-=32,n=ds(n),r&&(n=`Restricted[${n}]`),{N:n,P:o(),Q:o(),M:!t(),R:r}}})),Ys=n(),Xs=new Map;let a=e().concat(Qs(Ys)).sort(((t,e)=>t-e));a.forEach(((e,n)=>{let r=t(),s=a[n]=r?a[n-r]:{V:[],M:new Map};s.V.push(e),Ys.has(e)||Xs.set(e,s)}));for(let{V:t,M:e}of new Set(Xs.values())){let n=[];for(let e of t){let t=Ws.filter((t=>js(t,e))),s=n.find((({G:e})=>t.some((t=>e.has(t)))));s||(s={G:new Set,V:[]},n.push(s)),s.V.push(e),r(s.G,t)}let s=n.flatMap((t=>Qs(t.G)));for(let{G:t,V:r}of n){let n=new Set(s.filter((e=>!t.has(e))));for(let t of r)e.set(t,n)}}$s=new Set;let c=new Set;const l=t=>$s.has(t)?c.add(t):$s.add(t);for(let t of Ws){for(let e of t.P)l(e);for(let e of t.Q)l(e)}for(let t of $s)Xs.has(t)||c.has(t)||Xs.set(t,Hs);r($s,Us($s)),ti=function(t){let e=[],n=ss(t);return function t({S:n,B:r},s,i){if(!(4&n&&i===s[s.length-1])){2&n&&(i=s[s.length-1]),1&n&&e.push(s);for(let e of r)for(let n of e.Q)t(e,[...s,n],i)}}(function e(r){let s=t(),i=as((()=>{let r=ss(t).map((t=>n[t]));if(r.length)return e(r)}));return{S:s,B:i,Q:r}}([]),[]),e}(t).map((t=>Vs.from(t))).sort(ps),ei=new Map;for(let t of ti){let e=[ei];for(let n of t){let t=e.map((t=>{let e=t.get(n);return e||(e=new Map,t.set(n,e)),e}));n===Gs?e.push(...t):e=t}for(let n of e)n.V=t}}function ri(t){return(oi(t)?\"\":`${si(ii([t]))} `)+hs(t)}function si(t){return`\"${t}\"‎`}function ii(t,e=1/0,n=hs){let r=[];var s;s=t[0],ni(),Ks.has(s)&&r.push(\"◌\"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,o=t.length;for(let e=0;e\u003Co;e++){let s=t[e];oi(s)&&(r.push(ds(t.slice(i,e))),r.push(n(s)),i=e+1)}return r.push(ds(t.slice(i,o))),r.join(\"\")}function oi(t){return ni(),_s.has(t)}function ai(t,e,n){if(!t)return[];ni();let r=0;return t.split(Ms).map((t=>{let s=fs(t),i={input:s,offset:r};r+=s.length+1;try{let t,r=i.tokens=fi(s,e,n),o=r.length;if(!o)throw new Error(\"empty label\");let a=i.output=r.flat();if(function(t){for(let e=t.lastIndexOf(95);e>0;)if(95!==t[--e])throw new Error(\"underscore allowed only at start\")}(a),!(i.emoji=o>1||r[0].is_emoji)&&a.every((t=>t\u003C128)))!function(t){if(t.length>=4&&t[2]==Ls&&t[3]==Ls)throw new Error(`invalid label extension: \"${ds(t.slice(0,4))}\"`)}(a),t=\"ASCII\";else{let e=r.flatMap((t=>t.is_emoji?[]:t));if(e.length){if(Ks.has(a[0]))throw hi(\"leading combining mark\");for(let t=1;t\u003Co;t++){let e=r[t];if(!e.is_emoji&&Ks.has(e[0]))throw hi(`emoji + combining mark: \"${ds(r[t-1])} + ${ii([e[0]])}\"`)}!function(t){let e=t[0],n=$r.get(e);if(n)throw hi(`leading ${n}`);let r=t.length,s=-1;for(let i=1;i\u003Cr;i++){e=t[i];let r=$r.get(e);if(r){if(s==i)throw hi(`${n} + ${r}`);s=i+1,n=r}}if(s==r)throw hi(`trailing ${n}`)}(a);let n=Qs(new Set(e)),[s]=function(t){let e=Ws;for(let n of t){let t=e.filter((t=>js(t,n)));if(!t.length)throw Ws.some((t=>js(t,n)))?ui(e[0],n):li(n);if(e=t,1==t.length)break}return e}(n);!function(t,e){for(let n of e)if(!js(t,n))throw ui(t,n);if(t.M){let t=Us(e);for(let e=1,n=t.length;e\u003Cn;e++)if(qs.has(t[e])){let r=e+1;for(let s;r\u003Cn&&qs.has(s=t[r]);r++)for(let n=e;n\u003Cr;n++)if(t[n]==s)throw new Error(`duplicate non-spacing marks: ${ri(s)}`);if(r-e>ts)throw new Error(`excessive non-spacing marks: ${si(ii(t.slice(e-1,r)))} (${r-e}/${ts})`);e=r}}}(s,e),function(t,e){let n,r=[];for(let t of e){let e=Xs.get(t);if(e===Hs)return;if(e){let r=e.M.get(t);if(n=n?n.filter((t=>r.has(t))):Qs(r),!n.length)return}else r.push(t)}if(n)for(let e of n)if(r.every((t=>js(e,t))))throw new Error(`whole-script confusable: ${t.N}/${e.N}`)}(s,n),t=s.N}else t=\"Emoji\"}i.type=t}catch(t){i.error=t}return i}))}function ci(t){return t.map((({input:e,error:n,output:r})=>{if(n){let r=n.message;throw new Error(1==t.length?r:`Invalid label ${si(ii(e,63))}: ${r}`)}return ds(r)})).join(Ms)}function li(t){return new Error(`disallowed character: ${ri(t)}`)}function ui(t,e){let n=ri(e),r=Ws.find((t=>t.P.has(e)));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function hi(t){return new Error(`illegal placement: ${t}`)}function fi(t,e,n){let r=[],s=[];for(t=t.slice().reverse();t.length;){let i=pi(t);if(i)s.length&&(r.push(e(s)),s=[]),r.push(n(i));else{let e=t.pop();if($s.has(e))s.push(e);else{let t=Js.get(e);if(t)s.push(...t);else if(!zs.has(e))throw li(e)}}}return s.length&&r.push(e(s)),r}function di(t){return t.filter((t=>t!=Gs))}function pi(t,e){let n,r=ei,s=t.length;for(;s&&(r=r.get(t[--s]),r);){let{V:i}=r;i&&(n=i,e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}const gi=new Uint8Array(32);function mi(t){return f(0!==t.length,\"invalid ENS name; empty component\",\"comp\",t),t}function yi(t){const e=Ae(function(t){try{if(0===t.length)throw new Error(\"empty label\");return function(t){return ci(ai(t,Ds,di))}(t)}catch(e){f(!1,`invalid ENS name (${e.message})`,\"name\",t)}}(t)),n=[];if(0===t.length)return n;let r=0;for(let t=0;t\u003Ce.length;t++){46===e[t]&&(n.push(mi(e.slice(r,t))),r=t+1)}return f(r\u003Ce.length,\"invalid ENS name; empty component\",\"name\",t),n.push(mi(e.slice(r))),n}function wi(t){f(\"string\"==typeof t,\"invalid ENS name; not a string\",\"name\",t),f(t.length,\"invalid ENS name (empty label)\",\"name\",t);let e=gi;const n=yi(t);for(;n.length;)e=jt(k([e,jt(n.pop())]));return E(e)}function bi(t,e){const n=null!=e?e:63;return f(n\u003C=255,\"DNS encoded label cannot exceed 255\",\"length\",n),E(k(yi(t).map((e=>{f(e.length\u003C=n,`label ${JSON.stringify(t)} exceeds ${n} bytes`,\"name\",t);const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r}))))+\"00\"}gi.fill(0);class Ai extends At{constructor(t,e,n,r){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=yt(this.buffer)}update(t){st(this);const{view:e,buffer:n,blockLen:r}=this,s=(t=bt(t)).length;for(let i=0;i\u003Cs;){const o=Math.min(r-this.pos,s-i);if(o!==r)n.set(t.subarray(i,i+o),this.pos),this.pos+=o,i+=o,this.pos===r&&(this.process(e,0),this.pos=0);else{const e=yt(t);for(;r\u003C=s-i;i+=r)this.process(e,i)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){st(this),it(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:r,isLE:s}=this;let{pos:i}=this;e[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let t=i;t\u003Cr;t++)e[t]=0;!function(t,e,n,r){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),c=r?4:0,l=r?0:4;t.setUint32(e+c,o,r),t.setUint32(e+l,a,r)}(n,r-8,BigInt(8*this.length),s),this.process(n,0);const o=yt(t),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=a/4,l=this.get();if(c>l.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cc;t++)o.setUint32(4*t,l[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:r,finished:s,destroyed:i,pos:o}=this;return t.length=r,t.pos=o,t.finished=s,t.destroyed=i,r%e&&t.buffer.set(n),t}}const vi=(t,e,n)=>t&e^~t&n,Ei=(t,e,n)=>t&e^t&n^e&n,ki=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]),Pi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),xi=new Uint32Array(64);class Ni extends Ai{constructor(){super(64,32,8,!1),this.A=0|Pi[0],this.B=0|Pi[1],this.C=0|Pi[2],this.D=0|Pi[3],this.E=0|Pi[4],this.F=0|Pi[5],this.G=0|Pi[6],this.H=0|Pi[7]}get(){const{A:t,B:e,C:n,D:r,E:s,F:i,G:o,H:a}=this;return[t,e,n,r,s,i,o,a]}set(t,e,n,r,s,i,o,a){this.A=0|t,this.B=0|e,this.C=0|n,this.D=0|r,this.E=0|s,this.F=0|i,this.G=0|o,this.H=0|a}process(t,e){for(let n=0;n\u003C16;n++,e+=4)xi[n]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=xi[t-15],n=xi[t-2],r=wt(e,7)^wt(e,18)^e>>>3,s=wt(n,17)^wt(n,19)^n>>>10;xi[t]=s+xi[t-7]+r+xi[t-16]|0}let{A:n,B:r,C:s,D:i,E:o,F:a,G:c,H:l}=this;for(let t=0;t\u003C64;t++){const e=l+(wt(o,6)^wt(o,11)^wt(o,25))+vi(o,a,c)+ki[t]+xi[t]|0,u=(wt(n,2)^wt(n,13)^wt(n,22))+Ei(n,r,s)|0;l=c,c=a,a=o,o=i+e|0,i=s,s=r,r=n,n=e+u|0}n=n+this.A|0,r=r+this.B|0,s=s+this.C|0,i=i+this.D|0,o=o+this.E|0,a=a+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,s,i,o,a,c,l)}roundClean(){xi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Bi=vt((()=>new Ni)),[Ii,Ci]=pt.split([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map((t=>BigInt(t)))),Oi=new Uint32Array(80),Ri=new Uint32Array(80);class Ti extends Ai{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:n,Bl:r,Ch:s,Cl:i,Dh:o,Dl:a,Eh:c,El:l,Fh:u,Fl:h,Gh:f,Gl:d,Hh:p,Hl:g}=this;return[t,e,n,r,s,i,o,a,c,l,u,h,f,d,p,g]}set(t,e,n,r,s,i,o,a,c,l,u,h,f,d,p,g){this.Ah=0|t,this.Al=0|e,this.Bh=0|n,this.Bl=0|r,this.Ch=0|s,this.Cl=0|i,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|h,this.Gh=0|f,this.Gl=0|d,this.Hh=0|p,this.Hl=0|g}process(t,e){for(let n=0;n\u003C16;n++,e+=4)Oi[n]=t.getUint32(e),Ri[n]=t.getUint32(e+=4);for(let t=16;t\u003C80;t++){const e=0|Oi[t-15],n=0|Ri[t-15],r=pt.rotrSH(e,n,1)^pt.rotrSH(e,n,8)^pt.shrSH(e,n,7),s=pt.rotrSL(e,n,1)^pt.rotrSL(e,n,8)^pt.shrSL(e,n,7),i=0|Oi[t-2],o=0|Ri[t-2],a=pt.rotrSH(i,o,19)^pt.rotrBH(i,o,61)^pt.shrSH(i,o,6),c=pt.rotrSL(i,o,19)^pt.rotrBL(i,o,61)^pt.shrSL(i,o,6),l=pt.add4L(s,c,Ri[t-7],Ri[t-16]),u=pt.add4H(l,r,a,Oi[t-7],Oi[t-16]);Oi[t]=0|u,Ri[t]=0|l}let{Ah:n,Al:r,Bh:s,Bl:i,Ch:o,Cl:a,Dh:c,Dl:l,Eh:u,El:h,Fh:f,Fl:d,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let t=0;t\u003C80;t++){const e=pt.rotrSH(u,h,14)^pt.rotrSH(u,h,18)^pt.rotrBH(u,h,41),w=pt.rotrSL(u,h,14)^pt.rotrSL(u,h,18)^pt.rotrBL(u,h,41),b=u&f^~u&p,A=h&d^~h&g,v=pt.add5L(y,w,A,Ci[t],Ri[t]),E=pt.add5H(v,m,e,b,Ii[t],Oi[t]),k=0|v,P=pt.rotrSH(n,r,28)^pt.rotrBH(n,r,34)^pt.rotrBH(n,r,39),x=pt.rotrSL(n,r,28)^pt.rotrBL(n,r,34)^pt.rotrBL(n,r,39),N=n&s^n&o^s&o,B=r&i^r&a^i&a;m=0|p,y=0|g,p=0|f,g=0|d,f=0|u,d=0|h,({h:u,l:h}=pt.add(0|c,0|l,0|E,0|k)),c=0|o,l=0|a,o=0|s,a=0|i,s=0|n,i=0|r;const I=pt.add3L(k,x,B);n=pt.add3H(I,E,P,N),r=0|I}({h:n,l:r}=pt.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:i}=pt.add(0|this.Bh,0|this.Bl,0|s,0|i)),({h:o,l:a}=pt.add(0|this.Ch,0|this.Cl,0|o,0|a)),({h:c,l}=pt.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:u,l:h}=pt.add(0|this.Eh,0|this.El,0|u,0|h)),({h:f,l:d}=pt.add(0|this.Fh,0|this.Fl,0|f,0|d)),({h:p,l:g}=pt.add(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=pt.add(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(n,r,s,i,o,a,c,l,u,h,f,d,p,g,m,y)}roundClean(){Oi.fill(0),Ri.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Si=vt((()=>new Ti));const Fi=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw new Error(\"unable to locate global object\")}();Fi.crypto||Fi.msCrypto;function Ui(t){switch(t){case\"sha256\":return Bi.create();case\"sha512\":return Si.create()}f(!1,\"invalid hashing algorithm name\",\"algorithm\",t)}const Di=function(t){return Ui(\"sha256\").update(t).digest()},Li=function(t){return Ui(\"sha512\").update(t).digest()};let Mi=Di,Gi=Li,Hi=!1,Qi=!1;function ji(t){const e=y(t,\"data\");return E(Mi(e))}function Vi(t){const e=y(t,\"data\");return E(Gi(e))}ji._=Di,ji.lock=function(){Hi=!0},ji.register=function(t){if(Hi)throw new Error(\"sha256 is locked\");Mi=t},Object.freeze(ji),Vi._=Li,Vi.lock=function(){Qi=!0},Vi.register=function(t){if(Qi)throw new Error(\"sha512 is locked\");Gi=t},Object.freeze(ji);const Ji=\"0x0000000000000000000000000000000000000000000000000000000000000000\",zi=BigInt(0),Ki=BigInt(1),qi=BigInt(2),_i=BigInt(27),Zi=BigInt(28),Wi=BigInt(35),Yi={};function Xi(t){return B(G(t),32)}class $i{#$;#tt;#et;#nt;get r(){return this.#$}set r(t){f(32===P(t),\"invalid r\",\"value\",t),this.#$=E(t)}get s(){return this.#tt}set s(t){f(32===P(t),\"invalid s\",\"value\",t);const e=E(t);f(parseInt(e.substring(0,3))\u003C8,\"non-canonical s\",\"value\",e),this.#tt=e}get v(){return this.#et}set v(t){const e=L(t,\"value\");f(27===e||28===e,\"invalid v\",\"v\",t),this.#et=e}get networkV(){return this.#nt}get legacyChainId(){const t=this.networkV;return null==t?null:$i.getChainId(t)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const t=y(this.s);return this.yParity&&(t[0]|=128),E(t)}get compactSerialized(){return k([this.r,this.yParityAndS])}get serialized(){return k([this.r,this.s,this.yParity?\"0x1c\":\"0x1b\"])}constructor(t,e,n,r){g(t,Yi,\"Signature\"),this.#$=e,this.#tt=n,this.#et=r,this.#nt=null}[Symbol.for(\"nodejs.util.inspect.custom\")](){return`Signature { r: \"${this.r}\", s: \"${this.s}\", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new $i(Yi,this.r,this.s,this.v);return this.networkV&&(t.#nt=this.networkV),t}toJSON(){const t=this.networkV;return{_type:\"signature\",networkV:null!=t?t.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(t){const e=S(t,\"v\");return e==_i||e==Zi?zi:(f(e>=Wi,\"invalid EIP-155 v\",\"v\",t),(e-Wi)/qi)}static getChainIdV(t,e){return S(t)*qi+BigInt(35+e-27)}static getNormalizedV(t){const e=S(t);return e===zi||e===_i?27:e===Ki||e===Zi?28:(f(e>=Wi,\"invalid v\",\"v\",t),e&Ki?27:28)}static from(t){function e(e,n){f(e,n,\"signature\",t)}if(null==t)return new $i(Yi,Ji,Ji,27);if(\"string\"==typeof t){const n=y(t,\"signature\");if(64===n.length){const t=E(n.slice(0,32)),e=n.slice(32,64),r=128&e[0]?28:27;return e[0]&=127,new $i(Yi,t,E(e),r)}if(65===n.length){const t=E(n.slice(0,32)),r=n.slice(32,64);e(0==(128&r[0]),\"non-canonical s\");const s=$i.getNormalizedV(n[64]);return new $i(Yi,t,E(r),s)}e(!1,\"invalid raw signature length\")}if(t instanceof $i)return t.clone();const n=t.r;e(null!=n,\"missing r\");const r=Xi(n),s=function(t,n){if(null!=t)return Xi(t);if(null!=n){e(b(n,32),\"invalid yParityAndS\");const t=y(n);return t[0]&=127,E(t)}e(!1,\"missing s\")}(t.s,t.yParityAndS);e(0==(128&y(s)[0]),\"non-canonical s\");const{networkV:i,v:o}=function(t,n,r){if(null!=t){const e=S(t);return{networkV:e>=Wi?e:void 0,v:$i.getNormalizedV(e)}}if(null!=n)return e(b(n,32),\"invalid yParityAndS\"),{v:128&y(n)[0]?28:27};if(null!=r){switch(L(r,\"sig.yParity\")){case 0:return{v:27};case 1:return{v:28}}e(!1,\"invalid yParity\")}e(!1,\"missing v\")}(t.v,t.yParityAndS,t.yParity),a=new $i(Yi,r,s,o);return i&&(a.#nt=i),e(null==t.yParity||L(t.yParity,\"sig.yParity\")===a.yParity,\"yParity mismatch\"),e(null==t.yParityAndS||t.yParityAndS===a.yParityAndS,\"yParityAndS mismatch\"),a}}BigInt(0);const to=BigInt(1),eo=BigInt(2),no=t=>t instanceof Uint8Array,ro=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function so(t){if(!no(t))throw new Error(\"Uint8Array expected\");let e=\"\";for(let n=0;n\u003Ct.length;n++)e+=ro[t[n]];return e}function io(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);return BigInt(\"\"===t?\"0\":`0x${t}`)}function oo(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(e/2);for(let e=0;e\u003Cn.length;e++){const r=2*e,s=t.slice(r,r+2),i=Number.parseInt(s,16);if(Number.isNaN(i)||i\u003C0)throw new Error(\"Invalid byte sequence\");n[e]=i}return n}function ao(t){return io(so(t))}function co(t){if(!no(t))throw new Error(\"Uint8Array expected\");return io(so(Uint8Array.from(t).reverse()))}function lo(t,e){return oo(t.toString(16).padStart(2*e,\"0\"))}function uo(t,e){return lo(t,e).reverse()}function ho(t,e,n){let r;if(\"string\"==typeof e)try{r=oo(e)}catch(n){throw new Error(`${t} must be valid hex string, got \"${e}\". Cause: ${n}`)}else{if(!no(e))throw new Error(`${t} must be hex string or Uint8Array`);r=Uint8Array.from(e)}const s=r.length;if(\"number\"==typeof n&&s!==n)throw new Error(`${t} expected ${n} bytes, got ${s}`);return r}function fo(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let n=0;return t.forEach((t=>{if(!no(t))throw new Error(\"Uint8Array expected\");e.set(t,n),n+=t.length})),e}const po=t=>(eo\u003C\u003CBigInt(t-1))-to,go=t=>new Uint8Array(t),mo=t=>Uint8Array.from(t);function yo(t,e,n){if(\"number\"!=typeof t||t\u003C2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof e||e\u003C2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof n)throw new Error(\"hmacFn must be a function\");let r=go(t),s=go(t),i=0;const o=()=>{r.fill(1),s.fill(0),i=0},a=(...t)=>n(s,r,...t),c=(t=go())=>{s=a(mo([0]),t),r=a(),0!==t.length&&(s=a(mo([1]),t),r=a())},l=()=>{if(i++>=1e3)throw new Error(\"drbg: tried 1000 values\");let t=0;const n=[];for(;t\u003Ce;){r=a();const e=r.slice();n.push(e),t+=r.length}return fo(...n)};return(t,e)=>{let n;for(o(),c(t);!(n=e(l()));)c();return o(),n}}const wo={bigint:t=>\"bigint\"==typeof t,function:t=>\"function\"==typeof t,boolean:t=>\"boolean\"==typeof t,string:t=>\"string\"==typeof t,stringOrUint8Array:t=>\"string\"==typeof t||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>\"function\"==typeof t&&Number.isSafeInteger(t.outputLen)};function bo(t,e,n={}){const r=(e,n,r)=>{const s=wo[n];if(\"function\"!=typeof s)throw new Error(`Invalid validator \"${n}\", expected function`);const i=t[e];if(!(r&&void 0===i||s(i,t)))throw new Error(`Invalid param ${String(e)}=${i} (${typeof i}), expected ${n}`)};for(const[t,n]of Object.entries(e))r(t,n,!1);for(const[t,e]of Object.entries(n))r(t,e,!0);return t}const Ao=BigInt(0),vo=BigInt(1),Eo=BigInt(2),ko=BigInt(3),Po=BigInt(4),xo=BigInt(5),No=BigInt(8);BigInt(9),BigInt(16);function Bo(t,e){const n=t%e;return n>=Ao?n:e+n}function Io(t,e,n){if(n\u003C=Ao||e\u003CAo)throw new Error(\"Expected power/modulo > 0\");if(n===vo)return Ao;let r=vo;for(;e>Ao;)e&vo&&(r=r*t%n),t=t*t%n,e>>=vo;return r}function Co(t,e,n){let r=t;for(;e-- >Ao;)r*=r,r%=n;return r}function Oo(t,e){if(t===Ao||e\u003C=Ao)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=Bo(t,e),r=e,s=Ao,i=vo,o=vo,a=Ao;for(;n!==Ao;){const t=r/n,e=r%n,c=s-o*t,l=i-a*t;r=n,n=e,s=o,i=a,o=c,a=l}if(r!==vo)throw new Error(\"invert: does not exist\");return Bo(s,e)}function Ro(t){if(t%Po===ko){const e=(t+vo)/Po;return function(t,n){const r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error(\"Cannot find square root\");return r}}if(t%No===xo){const e=(t-xo)/No;return function(t,n){const r=t.mul(n,Eo),s=t.pow(r,e),i=t.mul(n,s),o=t.mul(t.mul(i,Eo),s),a=t.mul(i,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),n))throw new Error(\"Cannot find square root\");return a}}return function(t){const e=(t-vo)/Eo;let n,r,s;for(n=t-vo,r=0;n%Eo===Ao;n/=Eo,r++);for(s=Eo;s\u003Ct&&Io(s,e,t)!==t-vo;s++);if(1===r){const e=(t+vo)/Po;return function(t,n){const r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error(\"Cannot find square root\");return r}}const i=(n+vo)/Eo;return function(t,o){if(t.pow(o,e)===t.neg(t.ONE))throw new Error(\"Cannot find square root\");let a=r,c=t.pow(t.mul(t.ONE,s),n),l=t.pow(o,i),u=t.pow(o,n);for(;!t.eql(u,t.ONE);){if(t.eql(u,t.ZERO))return t.ZERO;let e=1;for(let n=t.sqr(u);e\u003Ca&&!t.eql(n,t.ONE);e++)n=t.sqr(n);const n=t.pow(c,vo\u003C\u003CBigInt(a-e-1));c=t.sqr(n),l=t.mul(l,n),u=t.mul(u,c),a=e}return l}}(t)}const To=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function So(t,e){const n=void 0!==e?e:t.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Fo(t){if(\"bigint\"!=typeof t)throw new Error(\"field order must be bigint\");const e=t.toString(2).length;return Math.ceil(e/8)}function Uo(t){const e=Fo(t);return e+Math.ceil(e/2)}class Do extends At{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,rt(t);const n=bt(e);if(this.iHash=t.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,s=new Uint8Array(r);s.set(n.length>r?t.create().update(n).digest():n);for(let t=0;t\u003Cs.length;t++)s[t]^=54;this.iHash.update(s),this.oHash=t.create();for(let t=0;t\u003Cs.length;t++)s[t]^=106;this.oHash.update(s),s.fill(0)}update(t){return st(this),this.iHash.update(t),this}digestInto(t){st(this),nt(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:n,finished:r,destroyed:s,blockLen:i,outputLen:o}=this;return t.finished=r,t.destroyed=s,t.blockLen=i,t.outputLen=o,t.oHash=e._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Lo=(t,e,n)=>new Do(t,e).update(n).digest();Lo.create=(t,e)=>new Do(t,e);const Mo=BigInt(0),Go=BigInt(1);function Ho(t){return bo(t.Fp,To.reduce(((t,e)=>(t[e]=\"function\",t)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"})),bo(t,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...So(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:Qo,hexToBytes:jo}=n,Vo={Err:class extends Error{constructor(t=\"\"){super(t)}},_parseInt(t){const{Err:e}=Vo;if(t.length\u003C2||2!==t[0])throw new e(\"Invalid signature integer tag\");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e(\"Invalid signature integer: wrong length\");if(128&r[0])throw new e(\"Invalid signature integer: negative\");if(0===r[0]&&!(128&r[1]))throw new e(\"Invalid signature integer: unnecessary leading zero\");return{d:Qo(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Vo,n=\"string\"==typeof t?jo(t):t;if(!(n instanceof Uint8Array))throw new Error(\"ui8a expected\");let r=n.length;if(r\u003C2||48!=n[0])throw new e(\"Invalid signature tag\");if(n[1]!==r-2)throw new e(\"Invalid signature: incorrect length\");const{d:s,l:i}=Vo._parseInt(n.subarray(2)),{d:o,l:a}=Vo._parseInt(i);if(a.length)throw new e(\"Invalid signature: left bytes after parsing\");return{r:s,s:o}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?\"00\"+t:t,n=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},r=e(n(t.s)),s=e(n(t.r)),i=r.length/2,o=s.length/2,a=n(i),c=n(o);return`30${n(o+i+4)}02${c}${s}02${a}${r}`}},Jo=BigInt(0),zo=BigInt(1),Ko=(BigInt(2),BigInt(3));BigInt(4);function qo(t){const e=function(t){const e=Ho(t);bo(e,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:n,Fp:r,a:s}=e;if(n){if(!r.eql(s,r.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof n||\"bigint\"!=typeof n.beta||\"function\"!=typeof n.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...e})}(t),{Fp:n}=e,r=e.toBytes||((t,e,r)=>{const s=e.toAffine();return fo(Uint8Array.from([4]),n.toBytes(s.x),n.toBytes(s.y))}),s=e.fromBytes||(t=>{const e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.B�gUC�YTES,2*n.BYTES))}});function i(t){const{a:r,b:s}=e,i=n.sqr(t),o=n.mul(i,t);return n.add(n.add(o,n.mul(t,r)),s)}if(!n.eql(n.sqr(e.Gy),i(e.Gx)))throw new Error(\"bad generator point: equation left != right\");function o(t){return\"bigint\"==typeof t&&Jo\u003Ct&&t\u003Ce.n}function a(t){if(!o(t))throw new Error(\"Expected valid bigint: 0 \u003C bigint \u003C curve.n\")}function c(t){const{allowedPrivateKeyLengths:n,nByteLength:r,wrapPrivateKey:s,n:i}=e;if(n&&\"bigint\"!=typeof t){if(t instanceof Uint8Array&&(t=so(t)),\"string\"!=typeof t||!n.includes(t.length))throw new Error(\"Invalid key\");t=t.padStart(2*r,\"0\")}let o;try{o=\"bigint\"==typeof t?t:ao(ho(\"private key\",t,r))}catch(e){throw new Error(`private key must be ${r} bytes, hex or bigint, not ${typeof t}`)}return s&&(o=Bo(o,i)),a(o),o}const l=new Map;function u(t){if(!(t instanceof h))throw new Error(\"ProjectivePoint expected\")}class h{constructor(t,e,r){if(this.px=t,this.py=e,this.pz=r,null==t||!n.isValid(t))throw new Error(\"x required\");if(null==e||!n.isValid(e))throw new Error(\"y required\");if(null==r||!n.isValid(r))throw new Error(\"z required\")}static fromAffine(t){const{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw new Error(\"invalid affine point\");if(t instanceof h)throw new Error(\"projective point not allowed\");const s=t=>n.eql(t,n.ZERO);return s(e)&&s(r)?h.ZERO:new h(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=n.invertBatch(t.map((t=>t.pz)));return t.map(((t,n)=>t.toAffine(e[n]))).map(h.fromAffine)}static fromHex(t){const e=h.fromAffine(s(ho(\"pointHex\",t)));return e.assertValidity(),e}static fromPrivateKey(t){return h.BASE.multiply(c(t))}_setWindowSize(t){this._WINDOW_SIZE=t,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:t,y:r}=this.toAffine();if(!n.isValid(t)||!n.isValid(r))throw new Error(\"bad point: x or y not FE\");const s=n.sqr(r),o=i(t);if(!n.eql(s,o))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:t}=this.toAffine();if(n.isOdd)return!n.isOdd(t);throw new Error(\"Field doesn't support isOdd\")}equals(t){u(t);const{px:e,py:r,pz:s}=this,{px:i,py:o,pz:a}=t,c=n.eql(n.mul(e,a),n.mul(i,s)),l=n.eql(n.mul(r,a),n.mul(o,s));return c&&l}negate(){return new h(this.px,n.neg(this.py),this.pz)}double(){const{a:t,b:r}=e,s=n.mul(r,Ko),{px:i,py:o,pz:a}=this;let c=n.ZERO,l=n.ZERO,u=n.ZERO,f=n.mul(i,i),d=n.mul(o,o),p=n.mul(a,a),g=n.mul(i,o);return g=n.add(g,g),u=n.mul(i,a),u=n.add(u,u),c=n.mul(t,u),l=n.mul(s,p),l=n.add(c,l),c=n.sub(d,l),l=n.add(d,l),l=n.mul(c,l),c=n.mul(g,c),u=n.mul(s,u),p=n.mul(t,p),g=n.sub(f,p),g=n.mul(t,g),g=n.add(g,u),u=n.add(f,f),f=n.add(u,f),f=n.add(f,p),f=n.mul(f,g),l=n.add(l,f),p=n.mul(o,a),p=n.add(p,p),f=n.mul(p,g),c=n.sub(c,f),u=n.mul(p,d),u=n.add(u,u),u=n.add(u,u),new h(c,l,u)}add(t){u(t);const{px:r,py:s,pz:i}=this,{px:o,py:a,pz:c}=t;let l=n.ZERO,f=n.ZERO,d=n.ZERO;const p=e.a,g=n.mul(e.b,Ko);let m=n.mul(r,o),y=n.mul(s,a),w=n.mul(i,c),b=n.add(r,s),A=n.add(o,a);b=n.mul(b,A),A=n.add(m,y),b=n.sub(b,A),A=n.add(r,i);let v=n.add(o,c);return A=n.mul(A,v),v=n.add(m,w),A=n.sub(A,v),v=n.add(s,i),l=n.add(a,c),v=n.mul(v,l),l=n.add(y,w),v=n.sub(v,l),d=n.mul(p,A),l=n.mul(g,w),d=n.add(l,d),l=n.sub(y,d),d=n.add(y,d),f=n.mul(l,d),y=n.add(m,m),y=n.add(y,m),w=n.mul(p,w),A=n.mul(g,A),y=n.add(y,w),w=n.sub(m,w),w=n.mul(p,w),A=n.add(A,w),m=n.mul(y,A),f=n.add(f,m),m=n.mul(v,A),l=n.mul(b,l),l=n.sub(l,m),m=n.mul(b,y),d=n.mul(v,d),d=n.add(d,m),new h(l,f,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(h.ZERO)}wNAF(t){return d.wNAFCached(this,l,t,(t=>{const e=n.invertBatch(t.map((t=>t.pz)));return t.map(((t,n)=>t.toAffine(e[n]))).map(h.fromAffine)}))}multiplyUnsafe(t){const r=h.ZERO;if(t===Jo)return r;if(a(t),t===zo)return this;const{endo:s}=e;if(!s)return d.unsafeLadder(this,t);let{k1neg:i,k1:o,k2neg:c,k2:l}=s.splitScalar(t),u=r,f=r,p=this;for(;o>Jo||l>Jo;)o&zo&&(u=u.add(p)),l&zo&&(f=f.add(p)),p=p.double(),o>>=zo,l>>=zo;return i&&(u=u.negate()),c&&(f=f.negate()),f=new h(n.mul(f.px,s.beta),f.py,f.pz),u.add(f)}multiply(t){a(t);let r,s,i=t;const{endo:o}=e;if(o){const{k1neg:t,k1:e,k2neg:a,k2:c}=o.splitScalar(i);let{p:l,f:u}=this.wNAF(e),{p:f,f:p}=this.wNAF(c);l=d.constTimeNegate(t,l),f=d.constTimeNegate(a,f),f=new h(n.mul(f.px,o.beta),f.py,f.pz),r=l.add(f),s=u.add(p)}else{const{p:t,f:e}=this.wNAF(i);r=t,s=e}return h.normalizeZ([r,s])[0]}multiplyAndAddUnsafe(t,e,n){const r=h.BASE,s=(t,e)=>e!==Jo&&e!==zo&&t.equals(r)?t.multiply(e):t.multiplyUnsafe(e),i=s(this,e).add(s(t,n));return i.is0()?void 0:i}toAffine(t){const{px:e,py:r,pz:s}=this,i=this.is0();null==t&&(t=i?n.ONE:n.inv(s));const o=n.mul(e,t),a=n.mul(r,t),c=n.mul(s,t);if(i)return{x:n.ZERO,y:n.ZERO};if(!n.eql(c,n.ONE))throw new Error(\"invZ was invalid\");return{x:o,y:a}}isTorsionFree(){const{h:t,isTorsionFree:n}=e;if(t===zo)return!0;if(n)return n(h,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:t,clearCofactor:n}=e;return t===zo?this:n?n(h,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),r(h,this,t)}toHex(t=!0){return so(this.toRawBytes(t))}}h.BASE=new h(e.Gx,e.Gy,n.ONE),h.ZERO=new h(n.ZERO,n.ONE,n.ZERO);const f=e.nBitLength,d=function(t,e){const n=(t,e)=>{const n=e.negate();return t?n:e},r=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:n,unsafeLadder(e,n){let r=t.ZERO,s=e;for(;n>Mo;)n&Go&&(r=r.add(s)),s=s.double(),n>>=Go;return r},precomputeWindow(t,e){const{windows:n,windowSize:s}=r(e),i=[];let o=t,a=o;for(let t=0;t\u003Cn;t++){a=o,i.push(a);for(let t=1;t\u003Cs;t++)a=a.add(o),i.push(a);o=a.double()}return i},wNAF(e,s,i){const{windows:o,windowSize:a}=r(e);let c=t.ZERO,l=t.BASE;const u=BigInt(2**e-1),h=2**e,f=BigInt(e);for(let t=0;t\u003Co;t++){const e=t*a;let r=Number(i&u);i>>=f,r>a&&(r-=h,i+=Go);const o=e,d=e+Math.abs(r)-1,p=t%2!=0,g=r\u003C0;0===r?l=l.add(n(p,s[o])):c=c.add(n(g,s[d]))}return{p:c,f:l}},wNAFCached(t,e,n,r){const s=t._WINDOW_SIZE||1;let i=e.get(t);return i||(i=this.precomputeWindow(t,s),1!==s&&e.set(t,r(i))),this.wNAF(s,i,n)}}}(h,e.endo?Math.ceil(f/2):f);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function _o(t){const e=function(t){const e=Ho(t);return bo(e,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...e})}(t),{Fp:n,n:r}=e,s=n.BYTES+1,i=2*n.BYTES+1;function o(t){return Bo(t,r)}function a(t){return Oo(t,r)}const{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:u,isWithinCurveOrder:h}=qo({...e,toBytes(t,e,r){const s=e.toAffine(),i=n.toBytes(s.x),o=fo;return r?o(Uint8Array.from([e.hasEvenY()?2:3]),i):o(Uint8Array.from([4]),i,n.toBytes(s.y))},fromBytes(t){const e=t.length,r=t[0],o=t.subarray(1);if(e!==s||2!==r&&3!==r){if(e===i&&4===r){return{x:n.fromBytes(o.subarray(0,n.BYTES)),y:n.fromBytes(o.subarray(n.BYTES,2*n.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${s} compressed bytes or ${i} uncompressed bytes`)}{const t=ao(o);if(!(Jo\u003C(a=t)&&a\u003Cn.ORDER))throw new Error(\"Point is not on curve\");const e=u(t);let s=n.sqrt(e);return 1==(1&r)!==((s&zo)===zo)&&(s=n.neg(s)),{x:t,y:s}}var a}}),f=t=>so(lo(t,e.nByteLength));function d(t){return t>r>>zo}const p=(t,e,n)=>ao(t.slice(e,n));class g{constructor(t,e,n){this.r=t,this.s=e,this.recovery=n,this.assertValidity()}static fromCompact(t){const n=e.nByteLength;return t=ho(\"compactSignature\",t,2*n),new g(p(t,0,n),p(t,n,2*n))}static fromDER(t){const{r:e,s:n}=Vo.toSig(ho(\"DER\",t));return new g(e,n)}assertValidity(){if(!h(this.r))throw new Error(\"r must be 0 \u003C r \u003C CURVE.n\");if(!h(this.s))throw new Error(\"s must be 0 \u003C s \u003C CURVE.n\")}addRecoveryBit(t){return new g(this.r,this.s,t)}recoverPublicKey(t){const{r,s,recovery:i}=this,l=b(ho(\"msgHash\",t));if(null==i||![0,1,2,3].includes(i))throw new Error(\"recovery id invalid\");const u=2===i||3===i?r+e.n:r;if(u>=n.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const h=0==(1&i)?\"02\":\"03\",d=c.fromHex(h+f(u)),p=a(u),g=o(-l*p),m=o(s*p),y=c.BASE.multiplyAndAddUnsafe(d,g,m);if(!y)throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return d(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return oo(this.toDERHex())}toDERHex(){return Vo.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return oo(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const m={isValidPrivateKey(t){try{return l(t),!0}catch(t){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const t=Uo(e.n);return function(t,e,n=!1){const r=t.length,s=Fo(e),i=Uo(e);if(r\u003C16||r\u003Ci||r>1024)throw new Error(`expected ${i}-1024 bytes of input, got ${r}`);const o=Bo(n?ao(t):co(t),e-vo)+vo;return n?uo(o,s):lo(o,s)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=t instanceof Uint8Array,n=\"string\"==typeof t,r=(e||n)&&t.length;return e?r===s||r===i:n?r===2*s||r===2*i:t instanceof c}const w=e.bits2int||function(t){const n=ao(t),r=8*t.length-e.nBitLength;return r>0?n>>BigInt(r):n},b=e.bits2int_modN||function(t){return o(w(t))},A=po(e.nBitLength);function v(t){if(\"bigint\"!=typeof t)throw new Error(\"bigint expected\");if(!(Jo\u003C=t&&t\u003CA))throw new Error(`bigint expected \u003C 2^${e.nBitLength}`);return lo(t,e.nByteLength)}function E(t,r,s=k){if([\"recovered\",\"canonical\"].some((t=>t in s)))throw new Error(\"sign() legacy options not supported\");const{hash:i,randomBytes:u}=e;let{lowS:f,prehash:p,extraEntropy:m}=s;null==f&&(f=!0),t=ho(\"msgHash\",t),p&&(t=ho(\"prehashed msgHash\",i(t)));const y=b(t),A=l(r),E=[v(A),v(y)];if(null!=m){const t=!0===m?u(n.BYTES):m;E.push(ho(\"extraEntropy\",t))}const P=fo(...E),x=y;return{seed:P,k2sig:function(t){const e=w(t);if(!h(e))return;const n=a(e),r=c.BASE.multiply(e).toAffine(),s=o(r.x);if(s===Jo)return;const i=o(n*o(x+s*A));if(i===Jo)return;let l=(r.x===s?0:2)|Number(r.y&zo),u=i;return f&&d(i)&&(u=function(t){return d(t)?o(-t):t}(i),l^=1),new g(s,u,l)}}}const k={lowS:e.lowS,prehash:!1},P={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,n=!0){if(y(t))throw new Error(\"first arg must be private key\");if(!y(e))throw new Error(\"second arg must be public key\");return c.fromHex(e).multiply(l(t)).toRawBytes(n)},sign:function(t,n,r=k){const{seed:s,k2sig:i}=E(t,n,r),o=e;return yo(o.hash.outputLen,o.nByteLength,o.hmac)(s,i)},verify:function(t,n,r,s=P){const i=t;if(n=ho(\"msgHash\",n),r=ho(\"publicKey\",r),\"strict\"in s)throw new Error(\"options.strict was renamed to lowS\");const{lowS:l,prehash:u}=s;let h,f;try{if(\"string\"==typeof i||i instanceof Uint8Array)try{h=g.fromDER(i)}catch(t){if(!(t instanceof Vo.Err))throw t;h=g.fromCompact(i)}else{if(\"object\"!=typeof i||\"bigint\"!=typeof i.r||\"bigint\"!=typeof i.s)throw new Error(\"PARSE\");{const{r:t,s:e}=i;h=new g(t,e)}}f=c.fromHex(r)}catch(t){if(\"PARSE\"===t.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(l&&h.hasHighS())return!1;u&&(n=e.hash(n));const{r:d,s:p}=h,m=b(n),y=a(p),w=o(m*y),A=o(d*y),v=c.BASE.multiplyAndAddUnsafe(f,w,A)?.toAffine();return!!v&&o(v.x)===d},ProjectivePoint:c,Signature:g,utils:m}}function Zo(t){return{hash:t,hmac:(e,...n)=>Lo(t,e,function(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let n=0;return t.forEach((t=>{if(!mt(t))throw new Error(\"Uint8Array expected\");e.set(t,n),n+=t.length})),e}(...n)),randomBytes:Et}}const Wo=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Yo=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),Xo=BigInt(1),$o=BigInt(2),ta=(t,e)=>(t+e/$o)/e;function ea(t){const e=Wo,n=BigInt(3),r=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,h=Co(u,n,e)*u%e,f=Co(h,n,e)*u%e,d=Co(f,$o,e)*l%e,p=Co(d,s,e)*d%e,g=Co(p,i,e)*p%e,m=Co(g,a,e)*g%e,y=Co(m,c,e)*m%e,w=Co(y,a,e)*g%e,b=Co(w,n,e)*u%e,A=Co(b,o,e)*p%e,v=Co(A,r,e)*l%e,E=Co(v,$o,e);if(!na.eql(na.sqr(E),t))throw new Error(\"Cannot find square root\");return E}const na=function(t,e,n=!1,r={}){if(t\u003C=Ao)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=So(t,e);if(i>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const o=Ro(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:po(s),ZERO:Ao,ONE:vo,create:e=>Bo(e,t),isValid:e=>{if(\"bigint\"!=typeof e)throw new Error(\"Invalid field element: expected bigint, got \"+typeof e);return Ao\u003C=e&&e\u003Ct},is0:t=>t===Ao,isOdd:t=>(t&vo)===vo,neg:e=>Bo(-e,t),eql:(t,e)=>t===e,sqr:e=>Bo(e*e,t),add:(e,n)=>Bo(e+n,t),sub:(e,n)=>Bo(e-n,t),mul:(e,n)=>Bo(e*n,t),pow:(t,e)=>function(t,e,n){if(n\u003CAo)throw new Error(\"Expected power > 0\");if(n===Ao)return t.ONE;if(n===vo)return e;let r=t.ONE,s=e;for(;n>Ao;)n&vo&&(r=t.mul(r,s)),s=t.sqr(s),n>>=vo;return r}(a,t,e),div:(e,n)=>Bo(e*Oo(n,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>Oo(e,t),sqrt:r.sqrt||(t=>o(a,t)),invertBatch:t=>function(t,e){const n=new Array(e.length),r=e.reduce(((e,r,s)=>t.is0(r)?e:(n[s]=e,t.mul(e,r))),t.ONE),s=t.inv(r);return e.reduceRight(((e,r,s)=>t.is0(r)?e:(n[s]=t.mul(e,n[s]),t.mul(e,r))),s),n}(a,t),cmov:(t,e,n)=>n?e:t,toBytes:t=>n?uo(t,i):lo(t,i),fromBytes:t=>{if(t.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${t.length}`);return n?co(t):ao(t)}});return Object.freeze(a)}(Wo,void 0,void 0,{sqrt:ea}),ra=function(t,e){const n=e=>_o({...t,...Zo(e)});return Object.freeze({...n(e),create:n})}({a:BigInt(0),b:BigInt(7),Fp:na,n:Yo,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:t=>{const e=Yo,n=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),r=-Xo*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),s=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),i=n,o=BigInt(\"0x100000000000000000000000000000000\"),a=ta(i*t,e),c=ta(-r*t,e);let l=Bo(t-a*n-c*s,e),u=Bo(-a*r-c*i,e);const h=l>o,f=u>o;if(h&&(l=e-l),f&&(u=e-u),l>o||u>o)throw new Error(\"splitScalar: Endomorphism failed, k=\"+t);return{k1neg:h,k1:l,k2neg:f,k2:u}}}},Bi);BigInt(0);ra.ProjectivePoint;class sa{#rt;constructor(t){f(32===P(t),\"invalid private key\",\"privateKey\",\"[REDACTED]\"),this.#rt=E(t)}get privateKey(){return this.#rt}get publicKey(){return sa.computePublicKey(this.#rt)}get compressedPublicKey(){return sa.computePublicKey(this.#rt,!0)}sign(t){f(32===P(t),\"invalid digest length\",\"digest\",t);const e=ra.sign(w(t),w(this.#rt),{lowS:!0});return $i.from({r:M(e.r,32),s:M(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=sa.computePublicKey(t);return E(ra.getSharedSecret(w(this.#rt),y(e),!1))}static computePublicKey(t,e){let n=y(t,\"key\");if(32===n.length){return E(ra.getPublicKey(n,!!e))}if(64===n.length){const t=new Uint8Array(65);t[0]=4,t.set(n,1),n=t}return E(ra.ProjectivePoint.fromHex(n).toRawBytes(e))}static recoverPublicKey(t,e){f(32===P(t),\"invalid digest length\",\"digest\",t);const n=$i.from(e);let r=ra.Signature.fromCompact(w(k([n.r,n.s])));r=r.addRecoveryBit(n.yParity);const s=r.recoverPublicKey(w(t));return f(null!=s,\"invalid signautre for digest\",\"signature\",e),\"0x\"+s.toHex(!1)}static addPoints(t,e,n){const r=ra.ProjectivePoint.fromHex(sa.computePublicKey(t).substring(2)),s=ra.ProjectivePoint.fromHex(sa.computePublicKey(e).substring(2));return\"0x\"+r.add(s).toHex(!!n)}}function ia(t){let e=t.toString(16);for(;e.length\u003C2;)e=\"0\"+e;return\"0x\"+e}function oa(t,e,n){let r=0;for(let s=0;s\u003Cn;s++)r=256*r+t[e+s];return r}function aa(t,e,n,r){const s=[];for(;n\u003Ce+1+r;){const i=ca(t,n);s.push(i.result),h((n+=i.consumed)\u003C=e+1+r,\"child data too short\",\"BUFFER_OVERRUN\",{buffer:t,length:r,offset:e})}return{consumed:1+r,result:s}}function ca(t,e){h(0!==t.length,\"data too short\",\"BUFFER_OVERRUN\",{buffer:t,length:0,offset:1});const n=e=>{h(e\u003C=t.length,\"data short segment too short\",\"BUFFER_OVERRUN\",{buffer:t,length:t.length,offset:e})};if(t[e]>=248){const r=t[e]-247;n(e+1+r);const s=oa(t,e+1,r);return n(e+1+r+s),aa(t,e,e+1+r,r+s)}if(t[e]>=192){const r=t[e]-192;return n(e+1+r),aa(t,e,e+1,r)}if(t[e]>=184){const r=t[e]-183;n(e+1+r);const s=oa(t,e+1,r);n(e+1+r+s);return{consumed:1+r+s,result:E(t.slice(e+1+r,e+1+r+s))}}if(t[e]>=128){const r=t[e]-128;n(e+1+r);return{consumed:1+r,result:E(t.slice(e+1,e+1+r))}}return{consumed:1,result:ia(t[e])}}function la(t){const e=y(t,\"data\"),n=ca(e,0);return f(n.consumed===e.length,\"unexpected junk after rlp payload\",\"data\",t),n.result}function ua(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function ha(t){if(Array.isArray(t)){let e=[];if(t.forEach((function(t){e=e.concat(ha(t))})),e.length\u003C=55)return e.unshift(192+e.length),e;const n=ua(e.length);return n.unshift(247+n.length),n.concat(e)}const e=Array.prototype.slice.call(y(t,\"object\"));if(1===e.length&&e[0]\u003C=127)return e;if(e.length\u003C=55)return e.unshift(128+e.length),e;const n=ua(e.length);return n.unshift(183+n.length),n.concat(e)}const fa=\"0123456789abcdef\";function da(t){let e=\"0x\";for(const n of ha(t))e+=fa[n>>4],e+=fa[15&n];return e}function pa(t,e){return function(t){let e;return e=\"string\"==typeof t?sa.computePublicKey(t,!1):t.publicKey,Wt(jt(\"0x\"+e.substring(4)).substring(26))}(sa.recoverPublicKey(t,e))}const ga=BigInt(0),ma=BigInt(2),ya=BigInt(27),wa=BigInt(28),ba=BigInt(35),Aa=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),va=131072;function Ea(t,e){let n=t.toString(16);for(;n.length\u003C2;)n=\"0\"+n;return n+=ji(e).substring(4),\"0x\"+n}function ka(t){return\"0x\"===t?null:Wt(t)}function Pa(t,e){try{return jn(t)}catch(n){f(!1,n.message,e,t)}}function xa(t,e){return\"0x\"===t?0:L(t,e)}function Na(t,e){if(\"0x\"===t)return ga;const n=S(t,e);return f(n\u003C=Aa,\"value exceeds uint size\",e,n),n}function Ba(t,e){const n=S(t,\"value\"),r=G(n);return f(r.length\u003C=32,\"value too large\",`tx.${e}`,n),r}function Ia(t){return jn(t).map((t=>[t.address,t.storageKeys]))}function Ca(t,e){f(Array.isArray(t),`invalid ${e}`,\"value\",t);for(let e=0;e\u003Ct.length;e++)f(b(t[e],32),\"invalid ${ param } hash\",`value[${e}]`,t[e]);return t}function Oa(t,e){let n;try{if(n=xa(e[0],\"yParity\"),0!==n&&1!==n)throw new Error(\"bad yParity\")}catch(t){f(!1,\"invalid yParity\",\"yParity\",e[0])}const r=B(e[1],32),s=B(e[2],32),i=$i.from({r,s,yParity:n});t.signature=i}class Ra{#st;#it;#e;#ot;#at;#ct;#lt;#ut;#ht;#ft;#dt;#pt;#gt;#mt;#yt;#wt;get type(){return this.#st}set type(t){switch(t){case null:this.#st=null;break;case 0:case\"legacy\":this.#st=0;break;case 1:case\"berlin\":case\"eip-2930\":this.#st=1;break;case 2:case\"london\":case\"eip-1559\":this.#st=2;break;case 3:case\"cancun\":case\"eip-4844\":this.#st=3;break;default:f(!1,\"unsupported transaction type\",\"type\",t)}}get typeName(){switch(this.type){case 0:return\"legacy\";case 1:return\"eip-2930\";case 2:return\"eip-1559\";case 3:return\"eip-4844\"}return null}get to(){const t=this.#it;return null==t&&3===this.type?rr:t}set to(t){this.#it=null==t?null:Wt(t)}get nonce(){return this.#ot}set nonce(t){this.#ot=L(t,\"value\")}get gasLimit(){return this.#at}set gasLimit(t){this.#at=S(t)}get gasPrice(){const t=this.#ct;return null!=t||0!==this.type&&1!==this.type?t:ga}set gasPrice(t){this.#ct=null==t?null:S(t,\"gasPrice\")}get maxPriorityFeePerGas(){const t=this.#lt;return null==t?2===this.type||3===this.type?ga:null:t}set maxPriorityFeePerGas(t){this.#lt=null==t?null:S(t,\"maxPriorityFeePerGas\")}get maxFeePerGas(){const t=this.#ut;return null==t?2===this.type||3===this.type?ga:null:t}set maxFeePerGas(t){this.#ut=null==t?null:S(t,\"maxFeePerGas\")}get data(){return this.#e}set data(t){this.#e=E(t)}get value(){return this.#ht}set value(t){this.#ht=S(t,\"value\")}get chainId(){return this.#ft}set chainId(t){this.#ft=S(t)}get signature(){return this.#dt||null}set signature(t){this.#dt=null==t?null:$i.from(t)}get accessList(){const t=this.#pt||null;return null==t?1===this.type||2===this.type||3===this.type?[]:null:t}set accessList(t){this.#pt=null==t?null:jn(t)}get maxFeePerBlobGas(){const t=this.#gt;return null==t&&3===this.type?ga:t}set maxFeePerBlobGas(t){this.#gt=null==t?null:S(t,\"maxFeePerBlobGas\")}get blobVersionedHashes(){let t=this.#mt;return null==t&&3===this.type?[]:t}set blobVersionedHashes(t){if(null!=t){f(Array.isArray(t),\"blobVersionedHashes must be an Array\",\"value\",t),t=t.slice();for(let e=0;e\u003Ct.length;e++)f(b(t[e],32),\"invalid blobVersionedHash\",`value[${e}]`,t[e])}this.#mt=t}get blobs(){return null==this.#wt?null:this.#wt.map((t=>Object.assign({},t)))}set blobs(t){if(null==t)return void(this.#wt=null);const e=[],n=[];for(let r=0;r\u003Ct.length;r++){const s=t[r];if(A(s)){h(this.#yt,\"adding a raw blob requires a KZG library\",\"UNSUPPORTED_OPERATION\",{operation:\"set blobs()\"});let t=y(s);if(f(t.length\u003C=va,\"blob is too large\",`blobs[${r}]`,s),t.length!==va){const e=new Uint8Array(va);e.set(t),t=e}const i=this.#yt.blobToKzgCommitment(t),o=E(this.#yt.computeBlobKzgProof(t,i));e.push({data:E(t),commitment:E(i),proof:o}),n.push(Ea(1,i))}else{const t=E(s.commitment);e.push({data:E(s.data),commitment:t,proof:E(s.proof)}),n.push(Ea(1,t))}}this.#wt=e,this.#mt=n}get kzg(){return this.#yt}set kzg(t){this.#yt=t}constructor(){this.#st=null,this.#it=null,this.#ot=0,this.#at=ga,this.#ct=null,this.#lt=null,this.#ut=null,this.#e=\"0x\",this.#ht=ga,this.#ft=ga,this.#dt=null,this.#pt=null,this.#gt=null,this.#mt=null,this.#wt=null,this.#yt=null}get hash(){return null==this.signature?null:jt(this.#bt(!0,!1))}get unsignedHash(){return jt(this.unsignedSerialized)}get from(){return null==this.signature?null:pa(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:sa.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#bt(t,e){h(!t||null!=this.signature,\"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"});const n=t?this.signature:null;switch(this.inferType()){case 0:return function(t,e){const n=[Ba(t.nonce,\"nonce\"),Ba(t.gasPrice||0,\"gasPrice\"),Ba(t.gasLimit,\"gasLimit\"),t.to||\"0x\",Ba(t.value,\"value\"),t.data];let r=ga;if(t.chainId!=ga)r=S(t.chainId,\"tx.chainId\"),f(!e||null==e.networkV||e.legacyChainId===r,\"tx.chainId/sig.v mismatch\",\"sig\",e);else if(t.signature){const e=t.signature.legacyChainId;null!=e&&(r=e)}if(!e)return r!==ga&&(n.push(G(r)),n.push(\"0x\"),n.push(\"0x\")),da(n);let s=BigInt(27+e.yParity);return r!==ga?s=$i.getChainIdV(r,e.v):BigInt(e.v)!==s&&f(!1,\"tx.chainId/sig.v mismatch\",\"sig\",e),n.push(G(s)),n.push(G(e.r)),n.push(G(e.s)),da(n)}(this,n);case 1:return function(t,e){const n=[Ba(t.chainId,\"chainId\"),Ba(t.nonce,\"nonce\"),Ba(t.gasPrice||0,\"gasPrice\"),Ba(t.gasLimit,\"gasLimit\"),t.to||\"0x\",Ba(t.value,\"value\"),t.data,Ia(t.accessList||[])];return e&&(n.push(Ba(e.yParity,\"recoveryParam\")),n.push(G(e.r)),n.push(G(e.s))),k([\"0x01\",da(n)])}(this,n);case 2:return function(t,e){const n=[Ba(t.chainId,\"chainId\"),Ba(t.nonce,\"nonce\"),Ba(t.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Ba(t.maxFeePerGas||0,\"maxFeePerGas\"),Ba(t.gasLimit,\"gasLimit\"),t.to||\"0x\",Ba(t.value,\"value\"),t.data,Ia(t.accessList||[])];return e&&(n.push(Ba(e.yParity,\"yParity\")),n.push(G(e.r)),n.push(G(e.s))),k([\"0x02\",da(n)])}(this,n);case 3:return function(t,e,n){const r=[Ba(t.chainId,\"chainId\"),Ba(t.nonce,\"nonce\"),Ba(t.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Ba(t.maxFeePerGas||0,\"maxFeePerGas\"),Ba(t.gasLimit,\"gasLimit\"),t.to||rr,Ba(t.value,\"value\"),t.data,Ia(t.accessList||[]),Ba(t.maxFeePerBlobGas||0,\"maxFeePerBlobGas\"),Ca(t.blobVersionedHashes||[],\"blobVersionedHashes\")];return e&&(r.push(Ba(e.yParity,\"yParity\")),r.push(G(e.r)),r.push(G(e.s)),n)?k([\"0x03\",da([r,n.map((t=>t.data)),n.map((t=>t.commitment)),n.map((t=>t.proof))])]):k([\"0x03\",da(r)])}(this,n,e?this.blobs:null)}h(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"})}get serialized(){return this.#bt(!0,!0)}get unsignedSerialized(){return this.#bt(!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=null!=this.gasPrice,e=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,n=null!=this.accessList,r=null!=this.#gt||this.#mt;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&h(this.maxFeePerGas>=this.maxPriorityFeePerGas,\"priorityFee cannot be more than maxFee\",\"BAD_DATA\",{value:this}),h(!e||0!==this.type&&1!==this.type,\"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\",\"BAD_DATA\",{value:this}),h(0!==this.type||!n,\"legacy transaction cannot have accessList\",\"BAD_DATA\",{value:this});const s=[];return null!=this.type?s.push(this.type):e?s.push(2):t?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(r&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return Ra.from(this)}toJSON(){const t=t=>null==t?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(null==t)return new Ra;if(\"string\"==typeof t){const e=y(t);if(e[0]>=127)return Ra.from(function(t){const e=la(t);f(Array.isArray(e)&&(9===e.length||6===e.length),\"invalid field count for legacy transaction\",\"data\",t);const n={type:0,nonce:xa(e[0],\"nonce\"),gasPrice:Na(e[1],\"gasPrice\"),gasLimit:Na(e[2],\"gasLimit\"),to:ka(e[3]),value:Na(e[4],\"value\"),data:E(e[5]),chainId:ga};if(6===e.length)return n;const r=Na(e[6],\"v\"),s=Na(e[7],\"r\"),i=Na(e[8],\"s\");if(s===ga&&i===ga)n.chainId=r;else{let t=(r-ba)/ma;t\u003Cga&&(t=ga),n.chainId=t,f(t!==ga||r===ya||r===wa,\"non-canonical legacy v\",\"v\",e[6]),n.signature=$i.from({r:B(e[7],32),s:B(e[8],32),v:r})}return n}(e));switch(e[0]){case 1:return Ra.from(function(t){const e=la(y(t).slice(1));f(Array.isArray(e)&&(8===e.length||11===e.length),\"invalid field count for transaction type: 1\",\"data\",E(t));const n={type:1,chainId:Na(e[0],\"chainId\"),nonce:xa(e[1],\"nonce\"),gasPrice:Na(e[2],\"gasPrice\"),gasLimit:Na(e[3],\"gasLimit\"),to:ka(e[4]),value:Na(e[5],\"value\"),data:E(e[6]),accessList:Pa(e[7],\"accessList\")};return 8===e.length||Oa(n,e.slice(8)),n}(e));case 2:return Ra.from(function(t){const e=la(y(t).slice(1));f(Array.isArray(e)&&(9===e.length||12===e.length),\"invalid field count for transaction type: 2\",\"data\",E(t));const n={type:2,chainId:Na(e[0],\"chainId\"),nonce:xa(e[1],\"nonce\"),maxPriorityFeePerGas:Na(e[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Na(e[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Na(e[4],\"gasLimit\"),to:ka(e[5]),value:Na(e[6],\"value\"),data:E(e[7]),accessList:Pa(e[8],\"accessList\")};return 9===e.length||Oa(n,e.slice(9)),n}(e));case 3:return Ra.from(function(t){let e=la(y(t).slice(1)),n=\"3\",r=null;if(4===e.length&&Array.isArray(e[0])){n=\"3 (network format)\";const t=e[1],s=e[2],i=e[3];f(Array.isArray(t),\"invalid network format: blobs not an array\",\"fields[1]\",t),f(Array.isArray(s),\"invalid network format: commitments not an array\",\"fields[2]\",s),f(Array.isArray(i),\"invalid network format: proofs not an array\",\"fields[3]\",i),f(t.length===s.length,\"invalid network format: blobs/commitments length mismatch\",\"fields\",e),f(t.length===i.length,\"invalid network format: blobs/proofs length mismatch\",\"fields\",e),r=[];for(let n=0;n\u003Ce[1].length;n++)r.push({data:t[n],commitment:s[n],proof:i[n]});e=e[0]}f(Array.isArray(e)&&(11===e.length||14===e.length),`invalid field count for transaction type: ${n}`,\"data\",E(t));const s={type:3,chainId:Na(e[0],\"chainId\"),nonce:xa(e[1],\"nonce\"),maxPriorityFeePerGas:Na(e[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Na(e[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Na(e[4],\"gasLimit\"),to:ka(e[5]),value:Na(e[6],\"value\"),data:E(e[7]),accessList:Pa(e[8],\"accessList\"),maxFeePerBlobGas:Na(e[9],\"maxFeePerBlobGas\"),blobVersionedHashes:e[10]};r&&(s.blobs=r),f(null!=s.to,`invalid address for transaction type: ${n}`,\"data\",t),f(Array.isArray(s.blobVersionedHashes),\"invalid blobVersionedHashes: must be an array\",\"data\",t);for(let e=0;e\u003Cs.blobVersionedHashes.length;e++)f(b(s.blobVersionedHashes[e],32),`invalid blobVersionedHash at index ${e}: must be length 32`,\"data\",t);return 11===e.length||Oa(s,e.slice(11)),s}(e))}h(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\"from\"})}const e=new Ra;return null!=t.type&&(e.type=t.type),null!=t.to&&(e.to=t.to),null!=t.nonce&&(e.nonce=t.nonce),null!=t.gasLimit&&(e.gasLimit=t.gasLimit),null!=t.gasPrice&&(e.gasPrice=t.gasPrice),null!=t.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),null!=t.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null!=t.maxFeePerBlobGas&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),null!=t.data&&(e.data=t.data),null!=t.value&&(e.value=t.value),null!=t.chainId&&(e.chainId=t.chainId),null!=t.signature&&(e.signature=$i.from(t.signature)),null!=t.accessList&&(e.accessList=t.accessList),null!=t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes),null!=t.kzg&&(e.kzg=t.kzg),null!=t.blobs&&(e.blobs=t.blobs),null!=t.hash&&(f(e.isSigned(),\"unsigned transaction cannot define '.hash'\",\"tx\",t),f(e.hash===t.hash,\"hash mismatch\",\"tx\",t)),null!=t.from&&(f(e.isSigned(),\"unsigned transaction cannot define '.from'\",\"tx\",t),f(e.from.toLowerCase()===(t.from||\"\").toLowerCase(),\"from mismatch\",\"tx\",t)),e}}const Ta=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";BigInt(0);const Sa=BigInt(58);function Fa(t){return t.match(/^ipfs:\\/\\/ipfs\\//i)?t=t.substring(12):t.match(/^ipfs:\\/\\//i)?t=t.substring(7):f(!1,\"unsupported IPFS format\",\"link\",t),`https://gateway.ipfs.io/ipfs/${t}`}class Ua{name;constructor(t){o(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error(\"unsupported coin\")}async decodeAddress(t,e){throw new Error(\"unsupported coin\")}}const Da=new RegExp(\"^(ipfs)://(.*)$\",\"i\"),La=[new RegExp(\"^(https)://(.*)$\",\"i\"),new RegExp(\"^(data):(.*)$\",\"i\"),Da,new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\",\"i\")];class Ma{provider;address;name;#At;#vt;constructor(t,e,n){o(this,{provider:t,address:e,name:n}),this.#At=null,this.#vt=new Yr(e,[\"function supportsInterface(bytes4) view returns (bool)\",\"function resolve(bytes, bytes) view returns (bytes)\",\"function addr(bytes32) view returns (address)\",\"function addr(bytes32, uint) view returns (bytes)\",\"function text(bytes32, string) view returns (string)\",\"function contenthash(bytes32) view returns (bytes)\"],t)}async supportsWildcard(){return null==this.#At&&(this.#At=(async()=>{try{return await this.#vt.supportsInterface(\"0x9061b923\")}catch(t){if(c(t,\"CALL_EXCEPTION\"))return!1;throw this.#At=null,t}})()),await this.#At}async#Et(t,e){e=(e||[]).slice();const n=this.#vt.interface;e.unshift(wi(this.name));let r=null;await this.supportsWildcard()&&(r=n.getFunction(t),h(r,\"missing fragment\",\"UNKNOWN_ERROR\",{info:{funcName:t}}),e=[bi(this.name,255),n.encodeFunctionData(r,e)],t=\"resolve(bytes,bytes)\"),e.push({enableCcipRead:!0});try{const s=await this.#vt[t](...e);return r?n.decodeFunctionResult(r,s)[0]:s}catch(t){if(!c(t,\"CALL_EXCEPTION\"))throw t}return null}async getAddress(t){if(null==t&&(t=60),60===t)try{const t=await this.#Et(\"addr(bytes32)\");return null==t||t===rr?null:t}catch(t){if(c(t,\"CALL_EXCEPTION\"))return null;throw t}if(t>=0&&t\u003C2147483648){let e=t+2147483648;const n=await this.#Et(\"addr(bytes32,uint)\",[e]);if(b(n,20))return Wt(n)}let e=null;for(const n of this.provider.plugins)if(n instanceof Ua&&n.suppor��u�tsCoinType(t)){e=n;break}if(null==e)return null;const n=await this.#Et(\"addr(bytes32,uint)\",[t]);if(null==n||\"0x\"===n)return null;const r=await e.decodeAddress(t,n);if(null!=r)return r;h(!1,\"invalid coin data\",\"UNSUPPORTED_OPERATION\",{operation:`getAddress(${t})`,info:{coinType:t,data:n}})}async getText(t){const e=await this.#Et(\"text(bytes32,string)\",[t]);return null==e||\"0x\"===e?null:e}async getContentHash(){const t=await this.#Et(\"contenthash(bytes32)\");if(null==t||\"0x\"===t)return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const t=\"e3010170\"===e[1]?\"ipfs\":\"ipns\",n=parseInt(e[4],16);if(e[5].length===2*n)return`${t}://${function(t){const e=y(t);let n=D(e),r=\"\";for(;n;)r=Ta[Number(n%Sa)]+r,n/=Sa;for(let t=0;t\u003Ce.length&&!e[t];t++)r=Ta[0]+r;return r}(\"0x\"+e[2])}`}const n=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return`bzz://${n[1]}`;h(!1,\"invalid or unsupported content hash data\",\"UNSUPPORTED_OPERATION\",{operation:\"getContentHash()\",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:\"name\",value:this.name}];try{const e=await this.getText(\"avatar\");if(null==e)return t.push({type:\"!avatar\",value:\"\"}),{url:null,linkage:t};t.push({type:\"avatar\",value:e});for(let n=0;n\u003CLa.length;n++){const r=e.match(La[n]);if(null==r)continue;const s=r[1].toLowerCase();switch(s){case\"https\":case\"data\":return t.push({type:\"url\",value:e}),{linkage:t,url:e};case\"ipfs\":{const n=Fa(e);return t.push({type:\"ipfs\",value:e}),t.push({type:\"url\",value:n}),{linkage:t,url:n}}case\"erc721\":case\"erc1155\":{const n=\"erc721\"===s?\"tokenURI(uint256)\":\"uri(uint256)\";t.push({type:s,value:e});const i=await this.getAddress();if(null==i)return t.push({type:\"!owner\",value:\"\"}),{url:null,linkage:t};const o=(r[2]||\"\").split(\"/\");if(2!==o.length)return t.push({type:`!${s}caip`,value:r[2]||\"\"}),{url:null,linkage:t};const a=o[1],c=new Yr(o[0],[\"function tokenURI(uint) view returns (string)\",\"function ownerOf(uint) view returns (address)\",\"function uri(uint) view returns (string)\",\"function balanceOf(address, uint256) view returns (uint)\"],this.provider);if(\"erc721\"===s){const e=await c.ownerOf(a);if(i!==e)return t.push({type:\"!owner\",value:e}),{url:null,linkage:t};t.push({type:\"owner\",value:e})}else if(\"erc1155\"===s){const e=await c.balanceOf(i,a);if(!e)return t.push({type:\"!balance\",value:\"0\"}),{url:null,linkage:t};t.push({type:\"balance\",value:e.toString()})}let l=await c[n](a);if(null==l||\"0x\"===l)return t.push({type:\"!metadata-url\",value:\"\"}),{url:null,linkage:t};t.push({type:\"metadata-url-base\",value:l}),\"erc1155\"===s&&(l=l.replace(\"{id}\",M(a,32).substring(2)),t.push({type:\"metadata-url-expanded\",value:l})),l.match(/^ipfs:/i)&&(l=Fa(l)),t.push({type:\"metadata-url\",value:l});let u={};const h=await new tr(l).send();h.assertOk();try{u=h.bodyJson}catch(e){try{t.push({type:\"!metadata\",value:h.bodyText})}catch(e){const n=h.body;return n&&t.push({type:\"!metadata\",value:E(n)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!u)return t.push({type:\"!metadata\",value:\"\"}),{url:null,linkage:t};t.push({type:\"metadata\",value:JSON.stringify(u)});let f=u.image;if(\"string\"!=typeof f)return t.push({type:\"!imageUrl\",value:\"\"}),{url:null,linkage:t};if(f.match(/^(https:\\/\\/|data:)/i));else{if(null==f.match(Da))return t.push({type:\"!imageUrl-ipfs\",value:f}),{url:null,linkage:t};t.push({type:\"imageUrl-ipfs\",value:f}),f=Fa(f)}return t.push({type:\"url\",value:f}),{linkage:t,url:f}}}}}catch(t){}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),n=e.getPlugin(\"org.ethers.plugins.network.Ens\");return h(n,\"network does not support ENS\",\"UNSUPPORTED_OPERATION\",{operation:\"getEnsAddress\",info:{network:e}}),n.address}static async#kt(t,e){const n=await Ma.getEnsAddress(t);try{const r=new Yr(n,[\"function resolver(bytes32) view returns (address)\"],t),s=await r.resolver(wi(e),{enableCcipRead:!0});return s===rr?null:s}catch(t){throw t}return null}static async fromName(t,e){let n=e;for(;;){if(\"\"===n||\".\"===n)return null;if(\"eth\"!==e&&\"eth\"===n)return null;const r=await Ma.#kt(t,n);if(null!=r){const s=new Ma(t,r,e);return n===e||await s.supportsWildcard()?s:null}n=n.split(\".\").slice(1).join(\".\")}}}const Ga=BigInt(0);function Ha(t,e){return function(n){return null==n?e:t(n)}}function Qa(t,e){return n=>{if(e&&null==n)return null;if(!Array.isArray(n))throw new Error(\"not an array\");return n.map((e=>t(e)))}}function ja(t,e){return n=>{const r={};for(const s in t){let i=s;if(e&&s in e&&!(i in n))for(const t of e[s])if(t in n){i=t;break}try{const e=t[s](n[i]);void 0!==e&&(r[s]=e)}catch(t){h(!1,`invalid value for value.${s} (${t instanceof Error?t.message:\"not-an-error\"})`,\"BAD_DATA\",{value:n})}}return r}}function Va(t){return f(b(t,!0),\"invalid data\",\"value\",t),t}function Ja(t){return f(b(t,32),\"invalid hash\",\"value\",t),t}const za=ja({address:Wt,blockHash:Ja,blockNumber:L,data:Va,index:L,removed:Ha((function(t){switch(t){case!0:case\"true\":return!0;case!1:case\"false\":return!1}f(!1,`invalid boolean; ${JSON.stringify(t)}`,\"value\",t)}),!1),topics:Qa(Ja),transactionHash:Ja,transactionIndex:L},{index:[\"logIndex\"]});const Ka=ja({hash:Ha(Ja),parentHash:Ja,parentBeaconBlockRoot:Ha(Ja,null),number:L,timestamp:L,nonce:Ha(Va),difficulty:S,gasLimit:S,gasUsed:S,stateRoot:Ha(Ja,null),receiptsRoot:Ha(Ja,null),blobGasUsed:Ha(S,null),excessBlobGas:Ha(S,null),miner:Ha(Wt),prevRandao:Ha(Ja,null),extraData:Va,baseFeePerGas:Ha(S)},{prevRandao:[\"mixHash\"]});const qa=ja({transactionIndex:L,blockNumber:L,transactionHash:Ja,address:Wt,topics:Qa(Ja),data:Va,index:L,blockHash:Ja},{index:[\"logIndex\"]});const _a=ja({to:Ha(Wt,null),from:Ha(Wt,null),contractAddress:Ha(Wt,null),index:L,root:Ha(E),gasUsed:S,blobGasUsed:Ha(S,null),logsBloom:Ha(Va),blockHash:Ja,hash:Ja,logs:Qa((function(t){return qa(t)})),blockNumber:L,cumulativeGasUsed:S,effectiveGasPrice:Ha(S),blobGasPrice:Ha(S,null),status:Ha(L),type:Ha(L,0)},{effectiveGasPrice:[\"gasPrice\"],hash:[\"transactionHash\"],index:[\"transactionIndex\"]});function Za(t){t.to&&S(t.to)===Ga&&(t.to=\"0x0000000000000000000000000000000000000000\");const e=ja({hash:Ja,index:Ha(L,void 0),type:t=>\"0x\"===t||null==t?0:L(t),accessList:Ha(jn,null),blobVersionedHashes:Ha(Qa(Ja,!0),null),blockHash:Ha(Ja,null),blockNumber:Ha(L,null),transactionIndex:Ha(L,null),from:Wt,gasPrice:Ha(S),maxPriorityFeePerGas:Ha(S),maxFeePerGas:Ha(S),maxFeePerBlobGas:Ha(S,null),gasLimit:S,to:Ha(Wt,null),value:S,nonce:L,data:Va,creates:Ha(Wt,null),chainId:Ha(S,null)},{data:[\"input\"],gasLimit:[\"gas\"],index:[\"transactionIndex\"]})(t);if(null==e.to&&null==e.creates&&(e.creates=function(t){const e=Wt(t.from);let n=S(t.nonce,\"tx.nonce\").toString(16);return n=\"0\"===n?\"0x\":n.length%2?\"0x0\"+n:\"0x\"+n,Wt(x(jt(da([e,n])),12))}(e)),1!==t.type&&2!==t.type||null!=t.accessList||(e.accessList=[]),t.signature?e.signature=$i.from(t.signature):e.signature=$i.from(t),null==e.chainId){const t=e.signature.legacyChainId;null!=t&&(e.chainId=t)}return e.blockHash&&S(e.blockHash)===Ga&&(e.blockHash=null),e}class Wa{name;constructor(t){o(this,{name:t})}clone(){return new Wa(this.name)}}class Ya extends Wa{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(t,e){null==t&&(t=0),super(`org.ethers.network.plugins.GasCost#${t||0}`);const n={effectiveBlock:t};function r(t,r){let s=(e||{})[t];null==s&&(s=r),f(\"number\"==typeof s,`invalud value for ${t}`,\"costs\",e),n[t]=s}r(\"txBase\",21e3),r(\"txCreate\",32e3),r(\"txDataZero\",4),r(\"txDataNonzero\",16),r(\"txAccessListStorageKey\",1900),r(\"txAccessListAddress\",2400),o(this,n)}clone(){return new Ya(this.effectiveBlock,this)}}class Xa extends Wa{address;targetNetwork;constructor(t,e){super(\"org.ethers.plugins.network.Ens\"),o(this,{address:t||\"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",targetNetwork:null==e?1:e})}clone(){return new Xa(this.address,this.targetNetwork)}}class $a extends Wa{#N;#Pt;get url(){return this.#N}get processFunc(){return this.#Pt}constructor(t,e){super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\"),this.#N=t,this.#Pt=e}clone(){return this}}const tc=new Map;class ec{#xt;#ft;#Nt;constructor(t,e){this.#xt=t,this.#ft=S(e),this.#Nt=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#xt}set name(t){this.#xt=t}get chainId(){return this.#ft}set chainId(t){this.#ft=S(t,\"chainId\")}matches(t){if(null==t)return!1;if(\"string\"==typeof t){try{return this.chainId===S(t)}catch(t){}return this.name===t}if(\"number\"==typeof t||\"bigint\"==typeof t){try{return this.chainId===S(t)}catch(t){}return!1}if(\"object\"==typeof t){if(null!=t.chainId){try{return this.chainId===S(t.chainId)}catch(t){}return!1}return null!=t.name&&this.name===t.name}return!1}get plugins(){return Array.from(this.#Nt.values())}attachPlugin(t){if(this.#Nt.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#Nt.set(t.name,t.clone()),this}getPlugin(t){return this.#Nt.get(t)||null}getPlugins(t){return this.plugins.filter((e=>e.name.split(\"#\")[0]===t))}clone(){const t=new ec(this.name,this.chainId);return this.plugins.forEach((e=>{t.attachPlugin(e.clone())})),t}computeIntrinsicGas(t){const e=this.getPlugin(\"org.ethers.plugins.network.GasCost\")||new Ya;let n=e.txBase;if(null==t.to&&(n+=e.txCreate),t.data)for(let r=2;r\u003Ct.data.length;r+=2)\"00\"===t.data.substring(r,r+2)?n+=e.txDataZero:n+=e.txDataNonzero;if(t.accessList){const r=jn(t.accessList);for(const t in r)n+=e.txAccessListAddress+e.txAccessListStorageKey*r[t].storageKeys.length}return n}static from(t){if(function(){if(sc)return;function t(t,e,n){const r=function(){const r=new ec(t,e);return null!=n.ensNetwork&&r.attachPlugin(new Xa(null,n.ensNetwork)),r.attachPlugin(new Ya),(n.plugins||[]).forEach((t=>{r.attachPlugin(t)})),r};ec.register(t,r),ec.register(e,r),n.altNames&&n.altNames.forEach((t=>{ec.register(t,r)}))}sc=!0,t(\"mainnet\",1,{ensNetwork:1,altNames:[\"homestead\"]}),t(\"ropsten\",3,{ensNetwork:3}),t(\"rinkeby\",4,{ensNetwork:4}),t(\"goerli\",5,{ensNetwork:5}),t(\"kovan\",42,{ensNetwork:42}),t(\"sepolia\",11155111,{ensNetwork:11155111}),t(\"holesky\",17e3,{ensNetwork:17e3}),t(\"classic\",61,{}),t(\"classicKotti\",6,{}),t(\"arbitrum\",42161,{ensNetwork:1}),t(\"arbitrum-goerli\",421613,{}),t(\"arbitrum-sepolia\",421614,{}),t(\"base\",8453,{ensNetwork:1}),t(\"base-goerli\",84531,{}),t(\"base-sepolia\",84532,{}),t(\"bnb\",56,{ensNetwork:1}),t(\"bnbt\",97,{}),t(\"linea\",59144,{ensNetwork:1}),t(\"linea-goerli\",59140,{}),t(\"linea-sepolia\",59141,{}),t(\"matic\",137,{ensNetwork:1,plugins:[rc(\"https://gasstation.polygon.technology/v2\")]}),t(\"matic-amoy\",80002,{}),t(\"matic-mumbai\",80001,{altNames:[\"maticMumbai\",\"maticmum\"],plugins:[rc(\"https://gasstation-testnet.polygon.technology/v2\")]}),t(\"optimism\",10,{ensNetwork:1,plugins:[]}),t(\"optimism-goerli\",420,{}),t(\"optimism-sepolia\",11155420,{}),t(\"xdai\",100,{ensNetwork:1})}(),null==t)return ec.from(\"mainnet\");if(\"number\"==typeof t&&(t=BigInt(t)),\"string\"==typeof t||\"bigint\"==typeof t){const e=tc.get(t);if(e)return e();if(\"bigint\"==typeof t)return new ec(\"unknown\",t);f(!1,\"unknown network\",\"network\",t)}if(\"function\"==typeof t.clone){return t.clone()}if(\"object\"==typeof t){f(\"string\"==typeof t.name&&\"number\"==typeof t.chainId,\"invalid network object name or chainId\",\"network\",t);const e=new ec(t.name,t.chainId);return(t.ensAddress||null!=t.ensNetwork)&&e.attachPlugin(new Xa(t.ensAddress,t.ensNetwork)),e}f(!1,\"invalid network\",\"network\",t)}static register(t,e){\"number\"==typeof t&&(t=BigInt(t));const n=tc.get(t);n&&f(!1,`conflicting network for ${JSON.stringify(n.name)}`,\"nameOrChainId\",t),tc.set(t,e)}}function nc(t,e){const n=String(t);if(!n.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const r=n.split(\".\");if(1===r.length&&r.push(\"\"),2!==r.length)throw new Error(`invalid gwei value: ${t}`);for(;r[1].length\u003Ce;)r[1]+=\"0\";if(r[1].length>9){let t=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||t++,r[1]=t.toString()}return BigInt(r[0]+r[1])}function rc(t){return new $a(t,(async(t,e,n)=>{let r;n.setHeader(\"User-Agent\",\"ethers\");try{const[e,s]=await Promise.all([n.send(),t()]);r=e;const i=r.bodyJson.standard;return{gasPrice:s.gasPrice,maxFeePerGas:nc(i.maxFee,9),maxPriorityFeePerGas:nc(i.maxPriorityFee,9)}}catch(t){h(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,\"SERVER_ERROR\",{request:n,response:r,error:t})}}))}let sc=!1;function ic(t){return JSON.parse(JSON.stringify(t))}class oc{#Bt;#It;#Ct;#Ot;constructor(t){this.#Bt=t,this.#It=null,this.#Ct=4e3,this.#Ot=-2}get pollingInterval(){return this.#Ct}set pollingInterval(t){this.#Ct=t}async#Rt(){try{const t=await this.#Bt.getBlockNumber();if(-2===this.#Ot)return void(this.#Ot=t);if(t!==this.#Ot){for(let e=this.#Ot+1;e\u003C=t;e++){if(null==this.#It)return;await this.#Bt.emit(\"block\",e)}this.#Ot=t}}catch(t){}null!=this.#It&&(this.#It=this.#Bt._setTimeout(this.#Rt.bind(this),this.#Ct))}start(){this.#It||(this.#It=this.#Bt._setTimeout(this.#Rt.bind(this),this.#Ct),this.#Rt())}stop(){this.#It&&(this.#Bt._clearTimeout(this.#It),this.#It=null)}pause(t){this.stop(),t&&(this.#Ot=-2)}resume(){this.start()}}class ac{#Bt;#Rt;#Tt;constructor(t){this.#Bt=t,this.#Tt=!1,this.#Rt=t=>{this._poll(t,this.#Bt)}}async _poll(t,e){throw new Error(\"sub-classes must override this\")}start(){this.#Tt||(this.#Tt=!0,this.#Rt(-2),this.#Bt.on(\"block\",this.#Rt))}stop(){this.#Tt&&(this.#Tt=!1,this.#Bt.off(\"block\",this.#Rt))}pause(t){this.stop()}resume(){this.start()}}class cc extends ac{#St;#Ft;constructor(t,e){super(t),this.#St=e,this.#Ft=-2}pause(t){t&&(this.#Ft=-2),super.pause(t)}async _poll(t,e){const n=await e.getBlock(this.#St);null!=n&&(-2===this.#Ft?this.#Ft=n.number:n.number>this.#Ft&&(e.emit(this.#St,n.number),this.#Ft=n.number))}}class lc extends ac{#X;constructor(t,e){super(t),this.#X=ic(e)}async _poll(t,e){throw new Error(\"@TODO\")}}class uc extends ac{#Ut;constructor(t,e){super(t),this.#Ut=e}async _poll(t,e){const n=await e.getTransactionReceipt(this.#Ut);n&&e.emit(this.#Ut,n)}}class hc{#Bt;#X;#It;#Tt;#Ot;constructor(t,e){this.#Bt=t,this.#X=ic(e),this.#It=this.#Rt.bind(this),this.#Tt=!1,this.#Ot=-2}async#Rt(t){if(-2===this.#Ot)return;const e=ic(this.#X);e.fromBlock=this.#Ot+1,e.toBlock=t;const n=await this.#Bt.getLogs(e);if(0!==n.length)for(const t of n)this.#Bt.emit(this.#X,t),this.#Ot=t.blockNumber;else this.#Ot\u003Ct-60&&(this.#Ot=t-60)}start(){this.#Tt||(this.#Tt=!0,-2===this.#Ot&&this.#Bt.getBlockNumber().then((t=>{this.#Ot=t})),this.#Bt.on(\"block\",this.#It))}stop(){this.#Tt&&(this.#Tt=!1,this.#Bt.off(\"block\",this.#It))}pause(t){this.stop(),t&&(this.#Ot=-2)}resume(){this.start()}}const fc=BigInt(2);function dc(t){return t&&\"function\"==typeof t.then}function pc(t,e){return t+\":\"+JSON.stringify(e,((t,e)=>{if(null==e)return\"null\";if(\"bigint\"==typeof e)return`bigint:${e.toString()}`;if(\"string\"==typeof e)return e.toLowerCase();if(\"object\"==typeof e&&!Array.isArray(e)){const t=Object.keys(e);return t.sort(),t.reduce(((t,n)=>(t[n]=e[n],t)),{})}return e}))}class gc{name;constructor(t){o(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function mc(t){return(t=Array.from(new Set(t).values())).sort(),t}async function yc(t,e){if(null==t)throw new Error(\"invalid event\");if(Array.isArray(t)&&(t={topics:t}),\"string\"==typeof t)switch(t){case\"block\":case\"debug\":case\"error\":case\"finalized\":case\"network\":case\"pending\":case\"safe\":return{type:t,tag:t}}if(b(t,32)){const e=t.toLowerCase();return{type:\"transaction\",tag:pc(\"tx\",{hash:e}),hash:e}}if(t.orphan){const e=t;return{type:\"orphan\",tag:pc(\"orphan\",e),filter:(n=e,JSON.parse(JSON.stringify(n)))}}var n;if(t.address||t.topics){const n=t,r={topics:(n.topics||[]).map((t=>null==t?null:Array.isArray(t)?mc(t.map((t=>t.toLowerCase()))):t.toLowerCase()))};if(n.address){const t=[],s=[],i=n=>{b(n)?t.push(n):s.push((async()=>{t.push(await xn(n,e))})())};Array.isArray(n.address)?n.address.forEach(i):i(n.address),s.length&&await Promise.all(s),r.address=mc(t.map((t=>t.toLowerCase())))}return{filter:r,tag:pc(\"event\",r),type:\"event\"}}f(!1,\"unknown ProviderEvent\",\"event\",t)}function wc(){return(new Date).getTime()}const bc={cacheTimeout:250,pollingInterval:4e3};class Ac{#Dt;#Nt;#Lt;#Mt;#Gt;#Ht;#Qt;#jt;#Vt;#Jt;#zt;#u;constructor(t,e){if(this.#u=Object.assign({},bc,e||{}),\"any\"===t)this.#Ht=!0,this.#Gt=null;else if(t){const e=ec.from(t);this.#Ht=!1,this.#Gt=Promise.resolve(e),setTimeout((()=>{this.emit(\"network\",e,null)}),0)}else this.#Ht=!1,this.#Gt=null;this.#jt=-1,this.#Qt=new Map,this.#Dt=new Map,this.#Nt=new Map,this.#Lt=null,this.#Mt=!1,this.#Vt=1,this.#Jt=new Map,this.#zt=!1}get pollingInterval(){return this.#u.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#Nt.values())}attachPlugin(t){if(this.#Nt.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#Nt.set(t.name,t.connect(this)),this}getPlugin(t){return this.#Nt.get(t)||null}get disableCcipRead(){return this.#zt}set disableCcipRead(t){this.#zt=!!t}async#Kt(t){const e=this.#u.cacheTimeout;if(e\u003C0)return await this._perform(t);const n=pc(t.method,t);let r=this.#Qt.get(n);return r||(r=this._perform(t),this.#Qt.set(n,r),setTimeout((()=>{this.#Qt.get(n)===r&&this.#Qt.delete(n)}),e)),await r}async ccipReadFetch(t,e,n){if(this.disableCcipRead||0===n.length||null==t.to)return null;const r=t.to.toLowerCase(),s=e.toLowerCase(),i=[];for(let e=0;e\u003Cn.length;e++){const o=n[e],a=o.replace(\"{sender}\",r).replace(\"{data}\",s),c=new tr(a);-1===o.indexOf(\"{data}\")&&(c.body={data:s,sender:r}),this.emit(\"debug\",{action:\"sendCcipReadFetchRequest\",request:c,index:e,urls:n});let l=\"unknown error\";const u=await c.send();try{const t=u.bodyJson;if(t.data)return this.emit(\"debug\",{action:\"receiveCcipReadFetchResult\",request:c,result:t}),t.data;t.message&&(l=t.message),this.emit(\"debug\",{action:\"receiveCcipReadFetchError\",request:c,result:t})}catch(t){}h(u.statusCode\u003C400||u.statusCode>=500,`response not found during CCIP fetch: ${l}`,\"OFFCHAIN_FAULT\",{reason:\"404_MISSING_RESOURCE\",transaction:t,info:{url:o,errorMessage:l}}),i.push(l)}h(!1,`error encountered during CCIP fetch: ${i.map((t=>JSON.stringify(t))).join(\", \")}`,\"OFFCHAIN_FAULT\",{reason:\"500_SERVER_ERROR\",transaction:t,info:{urls:n,errorMessages:i}})}_wrapBlock(t,e){return new mr(function(t){const e=Ka(t);return e.transactions=t.transactions.map((t=>\"string\"==typeof t?t:Za(t))),e}(t),this)}_wrapLog(t,e){return new yr(function(t){return za(t)}(t),this)}_wrapTransactionReceipt(t,e){return new wr(function(t){return _a(t)}(t),this)}_wrapTransactionResponse(t,e){return new br(Za(t),this)}_detectNetwork(){h(!1,\"sub-classes must implement this\",\"UNSUPPORTED_OPERATION\",{operation:\"_detectNetwork\"})}async _perform(t){h(!1,`unsupported method: ${t.method}`,\"UNSUPPORTED_OPERATION\",{operation:t.method,info:t})}async getBlockNumber(){const t=L(await this.#Kt({method:\"getBlockNumber\"}),\"%response\");return this.#jt>=0&&(this.#jt=t),t}_getAddress(t){return xn(t,this)}_getBlockTag(t){if(null==t)return\"latest\";switch(t){case\"earliest\":return\"0x0\";case\"finalized\":case\"latest\":case\"pending\":case\"safe\":return t}return b(t)?b(t,32)?t:H(t):(\"bigint\"==typeof t&&(t=L(t,\"blockTag\")),\"number\"==typeof t?t>=0?H(t):this.#jt>=0?H(this.#jt+t):this.getBlockNumber().then((e=>H(e+t))):void f(!1,\"invalid blockTag\",\"blockTag\",t))}_getFilter(t){const e=(t.topics||[]).map((t=>null==t?null:Array.isArray(t)?mc(t.map((t=>t.toLowerCase()))):t.toLowerCase())),n=\"blockHash\"in t?t.blockHash:void 0,r=(t,r,s)=>{let i;switch(t.length){case 0:break;case 1:i=t[0];break;default:t.sort(),i=t}if(n&&(null!=r||null!=s))throw new Error(\"invalid filter\");const o={};return i&&(o.address=i),e.length&&(o.topics=e),r&&(o.fromBlock=r),s&&(o.toBlock=s),n&&(o.blockHash=n),o};let s,i,o=[];if(t.address)if(Array.isArray(t.address))for(const e of t.address)o.push(this._getAddress(e));else o.push(this._getAddress(t.address));return\"fromBlock\"in t&&(s=this._getBlockTag(t.fromBlock)),\"toBlock\"in t&&(i=this._getBlockTag(t.toBlock)),o.filter((t=>\"string\"!=typeof t)).length||null!=s&&\"string\"!=typeof s||null!=i&&\"string\"!=typeof i?Promise.all([Promise.all(o),s,i]).then((t=>r(t[0],t[1],t[2]))):r(o,s,i)}_getTransactionRequest(t){const e=gr(t),n=[];if([\"to\",\"from\"].forEach((t=>{if(null==e[t])return;const r=xn(e[t],this);dc(r)?n.push(async function(){e[t]=await r}()):e[t]=r})),null!=e.blockTag){const t=this._getBlockTag(e.blockTag);dc(t)?n.push(async function(){e.blockTag=await t}()):e.blockTag=t}return n.length?async function(){return await Promise.all(n),e}():e}async getNetwork(){if(null==this.#Gt){const t=(async()=>{try{const t=await this._detectNetwork();return this.emit(\"network\",t,null),t}catch(e){throw this.#Gt===t&&(this.#Gt=null),e}})();return this.#Gt=t,(await t).clone()}const t=this.#Gt,[e,n]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==n.chainId&&(this.#Ht?(this.emit(\"network\",n,e),this.#Gt===t&&(this.#Gt=Promise.resolve(n))):h(!1,`network changed: ${e.chainId} => ${n.chainId} `,\"NETWORK_ERROR\",{event:\"changed\"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:e,gasPrice:n,priorityFee:r}=await i({_block:this.#qt(\"latest\",!1),gasPrice:(async()=>{try{return S(await this.#Kt({method:\"getGasPrice\"}),\"%response\")}catch(t){}return null})(),priorityFee:(async()=>{try{return S(await this.#Kt({method:\"getPriorityFee\"}),\"%response\")}catch(t){}return null})()});let s=null,o=null;const a=this._wrapBlock(e,t);return a&&a.baseFeePerGas&&(o=null!=r?r:BigInt(\"1000000000\"),s=a.baseFeePerGas*fc+o),new pr(n,s,o)},n=t.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");if(n){const t=new tr(n.url),r=await n.processFunc(e,this,t);return new pr(r.gasPrice,r.maxFeePerGas,r.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return dc(e)&&(e=await e),S(await this.#Kt({method:\"estimateGas\",transaction:e}),\"%response\")}async#_t(t,e,n){h(n\u003C10,\"CCIP read exceeded maximum redirections\",\"OFFCHAIN_FAULT\",{reason:\"TOO_MANY_REDIRECTS\",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const r=gr(t);try{return E(await this._perform({method:\"call\",transaction:r,blockTag:e}))}catch(t){if(!this.disableCcipRead&&l(t)&&t.data&&n>=0&&\"latest\"===e&&null!=r.to&&\"0x556f1830\"===x(t.data,0,4)){const s=t.data,i=await xn(r.to,this);let o;try{o=function(t){const e={sender:\"\",urls:[],calldata:\"\",selector:\"\",extraData:\"\",errorArgs:[]};h(P(t)>=160,\"insufficient OffchainLookup data\",\"OFFCHAIN_FAULT\",{reason:\"insufficient OffchainLookup data\"});const n=x(t,0,32);h(x(n,0,12)===x(Bc,0,12),\"corrupt OffchainLookup sender\",\"OFFCHAIN_FAULT\",{reason:\"corrupt OffchainLookup sender\"}),e.sender=x(n,12);try{const n=[],r=L(x(t,32,64)),s=L(x(t,r,r+32)),i=x(t,r+32);for(let t=0;t\u003Cs;t++){const e=vc(i,32*t);if(null==e)throw new Error(\"abort\");n.push(e)}e.urls=n}catch(t){h(!1,\"corrupt OffchainLookup urls\",\"OFFCHAIN_FAULT\",{reason:\"corrupt OffchainLookup urls\"})}try{const n=Ec(t,64);if(null==n)throw new Error(\"abort\");e.calldata=n}catch(t){h(!1,\"corrupt OffchainLookup calldata\",\"OFFCHAIN_FAULT\",{reason:\"corrupt OffchainLookup calldata\"})}h(x(t,100,128)===x(Bc,0,28),\"corrupt OffchainLookup callbaackSelector\",\"OFFCHAIN_FAULT\",{reason:\"corrupt OffchainLookup callbaackSelector\"}),e.selector=x(t,96,100);try{const n=Ec(t,128);if(null==n)throw new Error(\"abort\");e.extraData=n}catch(t){h(!1,\"corrupt OffchainLookup extraData\",\"OFFCHAIN_FAULT\",{reason:\"corrupt OffchainLookup extraData\"})}return e.errorArgs=\"sender,urls,calldata,selector,extraData\".split(/,/).map((t=>e[t])),e}(x(t.data,4))}catch(t){h(!1,t.message,\"OFFCHAIN_FAULT\",{reason:\"BAD_DATA\",transaction:r,info:{data:s}})}h(o.sender.toLowerCase()===i.toLowerCase(),\"CCIP Read sender mismatch\",\"CALL_EXCEPTION\",{action:\"call\",data:s,reason:\"OffchainLookup\",transaction:r,invocation:null,revert:{signature:\"OffchainLookup(address,string[],bytes,bytes4,bytes)\",name:\"OffchainLookup\",args:o.errorArgs}});const a=await this.ccipReadFetch(r,o.calldata,o.urls);h(null!=a,\"CCIP Read failed to fetch data\",\"OFFCHAIN_FAULT\",{reason:\"FETCH_FAILED\",transaction:r,info:{data:t.data,errorArgs:o.errorArgs}});const c={to:i,data:k([o.selector,Nc([a,o.extraData])])};this.emit(\"debug\",{action:\"sendCcipReadCall\",transaction:c});try{const t=await this.#_t(c,e,n+1);return this.emit(\"debug\",{action:\"receiveCcipReadCallResult\",transaction:Object.assign({},c),result:t}),t}catch(t){throw this.emit(\"debug\",{action:\"receiveCcipReadCallError\",transaction:Object.assign({},c),error:t}),t}}throw t}}async#Zt(t){const{value:e}=await i({network:this.getNetwork(),value:t});return e}async call(t){const{tx:e,blockTag:n}=await i({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await this.#Zt(this.#_t(e,n,t.enableCcipRead?0:-1))}async#Wt(t,e,n){let r=this._getAddress(e),s=this._getBlockTag(n);return\"string\"==typeof r&&\"string\"==typeof s||([r,s]=await Promise.all([r,s])),await this.#Zt(this.#Kt(Object.assign(t,{address:r,blockTag:s})))}async getBalance(t,e){return S(await this.#Wt({method:\"getBalance\"},t,e),\"%response\")}async getTransactionCount(t,e){return L(await this.#Wt({method:\"getTransactionCount\"},t,e),\"%response\")}async getCode(t,e){return E(await this.#Wt({method:\"getCode\"},t,e))}async getStorage(t,e,n){const r=S(e,\"position\");return E(await this.#Wt({method:\"getStorage\",position:r},t,n))}async broadcastTransaction(t){const{blockNumber:e,hash:n,network:r}=await i({blockNumber:this.getBlockNumber(),hash:this._perform({method:\"broadcastTransaction\",signedTransaction:t}),network:this.getNetwork()}),s=Ra.from(t);if(s.hash!==n)throw new Error(\"@TODO: the returned hash did not match\");return this._wrapTransactionResponse(s,r).replaceableTransaction(e)}async#qt(t,e){if(b(t,32))return await this.#Kt({method:\"getBlock\",blockHash:t,includeTransactions:e});let n=this._getBlockTag(t);return\"string\"!=typeof n&&(n=await n),await this.#Kt({method:\"getBlock\",blockTag:n,includeTransactions:e})}async getBlock(t,e){const{network:n,params:r}=await i({network:this.getNetwork(),params:this.#qt(t,!!e)});return null==r?null:this._wrapBlock(r,n)}async getTransaction(t){const{network:e,params:n}=await i({network:this.getNetwork(),params:this.#Kt({method:\"getTransaction\",hash:t})});return null==n?null:this._wrapTransactionResponse(n,e)}async getTransactionReceipt(t){const{network:e,params:n}=await i({network:this.getNetwork(),params:this.#Kt({method:\"getTransactionReceipt\",hash:t})});if(null==n)return null;if(null==n.gasPrice&&null==n.effectiveGasPrice){const e=await this.#Kt({method:\"getTransaction\",hash:t});if(null==e)throw new Error(\"report this; could not find tx or effectiveGasPrice\");n.effectiveGasPrice=e.gasPrice}return this._wrapTransactionReceipt(n,e)}async getTransactionResult(t){const{result:e}=await i({network:this.getNetwork(),result:this.#Kt({method:\"getTransactionResult\",hash:t})});return null==e?null:E(e)}async getLogs(t){let e=this._getFilter(t);dc(e)&&(e=await e);const{network:n,params:r}=await i({network:this.getNetwork(),params:this.#Kt({method:\"getLogs\",filter:e})});return r.map((t=>this._wrapLog(t,n)))}_getProvider(t){h(!1,\"provider cannot connect to target network\",\"UNSUPPORTED_OPERATION\",{operation:\"_getProvider()\"})}async getResolver(t){return await Ma.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){const e=wi((t=Wt(t)).substring(2).toLowerCase()+\".addr.reverse\");try{const n=await Ma.getEnsAddress(this),r=new Yr(n,[\"function resolver(bytes32) view returns (address)\"],this),s=await r.resolver(e);if(null==s||s===rr)return null;const i=new Yr(s,[\"function name(bytes32) view returns (string)\"],this),o=await i.name(e);return await this.resolveName(o)!==t?null:o}catch(t){if(c(t,\"BAD_DATA\")&&\"0x\"===t.value)return null;if(c(t,\"CALL_EXCEPTION\"))return null;throw t}return null}async waitForTransaction(t,e,n){const r=null!=e?e:1;return 0===r?this.getTransactionReceipt(t):new Promise((async(e,s)=>{let i=null;const o=async n=>{try{const s=await this.getTransactionReceipt(t);if(null!=s&&n-s.blockNumber+1>=r)return e(s),void(i&&(clearTimeout(i),i=null))}catch(t){console.log(\"EEE\",t)}this.once(\"block\",o)};null!=n&&(i=setTimeout((()=>{null!=i&&(i=null,this.off(\"block\",o),s(u(\"timeout\",\"TIMEOUT\",{reason:\"timeout\"})))}),n)),o(await this.getBlockNumber())}))}async waitForBlock(t){h(!1,\"not implemented yet\",\"NOT_IMPLEMENTED\",{operation:\"waitForBlock\"})}_clearTimeout(t){const e=this.#Jt.get(t);e&&(e.timer&&clearTimeout(e.timer),this.#Jt.delete(t))}_setTimeout(t,e){null==e&&(e=0);const n=this.#Vt++,r=()=>{this.#Jt.delete(n),t()};if(this.paused)this.#Jt.set(n,{timer:null,func:r,time:e});else{const t=setTimeout(r,e);this.#Jt.set(n,{timer:t,func:r,time:wc()})}return n}_forEachSubscriber(t){for(const e of this.#Dt.values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case\"debug\":case\"error\":case\"network\":return new gc(t.type);case\"block\":{const t=new oc(this);return t.pollingInterval=this.pollingInterval,t}case\"safe\":case\"finalized\":return new cc(this,t.type);case\"event\":return new hc(this,t.filter);case\"transaction\":return new uc(this,t.hash);case\"orphan\":return new lc(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const n of this.#Dt.values())if(n.subscriber===t){n.started&&n.subscriber.stop(),n.subscriber=e,n.started&&e.start(),null!=this.#Lt&&e.pause(this.#Lt);break}}async#Yt(t,e){let n=await yc(t,this);return\"event\"===n.type&&e&&e.length>0&&!0===e[0].removed&&(n=await yc({orphan:\"drop-log\",log:e[0]},this)),this.#Dt.get(n.tag)||null}async#Xt(t){const e=await yc(t,this),n=e.tag;let r=this.#Dt.get(n);if(!r){r={subscriber:this._getSubscriber(e),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#Dt.set(n,r)}return r}async on(t,e){const n=await this.#Xt(t);return n.listeners.push({listener:e,once:!1}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Lt&&n.subscriber.pause(this.#Lt)),this}async once(t,e){const n=await this.#Xt(t);return n.listeners.push({listener:e,once:!0}),n.started||(n.subscriber.start(),n.started=!0,null!=this.#Lt&&n.subscriber.pause(this.#Lt)),this}async emit(t,...e){const n=await this.#Yt(t,e);if(!n||0===n.listeners.length)return!1;const r=n.listeners.length;return n.listeners=n.listeners.filter((({listener:n,once:r})=>{const s=new Er(this,r?null:n,t);try{n.call(this,...e,s)}catch(t){}return!r})),0===n.listeners.length&&(n.started&&n.subscriber.stop(),this.#Dt.delete(n.tag)),r>0}async listenerCount(t){if(t){const e=await this.#Yt(t);return e?e.listeners.length:0}let e=0;for(const{listeners:t}of this.#Dt.values())e+=t.length;return e}async listeners(t){if(t){const e=await this.#Yt(t);return e?e.listeners.map((({listener:t})=>t)):[]}let e=[];for(const{listeners:t}of this.#Dt.values())e=e.concat(t.map((({listener:t})=>t)));return e}async off(t,e){const n=await this.#Yt(t);if(!n)return this;if(e){const t=n.listeners.map((({listener:t})=>t)).indexOf(e);t>=0&&n.listeners.splice(t,1)}return e&&0!==n.listeners.length||(n.started&&n.subscriber.stop(),this.#Dt.delete(n.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:n,subscriber:r}=await this.#Xt(t);n&&r.stop(),this.#Dt.delete(e)}else for(const[t,{started:e,subscriber:n}]of this.#Dt)e&&n.stop(),this.#Dt.delete(t);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return this.#Mt}destroy(){this.removeAllListeners();for(const t of this.#Jt.keys())this._clearTimeout(t);this.#Mt=!0}get paused(){return null!=this.#Lt}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(this.#jt=-1,null!=this.#Lt){if(this.#Lt==!!t)return;h(!1,\"cannot change pause type; resume first\",\"UNSUPPORTED_OPERATION\",{operation:\"pause\"})}this._forEachSubscriber((e=>e.pause(t))),this.#Lt=!!t;for(const t of 
���this.#Jt.values())t.timer&&clearTimeout(t.timer),t.time=wc()-t.time}resume(){if(null!=this.#Lt){this._forEachSubscriber((t=>t.resume())),this.#Lt=null;for(const t of this.#Jt.values()){let e=t.time;e\u003C0&&(e=0),t.time=wc(),setTimeout(t.func,e)}}}}function vc(t,e){try{const n=Ec(t,e);if(n)return ve(n)}catch(t){}return null}function Ec(t,e){if(\"0x\"===t)return null;try{const n=L(x(t,e,e+32)),r=L(x(t,n,n+32));return x(t,n+32,n+32+r)}catch(t){}return null}function kc(t){const e=G(t);if(e.length>32)throw new Error(\"internal; should not happen\");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function Pc(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}const xc=new Uint8Array([]);function Nc(t){const e=[];let n=0;for(let r=0;r\u003Ct.length;r++)e.push(xc),n+=32;for(let r=0;r\u003Ct.length;r++){const s=y(t[r]);e[r]=kc(n),e.push(kc(s.length)),e.push(Pc(s)),n+=32+32*Math.ceil(s.length/32)}return k(e)}const Bc=\"0x0000000000000000000000000000000000000000000000000000000000000000\";function Ic(t,e){if(t.provider)return t.provider;h(!1,\"missing provider\",\"UNSUPPORTED_OPERATION\",{operation:e})}async function Cc(t,e){let n=gr(e);if(null!=n.to&&(n.to=xn(n.to,t)),null!=n.from){const e=n.from;n.from=Promise.all([t.getAddress(),xn(e,t)]).then((([t,e])=>(f(t.toLowerCase()===e.toLowerCase(),\"transaction from mismatch\",\"tx.from\",e),t)))}else n.from=t.getAddress();return await i(n)}class Oc{provider;constructor(t){o(this,{provider:t||null})}async getNonce(t){return Ic(this,\"getTransactionCount\").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await Cc(this,t)}async populateTransaction(t){const e=Ic(this,\"populateTransaction\"),n=await Cc(this,t);null==n.nonce&&(n.nonce=await this.getNonce(\"pending\")),null==n.gasLimit&&(n.gasLimit=await this.estimateGas(n));const r=await this.provider.getNetwork();if(null!=n.chainId){f(S(n.chainId)===r.chainId,\"transaction chainId mismatch\",\"tx.chainId\",t.chainId)}else n.chainId=r.chainId;const s=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!s?0!==n.type&&1!==n.type||!s||f(!1,\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\",\"tx\",t):f(!1,\"eip-1559 transaction do not support gasPrice\",\"tx\",t),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type){const t=await e.getFeeData();h(null!=t.gasPrice,\"network does not support gasPrice\",\"UNSUPPORTED_OPERATION\",{operation:\"getGasPrice\"}),null==n.gasPrice&&(n.gasPrice=t.gasPrice)}else{const t=await e.getFeeData();if(null==n.type)if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const t=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=t,n.maxPriorityFeePerGas=t}else null==n.maxFeePerGas&&(n.maxFeePerGas=t.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas);else null!=t.gasPrice?(h(!s,\"network does not support EIP-1559\",\"UNSUPPORTED_OPERATION\",{operation:\"populateTransaction\"}),null==n.gasPrice&&(n.gasPrice=t.gasPrice),n.type=0):h(!1,\"failed to get consistent fee data\",\"UNSUPPORTED_OPERATION\",{operation:\"signer.getFeeData\"});else 2!==n.type&&3!==n.type||(null==n.maxFeePerGas&&(n.maxFeePerGas=t.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}else n.type=2;return await i(n)}async estimateGas(t){return Ic(this,\"estimateGas\").estimateGas(await this.populateCall(t))}async call(t){return Ic(this,\"call\").call(await this.populateCall(t))}async resolveName(t){const e=Ic(this,\"resolveName\");return await e.resolveName(t)}async sendTransaction(t){const e=Ic(this,\"sendTransaction\"),n=await this.populateTransaction(t);delete n.from;const r=Ra.from(n);return await e.broadcastTransaction(await this.signTransaction(r))}}class Rc{#Bt;#$t;#It;#Tt;#te;#ee;constructor(t){this.#Bt=t,this.#$t=null,this.#It=this.#Rt.bind(this),this.#Tt=!1,this.#te=null,this.#ee=!1}_subscribe(t){throw new Error(\"subclasses must override this\")}_emitResults(t,e){throw new Error(\"subclasses must override this\")}_recover(t){throw new Error(\"subclasses must override this\")}async#Rt(t){try{null==this.#$t&&(this.#$t=this._subscribe(this.#Bt));let t=null;try{t=await this.#$t}catch(t){if(!c(t,\"UNSUPPORTED_OPERATION\")||\"eth_newFilter\"!==t.operation)throw t}if(null==t)return this.#$t=null,void this.#Bt._recoverSubscriber(this,this._recover(this.#Bt));const e=await this.#Bt.getNetwork();if(this.#te||(this.#te=e),this.#te.chainId!==e.chainId)throw new Error(\"chaid changed\");if(this.#ee)return;const n=await this.#Bt.send(\"eth_getFilterChanges\",[t]);await this._emitResults(this.#Bt,n)}catch(t){console.log(\"@TODO\",t)}this.#Bt.once(\"block\",this.#It)}#ne(){const t=this.#$t;t&&(this.#$t=null,t.then((t=>{this.#Bt.destroyed||this.#Bt.send(\"eth_uninstallFilter\",[t])})))}start(){this.#Tt||(this.#Tt=!0,this.#Rt(-2))}stop(){this.#Tt&&(this.#Tt=!1,this.#ee=!0,this.#ne(),this.#Bt.off(\"block\",this.#It))}pause(t){t&&this.#ne(),this.#Bt.off(\"block\",this.#It)}resume(){this.start()}}class Tc extends Rc{#re;constructor(t,e){var n;super(t),this.#re=(n=e,JSON.parse(JSON.stringify(n)))}_recover(t){return new hc(t,this.#re)}async _subscribe(t){return await t.send(\"eth_newFilter\",[this.#re])}async _emitResults(t,e){for(const n of e)t.emit(this.#re,t._wrapLog(n,t._network))}}class Sc extends Rc{async _subscribe(t){return await t.send(\"eth_newPendingTransactionFilter\",[])}async _emitResults(t,e){for(const n of e)t.emit(\"pending\",n)}}const Fc=\"bigint,boolean,function,number,string,symbol\".split(/,/g);function Uc(t){if(null==t||Fc.indexOf(typeof t)>=0)return t;if(\"function\"==typeof t.getAddress)return t;if(Array.isArray(t))return t.map(Uc);if(\"object\"==typeof t)return Object.keys(t).reduce(((e,n)=>(e[n]=t[n],e)),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Dc(t){return new Promise((e=>{setTimeout(e,t)}))}function Lc(t){return t?t.toLowerCase():t}function Mc(t){return t&&\"number\"==typeof t.pollingInterval}const Gc={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1\u003C\u003C20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Hc extends Oc{address;constructor(t,e){super(t),o(this,{address:e=Wt(e)})}connect(t){h(!1,\"cannot reconnect JsonRpcSigner\",\"UNSUPPORTED_OPERATION\",{operation:\"signer.connect\"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const e=Uc(t),n=[];if(e.from){const r=e.from;n.push((async()=>{const n=await xn(r,this.provider);f(null!=n&&n.toLowerCase()===this.address.toLowerCase(),\"from address mismatch\",\"transaction\",t),e.from=n})())}else e.from=this.address;if(null==e.gasLimit&&n.push((async()=>{e.gasLimit=await this.provider.estimateGas({...e,from:this.address})})()),null!=e.to){const t=e.to;n.push((async()=>{e.to=await xn(t,this.provider)})())}n.length&&await Promise.all(n);const r=this.provider.getRpcTransaction(e);return this.provider.send(\"eth_sendTransaction\",[r])}async sendTransaction(t){const e=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(t);return await new Promise(((t,r)=>{const s=[1e3,100];let i=0;const o=async()=>{try{const r=await this.provider.getTransaction(n);if(null!=r)return void t(r.replaceableTransaction(e))}catch(t){if(c(t,\"CANCELLED\")||c(t,\"BAD_DATA\")||c(t,\"NETWORK_ERROR\"))return null==t.info&&(t.info={}),t.info.sendTransactionHash=n,void r(t);if(c(t,\"INVALID_ARGUMENT\")&&(i++,null==t.info&&(t.info={}),t.info.sendTransactionHash=n,i>10))return void r(t);this.provider.emit(\"error\",u(\"failed to fetch transation after sending (will try again)\",\"UNKNOWN_ERROR\",{error:t}))}this.provider._setTimeout((()=>{o()}),s.pop()||4e3)};o()}))}async signTransaction(t){const e=Uc(t);if(e.from){const n=await xn(e.from,this.provider);f(null!=n&&n.toLowerCase()===this.address.toLowerCase(),\"from address mismatch\",\"transaction\",t),e.from=n}else e.from=this.address;const n=this.provider.getRpcTransaction(e);return await this.provider.send(\"eth_signTransaction\",[n])}async signMessage(t){const e=\"string\"==typeof t?Ae(t):t;return await this.provider.send(\"personal_sign\",[E(e),this.address.toLowerCase()])}async signTypedData(t,e,n){const r=Uc(n),s=await Hn.resolveNames(t,e,r,(async t=>{const e=await xn(t);return f(null!=e,\"TypedData does not support null address\",\"value\",t),e}));return await this.provider.send(\"eth_signTypedData_v4\",[this.address.toLowerCase(),JSON.stringify(Hn.getPayload(s.domain,e,s.value))])}async unlock(t){return this.provider.send(\"personal_unlockAccount\",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const e=\"string\"==typeof t?Ae(t):t;return await this.provider.send(\"eth_sign\",[this.address.toLowerCase(),E(e)])}}class Qc extends Ac{#u;#se;#ie;#oe;#ae;#te;#ce;#le(){if(this.#oe)return;const t=1===this._getOption(\"batchMaxCount\")?0:this._getOption(\"batchStallTime\");this.#oe=setTimeout((()=>{this.#oe=null;const t=this.#ie;for(this.#ie=[];t.length;){const e=[t.shift()];for(;t.length&&e.length!==this.#u.batchMaxCount;){e.push(t.shift());if(JSON.stringify(e.map((t=>t.payload))).length>this.#u.batchMaxSize){t.unshift(e.pop());break}}(async()=>{const t=1===e.length?e[0].payload:e.map((t=>t.payload));this.emit(\"debug\",{action:\"sendRpcPayload\",payload:t});try{const n=await this._send(t);this.emit(\"debug\",{action:\"receiveRpcResult\",result:n});for(const{resolve:t,reject:r,payload:s}of e){if(this.destroyed){r(u(\"provider destroyed; cancelled request\",\"UNSUPPORTED_OPERATION\",{operation:s.method}));continue}const e=n.filter((t=>t.id===s.id))[0];if(null!=e)\"error\"in e?r(this.getRpcError(s,e)):t(e.result);else{const t=u(\"missing response for request\",\"BAD_DATA\",{value:n,info:{payload:s}});this.emit(\"error\",t),r(t)}}}catch(t){this.emit(\"debug\",{action:\"receiveRpcError\",error:t});for(const{reject:n}of e)n(t)}})()}}),t)}constructor(t,e){super(t,e),this.#se=1,this.#u=Object.assign({},Gc,e||{}),this.#ie=[],this.#oe=null,this.#te=null,this.#ce=null;{let t=null;const e=new Promise((e=>{t=e}));this.#ae={promise:e,resolve:t}}const n=this._getOption(\"staticNetwork\");\"boolean\"==typeof n?(f(!n||\"any\"!==t,\"staticNetwork cannot be used on special network 'any'\",\"options\",e),n&&null!=t&&(this.#te=ec.from(t))):n&&(f(null==t||n.matches(t),\"staticNetwork MUST match network object\",\"options\",e),this.#te=n)}_getOption(t){return this.#u[t]}get _network(){return h(this.#te,\"network is not available yet\",\"NETWORK_ERROR\"),this.#te}async _perform(t){if(\"call\"===t.method||\"estimateGas\"===t.method){let e=t.transaction;if(e&&null!=e.type&&S(e.type)&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const n=await this.getFeeData();null==n.maxFeePerGas&&null==n.maxPriorityFeePerGas&&(t=Object.assign({},t,{transaction:Object.assign({},e,{type:void 0})}))}}const e=this.getRpcRequest(t);return null!=e?await this.send(e.method,e.args):super._perform(t)}async _detectNetwork(){const t=this._getOption(\"staticNetwork\");if(t){if(!0!==t)return t;if(this.#te)return this.#te}return this.#ce?await this.#ce:this.ready?(this.#ce=(async()=>{try{const t=ec.from(S(await this.send(\"eth_chainId\",[])));return this.#ce=null,t}catch(t){throw this.#ce=null,t}})(),await this.#ce):(this.#ce=(async()=>{const t={id:this.#se++,method:\"eth_chainId\",params:[],jsonrpc:\"2.0\"};let e;this.emit(\"debug\",{action:\"sendRpcPayload\",payload:t});try{e=(await this._send(t))[0],this.#ce=null}catch(t){throw this.#ce=null,this.emit(\"debug\",{action:\"receiveRpcError\",error:t}),t}if(this.emit(\"debug\",{action:\"receiveRpcResult\",result:e}),\"result\"in e)return ec.from(S(e.result));throw this.getRpcError(t,e)})(),await this.#ce)}_start(){null!=this.#ae&&null!=this.#ae.resolve&&(this.#ae.resolve(),this.#ae=null,(async()=>{for(;null==this.#te&&!this.destroyed;)try{this.#te=await this._detectNetwork()}catch(t){if(this.destroyed)break;console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\"),this.emit(\"error\",u(\"failed to bootstrap network detection\",\"NETWORK_ERROR\",{event:\"initial-network-discovery\",info:{error:t}})),await Dc(1e3)}this.#le()})())}async _waitUntilReady(){if(null!=this.#ae)return await this.#ae.promise}_getSubscriber(t){return\"pending\"===t.type?new Sc(this):\"event\"===t.type?this._getOption(\"polling\")?new hc(this,t.filter):new Tc(this,t.filter):\"orphan\"===t.type&&\"drop-log\"===t.filter.orphan?new gc(\"orphan\"):super._getSubscriber(t)}get ready(){return null==this.#ae}getRpcTransaction(t){const e={};return[\"chainId\",\"gasLimit\",\"gasPrice\",\"type\",\"maxFeePerGas\",\"maxPriorityFeePerGas\",\"nonce\",\"value\"].forEach((n=>{if(null==t[n])return;let r=n;\"gasLimit\"===n&&(r=\"gas\"),e[r]=H(S(t[n],`tx.${n}`))})),[\"from\",\"to\",\"data\"].forEach((n=>{null!=t[n]&&(e[n]=E(t[n]))})),t.accessList&&(e.accessList=jn(t.accessList)),t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.map((t=>t.toLowerCase()))),e}getRpcRequest(t){switch(t.method){case\"chainId\":return{method:\"eth_chainId\",args:[]};case\"getBlockNumber\":return{method:\"eth_blockNumber\",args:[]};case\"getGasPrice\":return{method:\"eth_gasPrice\",args:[]};case\"getPriorityFee\":return{method:\"eth_maxPriorityFeePerGas\",args:[]};case\"getBalance\":return{method:\"eth_getBalance\",args:[Lc(t.address),t.blockTag]};case\"getTransactionCount\":return{method:\"eth_getTransactionCount\",args:[Lc(t.address),t.blockTag]};case\"getCode\":return{method:\"eth_getCode\",args:[Lc(t.address),t.blockTag]};case\"getStorage\":return{method:\"eth_getStorageAt\",args:[Lc(t.address),\"0x\"+t.position.toString(16),t.blockTag]};case\"broadcastTransaction\":return{method:\"eth_sendRawTransaction\",args:[t.signedTransaction]};case\"getBlock\":if(\"blockTag\"in t)return{method:\"eth_getBlockByNumber\",args:[t.blockTag,!!t.includeTransactions]};if(\"blockHash\"in t)return{method:\"eth_getBlockByHash\",args:[t.blockHash,!!t.includeTransactions]};break;case\"getTransaction\":return{method:\"eth_getTransactionByHash\",args:[t.hash]};case\"getTransactionReceipt\":return{method:\"eth_getTransactionReceipt\",args:[t.hash]};case\"call\":return{method:\"eth_call\",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case\"estimateGas\":return{method:\"eth_estimateGas\",args:[this.getRpcTransaction(t.transaction)]};case\"getLogs\":return t.filter&&null!=t.filter.address&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(Lc):t.filter.address=Lc(t.filter.address)),{method:\"eth_getLogs\",args:[t.filter]}}return null}getRpcError(t,e){const{method:n}=t,{error:r}=e;if(\"eth_estimateGas\"===n&&r.message){const e=r.message;if(!e.match(/revert/i)&&e.match(/insufficient funds/i))return u(\"insufficient funds\",\"INSUFFICIENT_FUNDS\",{transaction:t.params[0],info:{payload:t,error:r}})}if(\"eth_call\"===n||\"eth_estimateGas\"===n){const e=Jc(r),s=En.getBuiltinCallException(\"eth_call\"===n?\"call\":\"estimateGas\",t.params[0],e?e.data:null);return s.info={error:r,payload:t},s}const s=JSON.stringify(function(t){const e=[];return zc(t,e),e}(r));if(\"string\"==typeof r.message&&r.message.match(/user denied|ethers-user-denied/i)){return u(\"user rejected action\",\"ACTION_REJECTED\",{action:{eth_sign:\"signMessage\",personal_sign:\"signMessage\",eth_signTypedData_v4:\"signTypedData\",eth_signTransaction:\"signTransaction\",eth_sendTransaction:\"sendTransaction\",eth_requestAccounts:\"requestAccess\",wallet_requestAccounts:\"requestAccess\"}[n]||\"unknown\",reason:\"rejected\",info:{payload:t,error:r}})}if(\"eth_sendRawTransaction\"===n||\"eth_sendTransaction\"===n){const e=t.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return u(\"insufficient funds for intrinsic transaction cost\",\"INSUFFICIENT_FUNDS\",{transaction:e,info:{error:r}});if(s.match(/nonce/i)&&s.match(/too low/i))return u(\"nonce has already been used\",\"NONCE_EXPIRED\",{transaction:e,info:{error:r}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return u(\"replacement fee too low\",\"REPLACEMENT_UNDERPRICED\",{transaction:e,info:{error:r}});if(s.match(/only replay-protected/i))return u(\"legacy pre-eip-155 transactions not supported\",\"UNSUPPORTED_OPERATION\",{operation:n,info:{transaction:e,info:{error:r}}})}let i=!!s.match(/the method .* does not exist/i);return i||r&&r.details&&r.details.startsWith(\"Unauthorized method:\")&&(i=!0),i?u(\"unsupported operation\",\"UNSUPPORTED_OPERATION\",{operation:t.method,info:{error:r,payload:t}}):u(\"could not coalesce error\",\"UNKNOWN_ERROR\",{error:r,payload:t})}send(t,e){if(this.destroyed)return Promise.reject(u(\"provider destroyed; cancelled request\",\"UNSUPPORTED_OPERATION\",{operation:t}));const n=this.#se++,r=new Promise(((r,s)=>{this.#ie.push({resolve:r,reject:s,payload:{method:t,params:e,id:n,jsonrpc:\"2.0\"}})}));return this.#le(),r}async getSigner(t){null==t&&(t=0);const e=this.send(\"eth_accounts\",[]);if(\"number\"==typeof t){const n=await e;if(t>=n.length)throw new Error(\"no such account\");return new Hc(this,n[t])}const{accounts:n}=await i({network:this.getNetwork(),accounts:e});t=Wt(t);for(const e of n)if(Wt(e)===t)return new Hc(this,t);throw new Error(\"invalid account\")}async listAccounts(){return(await this.send(\"eth_accounts\",[])).map((t=>new Hc(this,t)))}destroy(){this.#oe&&(clearTimeout(this.#oe),this.#oe=null);for(const{payload:t,reject:e}of this.#ie)e(u(\"provider destroyed; cancelled request\",\"UNSUPPORTED_OPERATION\",{operation:t.method}));this.#ie=[],super.destroy()}}class jc extends Qc{#ue;constructor(t,e){super(t,e);let n=this._getOption(\"pollingInterval\");null==n&&(n=Gc.pollingInterval),this.#ue=n}_getSubscriber(t){const e=super._getSubscriber(t);return Mc(e)&&(e.pollingInterval=this.#ue),e}get pollingInterval(){return this.#ue}set pollingInterval(t){if(!Number.isInteger(t)||t\u003C0)throw new Error(\"invalid interval\");this.#ue=t,this._forEachSubscriber((t=>{Mc(t)&&(t.pollingInterval=this.#ue)}))}}class Vc extends jc{#he;constructor(t,e,n){null==t&&(t=\"http://localhost:8545\"),super(e,n),this.#he=\"string\"==typeof t?new tr(t):t.clone()}_getConnection(){return this.#he.clone()}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){const e=this._getConnection();e.body=JSON.stringify(t),e.setHeader(\"content-type\",\"application/json\");const n=await e.send();n.assertOk();let r=n.bodyJson;return Array.isArray(r)||(r=[r]),r}}function Jc(t){if(null==t)return null;if(\"string\"==typeof t.message&&t.message.match(/revert/i)&&b(t.data))return{message:t.message,data:t.data};if(\"object\"==typeof t){for(const e in t){const n=Jc(t[e]);if(n)return n}return null}if(\"string\"==typeof t)try{return Jc(JSON.parse(t))}catch(t){}return null}function zc(t,e){if(null!=t){if(\"string\"==typeof t.message&&e.push(t.message),\"object\"==typeof t)for(const n in t)zc(t[n],e);if(\"string\"==typeof t)try{return zc(JSON.parse(t),e)}catch(t){}}}class Kc extends jc{#G;constructor(t,e,n){const r=Object.assign({},null!=n?n:{},{batchMaxCount:1});f(t&&t.request,\"invalid EIP-1193 provider\",\"ethereum\",t),super(e,r),this.#G=async(e,n)=>{const r={method:e,params:n};this.emit(\"debug\",{action:\"sendEip1193Request\",payload:r});try{const e=await t.request(r);return this.emit(\"debug\",{action:\"receiveEip1193Result\",result:e}),e}catch(t){const e=new Error(t.message);throw e.code=t.code,e.data=t.data,e.payload=r,this.emit(\"debug\",{action:\"receiveEip1193Error\",error:e}),e}}}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){f(!Array.isArray(t),\"EIP-1193 does not support batch request\",\"payload\",t);try{const e=await this.#G(t.method,t.params||[]);return[{id:t.id,result:e}]}catch(e){return[{id:t.id,error:{code:e.code,data:e.data,message:e.message}}]}}getRpcError(t,e){switch((e=JSON.parse(JSON.stringify(e))).error.code||-1){case 4001:e.error.message=`ethers-user-denied: ${e.error.message}`;break;case 4200:e.error.message=`ethers-unsupported: ${e.error.message}`}return super.getRpcError(t,e)}async hasSigner(t){null==t&&(t=0);const e=await this.send(\"eth_accounts\",[]);return\"number\"==typeof t?e.length>t:(t=t.toLowerCase(),0!==e.filter((e=>e.toLowerCase()===t)).length)}async getSigner(t){if(null==t&&(t=0),!await this.hasSigner(t))try{await this.#G(\"eth_requestAccounts\",[])}catch(t){const e=t.payload;throw this.getRpcError(e,{id:e.id,error:t})}return await super.getSigner(t)}}const qc=new Set;const _c=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw new Error(\"unable to locate global object\")}().WebSocket;class Zc{#Bt;#X;get filter(){return JSON.parse(this.#X)}#fe;#de;#pe;constructor(t,e){this.#Bt=t,this.#X=JSON.stringify(e),this.#fe=null,this.#de=null,this.#pe=null}start(){this.#fe=this.#Bt.send(\"eth_subscribe\",this.filter).then((t=>(this.#Bt._register(t,this),t)))}stop(){this.#fe.then((t=>{this.#Bt.destroyed||this.#Bt.send(\"eth_unsubscribe\",[t])})),this.#fe=null}pause(t){h(t,\"preserve logs while paused not supported by SocketSubscriber yet\",\"UNSUPPORTED_OPERATION\",{operation:\"pause(false)\"}),this.#de=!!t}resume(){this.#de=null}_handleMessage(t){if(null!=this.#fe&&null===this.#de){let e=this.#pe;e=null==e?this._emit(this.#Bt,t):e.then((async()=>{await this._emit(this.#Bt,t)})),this.#pe=e.then((()=>{this.#pe===e&&(this.#pe=null)}))}}async _emit(t,e){throw new Error(\"sub-classes must implemente this; _emit\")}}class Wc extends Zc{constructor(t){super(t,[\"newHeads\"])}async _emit(t,e){t.emit(\"block\",parseInt(e.number))}}class Yc extends Zc{constructor(t){super(t,[\"newPendingTransactions\"])}async _emit(t,e){t.emit(\"pending\",e)}}class Xc extends Zc{#ge;get logFilter(){return JSON.parse(this.#ge)}constructor(t,e){super(t,[\"logs\",e]),this.#ge=JSON.stringify(e)}async _emit(t,e){t.emit(this.logFilter,t._wrapLog(e,t._network))}}class $c extends Qc{#me;#Dt;#ye;constructor(t,e){const n=Object.assign({},null!=e?e:{});f(null==n.batchMaxCount||1===n.batchMaxCount,\"sockets-based providers do not support batches\",\"options.batchMaxCount\",e),n.batchMaxCount=1,null==n.staticNetwork&&(n.staticNetwork=!0),super(t,n),this.#me=new Map,this.#Dt=new Map,this.#ye=new Map}_getSubscriber(t){switch(t.type){case\"close\":return new gc(\"close\");case\"block\":return new Wc(this);case\"pending\":return new Yc(this);case\"event\":return new Xc(this,t.filter);case\"orphan\":if(\"drop-log\"===t.filter.orphan)return new gc(\"drop-log\")}return super._getSubscriber(t)}_register(t,e){this.#Dt.set(t,e);const n=this.#ye.get(t);if(n){for(const t of n)e._handleMessage(t);this.#ye.delete(t)}}async _send(t){f(!Array.isArray(t),\"WebSocket does not support batch send\",\"payload\",t);const e=new Promise(((e,n)=>{this.#me.set(t.id,{payload:t,resolve:e,reject:n})}));return await this._waitUntilReady(),await this._write(JSON.stringify(t)),[await e]}async _processMessage(t){const e=JSON.parse(t);if(e&&\"object\"==typeof e&&\"id\"in e){const t=this.#me.get(e.id);if(null==t)return void this.emit(\"error\",u(\"received result for unknown id\",\"UNKNOWN_ERROR\",{reasonCode:\"UNKNOWN_ID\",result:e}));this.#me.delete(e.id),t.resolve(e)}else{if(!e||\"eth_subscription\"!==e.method)return void this.emit(\"error\",u(\"received unexpected message\",\"UNKNOWN_ERROR\",{reasonCode:\"UNEXPECTED_MESSAGE\",result:e}));{const t=e.params.subscription,n=this.#Dt.get(t);if(n)n._handleMessage(e.params.result);else{let n=this.#ye.get(t);null==n&&(n=[],this.#ye.set(t,n)),n.push(e.params.result)}}}}async _write(t){throw new Error(\"sub-classes must override this\")}}class tl extends $c{#he;#we;get websocket(){if(null==this.#we)throw new Error(\"websocket closed\");return this.#we}constructor(t,e,n){super(e,n),\"string\"==typeof t?(this.#he=()=>new _c(t),this.#we=this.#he()):\"function\"==typeof t?(this.#he=t,this.#we=t()):(this.#he=null,this.#we=t),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(t){console.log(\"failed to start WebsocketProvider\",t)}},this.websocket.onmessage=t=>{this._processMessage(t.data)}}async _write(t){this.websocket.send(t)}async destroy(){null!=this.#we&&(this.#we.close(),this.#we=null),super.destroy()}}const el=\"84842078b09946638c03157f83405213\";class nl extends tl{projectId;projectSecret;constructor(t,e){const n=new rl(t,e),r=n._getConnection();h(!r.credentials,\"INFURA WebSocket project secrets unsupported\",\"UNSUPPORTED_OPERATION\",{operation:\"InfuraProvider.getWebSocketProvider()\"});super(r.url.replace(/^http/i,\"ws\").replace(\"/v3/\",\"/ws/v3/\"),n._network),o(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===el}}class rl extends Vc{projectId;projectSecret;constructor(t,e,n){null==t&&(t=\"mainnet\");const r=ec.from(t);null==e&&(e=el),null==n&&(n=null);super(rl.getRequest(r,e,n),r,{staticNetwork:r}),o(this,{projectId:e,projectSecret:n})}_getProvider(t){try{return new rl(t,this.projectId,this.projectSecret)}catch(t){}return super._getProvider(t)}isCommunityResource(){return this.projectId===el}static getWebSocketProvider(t,e){return new nl(t,e)}static getRequest(t,e,n){null==e&&(e=el),null==n&&(n=null);const r=new tr(`https://${function(t){switch(t){case\"mainnet\":return\"mainnet.infura.io\";case\"goerli\":return\"goerli.infura.io\";case\"sepolia\":return\"sepolia.infura.io\";case\"arbitrum\":return\"arbitrum-mainnet.infura.io\";case\"arbitrum-goerli\":return\"arbitrum-goerli.infura.io\";case\"arbitrum-sepolia\":return\"arbitrum-sepolia.infura.io\";case\"base\":return\"base-mainnet.infura.io\";case\"base-goerlia\":return\"base-goerli.infura.io\";case\"base-sepolia\":return\"base-sepolia.infura.io\";case\"bnb\":return\"bnbsmartchain-mainnet.infura.io\";case\"bnbt\":return\"bnbsmartchain-testnet.infura.io\";case\"linea\":return\"linea-mainnet.infura.io\";case\"linea-goerli\":return\"linea-goerli.infura.io\";case\"linea-sepolia\":return\"linea-sepolia.infura.io\";case\"matic\":return\"polygon-mainnet.infura.io\";case\"matic-amoy\":return\"polygon-amoy.infura.io\";case\"matic-mumbai\":return\"polygon-mumbai.infura.io\";case\"optimism\":return\"optimism-mainnet.infura.io\";case\"optimism-goerli\":return\"optimism-goerli.infura.io\";case\"optimism-sepolia\":return\"optimism-sepolia.infura.io\"}f(!1,\"unsupported network\",\"network\",t)}(t.name)}/v3/${e}`);return r.allowGzip=!0,n&&r.setCredentials(\"\",n),e===el&&(r.retryFunc=async(t,e,n)=>{var r;return r=\"InfuraProvider\",qc.has(r)||(qc.add(r),console.log(\"========= NOTICE =========\"),console.log(`Request-Rate Exceeded for ${r} (this message will not be repeated)`),console.log(\"\"),console.log(\"The default API keys for each service are provided as a highly-throttled,\"),console.log(\"community resource for low-traffic projects and early prototyping.\"),console.log(\"\"),console.log(\"While your application will continue to function, we highly recommended\"),console.log(\"signing up for your own API keys to improve performance, increase your\"),console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\"),console.log(\"\"),console.log(\"For more details: https://docs.ethers.org/api-keys/\"),console.log(\"==========================\")),!0}),r}}const sl=[\"eip155:1\",\"eip155:11155111\",\"eip155:17000\"],il=\"Ethereum Name Service\";const ol=async t=>{const{chainId:e,address:n,domain:r}=t;let s;const i=parseInt(e.split(\":\")[1]??\"1\",10);if(sl.includes(e))s=new Kc(ethereum,i);else{const t=\"992108d9a01d4bffb06df489a0a3f458\";if(!t)throw new Error(\"INFURA_PROJECT_ID is missing.\");s=new rl(1,t)}if(r){const t=await s.getResolver(r);if(sl.includes(e)){var o;const e=await(null===(o=t)||void 0===o?void 0:o.getAddress());if(e)return{resolvedAddresses:[{resolvedAddress:e,protocol:il,domainName:r}]}}else{var a,c;const e=await(null===(a=t)||void 0===a?void 0:a.getAddress(i));if(e)return{resolvedAddresses:[{resolvedAddress:e,protocol:il,domainName:r}]};const n=await(null===(c=t)||void 0===c?void 0:c.getAddress());if(n){const t=await async function(t,e){try{return\"0x\"!==await t.getCode(e,\"pending\")}catch(t){return console.error(\"Unable to determine if resolved ENS address is a contract. Assuming it is and returning nothing.\"),!0}}(s,n);if(!t){const t=(await s.getNetwork()).name;return{resolvedAddresses:[{resolvedAddress:n,protocol:`⚠️ ${il} (${t})`,domainName:r}]}}}}}else if(n){const t=await s.lookupAddress(n);if(t)return{resolvedDomains:[{resolvedDomain:t,protocol:il}]}}return null};var al=exports;for(var cl in e)al[cl]=e[cl];e.__esModule&&Object.defineProperty(al,\"__esModule\",{value:!0})})();","status":"stopped","version":"0.1.2","versionHistory":[{"date":1.75069648342e+12,"origin":"metamask","version":"0.1.2"}]},"npm:@metamask/institutional-wallet-snap":{"auxiliaryFiles":[],"blocked":false,"enabled":true,"hideSnapBranding":true,"id":"npm:@metamask/institutional-wallet-snap","initialConnections":{"http://localhost:3000":{},"http://localhost:8000":{},"https://alpha.mycactus.io":{},"https://app.bitgo-test.com":{},"https://app.bitgo.com":{},"https://apps-portal.safe.global":{},"https://console.dev.mpcvault.com":{},"https://console.fireblocks.io":{},"https://console.mpcvault.com":{},"https://debug.mycactus.dev:1443":{},"https://dev10-console.waterballoons.xyz":{},"https://dev4-console.waterballoons.xyz":{},"https://local.waterballoons.xyz:4200":{},"https://localhost:3000":{},"https://neptune-custody-ui.metamask-institutional.io":{},"https://pre.mycactus.com":{},"https://saturn-custody-ui.metamask-institutional.io":{},"https://ui-preprod-v2.qa.zodia.io":{},"https://ui-preprod-v2.uat.zodia.io":{},"https://ui-v2.qa.zodia.io":{},"https://ui-v2.sit.zodia.io":{},"https://v2.custody.zodia.io":{},"https://www.mycactus.com":{},"https://www.mycactus.dev":{},"localhost:8000":{}},"initialPermissions":{"endowment:cronjob":{"jobs":[{"expression":"5/15 * * * * *","request":{"method":"execute"}},{"expression":"* * * * *","request":{"method":"manageSleepState"}}]},"endowment:ethereum-provider":{},"endowment:keyring":{"allowedOrigins":["localhost:8000","http://localhost:8000"]},"endowment:network-access":{},"endowment:page-home":{},"endowment:rpc":{"allowedOrigins":["localhost:8000","http://localhost:8000","localhost:3000","https://localhost:3000","http://localhost:3000","https://neptune-custody-ui.metamask-institutional.io","https://zodia.io","https://ui-v2.sit.zodia.io","https://ui-v2.qa.zodia.io","https://ui-preprod-v2.qa.zodia.io","https://ui-preprod-v2.uat.zodia.io","https://v2.custody.zodia.io","https://console.fireblocks.io","https://local.waterballoons.xyz:4200","https://dev4-console.waterballoons.xyz","https://dev10-console.waterballoons.xyz","https://console.dev.mpcvault.com","https://saturn-custody-ui.metamask-institutional.io","https://console.mpcvault.com","https://app.bitgo.com","https://app.bitgo-test.com","https://apps-portal.safe.global","https://alpha.mycactus.io","https://pre.mycactus.com","https://www.mycactus.dev","https://debug.mycactus.dev:1443","https://www.mycactus.com"]},"snap_dialog":{},"snap_manageAccounts":{},"snap_manageState":{},"snap_notify":{}},"localizationFiles":[],"manifest":{"description":"Institutional accounts in MetaMask.","initialConnections":{"http://localhost:3000":{},"http://localhost:8000":{},"https://alpha.mycactus.io":{},"https://app.bitgo-test.com":{},"https://app.bitgo.com":{},"https://apps-portal.safe.global":{},"https://console.dev.mpcvault.com":{},"https://console.fireblocks.io":{},"https://console.mpcvault.com":{},"https://debug.mycactus.dev:1443":{},"https://dev10-console.waterballoons.xyz":{},"https://dev4-console.waterballoons.xyz":{},"https://local.waterballoons.xyz:4200":{},"https://localhost:3000":{},"https://neptune-custody-ui.metamask-institutional.io":{},"https://pre.mycactus.com":{},"https://saturn-custody-ui.metamask-institutional.io":{},"https://ui-preprod-v2.qa.zodia.io":{},"https://ui-preprod-v2.uat.zodia.io":{},"https://ui-v2.qa.zodia.io":{},"https://ui-v2.sit.zodia.io":{},"https://v2.custody.zodia.io":{},"https://www.mycactus.com":{},"https://www.mycactus.dev":{},"localhost:8000":{}},"initialPermissions":{"endowment:cronjob":{"jobs":[{"expression":"5/15 * * * * *","request":{"method":"execute"}},{"expression":"* * * * *","request":{"method":"manageSleepState"}}]},"endowment:ethereum-provider":{},"endowment:keyring":{"allowedOrigins":["localhost:8000","http://localhost:8000"]},"endowment:network-access":{},"endowment:page-home":{},"endoww���ment:rpc":{"allowedOrigins":["localhost:8000","http://localhost:8000","localhost:3000","https://localhost:3000","http://localhost:3000","https://neptune-custody-ui.metamask-institutional.io","https://zodia.io","https://ui-v2.sit.zodia.io","https://ui-v2.qa.zodia.io","https://ui-preprod-v2.qa.zodia.io","https://ui-preprod-v2.uat.zodia.io","https://v2.custody.zodia.io","https://console.fireblocks.io","https://local.waterballoons.xyz:4200","https://dev4-console.waterballoons.xyz","https://dev10-console.waterballoons.xyz","https://console.dev.mpcvault.com","https://saturn-custody-ui.metamask-institutional.io","https://console.mpcvault.com","https://app.bitgo.com","https://app.bitgo-test.com","https://apps-portal.safe.global","https://alpha.mycactus.io","https://pre.mycactus.com","https://www.mycactus.dev","https://debug.mycactus.dev:1443","https://www.mycactus.com"]},"snap_dialog":{},"snap_manageAccounts":{},"snap_manageState":{},"snap_notify":{}},"manifestVersion":"0.1","proposedName":"Institutional Wallet","repository":{"type":"git","url":"git+https://github.com/MetaMask/snap-institutional-wallet.git"},"source":{"location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/institutional-wallet-snap","registry":"https://registry.npmjs.org/"}},"shasum":"oadOjTS9UGFvy18oEGuP0z2zufbQH4ZGl0ABl4aqtxU="},"version":"1.3.1"},"preinstalled":true,"removable":false,"sourceCode":"(()=>{var t={6975:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.byteArrayToHashObject=e.hashObjectToByteArray=void 0,e.hashObjectToByteArray=function(t,e,r){let n=t.h0;e[0+r]=255&n,n>>=8,e[1+r]=255&n,n>>=8,e[2+r]=255&n,n>>=8,e[3+r]=255&n,n=t.h1,e[4+r]=255&n,n>>=8,e[5+r]=255&n,n>>=8,e[6+r]=255&n,n>>=8,e[7+r]=255&n,n=t.h2,e[8+r]=255&n,n>>=8,e[9+r]=255&n,n>>=8,e[10+r]=255&n,n>>=8,e[11+r]=255&n,n=t.h3,e[12+r]=255&n,n>>=8,e[13+r]=255&n,n>>=8,e[14+r]=255&n,n>>=8,e[15+r]=255&n,n=t.h4,e[16+r]=255&n,n>>=8,e[17+r]=255&n,n>>=8,e[18+r]=255&n,n>>=8,e[19+r]=255&n,n=t.h5,e[20+r]=255&n,n>>=8,e[21+r]=255&n,n>>=8,e[22+r]=255&n,n>>=8,e[23+r]=255&n,n=t.h6,e[24+r]=255&n,n>>=8,e[25+r]=255&n,n>>=8,e[26+r]=255&n,n>>=8,e[27+r]=255&n,n=t.h7,e[28+r]=255&n,n>>=8,e[29+r]=255&n,n>>=8,e[30+r]=255&n,n>>=8,e[31+r]=255&n},e.byteArrayToHashObject=function(t){let e=0;e|=255&t[3],e\u003C\u003C=8,e|=255&t[2],e\u003C\u003C=8,e|=255&t[1],e\u003C\u003C=8,e|=255&t[0];const r=e;e=0,e|=255&t[7],e\u003C\u003C=8,e|=255&t[6],e\u003C\u003C=8,e|=255&t[5],e\u003C\u003C=8,e|=255&t[4];const n=e;e=0,e|=255&t[11],e\u003C\u003C=8,e|=255&t[10],e\u003C\u003C=8,e|=255&t[9],e\u003C\u003C=8,e|=255&t[8];const i=e;e=0,e|=255&t[15],e\u003C\u003C=8,e|=255&t[14],e\u003C\u003C=8,e|=255&t[13],e\u003C\u003C=8,e|=255&t[12];const o=e;e=0,e|=255&t[19],e\u003C\u003C=8,e|=255&t[18],e\u003C\u003C=8,e|=255&t[17],e\u003C\u003C=8,e|=255&t[16];const s=e;e=0,e|=255&t[23],e\u003C\u003C=8,e|=255&t[22],e\u003C\u003C=8,e|=255&t[21],e\u003C\u003C=8,e|=255&t[20];const a=e;e=0,e|=255&t[27],e\u003C\u003C=8,e|=255&t[26],e\u003C\u003C=8,e|=255&t[25],e\u003C\u003C=8,e|=255&t[24];const u=e;return e=0,e|=255&t[31],e\u003C\u003C=8,e|=255&t[30],e\u003C\u003C=8,e|=255&t[29],e\u003C\u003C=8,e|=255&t[28],{h0:r,h1:n,h2:i,h3:o,h4:s,h5:a,h6:u,h7:e}}},45113:(t,e)=>{\"use strict\";function r(t,e){const r=BigInt(1)\u003C\u003CBigInt(t);if(e>=r)throw new Error(`index ${e} too large for depth ${t}`);return r|e}Object.defineProperty(e,\"__esModule\",{value:!0}),e.gindexChild=e.gindexParent=e.gindexSibling=e.concatGindices=e.getGindexBits=e.gindexIterator=e.getGindicesAtDepth=e.iterateAtDepth=e.countToDepth=e.convertGindexToBitstring=e.toGindexBitstring=e.toGindex=e.bitIndexBigInt=void 0,e.bitIndexBigInt=function(t){return t.toString(2).length-1},e.toGindex=r,e.toGindexBitstring=function(t,e){const r=e?Number(e).toString(2):\"\";if(r.length>t)throw new Error(\"index too large for depth\");return\"1\"+r.padStart(t,\"0\")},e.convertGindexToBitstring=function(t){if(\"string\"==typeof t){if(0===t.length)throw new Error(n);return t}if(t\u003C1)throw new Error(n);return t.toString(2)},e.countToDepth=function(t){return t\u003C=1?0:(t-BigInt(1)).toString(2).length},e.iterateAtDepth=function(t,e,n){if(e+n>BigInt(1)\u003C\u003CBigInt(t))throw new Error(\"Too large for depth\");let i=r(t,e);const o=i+n;return{[Symbol.iterator]:()=>({next(){if(i\u003Co){const t=i;return i++,{done:!1,value:t}}return{done:!0,value:void 0}}})}},e.getGindicesAtDepth=function(t,e,n){if(e+n>BigInt(1)\u003C\u003CBigInt(t))throw new Error(\"Too large for depth\");let i=r(t,BigInt(e));const o=[];for(let t=0;t\u003Cn;t++)o.push(i++);return o};const n=\"Invalid gindex\";e.gindexIterator=function(t){let e;if(\"string\"==typeof t){if(!t.length)throw new Error(n);e=t}else{if(t\u003C1)throw new Error(n);e=t.toString(2)}let r=1;const i=()=>{if(r===e.length)return{done:!0,value:void 0};const t=Number(e[r]);return r++,{done:!1,value:t}};return{[Symbol.iterator]:()=>({next:i}),remainingBitLength:()=>e.length-r}},e.getGindexBits=function(t){let e;if(\"string\"==typeof t){if(!t.length)throw new Error(n);e=t}else{if(t\u003C1)throw new Error(n);e=t.toString(2)}const r=[];for(let t=1;t\u003Ce.length;t++)r.push(Number(e[t]));return r},e.concatGindices=function(t){return BigInt(t.reduce(((t,e)=>t+e.toString(2).slice(1)),\"0b1\"))},e.gindexSibling=function(t){return t^BigInt(1)},e.gindexParent=function(t){return t/BigInt(2)},e.gindexChild=function(t,e){return t*BigInt(2)+BigInt(e)}},29457:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.setHasher=e.hasher=void 0;const o=r(7207);i(r(64571),e),i(r(336),e),e.hasher=o.hasher,e.setHasher=function(t){e.hasher=t}},7207:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hasher=void 0;const n=r(67929),i=r(336),o=(t,e)=>n.sha256.create().update(t).update(e).digest();e.hasher={digest64:o,digest64HashObjects:(t,e)=>i.uint8ArrayToHashObject(o(i.hashObjectToUint8Array(t),i.hashObjectToUint8Array(e)))}},64571:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},336:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.uint8ArrayToHashObject=e.hashObjectToUint8Array=void 0;const n=r(6975);e.hashObjectToUint8Array=function(t){const e=new Uint8Array(32);return n.hashObjectToByteArray(t,e,0),e},e.uint8ArrayToHashObject=function(t){return n.byteArrayToHashObject(t)}},56567:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(45113),e),i(r(29457),e),i(r(78894),e),i(r(60628),e),i(r(47392),e),i(r(8738),e),i(r(72969),e),i(r(67048),e)},78894:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bitwiseOrNodeH=e.setNodeH=e.getNodeH=e.compose=e.identity=e.LeafNode=e.BranchNode=e.Node=void 0;const n=r(29457),i=2**32;class o{constructor(t,e,r,n,i,o,s,a){this.h0=t,this.h1=e,this.h2=r,this.h3=n,this.h4=i,this.h5=o,this.h6=s,this.h7=a}applyHash(t){this.h0=t.h0,this.h1=t.h1,this.h2=t.h2,this.h3=t.h3,this.h4=t.h4,this.h5=t.h5,this.h6=t.h6,this.h7=t.h7}}e.Node=o;e.BranchNode=class extends o{constructor(t,e){if(super(null,0,0,0,0,0,0,0),this._left=t,this._right=e,!t)throw new Error(\"Left node is undefined\");if(!e)throw new Error(\"Right node is undefined\")}get rootHashObject(){return null===this.h0&&super.applyHash(n.hasher.digest64HashObjects(this.left.rootHashObject,this.right.rootHashObject)),this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this._left}get right(){return this._right}};class s extends o{static fromRoot(t){return this.fromHashObject(n.uint8ArrayToHashObject(t))}static fromHashObject(t){return new s(t.h0,t.h1,t.h2,t.h3,t.h4,t.h5,t.h6,t.h7)}static fromZero(){return new s(0,0,0,0,0,0,0,0)}static fromUint32(t){return new s(t,0,0,0,0,0,0,0)}clone(){return s.fromHashObject(this)}get rootHashObject(){return this}get root(){return n.hashObjectToUint8Array(this)}isLeaf(){return!0}get left(){throw Error(\"LeafNode has no left node\")}get right(){throw Error(\"LeafNode has no right node\")}writeToBytes(t,e,r){t.set(this.root.slice(0,r),e)}getUint(t,e,r){const n=Math.floor(e/4);if(t\u003C4){const r=e%4*8,i=a(this,n);return 1===t?255&i>>r:65535&i>>r}if(4===t)return a(this,n)>>>0;if(8===t){const t=a(this,n),e=a(this,n+1);return 0===e?t>>>0:-1===e&&-1===t&&r?1/0:(t>>>0)+(e>>>0)*i}throw Error(\"uintBytes > 8\")}getUintBigint(t,e){const r=Math.floor(e/4);if(t\u003C4){const n=e%4*8,i=a(this,r);return 1===t?BigInt(255&i>>n):BigInt(65535&i>>n)}if(4===t)return BigInt(a(this,r)>>>0);{const e=Math.ceil(t/4);let n=BigInt(0);for(let t=0;t\u003Ce;t++)n+=BigInt(a(this,r+t)>>>0)\u003C\u003CBigInt(32*t);return n}}setUint(t,e,r,n){const o=Math.floor(e/4);if(t\u003C4){const n=e%4*8;let i=a(this,o);1===t?(i&=~(255\u003C\u003Cn),i|=r\u003C\u003Cn):(i&=~(65535\u003C\u003Cn),i|=r\u003C\u003Cn),u(this,o,i)}else if(4===t)u(this,o,r);else{if(8!==t)throw Error(\"uintBytes > 8\");r===1/0&&n?(u(this,o,-1),u(this,o+1,-1)):(u(this,o,4294967295&r),u(this,o+1,r/i&4294967295))}}setUintBigint(t,e,r){const n=Math.floor(e/4);if(t\u003C4){const i=Number(r),o=e%4*8;let s=a(this,n);1===t?(s&=~(255\u003C\u003Co),s|=i\u003C\u003Co):(s&=~(65535\u003C\u003Co),s|=i\u003C\u003Co),u(this,n,s)}else if(4===t)u(this,n,Number(r));else{const e=n+Math.ceil(t/4);for(let t=n;t\u003Ce;t++)u(this,t,Number(r&BigInt(4294967295))),r>>=BigInt(32)}}bitwiseOrUint(t,e,r){const n=Math.floor(e/4);if(t\u003C4){h(this,n,r\u003C\u003Ce%4*8)}else if(4===t)h(this,n,r);else{const e=n+Math.ceil(t/4);for(let t=n;t\u003Ce;t++)h(this,t,4294967295&r),r>>=32}}}function a(t,e){if(0===e)return t.h0;if(1===e)return t.h1;if(2===e)return t.h2;if(3===e)return t.h3;if(4===e)return t.h4;if(5===e)return t.h5;if(6===e)return t.h6;if(7===e)return t.h7;throw Error(\"hIndex > 7\")}function u(t,e,r){if(0===e)t.h0=r;else if(1===e)t.h1=r;else if(2===e)t.h2=r;else if(3===e)t.h3=r;else if(4===e)t.h4=r;else if(5===e)t.h5=r;else if(6===e)t.h6=r;else{if(7!==e)throw Error(\"hIndex > 7\");t.h7=r}}function h(t,e,r){if(0===e)t.h0|=r;else if(1===e)t.h1|=r;else if(2===e)t.h2|=r;else if(3===e)t.h3|=r;else if(4===e)t.h4|=r;else if(5===e)t.h5|=r;else if(6===e)t.h6|=r;else{if(7!==e)throw Error(\"hIndex > 7\");t.h7|=r}}e.LeafNode=s,e.identity=function(t){return t},e.compose=function(t,e){return function(r){return e(t(r))}},e.getNodeH=a,e.setNodeH=u,e.bitwiseOrNodeH=h},60628:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.packedNodeRootsToBytes=e.packedRootsBytesToLeafNodes=e.packedRootsBytesToNode=void 0;const n=r(8738),i=r(78894);function o(t,e,r){const n=r-e,o=Math.floor(n/32),s=new Array(Math.ceil(n/32));for(let r=0;r\u003Co;r++){const n=e+32*r;s[r]=new i.LeafNode(t.getInt32(n+0,!0),t.getInt32(n+4,!0),t.getInt32(n+8,!0),t.getInt32(n+12,!0),t.getInt32(n+16,!0),t.getInt32(n+20,!0),t.getInt32(n+24,!0),t.getInt32(n+28,!0))}const a=n%32;if(a>0){const r=new i.LeafNode(0,0,0,0,0,0,0,0);s[o]=r;const u=Math.floor(a/4);for(let n=0;n\u003Cu;n++)i.setNodeH(r,n,t.getInt32(e+32*o+4*n,!0));const h=n%4;if(h>0){let o=0;for(let r=0;r\u003Ch;r++)o|=t.getUint8(e+n-h+r)\u003C\u003C8*r;i.setNodeH(r,u,o)}}return s}e.packedRootsBytesToNode=function(t,e,r,i){const s=o(e,r,i);return n.subtreeFillToContents(s,t)},e.packedRootsBytesToLeafNodes=o,e.packedNodeRootsToBytes=function(t,e,r,n){const o=r%32,s=Math.floor(r/32);for(let r=0;r\u003Cs;r++){const i=n[r],o=e+32*r;t.setInt32(o+0,i.h0,!0),t.setInt32(o+4,i.h1,!0),t.setInt32(o+8,i.h2,!0),t.setInt32(o+12,i.h3,!0),t.setInt32(o+16,i.h4,!0),t.setInt32(o+20,i.h5,!0),t.setInt32(o+24,i.h6,!0),t.setInt32(o+28,i.h7,!0)}if(o>0){const a=n[s],u=Math.floor(o/4);for(let r=0;r\u003Cu;r++)t.setInt32(e+32*s+4*r,i.getNodeH(a,r),!0);const h=r%4;if(h>0){const n=i.getNodeH(a,u);for(let i=0;i\u003Ch;i++)t.setUint8(e+r-h+i,n>>8*i&255)}}}},50065:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromCompactMultiProof=e.createCompactMultiProof=e.compactMultiProofToNode=e.nodeToCompactMultiProof=e.descriptorToBitlist=e.computeDescriptor=void 0;const n=r(45113),i=r(78894),o=r(85410);function s(t,e){const r=e%8,n=t[Math.floor(e/8)];switch(r){case 0:return 0!=(128&n);case 1:return 0!=(64&n);case 2:return 0!=(32&n);case 3:return 0!=(16&n);case 4:return 0!=(8&n);case 5:return 0!=(4&n);case 6:return 0!=(2&n);case 7:return 0!=(1&n);default:throw new Error(\"unreachable\")}}function a(t){const e=[],r=8*t.length;let n=0,i=0;for(let o=0;o\u003Cr;o++){const a=s(t,o);if(e.push(a),a?i++:n++,i>n){if(o++,o+7\u003Cr)throw new Error(\"Invalid descriptor: too many bytes\");for(;o\u003Cr;o++){if(s(t,o))throw new Error(\"Invalid descriptor: too many 1 bits\")}return e}}throw new Error(\"Invalid descriptor: not enough 1 bits\")}function u(t,e,r){if(e[r])return[t.root];{const n=u(t.left,e,r+1),i=u(t.right,e,r+2*n.length);return[...n,...i]}}function h(t,e,r){return t[r.bitIndex++]?i.LeafNode.fromRoot(e[r.leafIndex++]):new i.BranchNode(h(t,e,r),h(t,e,r))}e.computeDescriptor=function(t){const e=new Set,r=new Set;for(const i of t){const t=n.convertGindexToBitstring(i);e.add(t);const{branch:s,path:a}=o.computeProofBitstrings(t);a.delete(t);for(const t of a)r.add(t);for(const t of s)e.add(t)}for(const t of r)e.delete(t);const i=Array.from(e).sort(((t,e)=>t.localeCompare(e)));let s=\"\";for(const t of i)for(let e=0;e\u003Ct.length;e++)if(\"1\"===t[t.length-1-e]){s+=\"1\".padStart(e+1,\"0\");break}s.length%8!=0&&(s=s.padEnd(8-s.length%8+s.length,\"0\"));const a=new Uint8Array(s.length/8);for(let t=0;t\u003Ca.length;t++)a[t]=Number(\"0b\"+s.substring(8*t,8*(t+1)));return a},e.descriptorToBitlist=a,e.nodeToCompactMultiProof=u,e.compactMultiProofToNode=h,e.createCompactMultiProof=function(t,e){return u(t,a(e),0)},e.createNodeFromCompactMultiProof=function(t,e){const r=a(e);if(r.length!==2*t.length-1)throw new Error(\"Invalid multiproof: invalid number of leaves\");return h(r,t,{bitIndex:0,leafIndex:0})}},47392:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.deserializeProof=e.serializeProof=e.createNodeFromProof=e.createProof=e.ProofTypeSerialized=e.ProofType=e.descriptorToBitlist=e.computeDescriptor=void 0;const n=r(4871),i=r(50065),o=r(42456),s=r(85492);var a,u=r(50065);Object.defineProperty(e,\"computeDescriptor\",{enumerable:!0,get:function(){return u.computeDescriptor}}),Object.defineProperty(e,\"descriptorToBitlist\",{enumerable:!0,get:function(){return u.descriptorToBitlist}}),function(t){t.single=\"single\",t.treeOffset=\"treeOffset\",t.multi=\"multi\",t.compactMulti=\"compactMulti\"}(a=e.ProofType||(e.ProofType={})),e.ProofTypeSerialized=[a.single,a.treeOffset,a.multi,a.compactMulti],e.createProof=function(t,e){switch(e.type){case a.single:{const[r,n]=o.createSingleProof(t,e.gindex);return{type:a.single,gindex:e.gindex,leaf:r,witnesses:n}}case a.treeOffset:{const[r,n]=s.createTreeOffsetProof(t,e.gindices);return{type:a.treeOffset,offsets:r,leaves:n}}case a.multi:{const[r,i,o]=n.createMultiProof(t,e.gindices);return{type:a.multi,leaves:r,witnesses:i,gindices:o}}case a.compactMulti:{const r=i.createCompactMultiProof(t,e.descriptor);return{type:a.compactMulti,leaves:r,descriptor:e.descriptor}}default:throw new Error(\"Invalid proof type\")}},e.createNodeFromProof=function(t){switch(t.type){case a.single:return o.createNodeFromSingleProof(t.gindex,t.leaf,t.witnesses);case a.treeOffset:return s.createNodeFromTreeOffsetProof(t.offsets,t.leaves);case a.multi:return n.createNodeFromMultiProof(t.leaves,t.witnesses,t.gindices);case a.compactMulti:return i.createNodeFromCompactMultiProof(t.leaves,t.descriptor);default:throw new Error(\"Invalid proof type\")}},e.serializeProof=function(t){switch(t.type){case a.single:case a.multi:throw new Error(\"Not implemented\");case a.treeOffset:{const r=new Uint8Array(1+s.computeTreeOffsetProofSerializedLength(t.offsets,t.leaves));return r[0]=e.ProofTypeSerialized.indexOf(a.treeOffset),s.serializeTreeOffsetProof(r,1,t.offsets,t.leaves),r}default:throw new Error(\"Invalid proof type\")}},e.deserializeProof=function(t){const r=e.ProofTypeSerialized[t[0]];if(!r)throw new Error(\"Invalid proof type\");switch(r){case a.single:case a.multi:throw new Error(\"Not implemented\");case a.treeOffset:{const[e,r]=s.deserializeTreeOffsetProof(t,1);return{type:a.treeOffset,offsets:e,leaves:r}}default:throw new Error(\"Invalid proof type\")}}},4871:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromMultiProof=e.createMultiProof=void 0;const n=r(78894),i=r(72969),o=r(85410);e.createMultiProof=function(t,e){const r=new i.Tree(t),n=o.computeMultiProofBitstrings(e.map((t=>t.toString(2))),!1,o.SortOrder.Decreasing),s=e.slice().sort(((t,e)=>t\u003Ce?1:-1));return[s.map((t=>r.getRoot(t))),n.map((t=>r.getRoot(t))),s]},e.createNodeFromMultiProof=function(t,e,r){if(t.length!==r.length)throw new Error(\"Leaves length should equal gindices length\");const i=r.map((t=>t.toString(2))),s=o.computeMultiProofBitstrings(i,!1,o.SortOrder.Decreasing);if(s.length!==e.length)throw new Error(\"Witnesses length should equal witnesses gindices length\");const a=Math.max(i[0]?.length??0,s[0]?.length??0),u=Object.fromEntries(Array.from({length:a},((t,e)=>[e+1,{}])));for(let e=0;e\u003Ci.length;e++){const r=i[e],o=t[e];u[r.length][r]=n.LeafNode.fromRoot(o)}for(let t=0;t\u003Cs.length;t++){const r=s[t],i=e[t];u[r.length][r]=n.LeafNode.fromRoot(i)}for(let t=a;t>1;t--){const e=u[t],r=u[t-1];for(const t of Object.keys(e)){const i=e[t];if(!i)continue;const o=\"0\"===t[t.length-1],s=t.substring(0,t.length-1),a=s+(o?\"1\":\"0\"),u=e[a];if(!u)throw new Error(`Sibling not found: ${a}`);const h=o?new n.BranchNode(i,u):new n.BranchNode(u,i);r[s]=h,delete e[t],delete e[a]}}const h=u[1][1];if(!h)throw new Error(\"Internal consistency error: no root found\");return h}},42456:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createNodeFromSingleProof=e.createSingleProof=e.ERR_INVALID_NAV=void 0;const n=r(78894),i=r(45113);e.ERR_INVALID_NAV=\"Invalid tree navigation\",e.createSingleProof=function(t,r){const n=[];let o=t;for(const t of i.gindexIterator(r))if(t){if(o.isLeaf())throw new Error(e.ERR_INVALID_NAV);n.push(o.left.root),o=o.right}else{if(o.isLeaf())throw new Error(e.ERR_INVALID_NAV);n.push(o.right.root),o=o.left}return[o.root,n.reverse()]},e.createNodeFromSingleProof=function(t,e,r){let i=n.LeafNode.fromRoot(e);const o=r.slice().reverse();for(;t>1;){const e=n.LeafNode.fromRoot(o.pop());i=t%BigInt(2)===BigInt(0)?new n.BranchNode(i,e):new n.BranchNode(e,i),t/=BigInt(2)}return i}},85492:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.deserializeTreeOffsetProof=e.serializeTreeOffsetProof=e.computeTreeOffsetProofSerializedLength=e.createNodeFromTreeOffsetProof=e.createTreeOffsetProof=e.treeOffsetProofToNode=e.nodeToTreeOffsetProof=void 0;const n=r(78894),i=r(85410);function o(t,e,r){if(r.length&&r[0].startsWith(e)){if(e===r[0])return r.shift(),[[],[t.root]];{const[n,i]=o(t.left,e+\"0\",r),[s,a]=o(t.right,e+\"1\",r);return[[i.length].concat(n,s),i.concat(a)]}}return[[],[]]}function s(t,e){if(e.length){if(1===e.length)return n.LeafNode.fromRoot(e[0]);{const r=t[0];return new n.BranchNode(s(t.slice(1,r),e.slice(0,r)),s(t.slice(r),e.slice(r)))}}throw new Error(\"Proof must contain gt 0 leaves\")}e.nodeToTreeOffsetProof=o,e.treeOffsetProofToNode=s,e.createTreeOffsetProof=function(t,e){return o(t,\"1\",i.computeMultiProofBitstrings(e.map((t=>t.toString(2)))))},e.createNodeFromTreeOffsetProof=function(t,e){return s(t,e)},e.computeTreeOffsetProofSerializedLength=function(t,e){return 2*(t.length+1)+32*e.length},e.serializeTreeOffsetProof=function(t,e,r,n){const i=new DataView(t.buffer,t.byteOffset,t.byteLength);i.setUint16(e,n.length,!0);const o=e+2;for(let t=0;t\u003Cr.length;t++)i.setUint16(2*t+o,r[t],!0);const s=o+2*r.length;for(let e=0;e\u003Cn.length;e++)t.set(n[e],32*e+s)},e.deserializeTreeOffsetProof=function(t,e){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=r.getUint16(e,!0);if(t.length\u003C2*(n-1)+32*n)throw new Error(\"Unable to deserialize tree offset proof: not enough bytes\");const i=e+2,o=Array.from({length:n-1},((t,e)=>r.getUint16(2*e+i,!0))),s=i+2*o.length,a=Array.from({length:n},((e,r)=>t.subarray(32*r+s,32*(r+1)+s)));return[o,a]}},85410:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.computeMultiProofBitstrings=e.SortOrder=e.filterParentBitstrings=e.sortDecreasingBitstrings=e.sortInOrderBitstrings=e.computeProofBitstrings=e.computeProofGindices=void 0;const n=r(45113);function i(t){const e=new Set,r=new Set;let n=t;for(;n.length>1;){e.add(n);const t=n[n.length-1],i=n.substring(0,n.length-1);r.add(i+(1^Number(t))),n=i}return{path:e,branch:r}}function o(t,e){return t.length?t.map((t=>t.padEnd(e))).sort().map((t=>t.trim())):[]}function s(t){return t.length?t.sort(((t,e)=>{if(t.length\u003Ce.length)return 1;if(e.length\u003Ct.length)return-1;let r=t.indexOf(\"0\"),n=e.indexOf(\"0\");for(;;){if(-1===r)return-1;if(-1===n)return 1;if(r\u003Cn)return 1;if(n\u003Cr)return-1;r=t.indexOf(\"0\",r+1),n=e.indexOf(\"0\",n+1)}})):[]}function a(t){const e=t.slice().sort(((t,e)=>t.length-e.length)),r=[];t:for(let t=0;t\u003Ce.length;t++){const n=e[t];for(let r=t+1;r\u003Ce.length;r++){if(e[r].startsWith(n))continue t}r.push(n)}return r}var u;e.computeProofGindices=function(t){const e=new Set,r=new Set;let i=t;for(;i>1;)e.add(i),r.add(n.gindexSibling(i)),i=n.gindexParent(i);return{path:e,branch:r}},e.computeProofBitstrings=i,e.sortInOrderBitstrings=o,e.sortDecreasingBitstrings=s,e.filterParentBitstrings=a,function(t){t[t.InOrder=0]=\"InOrder\",t[t.Decreasing=1]=\"Decreasing\",t[t.Unsorted=2]=\"Unsorted\"}(u=e.SortOrder||(e.SortOrder={})),e.computeMultiProofBitstrings=function(t,e=!0,r=u.InOrder){const n=a(t),h=new Set(e?n:[]),c=new Set,f=new Set;let l=1;for(const t of n){t.length>l&&(l=t.length);const{path:e,branch:r}=i(t);e.forEach((t=>c.add(t))),r.forEach((t=>f.add(t)))}switch(c.forEach((t=>f.delete(t))),f.forEach((t=>h.add(t))),r){case u.InOrder:return o(Array.from(h),l);case u.Decreasing:return s(Array.from(h));case u.Unsorted:return Array.from(h)}}},8738:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.subtreeFillToContents=e.subtreeFillToLength=e.subtreeFillToDepth=void 0;const n=r(78894),i=r(67048);function o(t,e){let r=t;for(;e>0;)r=new n.BranchNode(r,r),e--;return r}e.subtreeFillToDepth=o,e.subtreeFillToLength=function t(e,r,s){const a=1\u003C\u003Cr;if(s>a)throw new Error(\"ERR_TOO_MANY_NODES\");if(s===a)return o(e,r);if(0===r){if(1===s)return e;throw new Error(\"ERR_NAVIGATION\")}if(1===r)return new n.BranchNode(e,s>1?e:i.zeroNode(0));const u=a>>1;return s\u003C=u?new n.BranchNode(t(e,r-1,s),i.zeroNode(r-1)):new n.BranchNode(o(e,r-1),t(e,r-1,s-u))},e.subtreeFillToContents=function(t,e){const r=2**e;if(t.length>r)throw new Error(`nodes.length ${t.length} over maxIndex at depth ${e}`);if(0===t.length)return i.zeroNode(e);if(0===e)return t[0];if(1===e)return t.length>1?new n.BranchNode(t[0],t[1]):new n.BranchNode(t[0],i.zeroNode(0));let o=t.length;for(let r=e;r>0;r--){const s=o%2,a=o-s;for(let e=0;e\u003Ca;e+=2)t[e/2]=new n.BranchNode(t[e],t[e+1]);s>0&&(t[a/2]=new n.BranchNode(t[a],i.zeroNode(e-r))),o=a/2+s}return t[0]}},72969:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.treeZeroAfterIndex=e.iterateNodesAtDepth=e.getNodesAtDepth=e.setNodesAtDepth=e.setNodeAtDepth=e.getNodeAtDepth=e.setNodeWithFn=e.setNode=e.getNode=e.Tree=void 0;const n=r(67048),i=r(45113),o=r(78894),s=r(47392),a=r(42456);class u{constructor(t,e){this._rootNode=t,e&&(\"undefined\"==typeof WeakRef?this.hook=e:this.hook=new WeakRef(e))}static createFromProof(t){return new u(s.createNodeFromProof(t))}get rootNode(){return this._rootNode}set rootNode(t){if(this._rootNode=t,this.hook)if(\"undefined\"==typeof WeakRef)this.hook(t);else{const e=this.hook.deref();e?e(t):this.hook=void 0}}get root(){return this.rootNode.root}clone(){return new u(this.rootNode)}getSubtree(t){return new u(this.getNode(t),(e=>this.setNode(t,e)))}getNode(t){return h(this.rootNode,t)}getNodeAtDepth(t,e){return p(this.rootNode,t,e)}getRoot(t){return this.getNode(t).root}setNode(t,e){this.rootNode=c(this.rootNode,t,e)}setNodeWithFn(t,e){this.rootNode=f(this.rootNode,t,e)}setNodeAtDepth(t,e,r){this.rootNode=m(this.rootNode,t,e,r)}setRoot(t,e){this.setNode(t,o.LeafNode.fromRoot(e))}getNodesAtDepth(t,e,r){return y(this.rootNode,t,e,r)}iterateNodesAtDepth(t,e,r){return b(this.rootNode,t,e,r)}getSingleProof(t){return a.createSingleProof(this.rootNode,t)[1]}getProof(t){return s.createProof(this.rootNode,t)}}function h(t,e){const r=i.convertGindexToBitstring(e);let n=t;for(let t=1;t\u003Cr.length;t++){if(n.isLeaf())throw new Error(`Invalid tree - found leaf at depth ${t}`);n=\"1\"===r[t]?n.right:n.left}return n}function c(t,e,r){const n=i.convertGindexToBitstring(e);return d(n,l(t,n),r)}function f(t,e,r){const n=i.convertGindexToBitstring(e),o=l(t,n),s=o[o.length-1];return d(n,o,r(\"1\"===n[n.length-1]?s.right:s.left))}function l(t,e){let r=t;const n=[t];for(let t=1;t\u003Ce.length-1;t++)r=\"1\"===e[t]?r.right:r.left,n.push(r);return n}function d(t,e,r){let n=r;for(let r=t.length-1;r>=1;r--)n=\"1\"===t[r]?new o.BranchNode(e[r-1].left,n):new o.BranchNode(n,e[r-1].right);return n}function p(t,e,r){if(0===e)return t;if(1===e)return 0===r?t.left:t.right;let n=t;for(let t=e-1;t>=0;t--)n=v(t,r)?n.left:n.right;return n}function m(t,e,r,n){return g(t,e,[r],[n])}function g(t,e,r,n){if(0===e)return n.length>0?n[0]:t;const i=new Array(e),s=new Array(e),a=e-1;let u=a,h=t;i[a]=t;for(let t=0;t\u003Cr.length;t++){const e=r[t];for(let t=u;t>0;t--)h=v(t,e)?h.left:h.right,i[t-1]=h;u=0;1!=(1&e)?e+1===r[t+1]?(h=new o.BranchNode(n[t],n[t+1]),t++):h=new o.BranchNode(n[t],h.right):h=new o.BranchNode(h.left,n[t]);const l=t>=r.length-1,d=l?a:(c=e,f=r[t+1],Math.ceil(Math.log2(-~(c^f)))-1);for(let t=1;t\u003C=d;t++)if(v(t,e))l||t!==d?h=new o.BranchNode(h,i[t].right):(s[t]=h,h=i[t]);else{const e=s[t];void 0!==e?(h=new o.BranchNode(e,h),s[t]=void 0):h=new o.BranchNode(i[t].left,h)}u=d}var c,f;return h}function y(t,e,r,n){if(0===e)return 0===r&&n>0?[t]:[];if(1===e)return 0===n?[]:1===n?0===r?[t.left]:[t.right]:[t.left,t.right];const i=e-1;let o=i,s=t;const a=new Array(e),u=new Array(e),h=new Array(n);a[i]=t;for(let t=0;t\u003Cn;t++){for(let e=o;e>=0;e--){e!==o&&(a[e]=s);const n=v(e,r+t);u[e]=n,s=n?s.left:s.right}h[t]=s;for(let t=0;t\u003C=i;t++)if(!0===u[t]){o=t;break}s=a[o]}return h}function*b(t,e,r,n){const i=r+n,o=e-1;let s=o,a=t;const u=new Array(e),h=new Array(e);u[o]=t;for(let t=r;t\u003Ci;t++){for(let e=s;e>=0;e--){e!==s&&(u[e]=a);const r=v(e,t);h[e]=r,a=r?a.left:a.right}yield a;for(let t=0;t\u003C=o;t++)if(!0===h[t]){s=t;break}a=u[s]}}function v(t,e){if(t>31){const r=1\u003C\u003Ct-32;return(e/2**32>>>0&r)!==r}const r=1\u003C\u003Ct;return(e&r)!==r}e.Tree=u,e.getNode=h,e.setNode=c,e.setNodeWithFn=f,e.getNodeAtDepth=p,e.setNodeAtDepth=m,e.setNodesAtDepth=g,e.getNodesAtDepth=y,e.iterateNodesAtDepth=b,e.treeZeroAfterIndex=function(t,e,r){if(r\u003C0)return n.zeroNode(e);const i=new Array(e),s=e-1;let a=s,u=t;i[s]=t;for(let t=a;t>=0;t--)u=v(t,r)?u.left:u.right,i[t-1]=u;a=0;for(let t=0;t\u003C=s;t++)u=v(t,r)?new o.BranchNode(u,n.zeroNode(t)):new o.BranchNode(i[t].left,u);return u}},67048:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.zeroNode=void 0;const n=r(78894),i=[n.LeafNode.fromZero()];e.zeroNode=function(t){if(t>=i.length)for(let e=i.length;e\u003C=t;e++)i[e]=new n.BranchNode(i[e-1],i[e-1]);return i[t]}},60289:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(\"positive integer expected, got \"+t)}function n(t,...e){if(!((r=t)instanceof Uint8Array||ArrayBuffer.isView(r)&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(\"Uint8Array expected of length \"+e+\", got length=\"+t.length)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.anumber=r,e.abytes=n,e.ahash=function(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)},e.aexists=function(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")},e.aoutput=function(t,e){n(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(\"digestInto() expects output buffer of length at least \"+r)}},54584:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=void 0,e.setBigUint64=o,e.Chi=function(t,e,r){return t&e^~t&r},e.Maj=function(t,e,r){return t&e^t&r^e&r};const n=r(60289),i=r(58955);function o(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}class s extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.aexists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n\u003Cs;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o\u003C=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.aexists)(this),(0,n.aoutput)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:s,isLE:a}=this;let{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>s-u&&(this.process(r,0),u=0);for(let t=u;t\u003Cs;t++)e[t]=0;o(r,s-8,BigInt(8*this.length),a),this.process(r,0);const h=(0,i.createView)(t),c=this.outputLen;if(c%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const f=c/4,l=this.get();if(f>l.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cf;t++)h.setUint32(4*t,l[t],a)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=s},49873:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},67929:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=e.SHA256=void 0;const n=r(54584),i=r(58955),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t۱s��,e){for(let r=0;r\u003C16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t\u003C64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}e.SHA256=u;class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},58955:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.isLE=void 0,e.isBytes=function(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&\"Uint8Array\"===t.constructor.name},e.u8=function(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},e.u32=function(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))},e.createView=function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)},e.rotr=function(t,e){return t\u003C\u003C32-e|t>>>e},e.rotl=function(t,e){return t\u003C\u003Ce|t>>>32-e>>>0},e.byteSwap=o,e.byteSwap32=function(t){for(let e=0;e\u003Ct.length;e++)t[e]=o(t[e])},e.bytesToHex=function(t){(0,i.abytes)(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=s[t[r]];return e},e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=u(t.charCodeAt(i)),o=u(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o\u003Ct;o++){n(o);const t=Date.now()-i;t>=0&&t\u003Cr||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=h,e.toBytes=c,e.concatBytes=function(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];(0,i.abytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!=={}.toString.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(c(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(c(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(c(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&\"function\"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(t);throw new Error(\"crypto.getRandomValues must be defined\")};const n=r(49873),i=r(60289);function o(t){return t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255}e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],e.byteSwapIfBE=e.isLE?t=>t:t=>o(t);const s=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const a={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(t){return t>=a._0&&t\u003C=a._9?t-a._0:t>=a.A&&t\u003C=a.F?t-(a.A-10):t>=a.a&&t\u003C=a.f?t-(a.a-10):void 0}function h(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function c(t){return\"string\"==typeof t&&(t=h(t)),(0,i.abytes)(t),t}e.nextTick=async()=>{};e.Hash=class{clone(){return this._cloneInto()}}},8747:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BranchNodeStruct=void 0;const n=r(56567);class i extends n.Node{constructor(t,e){super(null,0,0,0,0,0,0,0),this.valueToNode=t,this.value=e}get rootHashObject(){if(null===this.h0){const t=this.valueToNode(this.value);super.applyHash(t.rootHashObject)}return this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this.valueToNode(this.value).left}get right(){return this.valueToNode(this.value).right}}e.BranchNodeStruct=i},60557:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hash64=e.byteArrayEquals=e.toHexString=e.fromHexString=e.getUint8ByteToBitBooleanArray=e.BitArray=e.TreeViewDU=e.TreeView=e.isCompositeType=e.CompositeType=e.isBasicType=e.BasicType=e.Type=e.ByteArrayType=e.BitArrayType=e.ArrayType=e.VectorCompositeType=e.VectorBasicType=e.UnionType=e.UintNumberType=e.UintBigintType=e.NoneType=e.ListCompositeType=e.ListBasicType=e.ContainerNodeStructType=e.ContainerType=e.ByteVectorType=e.ByteListType=e.BooleanType=e.BitVectorType=e.BitListType=void 0;var n=r(10284);Object.defineProperty(e,\"BitListType\",{enumerable:!0,get:function(){return n.BitListType}});var i=r(21393);Object.defineProperty(e,\"BitVectorType\",{enumerable:!0,get:function(){return i.BitVectorType}});var o=r(12034);Object.defineProperty(e,\"BooleanType\",{enumerable:!0,get:function(){return o.BooleanType}});var s=r(13568);Object.defineProperty(e,\"ByteListType\",{enumerable:!0,get:function(){return s.ByteListType}});var a=r(50245);Object.defineProperty(e,\"ByteVectorType\",{enumerable:!0,get:function(){return a.ByteVectorType}});var u=r(25039);Object.defineProperty(e,\"ContainerType\",{enumerable:!0,get:function(){return u.ContainerType}});var h=r(73261);Object.defineProperty(e,\"ContainerNodeStructType\",{enumerable:!0,get:function(){return h.ContainerNodeStructType}});var c=r(26866);Object.defineProperty(e,\"ListBasicType\",{enumerable:!0,get:function(){return c.ListBasicType}});var f=r(5189);Object.defineProperty(e,\"ListCompositeType\",{enumerable:!0,get:function(){return f.ListCompositeType}});var l=r(81638);Object.defineProperty(e,\"NoneType\",{enumerable:!0,get:function(){return l.NoneType}});var d=r(30436);Object.defineProperty(e,\"UintBigintType\",{enumerable:!0,get:function(){return d.UintBigintType}}),Object.defineProperty(e,\"UintNumberType\",{enumerable:!0,get:function(){return d.UintNumberType}});var p=r(51851);Object.defineProperty(e,\"UnionType\",{enumerable:!0,get:function(){return p.UnionType}});var m=r(55021);Object.defineProperty(e,\"VectorBasicType\",{enumerable:!0,get:function(){return m.VectorBasicType}});var g=r(54013);Object.defineProperty(e,\"VectorCompositeType\",{enumerable:!0,get:function(){return g.VectorCompositeType}});var y=r(89659);Object.defineProperty(e,\"ArrayType\",{enumerable:!0,get:function(){return y.ArrayType}});var b=r(86612);Object.defineProperty(e,\"BitArrayType\",{enumerable:!0,get:function(){return b.BitArrayType}});var v=r(54316);Object.defineProperty(e,\"ByteArrayType\",{enumerable:!0,get:function(){return v.ByteArrayType}});var w=r(57451);Object.defineProperty(e,\"Type\",{enumerable:!0,get:function(){return w.Type}});var M=r(70645);Object.defineProperty(e,\"BasicType\",{enumerable:!0,get:function(){return M.BasicType}}),Object.defineProperty(e,\"isBasicType\",{enumerable:!0,get:function(){return M.isBasicType}});var _=r(18715);Object.defineProperty(e,\"CompositeType\",{enumerable:!0,get:function(){return _.CompositeType}}),Object.defineProperty(e,\"isCompositeType\",{enumerable:!0,get:function(){return _.isCompositeType}});var E=r(62542);Object.defineProperty(e,\"TreeView\",{enumerable:!0,get:function(){return E.TreeView}});var A=r(40332);Object.defineProperty(e,\"TreeViewDU\",{enumerable:!0,get:function(){return A.TreeViewDU}});var S=r(21714);Object.defineProperty(e,\"BitArray\",{enumerable:!0,get:function(){return S.BitArray}}),Object.defineProperty(e,\"getUint8ByteToBitBooleanArray\",{enumerable:!0,get:function(){return S.getUint8ByteToBitBooleanArray}});var x=r(71518);Object.defineProperty(e,\"fromHexString\",{enumerable:!0,get:function(){return x.fromHexString}}),Object.defineProperty(e,\"toHexString\",{enumerable:!0,get:function(){return x.toHexString}}),Object.defineProperty(e,\"byteArrayEquals\",{enumerable:!0,get:function(){return x.byteArrayEquals}});var B=r(35397);Object.defineProperty(e,\"hash64\",{enumerable:!0,get:function(){return B.hash64}})},57451:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Type=void 0;e.Type=class{value_toTree(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),this.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}tree_toValue(t){const e=new Uint8Array(this.tree_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.tree_serializeToBytes({uint8Array:e,dataView:r},0,t),this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}serialize(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),e}deserialize(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length)}}},89659:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayType=void 0;const n=r(56567),i=r(18715),o=r(63191);class s extends i.CompositeType{constructor(t){super(),this.elementType=t}defaultValue(){return o.value_defaultValueArray(this.elementType,this.defaultLen)}getPropertyType(){return this.elementType}getPropertyGindex(t){if(\"number\"!=typeof t)throw Error(`Invalid array index: ${t}`);const e=Math.floor(t/this.itemsPerChunk);return n.toGindex(this.depth,BigInt(e))}getIndexProperty(t){return t}tree_getLeafGindices(t,e){let r;if(this.isList){if(!e)throw new Error(\"List type requires tree argument to get leaves\");r=this.tree_getLength(e)}else r=this.tree_getLength(null);const o=[];if(i.isCompositeType(this.elementType)){const i=n.toGindex(this.depth,BigInt(0)),s=i+BigInt(r),a=n.concatGindices([t,i]);if(null===this.elementType.fixedSize){if(!e)throw new Error(\"Array of variable size requires tree argument to get leaves\");for(let t=i,r=a;t\u003Cs;t++,r++)o.push(...this.elementType.tree_getLeafGindices(r,n.getNode(e,t)))}else for(let t=0,e=a;t\u003Cr;t++,e++)o.push(...this.elementType.tree_getLeafGindices(e))}else{const e=Math.ceil(r/this.itemsPerChunk),i=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),s=i+BigInt(e);for(let t=i;t\u003Cs;t++)o.push(t)}return this.isList&&o.push(n.concatGindices([t,i.LENGTH_GINDEX])),o}fromJson(t){return o.value_fromJsonArray(this.elementType,t,this)}toJson(t){return o.value_toJsonArray(this.elementType,t,this)}clone(t){return o.value_cloneArray(this.elementType,t)}equals(t,e){return o.value_equals(this.elementType,t,e)}}e.ArrayType=s},63191:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertValidArrayLength=e.value_defaultValueArray=e.value_equals=e.value_cloneArray=e.value_toJsonArray=e.value_fromJsonArray=e.tree_deserializeFromBytesArrayBasic=e.tree_serializeToBytesArrayBasic=e.value_deserializeFromBytesArrayBasic=e.value_serializeToBytesArrayBasic=e.setChunksNode=e.addLengthNode=e.getChunksNodeFromRootNode=e.getLengthFromRootNode=void 0;const n=r(56567);function i(t,e){return new n.BranchNode(t,n.LeafNode.fromUint32(e))}function o(t,e,r){if(r&&t%1!=0)throw Error(\"size not multiple of element fixedSize\");if(e.isList){if(t>e.limit)throw new Error(`Invalid list length ${t} over limit ${e.limit}`)}else if(t!==e.length)throw new Error(`Incorrect vector length ${t} expected ${e.length}`)}e.getLengthFromRootNode=function(t){return t.right.getUint(4,0)},e.getChunksNodeFromRootNode=function(t){return t.left},e.addLengthNode=i,e.setChunksNode=function(t,e,r){const i=void 0!==r?n.LeafNode.fromUint32(r):t.right;return new n.BranchNode(e,i)},e.value_serializeToBytesArrayBasic=function(t,e,r,n,i){const o=t.byteLength;for(let s=0;s\u003Ce;s++)t.value_serializeToBytes(r,n+s*o,i[s]);return n+e*o},e.value_deserializeFromBytesArrayBasic=function(t,e,r,n,i){const s=t.byteLength,a=(n-r)/s;o(a,i,!0);const u=new Array(a);for(let n=0;n\u003Ca;n++)u[n]=t.value_deserializeFromBytes(e,r+n*s,r+(n+1)*s);return u},e.tree_serializeToBytesArrayBasic=function(t,e,r,i,o,s){const a=t.byteLength*e,u=Math.ceil(a/32),h=n.getNodesAtDepth(s,r,0,u);return n.packedNodeRootsToBytes(i.dataView,o,a,h),o+a},e.tree_deserializeFromBytesArrayBasic=function(t,e,r,s,a,u){const h=(a-s)/t.byteLength;o(h,u,!0);const c=n.packedRootsBytesToNode(e,r.dataView,s,a);return u.isList?i(c,h):c},e.value_fromJsonArray=function(t,e,r){if(!Array.isArray(e))throw Error(\"JSON is not an array\");o(e.length,r);const n=new Array(e.length);for(let r=0;r\u003Ce.length;r++)n[r]=t.fromJson(e[r]);return n},e.value_toJsonArray=function(t,e,r){const n=r.isList?e.length:r.length,i=new Array(n);for(let r=0;r\u003Cn;r++)i[r]=t.toJson(e[r]);return i},e.value_cloneArray=function(t,e){const r=new Array(e.length);for(let n=0;n\u003Ce.length;n++)r[n]=t.clone(e[n]);return r},e.value_equals=function(t,e,r){if(e.length!==r.length)return!1;for(let n=0;n\u003Ce.length;n++)if(!t.equals(e[n],r[n]))return!1;return!0},e.value_defaultValueArray=function(t,e){const r=new Array(e);for(let n=0;n\u003Ce;n++)r[n]=t.defaultValue();return r},e.assertValidArrayLength=o},50404:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.value_getRootsArrayComposite=e.tree_deserializeFromBytesArrayComposite=e.tree_serializeToBytesArrayComposite=e.tree_serializedSizeArrayComposite=e.value_deserializeFromBytesArrayComposite=e.value_serializeToBytesArrayComposite=e.value_serializedSizeArrayComposite=e.maxSizeArrayComposite=e.minSizeArrayComposite=void 0;const n=r(56567),i=r(63191);function o(t,e,r,n,o){const s=n-r;let a;if(null===t)a=function(t,e,r){if(0===r)return new Uint32Array(0);const n=t.getUint32(e,!0),i=n;if(0===n)throw Error(\"First offset must be > 0\");if(i%4!=0)throw Error(\"Offset data length not multiple of 4\");const o=i/4,s=new Uint32Array(o);s[0]=n;for(let n=1;n\u003Co;n++){const i=t.getUint32(e+4*n,!0);if(s[n]=i,i>r)throw new Error(`Offset out of bounds ${i} > ${r}`);if(i\u003Cs[n-1])throw new Error(`Offsets must be increasing ${i} \u003C ${s[n-1]}`)}return s}(e,r,s);else{if(0===t)throw Error(\"element fixed length is 0\");if(s%t!=0)throw Error(`size ${s} is not multiple of element fixedSize ${t}`);const e=s/t;a=new Uint32Array(e);for(let r=0;r\u003Ce;r++)a[r]=r*t}return i.assertValidArrayLength(a.length,o),a}e.minSizeArrayComposite=function(t,e){return null===t.fixedSize?e*(4+t.minSize):e*t.minSize},e.maxSizeArrayComposite=function(t,e){return null===t.fixedSize?e*(4+t.maxSize):e*t.maxSize},e.value_serializedSizeArrayComposite=function(t,e,r){if(null===t.fixedSize){let n=0;for(let i=0;i\u003Ce;i++)n+=4+t.value_serializedSize(r[i]);return n}return e*t.fixedSize},e.value_serializeToBytesArrayComposite=function(t,e,r,n,i){if(null===t.fixedSize){let o=n+4*e;for(let s=0;s\u003Ce;s++)r.dataView.setUint32(n+4*s,o-n,!0),o=t.value_serializeToBytes(r,o,i[s]);return o}for(let o=0;o\u003Ce;o++)t.value_serializeToBytes(r,n+o*t.fixedSize,i[o]);return n+e*t.fixedSize},e.value_deserializeFromBytesArrayComposite=function(t,e,r,n,i){const s=o(t.fixedSize,e.dataView,r,n,i),a=s.length,u=new Array(a);for(let i=0;i\u003Ca;i++){const o=r+s[i],h=i===a-1?n:r+s[i+1];u[i]=t.value_deserializeFromBytes(e,o,h)}return u},e.tree_serializedSizeArrayComposite=function(t,e,r,i){if(null===t.fixedSize){const o=n.getNodesAtDepth(i,r,0,e);let s=0;for(let e=0;e\u003Co.length;e++)s+=4+t.tree_serializedSize(o[e]);return s}return e*t.fixedSize},e.tree_serializeToBytesArrayComposite=function(t,e,r,i,o,s){const a=n.getNodesAtDepth(i,r,0,e);if(null===t.fixedSize){let r=s+4*e;const{dataView:n}=o;for(let e=0;e\u003Ca.length;e++)n.setUint32(s+4*e,r-s,!0),r=t.tree_serializeToBytes(o,r,a[e]);return r}for(let e=0;e\u003Ca.length;e++)s=t.tree_serializeToBytes(o,s,a[e]);return s},e.tree_deserializeFromBytesArrayComposite=function(t,e,r,s,a,u){const h=o(t.fixedSize,r.dataView,s,a,u),c=h.length,f=new Array(c);for(let e=0;e\u003Cc;e++){const n=s+h[e],i=e===c-1?a:s+h[e+1];f[e]=t.tree_deserializeFromBytes(r,n,i)}const l=n.subtreeFillToContents(f,e);return u.isList?i.addLengthNode(l,c):l},e.value_getRootsArrayComposite=function(t,e,r){const n=new Array(e);for(let i=0;i\u003Ce;i++)n[i]=t.hashTreeRoot(r[i]);return n}},70645:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isBasicType=e.BasicType=void 0;const n=r(57451);class i extends n.Type{constructor(){super(...arguments),this.isBasic=!0,this.depth=0,this.maxChunkCount=1}value_serializedSize(){return this.byteLength}tree_serializedSize(){return this.byteLength}assertValidSize(t){if(t!==this.byteLength)throw Error(`BasicType invalid size ${t} expected ${this.byteLength}`)}hashTreeRoot(t){const e=new Uint8Array(32),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),e}clone(t){return t}equals(t,e){return t===e}}e.BasicType=i,e.isBasicType=function(t){return t.isBasic}},86612:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayType=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18715),a=r(76572),u=r(57844);class h extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!0}getView(t){return new a.BitArrayTreeView(this,t)}getViewDU(t){return new u.BitArrayTreeViewDU(this,t)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}getRoots(t){return o.splitIntoRootChunks(t.uint8Array)}getPropertyGindex(){return null}getPropertyType(){throw Error(\"Must only request BitArray complete data\")}getIndexProperty(){throw Error(\"Must only request BitArray complete data\")}tree_fromProofNode(t){return{node:t,done:!0}}tree_getLeafGindices(t,e){const r=this.tree_getByteLen(e),i=Math.ceil(r/32),o=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let t=0,e=o;t\u003Ci;t++,e++)a[t]=e;return this.isList&&a.push(n.concatGindices([t,s.LENGTH_GINDEX])),a}fromJson(t){const e=i.fromHexString(t),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}toJson(t){return i.toHexString(this.serialize(t))}clone(t){return t.clone()}equals(t,e){return t.bitLen===e.bitLen&&i.byteArrayEquals(t.uint8Array,e.uint8Array)}}e.BitArrayType=h},10284:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitListType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(63191),a=r(21714),u=r(86612);class h extends u.BitArrayType{constructor(t,e){if(super(),this.limitBits=t,this.fixedSize=null,this.minSize=1,this.isList=!0,0===t)throw Error(\"List limit must be > 0\");this.typeName=e?.typeName??`BitList[${t}]`,this.maxChunkCount=Math.ceil(this.limitBits/8/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.maxSize=Math.ceil(t/8)+1}static named(t,e){return new(o.namedClass(h,e.typeName))(t,e)}defaultValue(){return a.BitArray.fromBitLen(0)}value_serializedSize(t){return c(t.bitLen)}value_serializeToBytes(t,e,r){return t.uint8Array.set(r.uint8Array,e),f(t.uint8Array,e,r.bitLen)}value_deserializeFromBytes(t,e,r){const{uint8Array:n,bitLen:i}=this.deserializeUint8ArrayBitListFromBytes(t.uint8Array,e,r);return new a.BitArray(n,i)}tree_serializedSize(t){return c(s.getLengthFromRootNode(t))}tree_serializeToBytes(t,e,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/8),u=Math.ceil(a/32),h=n.getNodesAtDepth(i,this.chunkDepth,0,u);return n.packedNodeRootsToBytes(t.dataView,e,a,h),f(t.uint8Array,e,o)}tree_deserializeFromBytes(t,e,r){const{uint8Array:i,bitLen:o}=this.deserializeUint8ArrayBitListFromBytes(t.uint8Array,e,r),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=n.packedRootsBytesToNode(this.chunkDepth,a,0,i.length);return s.addLengthNode(u,o)}tree_getByteLen(t){if(!t)throw new Error(\"BitListType requires a node to get leaves\");return Math.ceil(s.getLengthFromRootNode(t)/8)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.bitLen)}deserializeUint8ArrayBitListFromBytes(t,e,r){const{uint8Array:n,bitLen:i}=function(t,e,r){if(r>t.length)throw Error(`BitList attempting to read byte ${r} of data length ${t.length}`);const n=t[r-1],i=r-e;if(0===n)throw new Error(\"Invalid deserialized bitlist, padding bit required\");if(1===n){return{uint8Array:Uint8Array.prototype.slice.call(t,e,r-1),bitLen:8*(i-1)}}const o=Uint8Array.prototype.slice.call(t,e,r),s=n.toString(2).length-1,a=8*(i-1)+s,u=255>>8-s;return o[i-1]&=u,{uint8Array:o,bitLen:a}}(t,e,r);if(i>this.limitBits)throw Error(`bitLen over limit ${i} > ${this.limitBits}`);return{uint8Array:n,bitLen:i}}}function c(t){const e=Math.ceil(t/8);return t%8==0?e+1:e}function f(t,e,r){const n=e+Math.ceil(r/8);return r%8==0?(t[n]=1,n+1):(t[n-1]|=1\u003C\u003Cr%8,n)}e.BitListType=h},21393:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitVectorType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(21714),a=r(86612);class u extends a.BitArrayType{constructor(t,e){if(super(),this.lengthBits=t,this.isList=!1,0===t)throw Error(\"Vector length must be > 0\");this.typeName=e?.typeName??`BitVector[${t}]`,this.chunkCount=Math.ceil(this.lengthBits/8/32),this.maxChunkCount=this.chunkCount,this.depth=i.maxChunksToDepth(this.chunkCount),this.fixedSize=Math.ceil(this.lengthBits/8),this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.zeroBitsMask=t%8==0?0:255&255\u003C\u003Ct%8}static named(t,e){return new(o.namedClass(u,e.typeName))(t,e)}defaultValue(){return s.BitArray.fromBitLen(this.lengthBits)}value_serializedSize(){return this.fixedSize}value_serializeToBytes(t,e,r){return t.uint8Array.set(r.uint8Array,e),e+this.fixedSize}value_deserializeFromBytes(t,e,r){return this.assertValidLength(t.uint8Array,e,r),new s.BitArray(Uint8Array.prototype.slice.call(t.uint8Array,e,r),this.lengthBits)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){const i=n.getNodesAtDepth(r,this.depth,0,this.chunkCount);return n.packedNodeRootsToBytes(t.dataView,e,this.fixedSize,i),e+this.fixedSize}tree_deserializeFromBytes(t,e,r){return this.assertValidLength(t.uint8Array,e,r),n.packedRootsBytesToNode(this.depth,t.dataView,e,r)}tree_getByteLen(){return this.fixedSize}assertValidLength(t,e,r){const n=r-e;if(r-e!==this.fixedSize)throw Error(`Invalid BitVector size ${n} != ${this.fixedSize}`);if(this.zeroBitsMask>0&&(t[r-1]&this.zeroBitsMask)>0)throw Error(\"BitVector: nonzero bits past length\")}}e.BitVectorType=u},12034:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BooleanType=void 0;const n=r(56567),i=r(61425),o=r(70645);class s extends o.BasicType{constructor(t){super(),this.byteLength=1,this.itemsPerChunk=32,this.fixedSize=1,this.minSize=1,this.maxSize=1,this.typeName=t?.typeName??\"boolean\"}static named(t){return new(i.namedClass(s,t.typeName))(t)}defaultValue(){return!1}value_serializeToBytes(t,e,r){return t.uint8Array[e]=r?1:0,e+1}value_deserializeFromBytes(t,e,r){switch(this.assertValidSize(r-e),t.uint8Array[e]){case 1:return!0;case 0:return!1;default:throw new Error(`Boolean: invalid value: ${t.uint8Array[e]}`)}}tree_serializeToBytes(t,e,r){return t.uint8Array[e]=r.getUint(4,0),e+1}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=t.uint8Array[e];if(i>1)throw Error(`Boolean: invalid value ${i}`);return n.LeafNode.fromUint32(i)}tree_getFromNode(t){return 1===t.getUint(4,0)}tree_setToNode(t,e){t.setUint(4,0,e?1:0)}tree_getFromPackedNode(t,e){const r=e%this.itemsPerChunk;return 0!==t.getUint(1,r)}tree_setToPackedNode(t,e,r){const n=e%this.itemsPerChunk;t.setUint(1,n,r?1:0)}fromJson(t){if(\"boolean\"!=typeof t)throw Error(`JSON invalid type ${typeof t} expected boolean`);return t}toJson(t){return t}}e.BooleanType=s},54316:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteArrayType=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18715);class a extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!1}defaultValue(){return new Uint8Array(this.minSize)}getView(t){return this.getViewDU(t.rootNode)}getViewDU(t){return this.tree_toValue(t)}commitView(t){return this.commitViewDU(t)}commitViewDU(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),this.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}cacheOfViewDU(){}toView(t){return t}toViewDU(t){return t}value_serializeToBytes(t,e,r){return t.uint8Array.set(r,e),e+r.length}value_deserializeFromBytes(t,e,r){return this.assertValidSize(r-e),Uint8Array.prototype.slice.call(t.uint8Array,e,r)}getRoots(t){return o.splitIntoRootChunks(t)}getPropertyGindex(){return null}getPropertyType(){throw Error(\"Must only request ByteArray complete data\")}getIndexProperty(){throw Error(\"Must only request ByteArray complete data\")}tree_fromProofNode(t){return{node:t,done:!0}}tree_getLeafGindices(t,e){const r=this.tree_getByteLen(e),i=Math.ceil(r/32),o=n.concatGindices([t,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let t=0,e=o;t\u003Ci;t++,e++)a[t]=e;return this.isList&&a.push(n.concatGindices([t,s.LENGTH_GINDEX])),a}fromJson(t){const e=i.fromHexString(t);return this.assertValidSize(e.length),e}toJson(t){return i.toHexString(t)}clone(t){return t}equals(t,e){return i.byteArrayEquals(t,e)}}e.ByteArrayType=a},13568:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteListType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(63191),a=r(54316);class u extends a.ByteArrayType{constructor(t,e){if(super(),this.limitBytes=t,this.fixedSize=null,this.isList=!0,0===t)throw Error(\"List limit must be > 0\");this.typeName=e?.typeName??`ByteList[${t}]`,this.maxChunkCount=Math.ceil(this.limitBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.minSize=0,this.maxSize=this.limitBytes}static named(t,e){return new(o.namedClass(u,e.typeName))(t,e)}value_serializedSize(t){return t.length}tree_serializedSize(t){return s.getLengthFromRootNode(t)}tree_serializeToBytes(t,e,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/32),u=n.getNodesAtDepth(i,this.chunkDepth,0,a);return n.packedNodeRootsToBytes(t.dataView,e,o,u),e+o}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=n.packedRootsBytesToNode(this.chunkDepth,t.dataView,e,r);return s.addLengthNode(i,r-e)}tree_getByteLen(t){if(!t)throw new Error(\"ByteListType requires a node to get leaves\");return s.getLengthFromRootNode(t)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.length)}assertValidSize(t){if(t>this.limitBytes)throw Error(`ByteList invalid size ${t} limit ${this.limitBytes}`)}}e.ByteListType=u},50245:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ByteVectorType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(54316);class a extends s.ByteArrayType{constructor(t,e){if(super(),this.lengthBytes=t,this.isList=!1,0===t)throw Error(\"Vector length must be > 0\");this.typeName=e?.typeName??`ByteVector[${t}]`,this.maxChunkCount=Math.ceil(this.lengthBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=this.lengthBytes,this.minSize=this.fixedSize,this.maxSize=this.fixedSize}static named(t,e){return new(o.namedClass(a,e.typeName))(t,e)}value_serializedSize(){return this.fixedSize}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){const i=n.getNodesAtDepth(r,this.chunkDepth,0,this.maxChunkCount);return n.packedNodeRootsToBytes(t.dataView,e,this.fixedSize,i),e+this.fixedSize}tree_deserializeFromBytes(t,e,r){return this.assertValidSize(r-e),n.packedRootsBytesToNode(this.chunkDepth,t.dataView,e,r)}tree_getByteLen(){return this.lengthBytes}assertValidSize(t){if(t!==this.lengthBytes)throw Error(`ByteVector invalid size ${t} expected ${this.lengthBytes}`)}}e.ByteVectorType=a},18715:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isCompositeType=e.CompositeType=e.LENGTH_GINDEX=void 0;const n=r(56567),i=r(71518),o=r(35397),s=r(18081),a=r(57451);e.LENGTH_GINDEX=BigInt(3);const u=Symbol(\"ssz_cached_permanent_root\");class h extends a.Type{constructor(t){super(),this.cachePermanentRootStruct=t,this.isBasic=!1}defaultView(){return this.toView(this.defaultValue())}defaultViewDU(){return this.toViewDU(this.defaultValue())}deserializeToView(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=this.tree_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length);return this.getView(new n.Tree(r))}deserializeToViewDU(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=this.tree_deserializeFromBytes({uint8Array:t,dataView:e},0,t.length);return this.getViewDU(r)}toView(t){const e=this.value_toTree(t);return this.getView(new n.Tree(e))}toViewDU(t){const e=this.value_toTree(t);return this.getViewDU(e)}toValueFromView(t){const e=this.commitView(t);return this.tree_toValue(e)}toValueFromViewDU(t){const e=this.commitViewDU(t);return this.tree_toValue(e)}toViewFromViewDU(t){const e=this.commitViewDU(t);return this.getView(new n.Tree(e))}toViewDUFromView(t){const e=this.commitView(t);return this.getViewDU(e)}hashTreeRoot(t){if(this.cachePermanentRootStruct){const e=t[u];if(e)return e}const e=o.merkleize(this.getRoots(t),this.maxChunkCount);return this.cachePermanentRootStruct&&(t[u]=e),e}getCachedPermanentRoot(t){return t[u]}createFromProof(t,e){const r=n.Tree.createFromProof(t).rootNode,o=s.treePostProcessFromProofNode(r,this);if(void 0!==e&&!i.byteArrayEquals(o.root,e))throw new Error(\"Proof does not match trusted root\");return this.getView(new n.Tree(o))}tree_createProof(t,e){const r=this.tree_createProofGindexes(t,e);return n.createProof(t,{type:n.ProofType.treeOffset,gindices:r})}tree_createProofGindexes(t,e){const r=[];for(const i of e){const{type:e,gindex:o}=this.getPathInfo(i);if(c(e)){const i=e.tree_getLeafGindices(o,null===e.fixedSize?n.getNode(t,o):void 0);for(const t of i)r.push(t)}else r.push(o)}return r}getPathInfo(t){const e=[];let r=this;for(const n of t){if(r.isBasic)throw new Error(\"Invalid path: cannot navigate beyond a basic type\");const t=r.getPropertyGindex(n);null!==t&&(e.push(t),r=r.getPropertyType(n))}return{type:r,gindex:n.concatGindices(e)}}tree_fromProofNode(t){return{node:t,done:!1}}}function c(t){return!t.isBasic}e.CompositeType=h,e.isCompositeType=c},25039:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.renderContainerTypeName=e.precomputeJsonKey=e.ContainerType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(18715),a=r(37685),u=r(68865),h=r(79705);class c extends s.CompositeType{constructor(t,e){super(e?.cachePermanentRootStruct),this.fields=t,this.opts=e,this.isList=!1,this.isViewMutable=!0,this.typeName=e?.typeName??l(t),this.maxChunkCount=Object.keys(t).length,this.depth=i.maxChunksToDepth(this.maxChunkCount),this.fieldsEntries=[];for(const r of Object.keys(t))this.fieldsEntries.push({fieldName:r,fieldType:this.fields[r],jsonKey:f(r,e?.casingMap,e?.jsonCase),gindex:n.toGindex(this.depth,BigInt(this.fieldsEntries.length))});if(0===this.fieldsEntries.length)throw Error(\"Container must have > 0 fields\");this.fieldsGindex={};for(let t=0;t\u003Cthis.fieldsEntries.length;t++)this.fieldsGindex[this.fieldsEntries[t].fieldName]=n.toGindex(this.depth,BigInt(t));this.jsonKeyToFieldName={};for(const{fieldName:t,jsonKey:e}of this.fieldsEntries)this.jsonKeyToFieldName[e]=t;const{minLen:r,maxLen:o,fixedSize:s}=function(t){let e=0,r=0,n=0;for(const i of Object.values(t))e+=i.minSize,r+=i.maxSize,null===i.fixedSize?(e+=4,r+=4,n=null):null!==n&&(n+=i.fixedSize);return{minLen:e,maxLen:r,fixedSize:n}}(t);this.minSize=r,this.maxSize=o,this.fixedSize=s;const{isFixedLen:h,fieldRangesFixedLen:c,variableOffsetsPosition:d,fixedEnd:p}=function(t){const e=[],���p�r=[],n=[];let i=0;for(const o of Object.values(t))e.push(null!==o.fixedSize),null===o.fixedSize?(n.push(i),i+=4):(r.push({start:i,end:i+o.fixedSize}),i+=o.fixedSize);return{isFixedLen:e,fieldRangesFixedLen:r,variableOffsetsPosition:n,fixedEnd:i}}(t);this.isFixedLen=h,this.fieldRangesFixedLen=c,this.variableOffsetsPosition=d,this.fixedEnd=p,this.TreeView=e?.getContainerTreeViewClass?.(this)??a.getContainerTreeViewClass(this),this.TreeViewDU=e?.getContainerTreeViewDUClass?.(this)??u.getContainerTreeViewDUClass(this)}static named(t,e){return new(o.namedClass(c,e.typeName))(t,e)}defaultValue(){const t={};for(const{fieldName:e,fieldType:r}of this.fieldsEntries)t[e]=r.defaultValue();return t}getView(t){return new this.TreeView(this,t)}getViewDU(t,e){return new this.TreeViewDU(this,t,e)}cacheOfViewDU(t){return t.cache}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}value_serializedSize(t){let e=0;for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e+=null===i.fixedSize?4+i.value_serializedSize(t[n]):i.fixedSize}return e}value_serializeToBytes(t,e,r){let n=e,i=e+this.fixedEnd;for(let o=0;o\u003Cthis.fieldsEntries.length;o++){const{fieldName:s,fieldType:a}=this.fieldsEntries[o];null===a.fixedSize?(t.dataView.setUint32(n,i-e,!0),n+=4,i=a.value_serializeToBytes(t,i,r[s])):n=a.value_serializeToBytes(t,n,r[s])}return i}value_deserializeFromBytes(t,e,r){const n=this.getFieldRanges(t.dataView,e,r),i={};for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=this.fieldsEntries[r],a=n[r];i[o]=s.value_deserializeFromBytes(t,e+a.start,e+a.end)}return i}tree_serializedSize(t){let e=0;const r=n.getNodesAtDepth(t,this.depth,0,this.fieldsEntries.length);for(let t=0;t\u003Cthis.fieldsEntries.length;t++){const{fieldType:n}=this.fieldsEntries[t],i=r[t];e+=null===n.fixedSize?4+n.tree_serializedSize(i):n.fixedSize}return e}tree_serializeToBytes(t,e,r){let i=e,o=e+this.fixedEnd;const s=n.getNodesAtDepth(r,this.depth,0,this.fieldsEntries.length);for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],a=s[r];null===n.fixedSize?(t.dataView.setUint32(i,o-e,!0),i+=4,o=n.tree_serializeToBytes(t,o,a)):i=n.tree_serializeToBytes(t,i,a)}return o}tree_deserializeFromBytes(t,e,r){const i=this.getFieldRanges(t.dataView,e,r),o=new Array(this.fieldsEntries.length);for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],s=i[r];o[r]=n.tree_deserializeFromBytes(t,e+s.start,e+s.end)}return n.subtreeFillToContents(o,this.depth)}getRoots(t){const e=new Array(this.fieldsEntries.length);for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e[r]=i.hashTreeRoot(t[n])}return e}getPropertyGindex(t){const e=this.fieldsGindex[t]??this.fieldsGindex[this.jsonKeyToFieldName[t]];if(void 0===e)throw Error(`Unknown container property ${t}`);return e}getPropertyType(t){const e=this.fields[t]??this.fields[this.jsonKeyToFieldName[t]];if(void 0===e)throw Error(`Unknown container property ${t}`);return e}getIndexProperty(t){return t>=this.fieldsEntries.length?null:this.fieldsEntries[t].fieldName}tree_getLeafGindices(t,e){const r=[];for(let i=0;i\u003Cthis.fieldsEntries.length;i++){const{fieldName:o,fieldType:s}=this.fieldsEntries[i],a=this.fieldsGindex[o],u=n.concatGindices([t,a]);if(s.isBasic)r.push(u);else{const t=s;if(null===s.fixedSize){if(!e)throw new Error(\"variable type requires tree argument to get leaves\");r.push(...t.tree_getLeafGindices(u,n.getNode(e,a)))}else r.push(...t.tree_getLeafGindices(u))}}return r}fromJson(t){if(\"object\"!=typeof t)throw Error(\"JSON must be of type object\");if(null===t)throw Error(\"JSON must not be null\");const e={};for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r],s=t[o];if(void 0===s)throw Error(`JSON expected key ${o} is undefined`);e[n]=i.fromJson(s)}return e}toJson(t){const e={};for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r];e[o]=i.toJson(t[n])}return e}clone(t){const e={};for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];e[n]=i.clone(t[n])}return e}equals(t,e){for(let r=0;r\u003Cthis.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];if(!i.equals(t[n],e[n]))return!1}return!0}getFieldRanges(t,e,r){if(0===this.variableOffsetsPosition.length){const t=r-e;if(t!==this.fixedEnd)throw Error(`${this.typeName} size ${t} not equal fixed size ${this.fixedEnd}`);return this.fieldRangesFixedLen}const n=function(t,e,r,n,i){const o=r-e,s=new Array(i.length);for(let r=0;r\u003Ci.length;r++){const a=t.getUint32(e+i[r],!0);if(a>o)throw new Error(`Offset out of bounds ${a} > ${o}`);if(0===r){if(a!==n)throw new Error(`First offset must equal to fixedEnd ${a} != ${n}`)}else if(a\u003Cs[r-1])throw new Error(`Offsets must be increasing ${a} \u003C ${s[r-1]}`);s[r]=a}return s}(t,e,r,this.fixedEnd,this.variableOffsetsPosition);n.push(r-e);let i=0,o=0;const s=new Array(this.isFixedLen.length);for(let t=0;t\u003Cthis.isFixedLen.length;t++)this.isFixedLen[t]?s[t]=this.fieldRangesFixedLen[o++]:(s[t]={start:n[i],end:n[i+1]},i++);return s}}function f(t,e,r){if(e){const r=e[t];if(void 0===r)throw Error(`casingMap[${t}] not defined`);return r}return r?h.Case[r](t):t}function l(t,e=\"Container\"){return`${e}({${Object.keys(t).map((e=>`${e}: ${t[e].typeName}`)).join(\", \")}})`}e.ContainerType=c,e.precomputeJsonKey=f,e.renderContainerTypeName=l},73261:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ContainerNodeStructType=void 0;const n=r(18715),i=r(25039),o=r(61425),s=r(81225),a=r(84320),u=r(8747);class h extends i.ContainerType{constructor(t,e){super(t,{typeName:e?.typeName??i.renderContainerTypeName(t,\"ContainerNodeStruct\"),...e,getContainerTreeViewClass:s.getContainerTreeViewClass,getContainerTreeViewDUClass:a.getContainerTreeViewDUClass}),this.fields=t;for(const{fieldName:t,fieldType:e}of this.fieldsEntries)if(n.isCompositeType(e)&&e.isViewMutable)throw Error(`ContainerNodeStructType field '${t}' ${e.typeName} view is mutable`)}static named(t,e){return new(o.namedClass(i.ContainerType,e.typeName))(t,e)}tree_serializedSize(t){return this.value_serializedSize(t.value)}tree_serializeToBytes(t,e,r){const{value:n}=r;return this.value_serializeToBytes(t,e,n)}tree_deserializeFromBytes(t,e,r){const n=this.value_deserializeFromBytes(t,e,r);return new u.BranchNodeStruct(this.valueToTree.bind(this),n)}getPropertyGindex(){return null}tree_fromProofNode(t){const e=new Uint8Array(super.tree_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);super.tree_serializeToBytes({uint8Array:e,dataView:r},0,t);const n=this.value_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length);return{node:new u.BranchNodeStruct(this.valueToTree.bind(this),n),done:!0}}tree_toValue(t){return t.value}value_toTree(t){return new u.BranchNodeStruct(this.valueToTree.bind(this),t)}valueToTree(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_serializeToBytes({uint8Array:e,dataView:r},0,t),super.tree_deserializeFromBytes({uint8Array:e,dataView:r},0,e.length)}}e.ContainerNodeStructType=h},26866:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicType=void 0;const n=r(63191),i=r(35397),o=r(61425),s=r(19291),a=r(61828),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.limit=e,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,!t.isBasic)throw Error(\"elementType must be basic\");if(0===e)throw Error(\"List limit must be > 0\");this.typeName=r?.typeName??`List[${t.typeName}, ${e}]`,this.itemsPerChunk=32/t.byteLength,this.maxChunkCount=Math.ceil(this.limit*t.byteLength/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=this.limit*t.maxSize}static named(t,e,r){return new(o.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ListBasicTreeView(this,t)}getViewDU(t,e){return new a.ListBasicTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return t.length*this.elementType.byteLength}value_serializeToBytes(t,e,r){return n.value_serializeToBytesArrayBasic(this.elementType,r.length,t,e,r)}value_deserializeFromBytes(t,e,r){return n.value_deserializeFromBytesArrayBasic(this.elementType,t,e,r,this)}tree_serializedSize(t){return this.tree_getLength(t)*this.elementType.byteLength}tree_serializeToBytes(t,e,r){const i=this.tree_getChunksNode(r),o=this.tree_getLength(r);return n.tree_serializeToBytesArrayBasic(this.elementType,o,this.chunkDepth,t,e,i)}tree_deserializeFromBytes(t,e,r){return n.tree_deserializeFromBytesArrayBasic(this.elementType,this.chunkDepth,t,e,r,this)}tree_getLength(t){return t.right.getUint(4,0)}tree_setLength(t,e){t.rootNode=n.addLengthNode(t.rootNode.left,e)}tree_getChunksNode(t){return t.left}tree_setChunksNode(t,e,r){return n.setChunksNode(t,e,r)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.length)}getRoots(t){const e=new Uint8Array(this.value_serializedSize(t)),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.value_serializeToBytesArrayBasic(this.elementType,t.length,{uint8Array:e,dataView:r},0,t),i.splitIntoRootChunks(e)}}e.ListBasicType=h},5189:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeType=void 0;const n=r(35397),i=r(61425),o=r(63191),s=r(50404),a=r(11783),u=r(82029),h=r(89659);class c extends h.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.limit=e,this.itemsPerChunk=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,t.isBasic)throw Error(\"elementType must not be basic\");if(0===e)throw Error(\"List limit must be > 0\");this.typeName=r?.typeName??`List[${t.typeName}, ${e}]`,this.maxChunkCount=this.limit,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=s.maxSizeArrayComposite(t,this.limit)}static named(t,e,r){return new(i.namedClass(c,r.typeName))(t,e,r)}getView(t){return new a.ListCompositeTreeView(this,t)}getViewDU(t,e){return new u.ListCompositeTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return s.value_serializedSizeArrayComposite(this.elementType,t.length,t)}value_serializeToBytes(t,e,r){return s.value_serializeToBytesArrayComposite(this.elementType,r.length,t,e,r)}value_deserializeFromBytes(t,e,r){return s.value_deserializeFromBytesArrayComposite(this.elementType,t,e,r,this)}tree_serializedSize(t){const e=this.tree_getChunksNode(t),r=this.tree_getLength(t);return s.tree_serializedSizeArrayComposite(this.elementType,r,this.chunkDepth,e)}tree_serializeToBytes(t,e,r){const n=this.tree_getChunksNode(r),i=this.tree_getLength(r);return s.tree_serializeToBytesArrayComposite(this.elementType,i,this.chunkDepth,n,t,e)}tree_deserializeFromBytes(t,e,r){return s.tree_deserializeFromBytesArrayComposite(this.elementType,this.chunkDepth,t,e,r,this)}tree_getLength(t){return o.getLengthFromRootNode(t)}tree_setLength(t,e){t.rootNode=o.addLengthNode(t.rootNode.left,e)}tree_getChunksNode(t){return t.left}tree_setChunksNode(t,e,r){return o.setChunksNode(t,e,r)}hashTreeRoot(t){return n.mixInLength(super.hashTreeRoot(t),t.length)}getRoots(t){return s.value_getRootsArrayComposite(this.elementType,t.length,t)}}e.ListCompositeType=c},81638:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.NoneType=void 0;const n=r(56567),i=r(70645);class o extends i.BasicType{constructor(){super(...arguments),this.typeName=\"none\",this.byteLength=0,this.itemsPerChunk=32,this.fixedSize=0,this.minSize=0,this.maxSize=0}defaultValue(){return null}value_serializeToBytes(t,e,r){return e}value_deserializeFromBytes(t,e){return null}tree_serializeToBytes(t,e,r){return e}tree_deserializeFromBytes(t,e,r){return n.zeroNode(0)}tree_getFromNode(t){return null}tree_setToNode(t,e){}tree_getFromPackedNode(t,e){return null}tree_setToPackedNode(t,e,r){}fromJson(t){if(null!==t)throw Error(\"JSON invalid type none must be null\");return null}toJson(t){return null}}e.NoneType=o},30436:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.UintBigintType=e.UintNumberType=e.uintBigintByteLens=e.uintNumberByteLens=void 0;const n=r(56567),i=r(61425),o=r(70645),s=BigInt(Number.MAX_SAFE_INTEGER),a=BigInt(2)**BigInt(64),u=BigInt(2)**BigInt(128),h=BigInt(2)**BigInt(192),c=2**32,f=4294967295;e.uintNumberByteLens=[1,2,4,8],e.uintBigintByteLens=[1,2,4,8,16,32];class l extends o.BasicType{constructor(t,e){if(super(),this.byteLength=t,t>8)throw Error(\"UintNumber byteLength limit is 8\");if(Math.log2(t)%1!=0)throw Error(\"byteLength must be a power of 2\");this.typeName=e?.typeName??\"uint\"+8*t,e?.clipInfinity&&(this.typeName+=\"Inf\"),e?.setBitwiseOR&&(this.typeName+=\"OR\"),this.itemsPerChunk=32/this.byteLength,this.fixedSize=t,this.minSize=t,this.maxSize=t,this.maxDecimalStr=(BigInt(2)**BigInt(8*this.byteLength)-BigInt(1)).toString(10),this.clipInfinity=!0===e?.clipInfinity,this.setBitwiseOR=!0===e?.setBitwiseOR}static named(t,e){return new(i.namedClass(l,e.typeName))(t,e)}defaultValue(){return 0}value_serializeToBytes({dataView:t},e,r){switch(this.byteLength){case 1:t.setInt8(e,r);break;case 2:t.setUint16(e,r,!0);break;case 4:t.setUint32(e,r,!0);break;case 8:r===1/0?(t.setUint32(e,4294967295),t.setUint32(e+4,4294967295)):(t.setUint32(e,4294967295&r,!0),t.setUint32(e+4,r/c&4294967295,!0))}return e+this.byteLength}value_deserializeFromBytes({dataView:t},e,r){switch(this.assertValidSize(r-e),this.byteLength){case 1:return t.getUint8(e);case 2:return t.getUint16(e,!0);case 4:return t.getUint32(e,!0);case 8:{const r=t.getUint32(e,!0),n=t.getUint32(e+4,!0);return n===f&&r===f&&this.clipInfinity?1/0:n*c+r}}}tree_serializeToBytes(t,e,r){const n=r.getUint(this.byteLength,0,this.clipInfinity);return this.value_serializeToBytes(t,e,n),e+this.byteLength}tree_deserializeFromBytes(t,e,r){this.assertValidSize(r-e);const i=this.value_deserializeFromBytes(t,e,r),o=n.LeafNode.fromZero();return o.setUint(this.byteLength,0,i,this.clipInfinity),o}tree_getFromNode(t){return t.getUint(this.byteLength,0,this.clipInfinity)}tree_setToNode(t,e){this.tree_setToPackedNode(t,0,e)}tree_getFromPackedNode(t,e){const r=this.byteLength*(e%this.itemsPerChunk);return t.getUint(this.byteLength,r,this.clipInfinity)}tree_setToPackedNode(t,e,r){const n=this.byteLength*(e%this.itemsPerChunk);this.setBitwiseOR?t.bitwiseOrUint(this.byteLength,n,r):t.setUint(this.byteLength,n,r,this.clipInfinity)}fromJson(t){if(\"number\"==typeof t)return t;if(\"string\"==typeof t){if(this.clipInfinity&&t===this.maxDecimalStr)return 1/0;{const e=parseInt(t,10);if(isNaN(e))throw Error(\"JSON invalid number isNaN\");if(e>Number.MAX_SAFE_INTEGER)throw Error(\"JSON invalid number > MAX_SAFE_INTEGER\");return e}}if(\"bigint\"==typeof t){if(t>s)throw Error(\"JSON invalid number > MAX_SAFE_INTEGER_BN\");return Number(t)}throw Error(`JSON invalid type ${typeof t} expected number`)}toJson(t){return t===1/0?this.maxDecimalStr:t.toString(10)}}e.UintNumberType=l;class d extends o.BasicType{constructor(t,e){if(super(),this.byteLength=t,t>32)throw Error(\"UintBigint byteLength limit is 32\");if(Math.log2(t)%1!=0)throw Error(\"byteLength must be a power of 2\");this.typeName=e?.typeName??\"uintBigint\"+8*t,this.byteLength=t,this.itemsPerChunk=32/this.byteLength,this.fixedSize=t,this.minSize=t,this.maxSize=t}static named(t,e){return new(i.namedClass(d,e.typeName))(t,e)}defaultValue(){return BigInt(0)}value_serializeToBytes({dataView:t},e,r){switch(this.byteLength){case 1:t.setInt8(e,Number(r));break;case 2:t.setUint16(e,Number(r),!0);break;case 4:t.setUint32(e,Number(r),!0);break;case 8:t.setBigUint64(e,r,!0);break;default:for(let n=0;n\u003Cthis.byteLength;n+=8){n>0&&(r/=a);const i=BigInt.asUintN(64,r);t.setBigUint64(e+n,i,!0)}}return e+this.byteLength}value_deserializeFromBytes({dataView:t},e,r){const n=r-e;if(n!==this.byteLength)throw Error(`Invalid size ${n} expected ${this.byteLength}`);switch(this.byteLength){case 1:return BigInt(t.getUint8(e));case 2:return BigInt(t.getUint16(e,!0));case 4:return BigInt(t.getUint32(e,!0));case 8:return t.getBigUint64(e,!0);case 16:{const r=t.getBigUint64(e,!0);return t.getBigUint64(e+8,!0)*a+r}case 32:{const r=t.getBigUint64(e,!0),n=t.getBigUint64(e+8,!0),i=t.getBigUint64(e+16,!0);return t.getBigUint64(e+24,!0)*h+i*u+n*a+r}}}tree_serializeToBytes(t,e,r){const n=r.getUintBigint(this.byteLength,0);return this.value_serializeToBytes(t,e,n),e+this.byteLength}tree_deserializeFromBytes(t,e,r){const i=r-e;if(i!==this.byteLength)throw Error(`Invalid size ${i} expected ${this.byteLength}`);const o=this.value_deserializeFromBytes(t,e,r),s=n.LeafNode.fromZero();return s.setUintBigint(this.byteLength,0,o),s}tree_getFromNode(t){return t.getUintBigint(this.byteLength,0)}tree_setToNode(t,e){this.tree_setToPackedNode(t,0,e)}tree_getFromPackedNode(t,e){const r=this.byteLength*(e%this.itemsPerChunk);return t.getUintBigint(this.byteLength,r)}tree_setToPackedNode(t,e,r){const n=this.byteLength*(e%this.itemsPerChunk);t.setUintBigint(this.byteLength,n,r)}fromJson(t){if(\"bigint\"==typeof t)return t;if(\"string\"==typeof t||\"number\"==typeof t)return BigInt(t);throw Error(`JSON invalid type ${typeof t} expected bigint`)}toJson(t){return t.toString(10)}}e.UintBigintType=d},51851:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.UnionType=void 0;const n=r(56567),i=r(35397),o=r(61425),s=r(18715),a=r(63191),u=r(81638),h=BigInt(2),c=BigInt(3);class f extends s.CompositeType{constructor(t,e){if(super(),this.types=t,this.depth=1,this.maxChunkCount=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,t.length>=128)throw Error(\"Must have less than 128 types\");if(0===t.length)throw Error(\"Must have at least 1 type option\");if(t[0]instanceof u.NoneType&&t.length\u003C2)throw Error(\"Must have at least 2 type options if the first is None\");for(let e=1;e\u003Ct.length;e++)if(t[e]instanceof u.NoneType)throw Error(\"None may only be the first option\");this.typeName=e?.typeName??`Union[${t.map((t=>t.typeName)).join(\",\")}]`;const r=[],n=[];for(const e of t)r.push(e.minSize),n.push(e.maxSize);this.minSize=1+Math.min(...r),this.maxSize=1+Math.max(...n),this.maxSelector=this.types.length-1}static named(t,e){return new(o.namedClass(f,e.typeName))(t,e)}defaultValue(){return{selector:0,value:this.types[0].defaultValue()}}getView(t){return this.tree_toValue(t.rootNode)}getViewDU(t){return this.tree_toValue(t)}cacheOfViewDU(){}commitView(t){return this.value_toTree(t)}commitViewDU(t){return this.value_toTree(t)}value_serializedSize(t){return 1+this.types[t.selector].value_serializedSize(t.value)}value_serializeToBytes(t,e,r){return t.uint8Array[e]=r.selector,this.types[r.selector].value_serializeToBytes(t,e+1,r.value)}value_deserializeFromBytes(t,e,r){const n=t.uint8Array[e];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);return{selector:n,value:this.types[n].value_deserializeFromBytes(t,e+1,r)}}tree_serializedSize(t){const e=a.getLengthFromRootNode(t),r=t.left;return 1+this.types[e].value_serializedSize(r)}tree_serializeToBytes(t,e,r){const n=a.getLengthFromRootNode(r),i=r.left;return t.uint8Array[e]=n,this.types[n].tree_serializeToBytes(t,e+1,i)}tree_deserializeFromBytes(t,e,r){const n=t.uint8Array[e];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);const i=this.types[n].tree_deserializeFromBytes(t,e+1,r);return a.addLengthNode(i,n)}hashTreeRoot(t){return i.mixInLength(super.hashTreeRoot(t),t.selector)}getRoots(t){return[this.types[t.selector].hashTreeRoot(t.value)]}getPropertyGindex(t){switch(t){case\"value\":return h;case\"selector\":return c;default:throw new Error(`Invalid Union type property ${t}`)}}getPropertyType(){throw new Error(\"Not applicable for Union type\")}getIndexProperty(t){if(0===t)return\"value\";if(1===t)return\"selector\";throw Error(\"Union index of out bounds\")}tree_getLeafGindices(t,e){if(!e)throw Error(\"rootNode required\");const r=[n.concatGindices([t,c])],i=a.getLengthFromRootNode(e),o=this.types[i],u=n.concatGindices([t,h]);return s.isCompositeType(o)?r.push(...o.tree_getLeafGindices(u,n.getNode(e,h))):r.push(u),r}fromJson(t){if(\"object\"!=typeof t)throw new Error(\"JSON must be of type object\");const e=t;if(\"number\"!=typeof e.selector)throw new Error(\"Invalid JSON Union selector must be number\");const r=this.types[e.selector];if(!r)throw new Error(\"Invalid JSON Union selector out of range\");return{selector:e.selector,value:r.toJson(e.value)}}toJson(t){return{selector:t.selector,value:this.types[t.selector].toJson(t.value)}}clone(t){return{selector:t.selector,value:this.types[t.selector].clone(t.value)}}equals(t,e){return t.selector===e.selector&&this.types[t.selector].equals(t.value,e.value)}}e.UnionType=f},55021:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorBasicType=void 0;const n=r(35397),i=r(61425),o=r(63191),s=r(77733),a=r(63341),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.length=e,this.isList=!1,this.isViewMutable=!0,!t.isBasic)throw Error(\"elementType must be basic\");if(0===e)throw Error(\"Vector length must be > 0\");this.typeName=r?.typeName??`Vector[${t.typeName}, ${e}]`,this.itemsPerChunk=32/t.byteLength,this.maxChunkCount=Math.ceil(e*t.byteLength/32),this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=e*t.byteLength,this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.defaultLen=e}static named(t,e,r){return new(i.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ArrayBasicTreeView(this,t)}getViewDU(t,e){return new a.ArrayBasicTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(){return this.fixedSize}value_serializeToBytes(t,e,r){return o.value_serializeToBytesArrayBasic(this.elementType,this.length,t,e,r)}value_deserializeFromBytes(t,e,r){return o.value_deserializeFromBytesArrayBasic(this.elementType,t,e,r,this)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(t,e,r){return o.tree_serializeToBytesArrayBasic(this.elementType,this.length,this.depth,t,e,r)}tree_deserializeFromBytes(t,e,r){return o.tree_deserializeFromBytesArrayBasic(this.elementType,this.depth,t,e,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(t){return t}tree_setChunksNode(t,e){return e}getRoots(t){const e=new Uint8Array(this.fixedSize),r=new DataView(e.buffer,e.byteOffset,e.byteLength);return o.value_serializeToBytesArrayBasic(this.elementType,this.length,{uint8Array:e,dataView:r},0,t),n.splitIntoRootChunks(e)}}e.VectorBasicType=h},54013:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorCompositeType=void 0;const n=r(35397),i=r(61425),o=r(50404),s=r(56330),a=r(82309),u=r(89659);class h extends u.ArrayType{constructor(t,e,r){if(super(t),this.elementType=t,this.length=e,this.itemsPerChunk=1,this.isList=!1,this.isViewMutable=!0,t.isBasic)throw Error(\"elementType must not be basic\");if(0===e)throw Error(\"Vector length must be > 0\");this.typeName=r?.typeName??`Vector[${t.typeName}, ${e}]`,this.maxChunkCount=e,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=null===t.fixedSize?null:e*t.fixedSize,this.minSize=o.minSizeArrayComposite(t,e),this.maxSize=o.maxSizeArrayComposite(t,e),this.defaultLen=e}static named(t,e,r){return new(i.namedClass(h,r.typeName))(t,e,r)}getView(t){return new s.ArrayCompositeTreeView(this,t)}getViewDU(t,e){return new a.ArrayCompositeTreeViewDU(this,t,e)}commitView(t){return t.node}commitViewDU(t){return t.commit(),t.node}cacheOfViewDU(t){return t.cache}value_serializedSize(t){return o.value_serializedSizeArrayComposite(this.elementType,this.length,t)}value_serializeToBytes(t,e,r){return o.value_serializeToBytesArrayComposite(this.elementType,this.length,t,e,r)}value_deserializeFromBytes(t,e,r){return o.value_deserializeFromBytesArrayComposite(this.elementType,t,e,r,this)}tree_serializedSize(t){return o.tree_serializedSizeArrayComposite(this.elementType,this.length,this.depth,t)}tree_serializeToBytes(t,e,r){return o.tree_serializeToBytesArrayComposite(this.elementType,this.length,this.depth,r,t,e)}tree_deserializeFromBytes(t,e,r){return o.tree_deserializeFromBytesArrayComposite(this.elementType,this.depth,t,e,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(t){return t}tree_setChunksNode(t,e){return e}getRoots(t){return o.value_getRootsArrayComposite(this.elementType,this.length,t)}}e.VectorCompositeType=h},71518:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.byteArrayEquals=e.fromHexString=e.toHexString=void 0;const r=new Array(256);e.toHexString=function(t){let e=\"0x\";for(const n of t)r[n]||(r[n]=n\u003C16?\"0\"+n.toString(16):n.toString(16)),e+=r[n];return e},e.fromHexString=function(t){if(\"string\"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(t.startsWith(\"0x\")&&(t=t.slice(2)),t.length%2!=0)throw new Error(`hex string length ${t.length} must be multiple of 2`);const e=t.length/2,r=new Uint8Array(e);for(let n=0;n\u003Ce;n++){const e=parseInt(t.slice(2*n,2*(n+1)),16);r[n]=e}return r},e.byteArrayEquals=function(t,e){if(t.length!==e.length)return!1;for(let r=0;r\u003Ct.length;r++)if(t[r]!==e[r])return!1;return!0}},35397:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.nextPowerOf2=e.maxChunksToDepth=e.bitLength=e.mixInLength=e.splitIntoRootChunks=e.merkleize=e.hash64=void 0;const i=r(29457),o=r(80038);function s(t,e){return i.hasher.digest64(t,e)}function a(t){return 0===t?0:Math.floor(Math.log2(t))+1}function u(t){return t\u003C=0?1:Math.pow(2,a(t-1))}e.hash64=s,e.merkleize=function(t,e){const r=a(u(e)-1);if(0==t.length)return o.zeroHash(r);let n=t.length;for(let e=0;e\u003Cr;e++){const r=n%2,i=n+r;for(let i=0;i\u003Cr;i++)t[n+i]=o.zeroHash(e);for(let e=0;e\u003Ci;e+=2)t[e/2]=s(t[e],t[e+1]);n=i/2}return t[0]},e.splitIntoRootChunks=function(t){const e=Math.ceil(t.length/32),r=new Array(e);for(let n=0;n\u003Ce;n++){const e=new Uint8Array(32);e.set(t.slice(32*n,32*(n+1))),r[n]=e}return r},e.mixInLength=function(t,e){const r=n.alloc(32);return r.writeUIntLE(e,0,6),s(t,r)},e.bitLength=a,e.maxChunksToDepth=function(t){return 0===t?0:Math.ceil(Math.log2(t))},e.nextPowerOf2=u},61425:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.namedClass=void 0,e.namedClass=function(t,e){return new Function(\"superClass\",`return class ${e} extends superClass {}`)(t)}},18081:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.treePostProcessFromProofNode=void 0;const n=r(56567);function i(t){return!t.isBasic}function o(t){return\"\"===t?0:parseInt(t,2)}e.treePostProcessFromProofNode=function t(e,r,s=\"\",a=0){if(0===a){const t=r.tree_fromProofNode(e);if(t.done)return t.node;e=t.node}const u=r.depth===a;if(e.isLeaf()){if(u){const t=r.getIndexProperty(o(s));if(null===t)return e;const n=r.getPropertyType(t);return 1===n.maxChunkCount&&i(n)?n.tree_fromProofNode(e).node:e}return e}if(u){const n=r.getIndexProperty(o(s));if(null===n)return e;const a=r.getPropertyType(n);if(!i(a))throw Error(\"BranchNode does not map to CompositeType\");const u=a.tree_fromProofNode(e);return u.done?u.node:t(u.node,a)}{const i=t(e.left,r,s+\"0\",a+1),o=t(e.right,r,s+\"1\",a+1);return i===e.left&&o===e.right?e:new n.BranchNode(i,o)}}},79705:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Case=void 0,e.Case={snake:t=>t.replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"_\"+t[1].toLowerCase())),constant:t=>t.replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"_\"+t[1])).toUpperCase(),pascal:t=>(t[0].toUpperCase()+t.slice(1)).replace(/[^0-z]/g,\"\"),camel:t=>t[0].toLowerCase()+t.slice(1),header:t=>t[0].toUpperCase()+t.slice(1).replace(/[^0-z]/g,\"\").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(t=>t[0]+\"-\"+t[1])),eth2:t=>e.Case.snake(t).replace(/(\\d)$/,\"_$1\")}},80038:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.zeroHash=void 0;const n=r(29457),i=[new Uint8Array(32)];e.zeroHash=function(t){if(t>=i.length)for(let e=i.length;e\u003C=t;e++)i[e]=n.hasher.digest64(i[e-1],i[e-1]);return i[t]}},21714:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getUint8ByteToBitBooleanArray=e.BitArray=void 0;const r=new Array(256);class n{constructor(t,e){if(this.uint8Array=t,this.bitLen=e,t.length!==Math.ceil(e/8))throw Error(\"BitArray uint8Array length does not match bitLen\")}static fromBitLen(t){return new n(new Uint8Array(Math.ceil(t/8)),t)}static fromSingleBit(t,e){const r=n.fromBitLen(t);return r.set(e,!0),r}static fromBoolArray(t){const e=n.fromBitLen(t.length);for(let r=0;r\u003Ct.length;r++)!0===t[r]&&e.set(r,!0);return e}clone(){return new n(Uint8Array.prototype.slice.call(this.uint8Array,0),this.bitLen)}get(t){const e=Math.floor(t/8),r=1\u003C\u003Ct%8;return(this.uint8Array[e]&r)===r}set(t,e){if(t>=this.bitLen)throw Error(`BitArray set bitIndex ${t} beyond bitLen ${this.bitLen}`);const r=Math.floor(t/8),n=1\u003C\u003Ct%8;let i=this.uint8Array[r];e?(i|=n,this.uint8Array[r]=i):(i&n)===n&&(i^=n,this.uint8Array[r]=i)}mergeOrWith(t){if(t.bitLen!==this.bitLen)throw Error(\"Must merge BitArrays of same bitLen\");for(let e=0;e\u003Cthis.uint8Array.length;e++)this.uint8Array[e]=this.uint8Array[e]|t.uint8Array[e]}intersectValues(t){const e=[];if(t.length!==this.bitLen)throw Error(`Must not intersect values of length ${t.length} != bitLen ${this.bitLen}`);const r=Math.floor(this.bitLen/8),n=this.bitLen%8,o=this.uint8Array;for(let n=0;n\u003Cr;n++){const r=i(o[n]);for(let i=0;i\u003C8;i++)r[i]&&e.push(t[8*n+i])}if(n>0){const s=i(o[r]);for(let i=0;i\u003Cn;i++)s[i]&&e.push(t[8*r+i])}return e}getTrueBitIndexes(){const t=[],e=this.uint8Array;for(let r=0,n=e.length;r\u003Cn;r++){const n=i(e[r]);for(let e=0;e\u003C8;e++)n[e]&&t.push(8*r+e)}return t}getSingleTrueBit(){let t=null;const e=this.uint8Array;for(let r=0,n=e.length;r\u003Cn;r++){if(0===e[r])continue;const n=i(e[r]);for(let e=0;e\u003C8;e++)if(!0===n[e]){if(null!==t)return null;t=8*r+e}}return null===t?null:t}toBoolArray(){const t=new Array(this.bitLen);for(let e=0;e\u003Cthis.bitLen;e++)t[e]=this.get(e);return t}}function i(t){return r[t]||(r[t]=function(t){const e=t.toString(2),r=e.length,n=new Array(8);for(let t=0;t\u003C8;t++)n[t]=t\u003Cr&&\"1\"===e[r-t-1];return n}(t)),r[t]}e.BitArray=n,e.getUint8ByteToBitBooleanArray=i},62542:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.TreeView=void 0;const n=r(56567);e.TreeView=class{serialize(){const t=new Uint8Array(this.type.tree_serializedSize(this.node)),e=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.type.tree_serializeToBytes({uint8Array:t,dataView:e},0,this.node),t}hashTreeRoot(){return this.node.root}createProof(t){return this.type.tree_createProof(this.node,t)}toValue(){return this.type.tree_toValue(this.node)}clone(){return this.type.getView(new n.Tree(this.node))}}},77733:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayBasicTreeView=void 0;const n=r(56567),i=r(62542);class o extends i.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(t){const e=Math.floor(t/this.type.itemsPerChunk),r=this.tree.getNodeAtDepth(this.type.depth,e);return this.type.elementType.tree_getFromPackedNode(r,t)}set(t,e){const r=this.length;if(t>=r)throw Error(`Error setting index over length ${t} > ${r}`);const n=Math.floor(t/this.type.itemsPerChunk),i=this.tree.getNodeAtDepth(this.type.depth,n).clone();this.type.elementType.tree_setToPackedNode(i,t,e),this.tree.setNodeAtDepth(this.type.depth,n,i)}getAll(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=Math.ceil(t/this.type.itemsPerChunk),i=n.getNodesAtDepth(e,this.type.chunkDepth,0,r),o=new Array(t),s=this.type.itemsPerChunk,a=Math.floor(t/s),u=t%s;for(let t=0;t\u003Ca;t++){const e=i[t];for(let r=0;r\u003Cs;r++)o[t*s+r]=this.type.elementType.tree_getFromPacked�1$�Node(e,r)}if(u>0){const t=i[a];for(let e=0;e\u003Cu;e++)o[a*s+e]=this.type.elementType.tree_getFromPackedNode(t,e)}return o}}e.ArrayBasicTreeView=o},56330:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayCompositeTreeView=void 0;const n=r(56567),i=r(62542);class o extends i.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(t){const e=n.toGindexBitstring(this.type.depth,t),r=this.tree.getSubtree(e);return this.type.elementType.getView(r)}getReadonly(t){const e=n.toGindexBitstring(this.type.depth,t),r=new n.Tree(this.tree.getNode(e));return this.type.elementType.getView(r)}set(t,e){const r=this.length;if(t>=r)throw Error(`Error setting index over length ${t} > ${r}`);const n=this.type.elementType.commitView(e);this.tree.setNodeAtDepth(this.type.depth,t,n)}getAllReadonly(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(e,this.type.chunkDepth,0,t),i=new Array(t);for(let e=0;e\u003Ct;e++)i[e]=this.type.elementType.getView(new n.Tree(r[e]));return i}getAllReadonlyValues(){const t=this.length,e=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(e,this.type.chunkDepth,0,t),i=new Array(t);for(let e=0;e\u003Ct;e++)i[e]=this.type.elementType.tree_toValue(r[e]);return i}}e.ArrayCompositeTreeView=o},76572:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayTreeView=void 0;const n=r(62542);class i extends n.TreeView{constructor(t,e){super(),this.type=t,this.tree=e,this.bitArray=t.tree_toValue(e.rootNode)}get node(){return this.tree.rootNode}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(t){return this.bitArray.get(t)}set(t,e){this.bitArray.set(t,e),this.tree.rootNode=this.type.value_toTree(this.bitArray)}mergeOrWith(t){this.bitArray.mergeOrWith(t)}intersectValues(t){return this.bitArray.intersectValues(t)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}}e.BitArrayTreeView=i},37685:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewClass=void 0;const n=r(56567),i=r(70645),o=r(18715),s=r(62542);class a extends s.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get node(){return this.tree.rootNode}}e.getContainerTreeViewClass=function(t){class e extends a{}for(let r=0;r\u003Ct.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=t.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=n.getNodeAtDepth(this.node,this.type.depth,r);return a.tree_getFromNode(t)},set:function(t){const e=n.getNodeAtDepth(this.node,this.type.depth,r).clone();a.tree_setToNode(e,t),this.tree.setNodeAtDepth(this.type.depth,r,e)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=n.toGindexBitstring(this.type.depth,r);return a.getView(this.tree.getSubtree(t))},set:function(t){const e=a.commitView(t);this.tree.setNodeAtDepth(this.type.depth,r,e)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},81225:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewClass=void 0;const n=r(18715),i=r(8747),o=r(62542);class s extends o.TreeView{constructor(t,e){super(),this.type=t,this.tree=e}get node(){return this.tree.rootNode}}e.getContainerTreeViewClass=function(t){class e extends s{}for(let r=0;r\u003Ct.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=t.fieldsEntries[r];if(s.isBasic)Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get:function(){return this.tree.rootNode.value[o]},set:function(t){const e=this.tree.rootNode,r=this.type.clone(e.value);r[o]=t,this.tree.rootNode=new i.BranchNodeStruct(e.valueToNode,r)}});else{if(!n.isCompositeType(s))throw Error(`Unknown fieldType ${s.typeName} for fieldName ${o}`);Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get:function(){const{value:t}=this.tree.rootNode;return s.toView(t[o])},set:function(t){const e=this.tree.rootNode,r=this.type.clone(e.value);r[o]=s.toValueFromView(t),this.tree.rootNode=new i.BranchNodeStruct(e.valueToNode,r)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},19291:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicTreeView=void 0;const n=r(56567),i=r(77733);class o extends i.ArrayBasicTreeView{constructor(t,e){super(t,e),this.type=t,this.tree=e}push(t){const e=this.length;if(e>=this.type.limit)throw Error(\"Error pushing over limit\");if(this.type.tree_setLength(this.tree,e+1),e%this.type.itemsPerChunk==0){const r=n.LeafNode.fromZero();this.type.elementType.tree_setToPackedNode(r,e,t);const i=Math.floor(e/this.type.itemsPerChunk);this.tree.setNodeAtDepth(this.type.depth,i,r)}else this.set(e,t)}}e.ListBasicTreeView=o},11783:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeTreeView=void 0;const n=r(56330);class i extends n.ArrayCompositeTreeView{constructor(t,e){super(t,e),this.type=t,this.tree=e}push(t){const e=this.length;if(e>=this.type.limit)throw Error(\"Error pushing over limit\");this.type.tree_setLength(this.tree,e+1),this.set(e,t)}}e.ListCompositeTreeView=i},40332:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.TreeViewDU=void 0;const n=r(62542);class i extends n.TreeView{hashTreeRoot(){return this.commit(),super.hashTreeRoot()}serialize(){return this.commit(),super.serialize()}clone(t){if(t)return this.type.getViewDU(this.node);{const t=this.cache;return this.clearCache(),this.type.getViewDU(this.node,t)}}}e.TreeViewDU=i},63341:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayBasicTreeViewDU=void 0;const n=r(56567),i=r(40332);class o extends i.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.nodesChanged=new Set,this.dirtyLength=!1,r?(this.nodes=r.nodes,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this._length=this.type.tree_getLength(e),this.nodesPopulated=!1)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,length:this._length,nodesPopulated:this.nodesPopulated}}get(t){const e=Math.floor(t/this.type.itemsPerChunk);let r=this.nodes[e];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r),this.type.elementType.tree_getFromPackedNode(r,t)}set(t,e){if(t>=this._length)throw Error(`Error setting index over length ${t} > ${this._length}`);const r=Math.floor(t/this.type.itemsPerChunk);let i;if(this.nodesChanged.has(r))i=this.nodes[r];else{i=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=i,this.nodesChanged.add(r)}this.type.elementType.tree_setToPackedNode(i,t,e)}getAll(){if(!this.nodesPopulated){const t=this.nodes,e=this.type.tree_getChunksNode(this.node),r=Math.ceil(this._length/this.type.itemsPerChunk);this.nodes=n.getNodesAtDepth(e,this.type.chunkDepth,0,r);for(const e of this.nodesChanged)this.nodes[e]=t[e];this.nodesPopulated=!0}const t=new Array(this._length),e=this.type.itemsPerChunk,r=Math.floor(this._length/e),i=this._length%e;for(let n=0;n\u003Cr;n++){const r=this.nodes[n];for(let i=0;i\u003Ce;i++)t[n*e+i]=this.type.elementType.tree_getFromPackedNode(r,i)}if(i>0){const n=this.nodes[r];for(let o=0;o\u003Ci;o++)t[r*e+o]=this.type.elementType.tree_getFromPackedNode(n,o)}return t}commit(){if(0===this.nodesChanged.size)return;const t=Array.from(this.nodesChanged.keys()).sort(((t,e)=>t-e)),e=new Array(t.length);for(let r=0;r\u003Ct.length;r++)e[r]=this.nodes[t[r]];const r=this.type.tree_getChunksNode(this._rootNode),i=n.setNodesAtDepth(r,this.type.chunkDepth,t,e);this._rootNode=this.type.tree_setChunksNode(this._rootNode,i,this.dirtyLength?this._length:void 0),this.nodesChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}}e.ArrayBasicTreeViewDU=o},82309:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ArrayCompositeTreeViewDU=void 0;const n=r(56567),i=r(40332);class o extends i.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.viewsChanged=new Map,this.dirtyLength=!1,r?(this.nodes=r.nodes,this.caches=r.caches,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this._length=this.type.tree_getLength(e),this.nodesPopulated=0===this._length)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,length:this._length,nodesPopulated:this.nodesPopulated}}get(t){const e=this.viewsChanged.get(t);if(e)return e;let r=this.nodes[t];void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r);const i=this.type.elementType.getViewDU(r,this.caches[t]);return this.type.elementType.isViewMutable&&this.viewsChanged.set(t,i),i}getReadonly(t){const e=this.viewsChanged.get(t);if(e)return e;let r=this.nodes[t];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r),this.type.elementType.getViewDU(r,this.caches[t])}set(t,e){if(t>=this._length)throw Error(`Error setting index over length ${t} > ${this._length}`);this.viewsChanged.set(t,e)}getAllReadonly(){this.populateAllNodes();const t=new Array(this._length);for(let e=0;e\u003Cthis._length;e++)t[e]=this.type.elementType.getViewDU(this.nodes[e],this.caches[e]);return t}getAllReadonlyValues(){this.populateAllNodes();const t=new Array(this._length);for(let e=0;e\u003Cthis._length;e++)t[e]=this.type.elementType.tree_toValue(this.nodes[e]);return t}commit(){if(0===this.viewsChanged.size)return;const t=[];for(const[e,r]of this.viewsChanged){const n=this.type.elementType.commitViewDU(r);this.nodes[e]=n,t.push({index:e,node:n});const i=this.type.elementType.cacheOfViewDU(r);i&&(this.caches[e]=i)}const e=t.sort(((t,e)=>t.index-e.index)),r=e.map((t=>t.index)),i=e.map((t=>t.node)),o=this.type.tree_getChunksNode(this._rootNode),s=n.setNodesAtDepth(o,this.type.chunkDepth,r,i);this._rootNode=this.type.tree_setChunksNode(this._rootNode,s,this.dirtyLength?this._length:void 0),this.viewsChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.viewsChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}populateAllNodes(){if(this.viewsChanged.size>0)throw Error(\"Must commit changes before reading all nodes\");this.nodesPopulated||(this.nodes=n.getNodesAtDepth(this._rootNode,this.type.depth,0,this.length),this.nodesPopulated=!0)}}e.ArrayCompositeTreeViewDU=o},57844:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BitArrayTreeViewDU=void 0;const n=r(40332);class i extends n.TreeViewDU{constructor(t,e){super(),this.type=t,this._rootNode=e,this._bitArray=null}get node(){return this._rootNode}get cache(){}commit(){null!==this._bitArray&&(this._rootNode=this.type.value_toTree(this._bitArray))}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(t){return this.bitArray.get(t)}set(t,e){this.bitArray.set(t,e)}mergeOrWith(t){this.bitArray.mergeOrWith(t)}intersectValues(t){return this.bitArray.intersectValues(t)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}get bitArray(){return null===this._bitArray&&(this._bitArray=this.type.tree_toValue(this._rootNode)),this._bitArray}clearCache(){this._bitArray=null}}e.BitArrayTreeViewDU=i},68865:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewDUClass=void 0;const n=r(56567),i=r(70645),o=r(18715),s=r(40332);class a extends s.TreeViewDU{constructor(t,e,r){super(),this.type=t,this._rootNode=e,this.nodes=[],this.nodesChanged=new Set,this.viewsChanged=new Map,r?(this.nodes=r.nodes,this.caches=r.caches,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this.nodesPopulated=!1)}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,nodesPopulated:this.nodesPopulated}}commit(){if(0===this.nodesChanged.size&&0===this.viewsChanged.size)return;const t=[];for(const[e,r]of this.viewsChanged){const n=this.type.fieldsEntries[e].fieldType,i=n.commitViewDU(r);this.nodes[e]=i,t.push({index:e,node:i});const o=n.cacheOfViewDU(r);o&&(this.caches[e]=o)}for(const e of this.nodesChanged)t.push({index:e,node:this.nodes[e]});const e=t.sort(((t,e)=>t.index-e.index)),r=e.map((t=>t.index)),i=e.map((t=>t.node));this._rootNode=n.setNodesAtDepth(this._rootNode,this.type.depth,r,i),this.nodesChanged.clear(),this.viewsChanged.clear()}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.viewsChanged.clear()}}e.getContainerTreeViewDUClass=function(t){class e extends a{}for(let r=0;r\u003Ct.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=t.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){let t=this.nodes[r];return void 0===t&&(t=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=t),a.tree_getFromNode(t)},set:function(t){let e;if(this.nodesChanged.has(r))e=this.nodes[r];else{e=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=e,this.nodesChanged.add(r)}a.tree_setToNode(e,t)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(e.prototype,s,{configurable:!1,enumerable:!0,get:function(){const t=this.viewsChanged.get(r);if(t)return t;let e=this.nodes[r];void 0===e&&(e=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=e);const i=a.getViewDU(e,this.caches[r]);return a.isViewMutable&&this.viewsChanged.set(r,i),i},set:function(t){this.viewsChanged.set(r,t)}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},84320:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getContainerTreeViewDUClass=void 0;const n=r(18715),i=r(40332);class o extends i.TreeViewDU{constructor(t,e){super(),this.type=t,this.valueChanged=null,this._rootNode=e}get node(){return this._rootNode}get cache(){}commit(){if(null===this.valueChanged)return;const t=this.valueChanged;this.valueChanged=null,this._rootNode=this.type.value_toTree(t)}clearCache(){this.valueChanged=null}}e.getContainerTreeViewDUClass=function(t){class e extends o{}for(let r=0;r\u003Ct.fieldsEntries.length;r++){const{fieldName:i,fieldType:o}=t.fieldsEntries[r];if(o.isBasic)Object.defineProperty(e.prototype,i,{configurable:!1,enumerable:!0,get:function(){return(this.valueChanged||this._rootNode.value)[i]},set:function(t){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value)),this.valueChanged[i]=t}});else{if(!n.isCompositeType(o))throw Error(`Unknown fieldType ${o.typeName} for fieldName ${i}`);Object.defineProperty(e.prototype,i,{configurable:!1,enumerable:!0,get:function(){const t=this.valueChanged||this._rootNode.value;return o.toViewDU(t[i])},set:function(t){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value));const e=o.toValueFromViewDU(t);this.valueChanged[i]=e}})}}return Object.defineProperty(e,\"name\",{value:t.typeName,writable:!1}),e}},61828:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListBasicTreeViewDU=void 0;const n=r(56567),i=r(63341);class o extends i.ArrayBasicTreeViewDU{constructor(t,e,r){super(t,e,r),this.type=t,this._rootNode=e}push(t){if(this._length>=this.type.limit)throw Error(\"Error pushing over limit\");this.dirtyLength=!0;const e=this._length++;if(e%this.type.itemsPerChunk==0){const t=Math.floor(e/this.type.itemsPerChunk);this.nodes[t]=n.zeroNode(0)}this.set(e,t)}}e.ListBasicTreeViewDU=o},82029:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ListCompositeTreeViewDU=void 0;const n=r(56567),i=r(82309);class o extends i.ArrayCompositeTreeViewDU{constructor(t,e,r){super(t,e,r),this.type=t,this._rootNode=e}push(t){if(this._length>=this.type.limit)throw Error(\"Error pushing over limit\");this.dirtyLength=!0;const e=this._length++;this.set(e,t)}sliceTo(t){this.commit();const e=this._rootNode;if(t>=this.type.tree_getLength(e)-1)return this;const r=this.type.tree_getChunksNode(e),i=n.treeZeroAfterIndex(r,this.type.chunkDepth,t),o=t+1,s=this.type.tree_setChunksNode(e,i,o);return this.type.getViewDU(s)}}e.ListCompositeTreeViewDU=o},19752:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Common=void 0;const i=r(99065),o=r(97108),s=r(22699),a=r(24579),u=r(73192),h=r(14002),c=r(27623),f=r(86369),l=r(43925),d=r(90649),p=r(12188),m=r(73824);class g extends s.EventEmitter{constructor(t){super(),this._eips=[],this._customChains=t.customChains??[],this._chainParams=this.setChain(t.chain),this.DEFAULT_HARDFORK=this._chainParams.defaultHardfork??d.Hardfork.Merge,this.HARDFORK_CHANGES=this.hardforks().map((t=>[t.name,p.hardforks[t.name]])),this._hardfork=this.DEFAULT_HARDFORK,void 0!==t.hardfork&&this.setHardfork(t.hardfork),t.eips&&this.setEIPs(t.eips)}static custom(t,e={}){const r=e.baseChain??\"mainnet\",n={...g._getChainParams(r)};if(n.name=\"custom-chain\",\"string\"!=typeof t)return new g({chain:{...n,...t},...e});if(t===d.CustomChain.PolygonMainnet)return g.custom({name:d.CustomChain.PolygonMainnet,chainId:137,networkId:137},e);if(t===d.CustomChain.PolygonMumbai)return g.custom({name:d.CustomChain.PolygonMumbai,chainId:80001,networkId:80001},e);if(t===d.CustomChain.ArbitrumRinkebyTestnet)return g.custom({name:d.CustomChain.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},e);if(t===d.CustomChain.ArbitrumOne)return g.custom({name:d.CustomChain.ArbitrumOne,chainId:42161,networkId:42161},e);if(t===d.CustomChain.xDaiChain)return g.custom({name:d.CustomChain.xDaiChain,chainId:100,networkId:100},e);if(t===d.CustomChain.OptimisticKovan)return g.custom({name:d.CustomChain.OptimisticKovan,chainId:69,networkId:69},{hardfork:d.Hardfork.Berlin,...e});if(t===d.CustomChain.OptimisticEthereum)return g.custom({name:d.CustomChain.OptimisticEthereum,chainId:10,networkId:10},{hardfork:d.Hardfork.Berlin,...e});throw new Error(`Custom chain ${t} not supported`)}static fromGethGenesis(t,{chain:e,eips:r,genesisHash:n,hardfork:i,mergeForkIdPostMerge:o}){const s=(0,m.parseGethGenesis)(t,e,o),a=new g({chain:s.name??\"custom\",customChains:[s],eips:r,hardfork:i??s.hardfork});return void 0!==n&&a.setForkHashes(n),a}static isSupportedChainId(t){const e=this._getInitializedChains();return Boolean(e.names[t.toString()])}static _getChainParams(t,e){const r=this._getInitializedChains(e);if(\"number\"==typeof t||\"bigint\"==typeof t){if(t=t.toString(),r.names[t]){return r[r.names[t]]}throw new Error(`Chain with ID ${t} not supported`)}if(void 0!==r[t])return r[t];throw new Error(`Chain with name ${t} not supported`)}setChain(t){if(\"number\"==typeof t||\"bigint\"==typeof t||\"string\"==typeof t)this._chainParams=g._getChainParams(t,this._customChains);else{if(\"object\"!=typeof t)throw new Error(\"Wrong input format\");{if(this._customChains.length>0)throw new Error(\"Chain must be a string, number, or bigint when initialized with customChains passed in\");const e=[\"networkId\",\"genesis\",\"hardforks\",\"bootstrapNodes\"];for(const r of e)if(!(r in t))throw new Error(`Missing required chain parameter: ${r}`);this._chainParams=t}}for(const t of this.hardforks())if(void 0===t.block)throw new Error(\"Hardfork cannot have undefined block number\");return this._chainParams}setHardfork(t){let e=!1;for(const r of this.HARDFORK_CHANGES)r[0]===t&&(this._hardfork!==t&&(this._hardfork=t,this.emit(\"hardforkChanged\",t)),e=!0);if(!e)throw new Error(`Hardfork with name ${t} not supported`)}getHardforkByBlockNumber(t,e,r){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=(0,i.toType)(e,i.TypeOutput.BigInt),r=(0,i.toType)(r,i.TypeOutput.Number);const n=this.hardforks().filter((t=>null!==t.block||null!==t.ttd&&void 0!==t.ttd||void 0!==t.timestamp)),o=n.findIndex((t=>null!==t.ttd&&void 0!==t.ttd));if(n.slice(o+1).findIndex((t=>null!==t.ttd&&void 0!==t.ttd))>=0)throw Error(\"More than one merge hardforks found with ttd specified\");let s=n.findIndex((e=>null!==e.block&&e.block>t||void 0!==r&&Number(e.timestamp)>r));if(-1===s)s=n.length;else if(0===s)throw Error(\"Must have at least one hardfork at block 0\");if(void 0===r){s-=n.slice(0,s).reverse().findIndex((t=>null!==t.block||void 0!==t.ttd))}if(s-=1,null===n[s].block&&void 0===n[s].timestamp)(null==e||BigInt(n[s].ttd)>e)&&(s-=1);else if(o>=0&&null!=e){if(s>=o&&BigInt(n[o].ttd)>e)throw Error(\"Maximum HF determined by total difficulty is lower than the block number HF\");if(s\u003Co&&BigInt(n[o].ttd)\u003C=e)throw Error(\"HF determined by block number is lower than the minimum total difficulty HF\")}const a=s;for(;s\u003Cn.length-1&&(n[s].block===n[s+1].block&&n[s].timestamp===n[s+1].timestamp);s++);if(r){if(n.slice(0,a).reduce(((t,e)=>Math.max(Number(e.timestamp??\"0\"),t)),0)>r)throw Error(\"Maximum HF determined by timestamp is lower than the block number/ttd HF\");if(n.slice(s+1).reduce(((t,e)=>Math.min(Number(e.timestamp??r),t)),r)\u003Cr)throw Error(\"Maximum HF determined by block number/ttd is lower than timestamp HF\")}return n[s].name}setHardforkByBlockNumber(t,e,r){const n=this.getHardforkByBlockNumber(t,e,r);return this.setHardfork(n),n}_getHardfork(t){const e=this.hardforks();for(const r of e)if(r.name===t)return r;return null}setEIPs(t=[]){for(const e of t){if(!(e in l.EIPs))throw new Error(`${e} not supported`);const r=this.gteHardfork(l.EIPs[e].minimumHardfork);if(!r)throw new Error(`${e} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${r}`);if(void 0!==l.EIPs[e].requiredEIPs)for(const r of l.EIPs[e].requiredEIPs)if(!t.includes(r)&&!this.isActivatedEIP(r))throw new Error(`${e} requires EIP ${r}, but is not included in the EIP list`)}this._eips=t}param(t,e){let r;for(const n of this._eips)if(r=this.paramByEIP(t,e,n),void 0!==r)return r;return this.paramByHardfork(t,e,this._hardfork)}paramByHardfork(t,e,r){let n=null;for(const i of this.HARDFORK_CHANGES){if(\"eips\"in i[1]){const r=i[1].eips;for(const i of r){const r=this.paramByEIP(t,e,i);n=\"bigint\"==typeof r?r:n}}else{if(void 0===i[1][t])throw new Error(`Topic ${t} not defined`);void 0!==i[1][t][e]&&(n=i[1][t][e].v)}if(i[0]===r)break}return BigInt(n??0)}paramByEIP(t,e,r){if(!(r in l.EIPs))throw new Error(`${r} not supported`);const n=l.EIPs[r];if(!(t in n))throw new Error(`Topic ${t} not defined`);if(void 0===n[t][e])return;const i=n[t][e].v;return BigInt(i)}paramByBlock(t,e,r,n,i){const o=this.getHardforkByBlockNumber(r,n,i);return this.paramByHardfork(t,e,o)}isActivatedEIP(t){if(this.eips().includes(t))return!0;for(const e of this.HARDFORK_CHANGES){const r=e[1];if(this.gteHardfork(r.name)&&\"eips\"in r&&r.eips.includes(t))return!0}return!1}hardforkIsActiveOnBlock(t,e){e=(0,i.toType)(e,i.TypeOutput.BigInt),t=t??this._hardfork;const r=this.hardforkBlock(t);return\"bigint\"==typeof r&&r!==BigInt(0)&&e>=r}activeOnBlock(t){return this.hardforkIsActiveOnBlock(null,t)}hardforkGteHardfork(t,e){t=t??this._hardfork;const r=this.hardforks();let n=-1,i=-1,o=0;for(const s of r)s.name===t&&(n=o),s.name===e&&(i=o),o+=1;return n>=i&&-1!==i}gteHardfork(t){return this.hardforkGteHardfork(null,t)}hardforkBlock(t){t=t??this._hardfork;const e=this._getHardfork(t)?.block;return null==e?null:BigInt(e)}hardforkTimestamp(t){t=t??this._hardfork;const e=this._getHardfork(t)?.timestamp;return null==e?null:BigInt(e)}eipBlock(t){for(const e of this.HARDFORK_CHANGES){const r=e[1];if(\"eips\"in r&&r.eips.includes(t))return this.hardforkBlock(e[0])}return null}hardforkTTD(t){t=t??this._hardfork;const e=this._getHardfork(t)?.ttd;return null==e?null:BigInt(e)}isHardforkBlock(t,e){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=e??this._hardfork;const r=this.hardforkBlock(e);return\"bigint\"==typeof r&&r!==BigInt(0)&&r===t}nextHardforkBlockOrTimestamp(t){t=t??this._hardfork;const e=this.hardforks();let r=e.findIndex((e=>e.name===t));if(t===d.Hardfork.Merge&&(r-=1),r\u003C0)return null;let n=e[r].timestamp??e[r].block;n=null!=n?Number(n):null;const i=e.slice(r+1).find((t=>{let e=t.timestamp??t.block;return e=null!=e?Number(e):null,t.name!==d.Hardfork.Merge&&null!=e&&e!==n}));if(void 0===i)return null;const o=i.timestamp??i.block;return null==o?null:BigInt(o)}nextHardforkBlock(t){t=t??this._hardfork;let e=this.hardforkBlock(t);if(null===e&&t===d.Hardfork.Merge){const t=this.hardforks(),r=t.findIndex((t=>null!==t.ttd&&void 0!==t.ttd));if(r\u003C0)throw Error(\"Merge hardfork should have been found\");e=this.hardforkBlock(t[r-1].name)}if(null===e)return null;return this.hardforks().reduce(((t,r)=>{const n=BigInt(null===r.block||void 0!==r.ttd&&null!==r.ttd?0:r.block);return n>e&&null===t?n:t}),null)}isNextHardforkBlock(t,e){t=(0,i.toType)(t,i.TypeOutput.BigInt),e=e??this._hardfork;const r=this.nextHardforkBlock(e);return null!==r&&r===t}_calcForkHash(t,e){let r=n.alloc(0),s=0;for(const e of this.hardforks()){const{block:i,timestamp:o,name:a}=e;let u=o??i;if(u=null!==u?Number(u):null,\"number\"==typeof u&&0!==u&&u!==s&&a!==d.Hardfork.Merge){const t=n.from(u.toString(16).padStart(16,\"0\"),\"hex\");r=n.concat([r,t]),s=u}if(e.name===t)break}const a=n.concat([e,r]);return`0x${(0,i.intToBuffer)((0,o.buf)(a)>>>0).toString(\"hex\")}`}forkHash(t,e){t=t??this._hardfork;const r=this._getHardfork(t);if(null===r||null===r?.block&&void 0===r?.timestamp&&void 0===r?.ttd){throw new Error(\"No fork hash calculation possible for future hardfork\")}if(null!=r?.forkHash)return r.forkHash;if(!e)throw new Error(\"genesisHash required for forkHash calculation\");return this._calcForkHash(t,e)}hardforkForForkHash(t){const e=this.hardforks().filter((e=>e.forkHash===t));return e.length>=1?e[e.length-1]:null}setForkHashes(t){for(const e of this.hardforks()){const r=e.timestamp??e.block;null!==e.forkHash&&void 0!==e.forkHash||null==r&&void 0===e.ttd||(e.forkHash=this.forkHash(e.name,t))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus.type),r[0]===t)break;return e??this._chainParams.consensus.type}consensusAlgorithm(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus.algorithm),r[0]===t)break;return e??this._chainParams.consensus.algorithm}consensusConfig(){const t=this.hardfork();let e;for(const r of this.HARDFORK_CHANGES)if(\"consensus\"in r[1]&&(e=r[1].consensus[r[1].consensus.algorithm]),r[0]===t)break;return e??this._chainParams.consensus[this.consensusAlgorithm()]??{}}copy(){const t=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return t.removeAllListeners(),t}static _getInitializedChains(t){const e={};for(const[t,r]of Object.entries(d.Chain))e[r]=t.toLowerCase();const r={mainnet:u,ropsten:c,rinkeby:h,goerli:a,sepolia:f};if(t)for(const n of t){const{name:t}=n;e[n.chainId.toString()]=t,r[t]=n}return r.names=e,r}}e.Common=g},43925:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.EIPs=void 0,e.EIPs={1153:r(59765),1559:r(59659),2315:r(609),2537:r(34335),2565:r(40354),2718:r(43928),2929:r(10810),2930:r(33501),3074:r(96973),3198:r(24984),3529:r(3573),3540:r(36685),3541:r(96309),3554:r(93609),3607:r(4204),3651:r(69727),3670:r(18038),3675:r(33021),3855:r(94222),3860:r(54359),4345:r(58444),4399:r(46401),4844:r(51200),4895:r(3122),5133:r(29694)}},90649:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.CustomChain=e.ConsensusAlgorithm=e.ConsensusType=e.Hardfork=e.Chain=void 0,function(t){t[t.Mainnet=1]=\"Mainnet\",t[t.Ropsten=3]=\"Ropsten\",t[t.Rinkeby=4]=\"Rinkeby\",t[t.Goerli=5]=\"Goerli\",t[t.Sepolia=11155111]=\"Sepolia\"}(e.Chain||(e.Chain={})),function(t){t.Chainstart=\"chainstart\",t.Homestead=\"homestead\",t.Dao=\"dao\",t.TangerineWhistle=\"tangerineWhistle\",t.SpuriousDragon=\"spuriousDragon\",t.Byzantium=\"byzantium\",t.Constantinople=\"constantinople\",t.Petersburg=\"petersburg\",t.Istanbul=\"istanbul\",t.MuirGlacier=\"muirGlacier\",t.Berlin=\"berlin\",t.London=\"london\",t.ArrowGlacier=\"arrowGlacier\",t.GrayGlacier=\"grayGlacier\",t.MergeForkIdTransition=\"mergeForkIdTransition\",t.Merge=\"merge\",t.Shanghai=\"shanghai\",t.ShardingForkDev=\"shardingFork\"}(e.Hardfork||(e.Hardfork={})),function(t){t.ProofOfStake=\"pos\",t.ProofOfWork=\"pow\",t.ProofOfAuthority=\"poa\"}(e.ConsensusType||(e.ConsensusType={})),function(t){t.Ethash=\"ethash\",t.Clique=\"clique\",t.Casper=\"casper\"}(e.ConsensusAlgorithm||(e.ConsensusAlgorithm={})),function(t){t.PolygonMainnet=\"polygon-mainnet\",t.PolygonMumbai=\"polygon-mumbai\",t.ArbitrumRinkebyTestnet=\"arbitrum-rinkeby-testnet\",t.ArbitrumOne=\"arbitrum-one\",t.xDaiChain=\"x-dai-chain\",t.OptimisticKovan=\"optimistic-kovan\",t.OptimisticEthereum=\"optimistic-ethereum\"}(e.CustomChain||(e.CustomChain={}))},12188:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hardforks=void 0,e.hardforks={chainstart:r(80021),homestead:r(72001),dao:r(75774),tangerineWhistle:r(70116),spuriousDragon:r(40610),byzantium:r(21773),constantinople:r(29517),petersburg:r(76694),istanbul:r(23316),muirGlacier:r(68288),berlin:r(45515),london:r(46497),shanghai:r(23317),arrowGlacier:r(98874),grayGlacier:r(13292),mergeForkIdTransition:r(76552),merge:r(69024),shardingFork:r(68870)}},31664:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(19752),e),i(r(90649),e),i(r(13732),e),i(r(73824),e)},13732:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},73824:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.parseGethGenesis=void 0;const n=r(99065),i=r(90649);function o(t,e=!0){const{name:r,config:o,difficulty:s,mixHash:a,gasLimit:u,coinbase:h,baseFeePerGas:c}=t;let{extraData:f,timestamp:l,nonce:d}=t;const p=Number(l),{chainId:m}=o;if(\"\"===f&&(f=\"0x\"),(0,n.isHexPrefixed)(l)||(l=(0,n.intToHex)(parseInt(l))),18!==d.length&&(d=function(t){return t&&\"0x0\"!==t?(0,n.isHexPrefixed)(t)?\"0x\"+(0,n.stripHexPrefix)(t).padStart(16,\"0\"):\"0x\"+t.padStart(16,\"0\"):\"0x0000000000000000\"}(d)),o.eip155Block!==o.eip158Block)throw new Error(\"EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork\");const g={name:r,chainId:m,networkId:m,genesis:{timestamp:l,gasLimit:parseInt(u),difficulty:parseInt(s),nonce:d,extraData:f,mixHash:a,coinbase:h,baseFeePerGas:c},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:void 0!==o.clique?{type:\"poa\",algorithm:\"clique\",clique:{period:o.clique.period??o.clique.blockperiodseconds,epoch:o.clique.epoch??o.clique.epochlength}}:{type:\"pow\",algorithm:\"ethash\",ethash:{}}},y={[i.Hardfork.Homestead]:{name:\"homesteadBlock\"},[i.Hardfork.Dao]:{name:\"daoForkBlock\"},[i.Hardfork.TangerineWhistle]:{name:\"eip150Block\"},[i.Hardfork.SpuriousDragon]:{name:\"eip155Block\"},[i.Hardfork.Byzantium]:{name:\"byzantiumBlock\"},[i.Hardfork.Constantinople]:{name:\"constantinopleBlock\"},[i.Hardfork.Petersburg]:{name:\"petersburgBlock\"},[i.Hardfork.Istanbul]:{name:\"istanbulBlock\"},[i.Hardfork.MuirGlacier]:{name:\"muirGlacierBlock\"},[i.H@����ardfork.Berlin]:{name:\"berlinBlock\"},[i.Hardfork.London]:{name:\"londonBlock\"},[i.Hardfork.MergeForkIdTransition]:{name:\"mergeForkBlock\",postMerge:e},[i.Hardfork.Shanghai]:{name:\"shanghaiTime\",postMerge:!0,isTimestamp:!0},[i.Hardfork.ShardingForkDev]:{name:\"shardingForkTime\",postMerge:!0,isTimestamp:!0}},b=Object.keys(y).reduce(((t,e)=>(t[y[e].name]=e,t)),{}),v=Object.keys(o).filter((t=>void 0!==b[t]&&void 0!==o[t]&&null!==o[t]));if(g.hardforks=v.map((t=>({name:b[t],block:!0===y[b[t]].isTimestamp||\"number\"!=typeof o[t]?null:o[t],timestamp:!0===y[b[t]].isTimestamp&&\"number\"==typeof o[t]?o[t]:void 0}))).filter((t=>null!==t.block||void 0!==t.timestamp)),g.hardforks.sort((function(t,e){return(t.block??1/0)-(e.block??1/0)})),g.hardforks.sort((function(t,e){return(t.timestamp??p)-(e.timestamp??p)})),void 0!==o.terminalTotalDifficulty){const t={name:i.Hardfork.Merge,ttd:o.terminalTotalDifficulty,block:null},e=g.hardforks.findIndex((t=>!0===y[t.name]?.postMerge));-1!==e?g.hardforks.splice(e,0,t):g.hardforks.push(t)}const w=g.hardforks.length>0?g.hardforks.slice(-1)[0]:void 0;return g.hardfork=w?.name,g.hardforks.unshift({name:i.Hardfork.Chainstart,block:0}),g}e.parseGethGenesis=function(t,e,r){try{if([\"config\",\"difficulty\",\"gasLimit\",\"alloc\"].some((e=>!(e in t))))throw new Error(\"Invalid format, expected geth genesis fields missing\");return void 0!==e&&(t.name=e),o(t,r)}catch(t){throw new Error(`Error parsing parameters file: ${t.message}`)}}},81381:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(69084),h=r(85835),c=r(96564),f=r(34933),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce\u003Cl)throw new Error(\"nonce must be greater than zero\");if(this.balance\u003Cl)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t\u003Cr.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},45337:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(81381),o=r(69084);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t\u003C=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},24179:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length\u003C2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},69084:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(96564),o=r(34933);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length\u003Cr?(t.copy(i),i):t.slice(0,r):t.length\u003Cr?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t\u003CBigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length\u003C=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n\u003Ct.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},85835:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},18439:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n\u003Ct.length;r+=1,n+=2)e[r]=t[n]\u003C\u003C4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r\u003C\u003C5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e\u003Ct.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]\u003C2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},96564:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(34933);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},99065:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(85835),e),i(r(61332),e),i(r(81381),e),i(r(45337),e),i(r(62503),e),i(r(83441),e),i(r(69084),e),i(r(30912),e),i(r(18439),e),i(r(24179),e);var o=r(34933);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(91576),e),i(r(48989),e)},34933:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r\u003Cn;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r\u003Ct.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length\u003C2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i\u003Ct.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},91576:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},48989:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},83441:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(69084),a=r(85835),u=r(96564);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i\u003C27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},30912:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(69084),i=r(34933);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},61332:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},62503:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(45337),o=r(69084),s=r(30912);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},57256:(t,e)=>{\"use strict\";function r(t){if(Array.isArray(t)){const e=[];let n=0;for(let i=0;i\u003Ct.length;i++){const o=r(t[i]);e.push(o),n+=o.length}return l(o(n,192),...e)}const e=g(t);return 1===e.length&&e[0]\u003C128?e:l(o(e.length,128),e)}function n(t,e,r){if(r>t.length)throw new Error(\"invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds\");return t.slice(e,r)}function i(t){if(0===t[0])throw new Error(\"invalid RLP: extra zeros\");return c(h(t))}function o(t,e){if(t\u003C56)return Uint8Array.from([t+e]);const r=p(t),n=p(e+55+r.length/2);return Uint8Array.from(f(n+r))}function s(t,e=!1){if(null==t||0===t.length)return Uint8Array.from([]);const r=a(g(t));if(e)return r;if(0!==r.remainder.length)throw new Error(\"invalid RLP: remainder must be zero\");return r.data}function a(t){let e,r,o,s,u;const h=[],c=t[0];if(c\u003C=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(c\u003C=183){if(e=c-127,o=128===c?Uint8Array.from([]):n(t,1,e),2===e&&o[0]\u003C128)throw new Error(\"invalid RLP encoding: invalid prefix, single byte \u003C 0x80 are not prefixed\");return{data:o,remainder:t.slice(e)}}if(c\u003C=191){if(r=c-182,t.length-1\u003Cr)throw new Error(\"invalid RLP: not enough bytes for string length\");if(e=i(n(t,1,r)),e\u003C=55)throw new Error(\"invalid RLP: expected string length to be greater than 55\");return o=n(t,r,e+r),{data:o,remainder:t.slice(e+r)}}if(c\u003C=247){for(e=c-191,s=n(t,1,e);s.length;)u=a(s),h.push(u.data),s=u.remainder;return{data:h,remainder:t.slice(e)}}{if(r=c-246,e=i(n(t,1,r)),e\u003C56)throw new Error(\"invalid RLP: encoded list too short\");const o=r+e;if(o>t.length)throw new Error(\"invalid RLP: total length is larger than the data\");for(s=n(t,r,o);s.length;)u=a(s),h.push(u.data),s=u.remainder;return{data:h,remainder:t.slice(o)}}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.RLP=e.utils=e.decode=e.encode=void 0,e.encode=r,e.decode=s;const u=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function h(t){let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=u[t[r]];return e}function c(t){const e=Number.parseInt(t,16);if(Number.isNaN(e))throw new Error(\"Invalid byte sequence\");return e}function f(t){if(\"string\"!=typeof t)throw new TypeError(\"hexToBytes: expected string, got \"+typeof t);if(t.length%2)throw new Error(\"hexToBytes: received invalid unpadded hex\");const e=new Uint8Array(t.length/2);for(let r=0;r\u003Ce.length;r++){const n=2*r;e[r]=c(t.slice(n,n+2))}return e}function l(...t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}function d(t){return(new TextEncoder).encode(t)}function p(t){if(t\u003C0)throw new Error(\"Invalid integer as argument, must be unsigned!\");const e=t.toString(16);return e.length%2?`0${e}`:e}function m(t){return t.length>=2&&\"0\"===t[0]&&\"x\"===t[1]}function g(t){if(t instanceof Uint8Array)return t;if(\"string\"==typeof t)return m(t)?f((e=\"string\"!=typeof(r=t)?r:m(r)?r.slice(2):r).length%2?`0${e}`:e):d(t);var e,r;if(\"number\"==typeof t||\"bigint\"==typeof t)return t?f(p(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw new Error(\"toBytes: received unsupported type \"+typeof t)}e.utils={bytesToHex:h,concatBytes:l,hexToBytes:f,utf8ToBytes:d},e.RLP={encode:r,decode:s}},68872:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.decodeSingle=e.decode=e.encodePacked=e.encodeSingle=e.encode=void 0;const n=r(67827),i=r(39777),o=r(69472);e.encode=(t,e,r,n)=>{try{return(0,o.pack)({types:t,values:e,packed:r,tight:n})}catch(t){if(t instanceof i.ParserError)throw new i.ParserError(`Unable to encode value: ${t.message}`,t);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(t)}`,t)}};e.encodeSingle=(t,r)=>(0,e.encode)([t],[r]);e.encodePacked=(t,r,n)=>(0,e.encode)(t,r,!0,n);e.decode=(t,e)=>{const r=(0,n.createBytes)(e);try{return(0,o.unpack)(t,r)}catch(t){if(t instanceof i.ParserError)throw new i.ParserError(`Unable to decode value: ${t.message}`,t);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(t)}`,t)}};e.decodeSingle=(t,r)=>{const o=(0,e.decode)([t],r);return(0,n.assert)(1===o.length,new i.ParserError(\"Decoded value array has unexpected length.\")),o[0]}},39777:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ParserError=e.getErrorStack=e.getErrorMessage=void 0;const n=r(67827);e.getErrorMessage=t=>\"string\"==typeof t?t:t instanceof Error||(0,n.isObject)(t)&&(0,n.hasProperty)(t,\"message\")&&\"string\"==typeof t.message?t.message:\"Unknown error.\";e.getErrorStack=t=>{if(t instanceof Error)return t.stack};class i extends Error{constructor(t,r){super(t),this.name=\"ParserError\";const n=(0,e.getErrorStack)(r);n&&(this.stack=n)}}e.ParserError=i},40260:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(68872),e),i(r(39777),e),i(r(75858),e)},12378:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.iterate=void 0;const n=r(67827);e.iterate=function*(t,e=32){for(let r=0;r\u003Ct.length;r+=e){const i=t=>{(0,n.assert)(t>=0,\"Cannot skip a negative number of bytes.\"),(0,n.assert)(t%e==0,\"Length must be a multiple of the size.\"),r+=t},o=t.subarray(r);yield{skip:i,value:o}}return{skip:()=>{},value:new Uint8Array}}},69472:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.unpack=e.pack=e.isDynamicParser=e.getParser=voi҄��d 0;const n=r(67827),i=r(39777),o=r(12378),s=r(84206),a=r(92313);e.getParser=t=>{const e={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=e[t];if(r)return r;const n=Object.values(e).find((e=>e.isType(t)));if(n)return n;throw new i.ParserError(`The type \"${t}\" is not supported.`)};e.isDynamicParser=(t,e)=>{const{isDynamic:r}=t;return\"function\"==typeof r?r(e):r};e.pack=({types:t,values:r,packed:o=!1,tight:s=!1,arrayPacked:u=!1,byteArray:h=new Uint8Array})=>{(0,n.assert)(t.length===r.length,new i.ParserError(`The number of types (${t.length}) does not match the number of values (${r.length}).`));const{staticBuffer:c,dynamicBuffer:f,pointers:l}=t.reduce((({staticBuffer:t,dynamicBuffer:i,pointers:a},h,c)=>{const f=(0,e.getParser)(h),l=r[c];if(o||u||!(0,e.isDynamicParser)(f,h))return{staticBuffer:f.encode({buffer:t,value:l,type:h,packed:o,tight:s}),dynamicBuffer:i,pointers:a};return{staticBuffer:(0,n.concatBytes)([t,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:i,value:l,type:h,packed:o,tight:s}),pointers:[...a,{position:t.length,pointer:i.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!o&&!u||0===f.length,new i.ParserError(\"Invalid pack state.\"));const d=c.length,p=l.reduce(((t,{pointer:e,position:r})=>{const i=(0,a.padStart)((0,n.numberToBytes)(d+e));return(0,a.set)(t,i,r)}),c);return(0,n.concatBytes)([h,p,f])};e.unpack=(t,r)=>{const s=(0,o.iterate)(r);return t.map((t=>{const{value:{value:o,skip:a},done:u}=s.next();(0,n.assert)(!u,new i.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse \"${t}\".`));const h=(0,e.getParser)(t);if((0,e.isDynamicParser)(h,t)){const e=(0,n.bytesToNumber)(o.subarray(0,32)),i=r.subarray(e);return h.decode({type:t,value:i,skip:a})}return h.decode({type:t,value:o,skip:a})}))}},27683:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.address=e.getAddress=void 0;const n=r(67827),i=r(39777),o=r(92313);e.getAddress=t=>{const e=(0,n.createBytes)(t);return(0,n.assert)(e.length\u003C=20,new i.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${e.length} bytes.`)),(0,o.padStart)(e,20)},e.address={isDynamic:!1,isType:t=>\"address\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:i}){const s=(0,e.getAddress)(r);if(i)return(0,n.concatBytes)([t,s]);const a=(0,o.padStart)(s);return(0,n.concatBytes)([t,a])},decode:({value:t})=>(0,n.add0x)((0,n.bytesToHex)(t.slice(12,32)))}},37759:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.array=e.getTupleType=e.getArrayType=e.isArrayType=void 0;const n=r(67827),i=r(39777),o=r(69472),s=r(92313),a=r(92408),u=r(44409),h=/^(?\u003Ctype>.*)\\[(?\u003Clength>\\d*?)\\]$/u;e.isArrayType=t=>h.test(t);e.getArrayType=t=>{const e=t.match(h);return(0,n.assert)(e?.groups?.type,new i.ParserError(`Invalid array type. Expected an array type, but received \"${t}\".`)),[e.groups.type,e.groups.length?parseInt(e.groups.length,10):void 0]};e.getTupleType=(t,e)=>`(${new Array(e).fill(t).join(\",\")})`,e.array={isDynamic(t){const[r,n]=(0,e.getArrayType)(t);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:t=>(0,e.isArrayType)(t),getByteLength(t){(0,n.assert)((0,e.isArrayType)(t),new i.ParserError(`Expected an array type, but received \"${t}\".`));const[r,s]=(0,e.getArrayType)(t);return(0,o.isDynamicParser)(this,t)||void 0===s?32:u.tuple.getByteLength((0,e.getTupleType)(r,s))},encode({type:t,buffer:r,value:h,packed:c,tight:f}){const[l,d]=(0,e.getArrayType)(t);if((0,n.assert)(!c||!(0,e.isArrayType)(l),new i.ParserError(\"Cannot pack nested arrays.\")),c&&(0,o.isDynamicParser)((0,o.getParser)(l),l))return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:r,packed:c,arrayPacked:!0,tight:f});if(d)return(0,n.assert)(d===h.length,new i.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${h.length}.`)),u.tuple.encode({type:(0,e.getTupleType)(l,d),buffer:r,value:h,packed:a.fixedBytes.isType(l)&&f,tight:f});if(c)return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:r,packed:a.fixedBytes.isType(l)&&f,arrayPacked:!0,tight:f});const p=(0,s.padStart)((0,n.numberToBytes)(h.length));return(0,o.pack)({types:new Array(h.length).fill(l),values:h,byteArray:(0,n.concatBytes)([r,p]),packed:c,tight:f})},decode({type:t,value:r,...s}){const[a,h]=(0,e.getArrayType)(t);if(h){const t=u.tuple.decode({type:(0,e.getTupleType)(a,h),value:r,...s});return(0,n.assert)(t.length===h,new i.ParserError(`Array length does not match type length. Expected a length of ${h}, but received ${t.length}.`)),t}const c=(0,n.bytesToNumber)(r.subarray(0,32));return(0,o.unpack)(new Array(c).fill(a),r.subarray(32))}}},18457:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bool=e.getBooleanValue=void 0;const n=r(57169),i=r(67827),o=r(39777),s=r(1001),a=(0,n.coerce)((0,n.boolean)(),(0,n.union)([(0,n.literal)(\"true\"),(0,n.literal)(\"false\")]),(t=>\"true\"===t));e.getBooleanValue=t=>{try{return(0,n.create)(t,a)?BigInt(1):BigInt(0)}catch{throw new o.ParserError(`Invalid boolean value. Expected a boolean literal, or the string \"true\" or \"false\", but received \"${t}\".`)}},e.bool={isDynamic:!1,isType:t=>\"bool\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:n,tight:o}){const a=(0,e.getBooleanValue)(r);return n?(0,i.concatBytes)([t,(0,i.bigIntToBytes)(a)]):s.number.encode({type:\"uint256\",buffer:t,value:a,packed:n,tight:o})},decode:t=>s.number.decode({...t,type:\"uint256\"})===BigInt(1)}},37300:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bytes=void 0;const n=r(67827),i=r(92313);e.bytes={isDynamic:!0,isType:t=>\"bytes\"===t,getByteLength:()=>32,encode({buffer:t,value:e,packed:r}){const o=(0,n.createBytes)(e);if(r)return(0,n.concatBytes)([t,o]);const s=32*Math.ceil(o.byteLength/32);return(0,n.concatBytes)([t,(0,i.padStart)((0,n.numberToBytes)(o.byteLength)),(0,i.padEnd)(o,s)])},decode({value:t}){const e=t.subarray(0,32),r=(0,n.bytesToNumber)(e);return t.slice(32,32+r)}}},92408:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.fixedBytes=e.getByteLength=void 0;const n=r(67827),i=r(39777),o=r(92313),s=/^bytes([0-9]{1,2})$/u;e.getByteLength=t=>{const e=t.match(s)?.[1];(0,n.assert)(e,`Invalid byte length. Expected a number between 1 and 32, but received \"${t}\".`);const r=Number(e);return(0,n.assert)(r>0&&r\u003C=32,new i.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received \"${t}\".`)),r},e.fixedBytes={isDynamic:!1,isType:t=>s.test(t),getByteLength:()=>32,encode({type:t,buffer:r,value:s,packed:a}){const u=(0,e.getByteLength)(t),h=(0,n.createBytes)(s);return(0,n.assert)(h.length\u003C=u,new i.ParserError(`Expected a value of length ${u}, but received a value of length ${h.length}.`)),a?(0,n.concatBytes)([r,(0,o.padEnd)(h,u)]):(0,n.concatBytes)([r,(0,o.padEnd)(h)])},decode({type:t,value:r}){const n=(0,e.getByteLength)(t);return r.slice(0,n)}}},42345:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.fn=e.getFunction=void 0;const n=r(57169),i=r(67827),o=r(39777),s=r(92408),a=(0,n.coerce)((0,n.object)({address:i.StrictHexStruct,selector:i.StrictHexStruct}),(0,n.union)([i.StrictHexStruct,(0,n.instance)(Uint8Array)]),(t=>{const e=(0,i.createBytes)(t);return(0,i.assert)(24===e.length,new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${e.length} bytes.`)),{address:(0,i.bytesToHex)(e.subarray(0,20)),selector:(0,i.bytesToHex)(e.subarray(20,24))}}));e.getFunction=t=>{const e=(0,n.create)(t,a);return(0,i.concatBytes)([(0,i.hexToBytes)(e.address),(0,i.hexToBytes)(e.selector)])},e.fn={isDynamic:!1,isType:t=>\"function\"===t,getByteLength:()=>32,encode({buffer:t,value:r,packed:n,tight:i}){const o=(0,e.getFunction)(r);return s.fixedBytes.encode({type:\"bytes24\",buffer:t,value:o,packed:n,tight:i})},decode:({value:t})=>({address:(0,i.bytesToHex)(t.slice(0,20)),selector:(0,i.bytesToHex)(t.slice(20,24))})}},84206:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(27683),e),i(r(37759),e),i(r(18457),e),i(r(37300),e),i(r(92408),e),i(r(42345),e),i(r(1001),e),i(r(10052),e),i(r(85967),e),i(r(44409),e)},1001:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.number=e.getBigInt=e.assertNumberLength=e.getLength=e.isSigned=void 0;const n=r(67827),i=r(39777),o=r(92313),s=/^u?int(?\u003Clength>[0-9]*)?$/u;e.isSigned=t=>!t.startsWith(\"u\");e.getLength=t=>{if(\"int\"===t||\"uint\"===t)return 256;const e=t.match(s);(0,n.assert)(e?.groups?.length,new i.ParserError(`Invalid number type. Expected a number type, but received \"${t}\".`));const r=parseInt(e.groups.length,10);return(0,n.assert)(r>=8&&r\u003C=256,new i.ParserError(`Invalid number length. Expected a number between 8 and 256, but received \"${t}\".`)),(0,n.assert)(r%8==0,new i.ParserError(`Invalid number length. Expected a multiple of 8, but received \"${t}\".`)),r};e.assertNumberLength=(t,r)=>{const o=(0,e.getLength)(r),s=BigInt(2)**BigInt(o-((0,e.isSigned)(r)?1:0))-BigInt(1);(0,e.isSigned)(r)?(0,n.assert)(t>=-(s+BigInt(1))&&t\u003C=s,new i.ParserError(`Number \"${t}\" is out of range for type \"${r}\".`)):(0,n.assert)(t\u003C=s,new i.ParserError(`Number \"${t}\" is out of range for type \"${r}\".`))};e.getBigInt=t=>{try{return(0,n.createBigInt)(t)}catch{throw new i.ParserError(`Invalid number. Expected a valid number value, but received \"${t}\".`)}},e.number={isDynamic:!1,isType:t=>s.test(t),getByteLength:()=>32,encode({type:t,buffer:r,value:i,packed:s}){const a=(0,e.getBigInt)(i);if((0,e.assertNumberLength)(a,t),(0,e.isSigned)(t)){if(s){const i=(0,e.getLength)(t)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const i=(0,e.getLength)(t)/8;return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a),i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(a))])},decode({type:t,value:r}){const i=r.subarray(0,32);if((0,e.isSigned)(t)){const r=(0,n.bytesToSignedBigInt)(i);return(0,e.assertNumberLength)(r,t),r}const o=(0,n.bytesToBigInt)(i);return(0,e.assertNumberLength)(o,t),o}}},10052:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},85967:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.string=void 0;const n=r(67827),i=r(37300);e.string={isDynamic:!0,isType:t=>\"string\"===t,getByteLength:()=>32,encode:({buffer:t,value:e,packed:r,tight:o})=>i.bytes.encode({type:\"bytes\",buffer:t,value:(0,n.stringToBytes)(e),packed:r,tight:o}),decode:t=>(0,n.bytesToString)(i.bytes.decode(t))}},44409:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.tuple=e.getTupleElements=void 0;const n=r(67827),i=r(39777),o=r(69472),s=/^\\((.+)\\)$/u;e.getTupleElements=t=>{(0,n.assert)(t.startsWith(\"(\")&&t.endsWith(\")\"),new i.ParserError(`Invalid tuple type. Expected tuple type, but received \"${t}\".`));const e=[];let r=\"\",o=0;for(let n=1;n\u003Ct.length-1;n++){const i=t[n];\",\"===i&&0===o?(e.push(r.trim()),r=\"\"):(r+=i,\"(\"===i?o+=1:\")\"===i&&(o-=1))}return r.trim()&&e.push(r.trim()),e},e.tuple={isDynamic:t=>(0,e.getTupleElements)(t).some((t=>{const e=(0,o.getParser)(t);return(0,o.isDynamicParser)(e,t)})),isType:t=>(t=>s.test(t))(t),getByteLength(t){if((0,o.isDynamicParser)(this,t))return 32;return(0,e.getTupleElements)(t).reduce(((t,e)=>t+(0,o.getParser)(e).getByteLength(e)),0)},encode({type:t,buffer:r,value:n,packed:i,tight:s}){const a=(0,e.getTupleElements)(t);return(0,o.pack)({types:a,values:n,byteArray:r,packed:i,tight:s})},decode({type:t,value:r,skip:n}){const i=(0,e.getTupleElements)(t);return n(this.getByteLength(t)-32),(0,o.unpack)(i,r)}}},54163:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},75858:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(54163),e)},21348:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.padEnd=e.padStart=e.set=void 0;const n=r(67827);e.set=(t,e,r)=>(0,n.concatBytes)([t.subarray(0,r),e,t.subarray(r+e.length)]);e.padStart=(t,e=32)=>{const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([r,t])};e.padEnd=(t,e=32)=>{const r=new Uint8Array(Math.max(e-t.length,0)).fill(0);return(0,n.concatBytes)([t,r])}},92313:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(21348),e)},92517:function(t,e,r){\"use strict\";var n=r(48834).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,\"default\",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)\"default\"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,\"__esModule\",{value:!0}),e.getEncryptionPublicKey=e.decryptSafely=e.decrypt=e.encryptSafely=e.encrypt=void 0;const a=s(r(10717)),u=s(r(251)),h=r(65491);function c({publicKey:t,data:e,version:r}){if((0,h.isNullish)(t))throw new Error(\"Missing publicKey parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing version parameter\");if(\"x25519-xsalsa20-poly1305\"===r){if(\"string\"!=typeof e)throw new Error(\"Message data must be given as a string\");const r=a.box.keyPair();let n;try{n=u.decodeBase64(t)}catch(t){throw new Error(\"Bad public key\")}const i=u.decodeUTF8(e),o=a.randomBytes(a.box.nonceLength),s=a.box(i,o,n,r.secretKey);return{version:\"x25519-xsalsa20-poly1305\",nonce:u.encodeBase64(o),ephemPublicKey:u.encodeBase64(r.publicKey),ciphertext:u.encodeBase64(s)}}throw new Error(\"Encryption type/version not supported\")}function f({encryptedData:t,privateKey:e}){if((0,h.isNullish)(t))throw new Error(\"Missing encryptedData parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing privateKey parameter\");if(\"x25519-xsalsa20-poly1305\"===t.version){const r=l(e),n=a.box.keyPair.fromSecretKey(r).secretKey,i=u.decodeBase64(t.nonce),o=u.decodeBase64(t.ciphertext),s=u.decodeBase64(t.ephemPublicKey),h=a.box.open(o,i,s,n);try{if(!h)throw new Error;const t=u.encodeUTF8(h);if(!t)throw new Error;return t}catch(t){if(t&&\"string\"==typeof t.message&&t.message.length)throw new Error(`Decryption failed: ${t.message}`);throw new Error(\"Decryption failed.\")}}throw new Error(\"Encryption type/version not supported.\")}function l(t){const e=n.from(t,\"hex\").toString(\"base64\");return u.decodeBase64(e)}e.encrypt=c,e.encryptSafely=function({publicKey:t,data:e,version:r}){if((0,h.isNullish)(t))throw new Error(\"Missing publicKey parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing version parameter\");if(\"object\"==typeof e&&e&&\"toJSON\"in e)throw new Error(\"Cannot encrypt with toJSON property.  Please remove toJSON property\");const i={data:e,padding:\"\"},o=n.byteLength(JSON.stringify(i),\"utf-8\")%2048;let s=0;return o>0&&(s=2048-o-16),i.padding=\"0\".repeat(s),c({publicKey:t,data:JSON.stringify(i),version:r})},e.decrypt=f,e.decryptSafely=function({encryptedData:t,privateKey:e}){if((0,h.isNullish)(t))throw new Error(\"Missing encryptedData parameter\");if((0,h.isNullish)(e))throw new Error(\"Missing privateKey parameter\");return JSON.parse(f({encryptedData:t,privateKey:e})).data},e.getEncryptionPublicKey=function(t){const e=l(t),r=a.box.keyPair.fromSecretKey(e).publicKey;return u.encodeBase64(r)}},50539:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalize=e.concatSig=void 0,i(r(91695),e),i(r(5190),e),i(r(92517),e);var o=r(65491);Object.defineProperty(e,\"concatSig\",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(e,\"normalize\",{enumerable:!0,get:function(){return o.normalize}})},91695:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.extractPublicKey=e.recoverPersonalSignature=e.personalSign=void 0;const n=r(59303),i=r(65491);function o(t,e){const r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(t));return(0,i.recoverPublicKey)(r,e)}e.personalSign=function({privateKey:t,data:e}){if((0,i.isNullish)(e))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(t))throw new Error(\"Missing privateKey parameter\");const r=(0,i.legacyToBuffer)(e),o=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(o,t);return(0,i.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},e.recoverPersonalSignature=function({data:t,signature:e}){if((0,i.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(e))throw new Error(\"Missing signature parameter\");const r=o(t,e),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},e.extractPublicKey=function({data:t,signature:e}){if((0,i.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,i.isNullish)(e))throw new Error(\"Missing signature parameter\");return`0x${o(t,e).toString(\"hex\")}`}},5190:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.recoverTypedSignature=e.signTypedData=e.typedSignatureHash=e.TypedDataUtils=e.TYPED_MESSAGE_SCHEMA=e.SignTypedDataVersion=void 0;const n=r(59303),i=r(40260),o=r(84206),s=r(92313),a=r(17487),u=r(1115),h=r(65491);var c;function f(t,e){if(!Object.keys(c).includes(t))throw new Error(`Invalid version: '${t}'`);if(e&&!e.includes(t))throw new Error(`SignTypedDataVersion not allowed: '${t}'. Allowed versions are: ${e.join(\", \")}`)}function l(t,e){(0,a.assert)(null!==e,`Unable to encode value: Invalid number. Expected a valid number value, but received \"${e}\".`);const r=BigInt(e),n=(0,o.getLength)(t),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-i&&r\u003C=i,`Unable to encode value: Number \"${e}\" is out of range for type \"${t}\".`),r}function d(t){let e=BigInt(0);for(let r=0;r\u003Ct.length;r++){const n=BigInt(t.charCodeAt(r)-48);e*=BigInt(10),e+=n>=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(e),20)}function p(t,e,r,o,h){if(f(h,[c.V3,c.V4]),void 0!==t[r])return[\"bytes32\",h===c.V4&&null==o?\"0x0000000000000000000000000000000000000000000000000000000000000000\":(0,n.arrToBufArr)((0,u.keccak256)(m(r,o,t,h)))];if(\"function\"===r)throw new Error('Unsupported or invalid type: \"function\"');if(void 0===o)throw new Error(`missing value for field ${e} of type ${r}`);if(\"address\"===r){if(\"number\"==typeof o)return[\"address\",(0,s.padStart)((0,a.numberToBytes)(o),20)];if((0,a.isStrictHexString)(o))return[\"address\",(0,a.add0x)(o)];if(\"string\"==typeof o)return[\"address\",d(o).subarray(0,20)]}if(\"bool\"===r)return[\"bool\",Boolean(o)];if(\"bytes\"===r)return\"number\"==typeof o?o=(0,a.numberToBytes)(o):(0,a.isStrictHexString)(o)||\"0x\"===o?o=(0,a.hexToBytes)(o):\"string\"==typeof o&&(o=(0,a.stringToBytes)(o)),[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.startsWith(\"bytes\")&&\"bytes\"!==r&&!r.includes(\"[\"))return\"number\"==typeof o?o\u003C0?[\"bytes32\",new Uint8Array(32)]:[\"bytes32\",(0,a.bigIntToBytes)(BigInt(o))]:(0,a.isStrictHexString)(o)?[\"bytes32\",(0,a.hexToBytes)(o)]:[\"bytes32\",o];if(r.startsWith(\"int\")&&!r.includes(\"[\")){const t=l(r,o);return t>=BigInt(0)?[\"uint256\",t]:[\"int256\",t]}if(\"string\"===r)return o=\"number\"==typeof o?(0,a.numberToBytes)(o):(0,a.stringToBytes)(null!=o?o:\"\"),[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)(o))];if(r.endsWith(\"]\")){if(h===c.V3)throw new Error(\"Arrays are unimplemented in encodeData; use V4 extension\");const s=r.slice(0,r.lastIndexOf(\"[\")),a=o.map((r=>p(t,e,s,r,h)));return[\"bytes32\",(0,n.arrToBufArr)((0,u.keccak256)((0,i.encode)(a.map((([t])=>t)),a.map((([,t])=>t)))))]}return[r,o]}function m(t,e,r,o){f(o,[c.V3,c.V4]);const s=[\"bytes32\"],a=[v(t,r)];for(const n of r[t]){if(o===c.V3&&void 0===e[n.name])continue;const[t,i]=p(r,n.name,n.type,e[n.name],o);s.push(t),a.push(i)}return(0,n.arrToBufArr)((0,i.encode)(s,a))}function g(t,e){let r=\"\";const n=y(t,e);n.delete(t);const i=[t,...Array.from(n).sort()];for(const t of i){if(!e[t])throw new Error(`No type definition specified: ${t}`);r+=`${t}(${e[t].map((({name:t,type:e})=>`${e} ${t}`)).join(\",\")})`}return r}function y(t,e,r=new Set){if(\"string\"!=typeof t)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(t)}`);const n=t.match(/^\\w*/u);if([t]=n,r.has(t)||void 0===e[t])return r;r.add(t);for(const n of e[t])y(n.type,e,r);return r}function b(t,e,r,i){f(i,[c.V3,c.V4]);const o=m(t,e,r,i),s=(0,u.keccak256)(o);return(0,n.arrToBufArr)(s)}function v(t,e){const r=(0,a.stringToBytes)(g(t,e));return(0,n.arrToBufArr)((0,u.keccak256)(r))}function w(t){const r={};for(const n in e.TYPED_MESSAGE_SCHEMA.properties)t[n]&&(r[n]=t[n]);return\"types\"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function M(t,e){f(e,[c.V3,c.V4]);const r=w(t),{domain:n}=r;return b(\"EIP712Domain\",n,{EIP712Domain:r.types.EIP712Domain},e)}function _(t,e){if((0,o.isArrayType)(t)&&Array.isArray(e)){const[r]=(0,o.getArrayType)(t);return e.map((t=>_(r,t)))}if(\"address\"===t){if(\"number\"==typeof e)return(0,s.padStart)((0,a.numberToBytes)(e),20);if((0,a.isStrictHexString)(e))return(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,20),20);if(e instanceof Uint8Array)return(0,s.padStart)(e.subarray(0,20),20)}if(\"bool\"===t)return Boolean(e);if(t.startsWith(\"bytes\")&&\"bytes\"!==t){const r=(0,o.getByteLength)(t);if(\"number\"==typeof e)return e\u003C0?new Uint8Array:(0,a.numberToBytes)(e).subarray(0,r);if((0,a.isStrictHexString)(e))return(0,a.hexToBytes)(e).subarray(0,r);if(e instanceof Uint8Array)return e.subarray(0,r)}if(t.startsWith(\"uint\")&&\"number\"==typeof e)return Math.abs(e);if(t.startsWith(\"int\")&&\"number\"==typeof e){const r=(0,o.getLength)(t);return BigInt.asIntN(r,BigInt(e))}return e}function E(t,e){return e.map((e=>{if(\"string\"==typeof e||\"number\"==typeof e||\"bigint\"==typeof e){const r=l(t,e);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,o.getLength)(t),i=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(i,32)}return e}))}function A(t){const e=new Error(\"Expect argument to be non-empty array\");if(\"object\"!=typeof t||!(\"length\"in t)||!t.length)throw e;const r=t.map((({name:t,type:e,value:r})=>{if(\"address[]\"===e)return{name:t,type:\"bytes32[]\",value:(n=r,n.map((t=>\"number\"==typeof t?(0,s.padStart)((0,a.numberToBytes)(t),32):(0,a.isStrictHexString)(t)?(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,32),32):t instanceof Uint8Array?(0,s.padStart)(t.subarray(0,32),32):t)))};var n;if(e.startsWith(\"int\")&&(0,o.isArrayType)(e)){const[n,i]=(0,o.getArrayType)(e);return{name:t,type:`bytes32[${null!=i?i:\"\"}]`,value:E(n,r)}}return{name:t,type:e,value:_(e,r)}})),c=r.map((t=>\"bytes\"!==t.type?t.value:(0,h.legacyToBuffer)(t.value))),f=r.map((t=>{if(\"function\"===t.type)throw new Error('Unsupported or invalid type: \"function\"');return t.type})),l=t.map((t=>{if(!t.name)throw e;return`${t.type} ${t.name}`}));return(0,n.arrToBufArr)((0,u.keccak256)((0,i.encodePacked)([\"bytes32\",\"bytes32\"],[(0,u.keccak256)((0,i.encodePacked)([\"string[]\"],[l],!0)),(0,u.keccak256)((0,i.encodePacked)(f,c,!0))])))}!function(t){t.V1=\"V1\",t.V3=\"V3\",t.V4=\"V4\"}(c=e.SignTypedDataVersion||(e.SignTypedDataVersion={})),e.TYPED_MESSAGE_SCHEMA={type:\"object\",properties:{types:{type:\"object\",additionalProperties:{type:\"array\",items:{type:\"object\",properties:{name:{type:\"string\"},type:{type:\"string\"}},required:[\"name\",\"type\"]}}},primaryType:{type:\"string\"},domain:{type:\"object\"},message:{type:\"object\"}},required:[\"types\",\"primaryType\",\"domain\",\"message\"]},e.TypedDataUtils={encodeData:m,encodeType:g,findTypeDependencies:y,hashStruct:b,hashType:v,sanitizeData:w,eip712Hash:function(t,e){f(e,[c.V3,c.V4]);const r=w(t),i=[(0,a.hexToBytes)(\"1901\")];return i.push(M(t,e)),\"EIP712Domain\"!==r.primaryType&&i.push(b(r.primaryType,r.message,r.types,e)),(0,n.arrToBufArr)((0,u.keccak256)((0,a.concatBytes)(i)))},eip712DomainHash:M},e.typedSignatureHash=function(t){const e=A(t);return(0,a.bytesToHex)(e)},e.signTypedData=function({privateKey:t,data:r,version:i}){if(f(i),(0,h.isNullish)(r))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(t))throw new Error(\"Missing private key parameter\");const o=i===c.V1?A(r):e.TypedDataUtils.eip712Hash(r,i),s=(0,n.ecsign)(o,t);return(0,h.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},e.recoverTypedSignature=function({data:t,signature:r,version:i}){if(f(i),(0,h.isNullish)(t))throw new Error(\"Missing data parameter\");if((0,h.isNullish)(r))throw new Error(\"Missing signature parameter\");const o=i===c.V1?A(t):e.TypedDataUtils.eip712Hash(t,i),s=(0,h.recoverPublicKey)(o,r),u=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(u)}},65491:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalize=e.recoverPublicKey=e.concatSig=e.legacyToBuffer=e.isNullish=e.padWithZeroes=void 0;const i=r(59303),o=r(17487);function s(t,e){if(\"\"!==t&&!/^[a-f0-9]+$/iu.test(t))throw new Error(`Expected an unprefixed hex string. Received: ${t}`);if(e\u003C0)throw new Error(`Expected a non-negative integer target length. Received: ${e}`);return String.prototype.padStart.call(t,e,\"0\")}function a(t){return null==t}e.padWithZeroes=s,e.isNullish=a,e.legacyToBuffer=function(t){return\"string\"!=typeof t||(0,i.isHexString)(t)?(0,i.toBuffer)(t):n.from(t)},e.concatSig=function(t,e,r){const n=(0,i.fromSigned)(e),a=(0,i.fromSigned)(r),u=(0,i.bufferToInt)(t),h=s((0,i.toUnsigned)(n).toString(\"hex\"),64),c=s((0,i.toUnsigned)(a).toString(\"hex\"),64),f=(0,o.remove0x)((0,o.numberToHex)(u));return(0,o.add0x)(h.concat(c,f))},e.recoverPublicKey=function(t,e){const r=(0,i.fromRpcSig)(e);return(0,i.ecrecover)(t,r.v,r.r,r.s)},e.normalize=function(t){if(!a(t)){if(\"number\"==typeof t){if(t\u003C0)return\"0x\";const e=(0,o.numberToBytes)(t);t=(0,o.bytesToHex)(e)}if(\"string\"!=typeof t){let e=\"eth-sig-util.normalize() requires hex string or integer input.\";throw e+=` received ${typeof t}: ${t}`,new Error(e)}return(0,o.add0x)(t.toLowerCase())}}},32660:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(40756),h=r(68413),c=r(36243),f=r(54403),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce\u003Cl)throw new Error(\"nonce must be greater than zero\");if(this.balance\u003Cl)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t\u003Cr.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRaw]�
�Bytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},6175:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(32660),o=r(40756);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t\u003C=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},25778:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length\u003C2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},40756:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(36243),o=r(54403);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length\u003Cr?(t.copy(i),i):t.slice(0,r):t.length\u003Cr?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t\u003CBigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length\u003C=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n\u003Ct.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},68413:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},12921:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n\u003Ct.length;r+=1,n+=2)e[r]=t[n]\u003C\u003C4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r\u003C\u003C5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e\u003Ct.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]\u003C2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},36243:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(54403);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},59303:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(68413),e),i(r(80945),e),i(r(32660),e),i(r(6175),e),i(r(62334),e),i(r(96413),e),i(r(40756),e),i(r(5263),e),i(r(12921),e),i(r(25778),e);var o=r(54403);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(95594),e),i(r(26698),e)},54403:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r\u003Cn;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r\u003Ct.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length\u003C2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i\u003Ct.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},95594:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},26698:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},96413:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(40756),a=r(68413),u=r(36243);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i\u003C27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},5263:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(40756),i=r(54403);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},80945:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},62334:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(6175),o=r(40756),s=r(5263);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},45887:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getHash=s,e.createCurve=function(t,e){const r=e=>(0,o.weierstrass)({...t,...s(e)});return Object.freeze({...r(e),create:r})};const n=r(97493),i=r(96013),o=r(57851);function s(t){return{hash:t,hmac:(e,...r)=>(0,n.hmac)(t,e,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}},41465:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wNAF=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t\u003Cr;t++){a=s,o.push(a);for(let t=1;t\u003Ci;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:a,windowSize:u}=n(e);let h=t.ZERO,c=t.BASE;const f=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let t=0;t\u003Ca;t++){const e=t*u;let n=Number(o&f);o>>=d,n>u&&(n-=l,o+=s);const a=e,p=e+Math.abs(n)-1,m=t%2!=0,g=n\u003C0;0===n?c=c.add(r(m,i[a])):h=h.add(r(g,i[p]))}return{p:h,f:c}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}},e.validateBasic=function(t){return(0,n.validateField)(t.Fp),(0,i.validateObject)(t,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...(0,n.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})};const n=r(49530),i=r(4323),o=BigInt(0),s=BigInt(1)},91322:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.expand_message_xmd=h,e.expand_message_xof=c,e.hash_to_field=f,e.isogenyMap=function(t,e){const r=e.map((t=>Array.from(t).reverse()));return(e,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>t.add(t.mul(r,e),n)))));return e=t.div(i,o),n=t.mul(n,t.div(s,a)),{x:e,y:n}}},e.createHasher=function(t,e,r){if(\"function\"!=typeof e)throw new Error(\"mapToCurve() must be defined\");return{hashToCurve(n,i){const o=f(n,2,{...r,DST:r.DST,...i}),s=t.fromAffine(e(o[0])),a=t.fromAffine(e(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=f(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s},mapToCurve(r){if(!Array.isArray(r))throw new Error(\"mapToCurve: expected array of bigints\");for(const t of r)if(\"bigint\"!=typeof t)throw new Error(`mapToCurve: expected array of bigints, got ${t} in array`);const n=t.fromAffine(e(r)).clearCofactor();return n.assertValidity(),n}}};const n=r(49530),i=r(4323),o=i.bytesToNumberBE;function s(t,e){if(t\u003C0||t>=1\u003C\u003C8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function a(t,e){const r=new Uint8Array(t.length);for(let n=0;n\u003Ct.length;n++)r[n]=t[n]^e[n];return r}function u(t){if(!Number.isSafeInteger(t))throw new Error(\"number expected\")}function h(t,e,r,n){(0,i.abytes)(t),(0,i.abytes)(e),u(r),e.length>255&&(e=n((0,i.concatBytes)((0,i.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"),e)));const{outputLen:o,blockLen:h}=n,c=Math.ceil(r/o);if(c>255)throw new Error(\"Invalid xmd length\");const f=(0,i.concatBytes)(e,s(e.length,1)),l=s(0,h),d=s(r,2),p=new Array(c),m=n((0,i.concatBytes)(l,t,d,s(0,1),f));p[0]=n((0,i.concatBytes)(m,s(1,1),f));for(let t=1;t\u003C=c;t++){const e=[a(m,p[t-1]),s(t+1,1),f];p[t]=n((0,i.concatBytes)(...e))}return(0,i.concatBytes)(...p).slice(0,r)}function c(t,e,r,n,o){if((0,i.abytes)(t),(0,i.abytes)(e),u(r),e.length>255){const t=Math.ceil(2*n/8);e=o.create({dkLen:t}).update((0,i.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(e).digest()}if(r>65535||e.length>255)throw new Error(\"expand_message_xof: invalid lenInBytes\");return o.create({dkLen:r}).update(t).update(s(r,2)).update(e).update(s(e.length,1)).digest()}function f(t,e,r){(0,i.validateObject)(r,{DST:\"stringOrUint8Array\",p:\"bigint\",m:\"isSafeInteger\",k:\"isSafeInteger\",hash:\"hash\"});const{p:s,k:a,m:f,hash:l,expand:d,DST:p}=r;(0,i.abytes)(t),u(e);const m=\"string\"==typeof p?(0,i.utf8ToBytes)(p):p,g=s.toString(2).length,y=Math.ceil((g+a)/8),b=e*f*y;let v;if(\"xmd\"===d)v=h(t,m,b,l);else if(\"xof\"===d)v=c(t,m,b,a,l);else{if(\"_internal_pass\"!==d)throw new Error('expand must be \"xmd\" or \"xof\"');v=t}const w=new Array(e);for(let t=0;t\u003Ce;t++){const e=new Array(f);for(let r=0;r\u003Cf;r++){const i=y*(r+t*f),a=v.subarray(i,i+y);e[r]=(0,n.mod)(o(a),s)}w[t]=e}return w}},49530:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.isNegativeLE=void 0,e.mod=f,e.pow=l,e.pow2=function(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n},e.invert=d,e.tonelliShanks=p,e.FpSqrt=m,e.validateField=function(t){const e=g.reduce(((t,e)=>(t[e]=\"function\",t)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});return(0,n.validateObject)(t,e)},e.FpPow=y,e.FpInvertBatch=b,e.FpDiv=function(t,e,r){return t.mul(e,\"bigint\"==typeof r?d(r,t.ORDER):t.inv(r))},e.FpIsSquare=function(t){const e=(t.ORDER-o)/s;return r=>{const n=t.pow(r,e);return t.eql(n,t.ZERO)||t.eql(n,t.ONE)}},e.nLength=v,e.Field=function(t,e,r=!1,s={}){if(t\u003C=i)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:a,nByteLength:u}=v(t,e);if(u>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const h=m(t),c=Object.freeze({ORDER:t,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:e=>f(e,t),isValid:e=>{if(\"bigint\"!=typeof e)throw new Error(\"Invalid field element: expected bigint, got \"+typeof e);return i\u003C=e&&e\u003Ct},is0:t=>t===i,isOdd:t=>(t&o)===o,neg:e=>f(-e,t),eql:(t,e)=>t===e,sqr:e=>f(e*e,t),add:(e,r)=>f(e+r,t),sub:(e,r)=>f(e-r,t),mul:(e,r)=>f(e*r,t),pow:(t,e)=>y(c,t,e),div:(e,r)=>f(e*d(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>d(e,t),sqrt:s.sqrt||(t=>h(c,t)),invertBatch:t=>b(c,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?(0,n.numberToBytesLE)(t,u):(0,n.numberToBytesBE)(t,u),fromBytes:t=>{if(t.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${t.length}`);return r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t)}});return Object.freeze(c)},e.FpSqrtOdd=function(t,e){if(!t.isOdd)throw new Error(\"Field doesn't have isOdd\");const r=t.sqrt(e);return t.isOdd(r)?r:t.neg(r)},e.FpSqrtEven=function(t,e){if(!t.isOdd)throw new Error(\"Field doesn't have isOdd\");const r=t.sqrt(e);return t.isOdd(r)?t.neg(r):r},e.hashToPrivateScalar=function(t,e,r=!1){const i=(t=(0,n.ensureBytes)(\"privateHash\",t)).length,s=v(e).nByteLength+8;if(s\u003C24||i\u003Cs||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(t):(0,n.bytesToNumberBE)(t),e-o)+o},e.getFieldBytesLength=w,e.getMinHashLength=M,e.mapHashToField=function(t,e,r=!1){const i=t.length,s=w(e),a=M(e);if(i\u003C16||i\u003Ca||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(t):(0,n.bytesToNumberLE)(t),e-o)+o;return r?(0,n.numberToBytesLE)(u,s):(0,n.numberToBytesBE)(u,s)};const n=r(4323),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),h=BigInt(5),c=BigInt(8);BigInt(9),BigInt(16);function f(t,e){const r=t%e;return r>=i?r:e+r}function l(t,e,r){if(r\u003C=i||e\u003Ci)throw new Error(\"Expected power/modulo > 0\");if(r===o)return i;let n=o;for(;e>i;)e&o&&(n=n*t%r),t=t*t%r,e>>=o;return n}function d(t,e){if(t===i||e\u003C=i)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=f(t,e),n=e,s=i,a=o,u=o,h=i;for(;r!==i;){const t=n/r,e=n%r,i=s-u*t,o=a-h*t;n=r,r=e,s=u,a=h,u=i,h=o}if(n!==o)throw new Error(\"invert: does not exist\");return f(s,e)}function p(t){const e=(t-o)/s;let r,n,a;for(r=t-o,n=0;r%s===i;r/=s,n++);for(a=s;a\u003Ct&&l(a,e,t)!==t-o;a++);if(1===n){const e=(t+o)/u;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const h=(r+o)/s;return function(t,i){if(t.pow(i,e)===t.neg(t.ONE))throw new Error(\"Cannot find square root\");let s=n,u=t.pow(t.mul(t.ONE,a),r),c=t.pow(i,h),f=t.pow(i,r);for(;!t.eql(f,t.ONE);){if(t.eql(f,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(f);e\u003Cs&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(u,o\u003C\u003CBigInt(s-e-1));u=t.sqr(r),c=t.mul(c,r),f=t.mul(f,u),s=e}return c}}function m(t){if(t%u===a){const e=(t+o)/u;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(t%c===h){const e=(t-h)/c;return function(t,r){const n=t.mul(r,s),i=t.pow(n,e),o=t.mul(r,i),a=t.mul(t.mul(o,s),i),u=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(u),r))throw new Error(\"Cannot find square root\");return u}}return p(t)}e.isNegativeLE=(t,e)=>(f(t,e)&o)===o;const g=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function y(t,e,r){if(r\u003Ci)throw new Error(\"Expected power > 0\");if(r===i)return t.ONE;if(r===o)return e;let n=t.ONE,s=e;for(;r>i;)r&o&&(n=t.mul(n,s)),s=t.sqr(s),r>>=o;return n}function b(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}function v(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(t){if(\"bigint\"!=typeof t)throw new Error(\"field order must be bigint\");const e=t.toString(2).length;return Math.ceil(e/8)}function M(t){const e=w(t);return e+Math.ceil(e/2)}},4323:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.bitMask=void 0,e.isBytes=o,e.abytes=s,e.bytesToHex=u,e.numberToHexUnpadded=h,e.hexToNumber=c,e.hexToBytes=d,e.bytesToNumberBE=function(t){return c(u(t))},e.bytesToNumberLE=function(t){return s(t),c(u(Uint8Array.from(t).reverse()))},e.numberToBytesBE=p,e.numberToBytesLE=function(t,e){return p(t,e).reverse()},e.numberToVarBytesBE=function(t){return d(h(t))},e.ensureBytes=function(t,e,r){let n;if(\"string\"==typeof e)try{n=d(e)}catch(r){throw new Error(`${t} must be valid hex string, got \"${e}\". Cause: ${r}`)}else{if(!o(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if(\"number\"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n},e.concatBytes=m,e.equalBytes=function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n\u003Ct.length;n++)r|=t[n]^e[n];return 0===r},e.utf8ToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))},e.bitLen=function(t){let e;for(e=0;t>r;t>>=n,e+=1);return e},e.bitGet=function(t,e){return t>>BigInt(e)&n},e.bitSet=function(t,e,i){return t|(i?n:r)\u003C\u003CBigInt(e)},e.createHmacDrbg=function(t,e,r){if(\"number\"!=typeof t||t\u003C2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof e||e\u003C2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=g(t),i=g(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),u=(t=g())=>{i=a(y([0]),t),n=a(),0!==t.length&&(i=a(y([1]),t),n=a())},h=()=>{if(o++>=1e3)throw new Error(\"drbg: tried 1000 values\");let t=0;const r=[];for(;t\u003Ce;){n=a();const e=n.slice();r.push(e),t+=n.length}return m(...r)};return(t,e)=>{let r;for(s(),u(t);!(r=e(h()));)u();return s���P�(),r}},e.validateObject=function(t,e,r={}){const n=(e,r,n)=>{const i=b[r];if(\"function\"!=typeof i)throw new Error(`Invalid validator \"${r}\", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t};const r=BigInt(0),n=BigInt(1),i=BigInt(2);function o(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function s(t){if(!o(t))throw new Error(\"Uint8Array expected\")}const a=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function u(t){s(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=a[t[r]];return e}function h(t){const e=t.toString(16);return 1&e.length?`0${e}`:e}function c(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);return BigInt(\"\"===t?\"0\":`0x${t}`)}const f={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function l(t){return t>=f._0&&t\u003C=f._9?t-f._0:t>=f._A&&t\u003C=f._F?t-(f._A-10):t>=f._a&&t\u003C=f._f?t-(f._a-10):void 0}function d(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=l(t.charCodeAt(i)),o=l(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n}function p(t,e){return d(t.toString(16).padStart(2*e,\"0\"))}function m(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];s(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}e.bitMask=t=>(i\u003C\u003CBigInt(t-1))-n;const g=t=>new Uint8Array(t),y=t=>Uint8Array.from(t);const b={bigint:t=>\"bigint\"==typeof t,function:t=>\"function\"==typeof t,boolean:t=>\"boolean\"==typeof t,string:t=>\"string\"==typeof t,stringOrUint8Array:t=>\"string\"==typeof t||o(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>\"function\"==typeof t&&Number.isSafeInteger(t.outputLen)}},57851:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=function(t){const r=function(t){const e=(0,n.validateBasic)(t);return o.validateObject(e,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...e})}(t),{Fp:a,n:u}=r,f=a.BYTES+1,l=2*a.BYTES+1;function d(t){return i.mod(t,u)}function m(t){return i.invert(t,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:y,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(t,e,r){const n=e.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([e.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(t){const e=t.length,r=t[0],n=t.subarray(1);if(e!==f||2!==r&&3!==r){if(e===l&&4===r){return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${f} compressed bytes or ${l} uncompressed bytes`)}{const t=o.bytesToNumberBE(n);if(!(h\u003C(i=t)&&i\u003Ca.ORDER))throw new Error(\"Point is not on curve\");const e=b(t);let s;try{s=a.sqrt(e)}catch(t){const e=t instanceof Error?\": \"+t.message:\"\";throw new Error(\"Point is not on curve\"+e)}return 1==(1&r)!==((s&c)===c)&&(s=a.neg(s)),{x:t,y:s}}var i}}),w=t=>o.bytesToHex(o.numberToBytesBE(t,r.nByteLength));function M(t){return t>u>>c}const _=(t,e,r)=>o.bytesToNumberBE(t.slice(e,r));class E{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const e=r.nByteLength;return t=(0,s.ensureBytes)(\"compactSignature\",t,2*e),new E(_(t,0,e),_(t,e,2*e))}static fromDER(t){const{r,s:n}=e.DER.toSig((0,s.ensureBytes)(\"DER\",t));return new E(r,n)}assertValidity(){if(!v(this.r))throw new Error(\"r must be 0 \u003C r \u003C CURVE.n\");if(!v(this.s))throw new Error(\"s must be 0 \u003C s \u003C CURVE.n\")}addRecoveryBit(t){return new E(this.r,this.s,t)}recoverPublicKey(t){const{r:e,s:n,recovery:i}=this,o=B((0,s.ensureBytes)(\"msgHash\",t));if(null==i||![0,1,2,3].includes(i))throw new Error(\"recovery id invalid\");const u=2===i||3===i?e+r.n:e;if(u>=a.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const h=0==(1&i)?\"02\":\"03\",c=g.fromHex(h+w(u)),f=m(u),l=d(-o*f),p=d(n*f),y=g.BASE.multiplyAndAddUnsafe(c,l,p);if(!y)throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return M(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(t){try{return y(t),!0}catch(t){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const t=i.getMinHashLength(r.n);return i.mapHashToField(r.randomBytes(t),r.n)},precompute:(t=8,e=g.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function S(t){const e=o.isBytes(t),r=\"string\"==typeof t,n=(e||r)&&t.length;return e?n===f||n===l:r?n===2*f||n===2*l:t instanceof g}const x=r.bits2int||function(t){const e=o.bytesToNumberBE(t),n=8*t.length-r.nBitLength;return n>0?e>>BigInt(n):e},B=r.bits2int_modN||function(t){return d(x(t))},T=o.bitMask(r.nBitLength);function I(t){if(\"bigint\"!=typeof t)throw new Error(\"bigint expected\");if(!(h\u003C=t&&t\u003CT))throw new Error(`bigint expected \u003C 2^${r.nBitLength}`);return o.numberToBytesBE(t,r.nByteLength)}function k(t,e,n=P){if([\"recovered\",\"canonical\"].some((t=>t in n)))throw new Error(\"sign() legacy options not supported\");const{hash:i,randomBytes:u}=r;let{lowS:f,prehash:l,extraEntropy:p}=n;null==f&&(f=!0),t=(0,s.ensureBytes)(\"msgHash\",t),l&&(t=(0,s.ensureBytes)(\"prehashed msgHash\",i(t)));const b=B(t),w=y(e),_=[I(w),I(b)];if(null!=p&&!1!==p){const t=!0===p?u(a.BYTES):p;_.push((0,s.ensureBytes)(\"extraEntropy\",t))}const A=o.concatBytes(..._),S=b;return{seed:A,k2sig:function(t){const e=x(t);if(!v(e))return;const r=m(e),n=g.BASE.multiply(e).toAffine(),i=d(n.x);if(i===h)return;const o=d(r*d(S+i*w));if(o===h)return;let s=(n.x===i?0:2)|Number(n.y&c),a=o;return f&&M(o)&&(a=function(t){return M(t)?d(-t):t}(o),s^=1),new E(i,a,s)}}}const P={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(t,e=!0){return g.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(S(t))throw new Error(\"first arg must be private key\");if(!S(e))throw new Error(\"second arg must be public key\");return g.fromHex(e).multiply(y(t)).toRawBytes(r)},sign:function(t,e,n=P){const{seed:i,k2sig:s}=k(t,e,n),a=r;return o.createHmacDrbg(a.hash.outputLen,a.nByteLength,a.hmac)(i,s)},verify:function(t,n,i,a=C){const u=t;if(n=(0,s.ensureBytes)(\"msgHash\",n),i=(0,s.ensureBytes)(\"publicKey\",i),\"strict\"in a)throw new Error(\"options.strict was renamed to lowS\");const{lowS:h,prehash:c}=a;let f,l;try{if(\"string\"==typeof u||o.isBytes(u))try{f=E.fromDER(u)}catch(t){if(!(t instanceof e.DER.Err))throw t;f=E.fromCompact(u)}else{if(\"object\"!=typeof u||\"bigint\"!=typeof u.r||\"bigint\"!=typeof u.s)throw new Error(\"PARSE\");{const{r:t,s:e}=u;f=new E(t,e)}}l=g.fromHex(i)}catch(t){if(\"PARSE\"===t.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(h&&f.hasHighS())return!1;c&&(n=r.hash(n));const{r:p,s:y}=f,b=B(n),v=m(y),w=d(b*v),M=d(p*v),_=g.BASE.multiplyAndAddUnsafe(l,w,M)?.toAffine();if(!_)return!1;return d(_.x)===p},ProjectivePoint:g,Signature:E,utils:A}},e.SWUFpSqrtRatio=m,e.mapToCurveSimpleSWU=function(t,e){if(i.validateField(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error(\"mapToCurveSimpleSWU: invalid opts\");const r=m(t,e.Z);if(!t.isOdd)throw new Error(\"Fp.isOdd is not implemented!\");return n=>{let i,o,s,a,u,h,c,f;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),a=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),a=t.mul(a,e.A),o=t.sqr(s),h=t.sqr(a),u=t.mul(h,e.A),o=t.add(o,u),o=t.mul(o,s),h=t.mul(h,a),u=t.mul(h,e.B),o=t.add(o,u),c=t.mul(i,s);const{isValid:l,value:d}=r(o,h);f=t.mul(i,n),f=t.mul(f,d),c=t.cmov(c,s,l),f=t.cmov(f,d,l);const p=t.isOdd(n)===t.isOdd(f);return f=t.cmov(t.neg(f),f,p),c=t.div(c,a),{x:c,y:f}}};const n=r(41465),i=r(49530),o=r(4323),s=r(4323);const{bytesToNumberBE:a,hexToBytes:u}=o;e.DER={Err:class extends Error{constructor(t=\"\"){super(t)}},_parseInt(t){const{Err:r}=e.DER;if(t.length\u003C2||2!==t[0])throw new r(\"Invalid signature integer tag\");const n=t[1],i=t.subarray(2,n+2);if(!n||i.length!==n)throw new r(\"Invalid signature integer: wrong length\");if(128&i[0])throw new r(\"Invalid signature integer: negative\");if(0===i[0]&&!(128&i[1]))throw new r(\"Invalid signature integer: unnecessary leading zero\");return{d:a(i),l:t.subarray(n+2)}},toSig(t){const{Err:r}=e.DER,n=\"string\"==typeof t?u(t):t;o.abytes(n);let i=n.length;if(i\u003C2||48!=n[0])throw new r(\"Invalid signature tag\");if(n[1]!==i-2)throw new r(\"Invalid signature: incorrect length\");const{d:s,l:a}=e.DER._parseInt(n.subarray(2)),{d:h,l:c}=e.DER._parseInt(a);if(c.length)throw new r(\"Invalid signature: left bytes after parsing\");return{r:s,s:h}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?\"00\"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(3),d=BigInt(4);function p(t){const e=function(t){const e=(0,n.validateBasic)(t);o.validateObject(e,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:i,a:s}=e;if(r){if(!i.eql(s,i.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...e})}(t),{Fp:r}=e,a=e.toBytes||((t,e,n)=>{const i=e.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),u=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function f(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),f(e.Gx)))throw new Error(\"bad generator point: equation left != right\");function d(t){return\"bigint\"==typeof t&&h\u003Ct&&t\u003Ce.n}function p(t){if(!d(t))throw new Error(\"Expected valid bigint: 0 \u003C bigint \u003C curve.n\")}function m(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:a,n:u}=e;if(r&&\"bigint\"!=typeof t){if(o.isBytes(t)&&(t=o.bytesToHex(t)),\"string\"!=typeof t||!r.includes(t.length))throw new Error(\"Invalid key\");t=t.padStart(2*n,\"0\")}let h;try{h=\"bigint\"==typeof t?t:o.bytesToNumberBE((0,s.ensureBytes)(\"private key\",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return a&&(h=i.mod(h,u)),p(h),h}const g=new Map;function y(t){if(!(t instanceof b))throw new Error(\"ProjectivePoint expected\")}class b{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error(\"x required\");if(null==e||!r.isValid(e))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error(\"invalid affine point\");if(t instanceof b)throw new Error(\"projective point not allowed\");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?b.ZERO:new b(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(b.fromAffine)}static fromHex(t){const e=b.fromAffine(u((0,s.ensureBytes)(\"pointHex\",t)));return e.assertValidity(),e}static fromPrivateKey(t){return b.BASE.multiply(m(t))}_setWindowSize(t){this._WINDOW_SIZE=t,g.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const i=r.sqr(n),o=f(t);if(!r.eql(i,o))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error(\"Field doesn't support isOdd\")}equals(t){y(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),h=r.eql(r.mul(n,a),r.mul(s,i));return u&&h}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,l),{px:o,py:s,pz:a}=this;let u=r.ZERO,h=r.ZERO,c=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),m=r.mul(o,s);return m=r.add(m,m),c=r.mul(o,a),c=r.add(c,c),u=r.mul(t,c),h=r.mul(i,p),h=r.add(u,h),u=r.sub(d,h),h=r.add(d,h),h=r.mul(u,h),u=r.mul(m,u),c=r.mul(i,c),p=r.mul(t,p),m=r.sub(f,p),m=r.mul(t,m),m=r.add(m,c),c=r.add(f,f),f=r.add(c,f),f=r.add(f,p),f=r.mul(f,m),h=r.add(h,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,m),u=r.sub(u,f),c=r.mul(p,d),c=r.add(c,c),c=r.add(c,c),new b(u,h,c)}add(t){y(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let h=r.ZERO,c=r.ZERO,f=r.ZERO;const d=e.a,p=r.mul(e.b,l);let m=r.mul(n,s),g=r.mul(i,a),v=r.mul(o,u),w=r.add(n,i),M=r.add(s,a);w=r.mul(w,M),M=r.add(m,g),w=r.sub(w,M),M=r.add(n,o);let _=r.add(s,u);return M=r.mul(M,_),_=r.add(m,v),M=r.sub(M,_),_=r.add(i,o),h=r.add(a,u),_=r.mul(_,h),h=r.add(g,v),_=r.sub(_,h),f=r.mul(d,M),h=r.mul(p,v),f=r.add(h,f),h=r.sub(g,f),f=r.add(g,f),c=r.mul(h,f),g=r.add(m,m),g=r.add(g,m),v=r.mul(d,v),M=r.mul(p,M),g=r.add(g,v),v=r.sub(m,v),v=r.mul(d,v),M=r.add(M,v),m=r.mul(g,M),c=r.add(c,m),m=r.mul(_,M),h=r.mul(w,h),h=r.sub(h,m),m=r.mul(w,g),f=r.mul(_,f),f=r.add(f,m),new b(h,c,f)}subtract(t){return this.add(t.negate())}is0(){return this.equals(b.ZERO)}wNAF(t){return w.wNAFCached(this,g,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(b.fromAffine)}))}multiplyUnsafe(t){const n=b.ZERO;if(t===h)return n;if(p(t),t===c)return this;const{endo:i}=e;if(!i)return w.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(t),f=n,l=n,d=this;for(;s>h||u>h;)s&c&&(f=f.add(d)),u&c&&(l=l.add(d)),d=d.double(),s>>=c,u>>=c;return o&&(f=f.negate()),a&&(l=l.negate()),l=new b(r.mul(l.px,i.beta),l.py,l.pz),f.add(l)}multiply(t){p(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:u}=s.splitScalar(o);let{p:h,f:c}=this.wNAF(e),{p:f,f:l}=this.wNAF(u);h=w.constTimeNegate(t,h),f=w.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=h.add(f),i=c.add(l)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=b.BASE,i=(t,e)=>e!==h&&e!==c&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error(\"invZ was invalid\");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===c)return!0;if(r)return r(b,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===c?this:r?r(b,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),a(b,this,t)}toHex(t=!0){return o.bytesToHex(this.toRawBytes(t))}}b.BASE=new b(e.Gx,e.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=e.nBitLength,w=(0,n.wNAF)(b,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:f,isWithinCurveOrder:d}}function m(t,e){const r=t.ORDER;let n=h;for(let t=r-c;t%f===h;t/=f)n+=c;const i=n,o=f\u003C\u003Ci-c-c,s=o*f,a=(r-c)/s,u=(a-c)/f,p=s-c,m=o,g=t.pow(e,a),y=t.pow(e,(a+c)/f);let b=(e,r)=>{let n=g,o=t.pow(r,p),s=t.sqr(o);s=t.mul(s,r);let a=t.mul(e,s);a=t.pow(a,u),a=t.mul(a,o),o=t.mul(a,r),s=t.mul(a,e);let h=t.mul(s,o);a=t.pow(h,m);let l=t.eql(a,t.ONE);o=t.mul(s,y),a=t.mul(h,n),s=t.cmov(o,s,l),h=t.cmov(a,h,l);for(let e=i;e>c;e--){let r=e-f;r=f\u003C\u003Cr-c;let i=t.pow(h,r);const a=t.eql(i,t.ONE);o=t.mul(s,n),n=t.mul(n,n),i=t.mul(h,n),s=t.cmov(o,s,a),h=t.cmov(i,h,a)}return{isValid:l,value:s}};if(t.ORDER%d===l){const r=(t.ORDER-l)/d,n=t.sqrt(t.neg(e));b=(e,i)=>{let o=t.sqr(i);const s=t.mul(e,i);o=t.mul(o,s);let a=t.pow(o,r);a=t.mul(a,s);const u=t.mul(a,n),h=t.mul(t.sqr(a),i),c=t.eql(h,e);return{isValid:c,value:t.cmov(u,a,c)}}}return b}},11613:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0,e.number=r,e.bool=n,e.isBytes=i,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},70126:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;const n=r(11613),i=r(96013);e.Chi=(t,e,r)=>t&e^~t&r;e.Maj=(t,e,r)=>t&e^t&r^e&r;class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.exists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n\u003Cs;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o\u003C=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t\u003Co;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(t),h=this.outputLen;if(h%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=h/4,f=this.get();if(c>f.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cc;t++)u.setUint32(4*t,f[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=o},19419:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},97493:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hmac=e.HMAC=void 0;const n=r(11613),i=r(96013);class o extends i.Hash{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(t);const r=(0,i.toBytes)(e);if(this.iHash=t.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let t=0;t\u003Cs.length;t++)s[t]^=54;this.iHash.update(s),this.oHash=t.create();for(let t=0;t\u003Cs.length;t++)s[t]^=106;this.oHash.update(s),s.fill(0)}update(t){return(0,n.exists)(this),this.iHash.update(t),this}digestInto(t){(0,n.exists)(this),(0,n.bytes)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;e.hmac=(t,e,r)=>new o(t,e).update(r).digest(),e.hmac.create=(t,e)=>new o(t,e)},77371:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=void 0;const n=r(70126),i=r(96013),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r\u003C16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t\u003C64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},96013:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const n=r(19419),i=r(11613);e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name};e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t\u003C\u003C32-e|t>>>e;e.rotl=(t,e)=>t\u003C\u003Ce|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t),e.byteSwap32=function(t){for(let r=0;r\u003Ct.length;r++)t[r]=(0,e.byteSwap)(t[r])};const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=o[t[r]];return e};const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t\u003C=s._9?t-s._0:t>=s._A&&t\u003C=s._F?t-(s._A-10):t>=s._a&&t\u003C=s._f?t-(s._a-10):void 0}e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n};function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o\u003Ct;o++){n(o);const t=Date.now()-i;t>=0&&t\u003Cr||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}},38358:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;const n=r(77371),i=r(96013),o=r(45887),s=r(91322),a=r(49530),u=r(4323),h=r(57851),c=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),f=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),l=BigInt(1),d=BigInt(2),p=(t,e)=>(t+e/d)/e;function m(t){const e=c,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),u=BigInt(44),h=BigInt(88),f=t*t*t%e,l=f*f*t%e,p=(0,a.pow2)(l,r,e)*l%e,m=(0,a.pow2)(p,r,e)*l%e,y=(0,a.pow2)(m,d,e)*f%e,b=(0,a.pow2)(y,i,e)*y%e,v=(0,a.pow2)(b,o,e)*b%e,w=(0,a.pow2)(v,u,e)*v%e,M=(0,a.pow2)(w,h,e)*w%e,_=(0,a.pow2)(M,u,e)*v%e,E=(0,a.pow2)(_,r,e)*l%e,A=(0,a.pow2)(E,s,e)*b%e,S=(0,a.pow2)(A,n,e)*f%e,x=(0,a.pow2)(S,d,e);if(!g.eql(g.sqr(x),t))throw new Error(\"Cannot find square root\");return x}const g=(0,a.Field)(c,void 0,void 0,{sqrt:m});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:g,n:f,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:t=>{const e=f,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-l*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),i=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),o=r,s=BigInt(\"0x100000000000000000000000000000000\"),u=p(o*t,e),h=p(-n*t,e);let c=(0,a.mod)(t-u*r-h*i,e),d=(0,a.mod)(-u*n-h*o,e);const m=c>s,g=d>s;if(m&&(c=e-c),g&&(d=e-d),c>s||d>s)throw new Error(\"splitScalar: Endomorphism failed, k=\"+t);return{k1neg:m,k1:c,k2neg:g,k2:d}}}},n.sha256);const y=BigInt(0),b=t=>\"bigint\"==typeof t&&y\u003Ct&&t\u003Cc,v=t=>\"bigint\"==typeof t&&y\u003Ct&&t\u003Cf,w={};function M(t,...e){let r=w[t];if(void 0===r){const e=(0,n.sha256)(Uint8Array.from(t,(t=>t.charCodeAt(0))));r=(0,u.concatBytes)(e,e),w[t]=r}return(0,n.sha256)((0,u.concatBytes)(r,...e))}const _=t=>t.toRawBytes(!0).slice(1),E=t=>(0,u.numberToBytesBE)(t,32),A=t=>(0,a.mod)(t,c),S=t=>(0,a.mod)(t,f),x=e.secp256k1.ProjectivePoint,B=(t,e,r)=>x.BASE.multiplyAndAddUnsafe(t,e,r);function T(t){let r=e.secp256k1.utils.normPrivateKeyToScalar(t),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:_(n)}}function I(t){if(!b(t))throw new Error(\"bad x: need 0 \u003C x \u003C p\");const e=A(t*t);let r=m(A(e*t+BigInt(7)));r%d!==y&&(r=A(-r));const n=new x(t,r,l);return n.assertValidity(),n}function k(...t){return S((0,u.bytesToNumberBE)(M(\"BIP0340/challenge\",...t)))}function P(t){return T(t).bytes}function C(t,e,r=(0,i.randomBytes)(32)){const n=(0,u.ensureBytes)(\"message\",t),{bytes:o,scalar:s}=T(e),a=(0,u.ensureBytes)(\"auxRand\",r,32),h=E(s^(0,u.bytesToNumberBE)(M(\"BIP0340/aux\",a))),c=M(\"BIP0340/nonce\",h,o,n),f=S((0,u.bytesToNumberBE)(c));if(f===y)throw new Error(\"sign failed: k is zero\");const{bytes:l,scalar:d}=T(f),p=k(l,o,n),m=new Uint8Array(64);if(m.set(l,0),m.set(E(S(d+p*s)),32),!R(m,n,o))throw new Error(\"sign: Invalid signature produced\");return m}function R(t,e,r){const n=(0,u.ensureBytes)(\"signature\",t,64),i=(0,u.ensureBytes)(\"message\",e),o=(0,u.ensureBytes)(\"publicKey\",r,32);try{const t=I((0,u.bytesToNumberBE)(o)),e=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!b(e))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!v(r))return!1;const s=k(E(e),_(t),i),a=B(t,r,S(-s));return!(!a||!a.hasEvenY()||a.toAffine().x!==e)}catch(t){return!1}}e.schnorr={getPublicKey:P,sign:C,verify:R,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:_,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:M,mod:a.mod}};const O=(0,s.isogenyMap)(g,[[\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"],[\"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"],[\"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"],[\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\"0x0000000000000000000000000000000000000000000000000000000000000001\"]].map((t=>t.map(
�(t=>BigInt(t)))))),L=(0,h.mapToCurveSimpleSWU)(g,{A:BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),B:BigInt(\"1771\"),Z:g.create(BigInt(\"-11\"))}),N=(0,s.createHasher)(e.secp256k1.ProjectivePoint,(t=>{const{x:e,y:r}=L(g.create(t[0]));return O(e,r)}),{DST:\"secp256k1_XMD:SHA-256_SSWU_RO_\",encodeDST:\"secp256k1_XMD:SHA-256_SSWU_NU_\",p:g.ORDER,m:1,k:128,expand:\"xmd\",hash:n.sha256});e.hashToCurve=N.hashToCurve,e.encodeToCurve=N.encodeToCurve},53525:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isBytes=i,e.number=r,e.bool=n,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},11655:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.add5L=e.add5H=e.add4H=e.add4L=e.add3H=e.add3L=e.rotlBL=e.rotlBH=e.rotlSL=e.rotlSH=e.rotr32L=e.rotr32H=e.rotrBL=e.rotrBH=e.rotrSL=e.rotrSH=e.shrSL=e.shrSH=e.toBig=void 0,e.fromBig=i,e.split=o,e.add=v;const r=BigInt(2**32-1),n=BigInt(32);function i(t,e=!1){return e?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o\u003Ct.length;o++){const{h:s,l:a}=i(t[o],e);[r[o],n[o]]=[s,a]}return[r,n]}const s=(t,e)=>BigInt(t>>>0)\u003C\u003Cn|BigInt(e>>>0);e.toBig=s;const a=(t,e,r)=>t>>>r;e.shrSH=a;const u=(t,e,r)=>t\u003C\u003C32-r|e>>>r;e.shrSL=u;const h=(t,e,r)=>t>>>r|e\u003C\u003C32-r;e.rotrSH=h;const c=(t,e,r)=>t\u003C\u003C32-r|e>>>r;e.rotrSL=c;const f=(t,e,r)=>t\u003C\u003C64-r|e>>>r-32;e.rotrBH=f;const l=(t,e,r)=>t>>>r-32|e\u003C\u003C64-r;e.rotrBL=l;const d=(t,e)=>e;e.rotr32H=d;const p=(t,e)=>t;e.rotr32L=p;const m=(t,e,r)=>t\u003C\u003Cr|e>>>32-r;e.rotlSH=m;const g=(t,e,r)=>e\u003C\u003Cr|t>>>32-r;e.rotlSL=g;const y=(t,e,r)=>e\u003C\u003Cr-32|t>>>64-r;e.rotlBH=y;const b=(t,e,r)=>t\u003C\u003Cr-32|e>>>64-r;function v(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=b;const w=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=w;const M=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=M;const _=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=_;const E=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=E;const A=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=A;const S=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=S;const x={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:h,rotrSL:c,rotrBH:f,rotrBL:l,rotr32H:d,rotr32L:p,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:v,add3L:w,add3H:M,add4L:_,add4H:E,add5H:S,add5L:A};e.default=x},70825:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},80125:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=void 0,e.keccakP=v;const n=r(53525),i=r(11655),o=r(70064),s=[],a=[],u=[],h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(7),d=BigInt(256),p=BigInt(113);for(let t=0,e=c,r=1,n=0;t\u003C24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t\u003C7;t++)e=(e\u003C\u003Cc^(e>>l)*p)%d,e&f&&(i^=c\u003C\u003C(c\u003C\u003CBigInt(t))-c);u.push(i)}const[m,g]=(0,i.split)(u,!0),y=(t,e,r)=>r>32?(0,i.rotlBH)(t,e,r):(0,i.rotlSH)(t,e,r),b=(t,e,r)=>r>32?(0,i.rotlBL)(t,e,r):(0,i.rotlSL)(t,e,r);function v(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n\u003C24;n++){for(let e=0;e\u003C10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e\u003C10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=b(o,s,1)^r[n+1];for(let r=0;r\u003C50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r\u003C24;r++){const n=a[r],o=y(e,i,n),u=b(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=u}for(let e=0;e\u003C50;e+=10){for(let n=0;n\u003C10;n++)r[n]=t[e+n];for(let n=0;n\u003C10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=g[n]}r.fill(0)}class w extends o.Hash{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),v(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.exists)(this);const{blockLen:e,state:r}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n\u003Ci;){const o=Math.min(e-this.pos,i-n);for(let e=0;e\u003Co;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.exists)(this,!1),(0,n.bytes)(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n\u003Ci;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return(0,n.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.output)(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new w(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}e.Keccak=w;const M=(t,e,r)=>(0,o.wrapConstructor)((()=>new w(e,t,r)));e.sha3_224=M(6,144,28),e.sha3_256=M(6,136,32),e.sha3_384=M(6,104,48),e.sha3_512=M(6,72,64),e.keccak_224=M(1,144,28),e.keccak_256=M(1,136,32),e.keccak_384=M(1,104,48),e.keccak_512=M(1,72,64);const _=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(e,t,void 0===n.dkLen?r:n.dkLen,!0)));e.shake128=_(31,168,16),e.shake256=_(31,136,32)},70064:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=void 0,e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name},e.byteSwap32=function(t){for(let r=0;r\u003Ct.length;r++)t[r]=(0,e.byteSwap)(t[r])},e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=o[t[r]];return e},e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o\u003Ct;o++){n(o);const t=Date.now()-i;t>=0&&t\u003Cr||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r},e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));if(n.crypto&&\"function\"==typeof n.crypto.randomBytes)return n.crypto.randomBytes(t);throw new Error(\"crypto.getRandomValues must be defined\")};const n=r(70825),i=r(53525);e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t\u003C\u003C32-e|t>>>e;e.rotl=(t,e)=>t\u003C\u003Ce|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t);const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t\u003C=s._9?t-s._0:t>=s._A&&t\u003C=s._F?t-(s._A-10):t>=s._a&&t\u003C=s._f?t-(s._a-10):void 0}function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString},36237:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t))throw new Error(`Wrong integer: ${t}`)}function n(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function i(...t){const e=t=>t,r=(t,e)=>r=>t(e(r));return{encode:t.map((t=>t.encode)).reduceRight(r,e),decode:t.map((t=>t.decode)).reduce(r,e)}}function o(t){return{encode:e=>{if(!Array.isArray(e)||e.length&&\"number\"!=typeof e[0])throw new Error(\"alphabet.encode input should be an array of numbers\");return e.map((e=>{if(r(e),e\u003C0||e>=t.length)throw new Error(`Digit index outside alphabet: ${e} (alphabet: ${t.length})`);return t[e]}))},decode:e=>{if(!Array.isArray(e)||e.length&&\"string\"!=typeof e[0])throw new Error(\"alphabet.decode input should be array of strings\");return e.map((e=>{if(\"string\"!=typeof e)throw new Error(`alphabet.decode: not string element=${e}`);const r=t.indexOf(e);if(-1===r)throw new Error(`Unknown letter: \"${e}\". Allowed: ${t}`);return r}))}}}function s(t=\"\"){if(\"string\"!=typeof t)throw new Error(\"join separator should be string\");return{encode:e=>{if(!Array.isArray(e)||e.length&&\"string\"!=typeof e[0])throw new Error(\"join.encode input should be array of strings\");for(let t of e)if(\"string\"!=typeof t)throw new Error(`join.encode: non-string input=${t}`);return e.join(t)},decode:e=>{if(\"string\"!=typeof e)throw new Error(\"join.decode input should be string\");return e.split(t)}}}function a(t,e=\"=\"){if(r(t),\"string\"!=typeof e)throw new Error(\"padding chr should be string\");return{encode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let t of r)if(\"string\"!=typeof t)throw new Error(`padding.encode: non-string input=${t}`);for(;r.length*t%8;)r.push(e);return r},decode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let t of r)if(\"string\"!=typeof t)throw new Error(`padding.decode: non-string input=${t}`);let n=r.length;if(n*t%8)throw new Error(\"Invalid padding: string should have whole number of bytes\");for(;n>0&&r[n-1]===e;n--)if(!((n-1)*t%8))throw new Error(\"Invalid padding: string has too much padding\");return r.slice(0,n)}}}function u(t){if(\"function\"!=typeof t)throw new Error(\"normalize fn should be function\");return{encode:t=>t,decode:e=>t(e)}}function h(t,e,n){if(e\u003C2)throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`);if(n\u003C2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(t))throw new Error(\"convertRadix: data should be array\");if(!t.length)return[];let i=0;const o=[],s=Array.from(t);for(s.forEach((t=>{if(r(t),t\u003C0||t>=e)throw new Error(`Wrong integer: ${t}`)}));;){let t=0,r=!0;for(let o=i;o\u003Cs.length;o++){const a=s[o],u=e*t+a;if(!Number.isSafeInteger(u)||e*t/e!==t||u-a!=e*t)throw new Error(\"convertRadix: carry overflow\");t=u%n;const h=Math.floor(u/n);if(s[o]=h,!Number.isSafeInteger(h)||h*n+t!==u)throw new Error(\"convertRadix: carry overflow\");r&&(h?r=!1:i=o)}if(o.push(t),r)break}for(let e=0;e\u003Ct.length-1&&0===t[e];e++)o.push(0);return o.reverse()}Object.defineProperty(e,\"__esModule\",{value:!0}),e.bytes=e.stringToBytes=e.str=e.bytesToString=e.hex=e.utf8=e.bech32m=e.bech32=e.base58check=e.createBase58check=e.base58xmr=e.base58xrp=e.base58flickr=e.base58=e.base64urlnopad=e.base64url=e.base64nopad=e.base64=e.base32crockford=e.base32hexnopad=e.base32hex=e.base32nopad=e.base32=e.base16=e.utils=void 0,e.assertNumber=r;const c=(t,e)=>e?c(e,t%e):t,f=(t,e)=>t+(e-c(t,e));function l(t,e,n,i){if(!Array.isArray(t))throw new Error(\"convertRadix2: data should be array\");if(e\u003C=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(n\u003C=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(f(e,n)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${f(e,n)}`);let o=0,s=0;const a=2**n-1,u=[];for(const i of t){if(r(i),i>=2**e)throw new Error(`convertRadix2: invalid data word=${i} from=${e}`);if(o=o\u003C\u003Ce|i,s+e>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`);for(s+=e;s>=n;s-=n)u.push((o>>s-n&a)>>>0);o&=2**s-1}if(o=o\u003C\u003Cn-s&a,!i&&s>=e)throw new Error(\"Excess padding\");if(!i&&o)throw new Error(`Non-zero padding: ${o}`);return i&&s>0&&u.push(o>>>0),u}function d(t){return r(t),{encode:e=>{if(!n(e))throw new Error(\"radix.encode input should be Uint8Array\");return h(Array.from(e),256,t)},decode:e=>{if(!Array.isArray(e)||e.length&&\"number\"!=typeof e[0])throw new Error(\"radix.decode input should be array of numbers\");return Uint8Array.from(h(e,t,256))}}}function p(t,e=!1){if(r(t),t\u003C=0||t>32)throw new Error(\"radix2: bits should be in (0..32]\");if(f(8,t)>32||f(t,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:r=>{if(!n(r))throw new Error(\"radix2.encode input should be Uint8Array\");return l(Array.from(r),8,t,!e)},decode:r=>{if(!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"radix2.decode input should be array of numbers\");return Uint8Array.from(l(r,t,8,e))}}}function m(t){if(\"function\"!=typeof t)throw new Error(\"unsafeWrapper fn should be function\");return function(...e){try{return t.apply(null,e)}catch(t){}}}function g(t,e){if(r(t),\"function\"!=typeof e)throw new Error(\"checksum fn should be function\");return{encode(r){if(!n(r))throw new Error(\"checksum.encode: input should be Uint8Array\");const i=e(r).slice(0,t),o=new Uint8Array(r.length+t);return o.set(r),o.set(i,r.length),o},decode(r){if(!n(r))throw new Error(\"checksum.decode: input should be Uint8Array\");const i=r.slice(0,-t),o=e(i).slice(0,t),s=r.slice(-t);for(let e=0;e\u003Ct;e++)if(o[e]!==s[e])throw new Error(\"Invalid checksum\");return i}}}e.utils={alphabet:o,chain:i,checksum:g,convertRadix:h,convertRadix2:l,radix:d,radix2:p,join:s,padding:a},e.base16=i(p(4),o(\"0123456789ABCDEF\"),s(\"\")),e.base32=i(p(5),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),a(5),s(\"\")),e.base32nopad=i(p(5),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),s(\"\")),e.base32hex=i(p(5),o(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),a(5),s(\"\")),e.base32hexnopad=i(p(5),o(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),s(\"\")),e.base32crockford=i(p(5),o(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),s(\"\"),u((t=>t.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\")))),e.base64=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),a(6),s(\"\")),e.base64nopad=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),s(\"\")),e.base64url=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),a(6),s(\"\")),e.base64urlnopad=i(p(6),o(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),s(\"\"));const y=t=>i(d(58),o(t),s(\"\"));e.base58=y(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),e.base58flickr=y(\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"),e.base58xrp=y(\"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz\");const b=[0,2,3,5,6,7,9,10,11];e.base58xmr={encode(t){let r=\"\";for(let n=0;n\u003Ct.length;n+=8){const i=t.subarray(n,n+8);r+=e.base58.encode(i).padStart(b[i.length],\"1\")}return r},decode(t){let r=[];for(let n=0;n\u003Ct.length;n+=11){const i=t.slice(n,n+11),o=b.indexOf(i.length),s=e.base58.decode(i);for(let t=0;t\u003Cs.length-o;t++)if(0!==s[t])throw new Error(\"base58xmr: wrong padding\");r=r.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(r)}};e.createBase58check=t=>i(g(4,(e=>t(t(e)))),e.base58),e.base58check=e.createBase58check;const v=i(o(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),s(\"\")),w=[996825010,642813549,513874426,1027748829,705979059];function M(t){const e=t>>25;let r=(33554431&t)\u003C\u003C5;for(let t=0;t\u003Cw.length;t++)1==(e>>t&1)&&(r^=w[t]);return r}function _(t,e,r=1){const n=t.length;let i=1;for(let e=0;e\u003Cn;e++){const r=t.charCodeAt(e);if(r\u003C33||r>126)throw new Error(`Invalid prefix (${t})`);i=M(i)^r>>5}i=M(i);for(let e=0;e\u003Cn;e++)i=M(i)^31&t.charCodeAt(e);for(let t of e)i=M(i)^t;for(let t=0;t\u003C6;t++)i=M(i);return i^=r,v.encode(l([i%2**30],30,5,!1))}function E(t){const e=\"bech32\"===t?1:734539939,r=p(5),n=r.decode,i=r.encode,o=m(n);function s(t,r,n=90){if(\"string\"!=typeof t)throw new Error(\"bech32.encode prefix should be string, not \"+typeof t);if(r instanceof Uint8Array&&(r=Array.from(r)),!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"bech32.encode words should be array of numbers, not \"+typeof r);if(0===t.length)throw new TypeError(`Invalid prefix length ${t.length}`);const i=t.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);const o=t.toLowerCase(),s=_(o,r,e);return`${o}1${v.encode(r)}${s}`}function a(t,r=90){if(\"string\"!=typeof t)throw new Error(\"bech32.decode input should be string, not \"+typeof t);if(t.length\u003C8||!1!==r&&t.length>r)throw new TypeError(`Wrong string length: ${t.length} (${t}). Expected (8..${r})`);const n=t.toLowerCase();if(t!==n&&t!==t.toUpperCase())throw new Error(\"String must be lowercase or uppercase\");const i=n.lastIndexOf(\"1\");if(0===i||-1===i)throw new Error('Letter \"1\" must be present between prefix and data only');const o=n.slice(0,i),s=n.slice(i+1);if(s.length\u003C6)throw new Error(\"Data must be at least 6 characters long\");const a=v.decode(s).slice(0,-6),u=_(o,a,e);if(!s.endsWith(u))throw new Error(`Invalid checksum in ${t}: expected \"${u}\"`);return{prefix:o,words:a}}return{encode:s,decode:a,encodeFromBytes:function(t,e){return s(t,i(e))},decodeToBytes:function(t){const{prefix:e,words:r}=a(t,!1);return{prefix:e,words:r,bytes:n(r)}},decodeUnsafe:m(a),fromWords:n,fromWordsUnsafe:o,toWords:i}}e.bech32=E(\"bech32\"),e.bech32m=E(\"bech32m\"),e.utf8={encode:t=>(new TextDecoder).decode(t),decode:t=>(new TextEncoder).encode(t)},e.hex=i(p(4),o(\"0123456789abcdef\"),s(\"\"),u((t=>{if(\"string\"!=typeof t||t.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`);return t.toLowerCase()})));const A={utf8:e.utf8,hex:e.hex,base16:e.base16,base32:e.base32,base64:e.base64,base64url:e.base64url,base58:e.base58,base58xmr:e.base58xmr},S=\"Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr\";e.bytesToString=(t,e)=>{if(\"string\"!=typeof t||!A.hasOwnProperty(t))throw new TypeError(S);if(!n(e))throw new TypeError(\"bytesToString() expects Uint8Array\");return A[t].encode(e)},e.str=e.bytesToString;e.stringToBytes=(t,e)=>{if(!A.hasOwnProperty(t))throw new TypeError(S);if(\"string\"!=typeof e)throw new TypeError(\"stringToBytes() expects string\");return A[t].decode(e)},e.bytes=e.stringToBytes},22812:(t,e,r)=>{\"use strict\";const n=e;n.bignum=r(90735),n.define=r(45192).define,n.base=r(84798),n.constants=r(96906),n.decoders=r(18211),n.encoders=r(89116)},45192:(t,e,r)=>{\"use strict\";const n=r(89116),i=r(18211),o=r(91285);function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new s(t,e)},s.prototype._createNamed=function(t){const e=this.name;function r(t){this._initNamed(t,e)}return o(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},s.prototype._getDecoder=function(t){return t=t||\"der\",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},s.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},s.prototype._getEncoder=function(t){return t=t||\"der\",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},s.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},47362:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(80126).b,o=r(27654).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error(\"Input not Buffer\")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return a.isEncoderBuffer(t)||(t=new a(t,e)),this.length+=t.length,t}),this);else if(\"number\"==typeof t){if(!(0\u003C=t&&t\u003C=255))return e.error(\"non-byte EncoderBuffer value\");this.value=t,this.length=1}else if(\"string\"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error(\"Unsupported type: \"+typeof t);this.value=t,this.length=t.length}}n(s,i),e.C=s,s.isDecoderBuffer=function(t){if(t instanceof s)return!0;return\"object\"==typeof t&&o.isBuffer(t.base)&&\"DecoderBuffer\"===t.constructor.name&&\"number\"==typeof t.offset&&\"number\"==typeof t.length&&\"function\"==typeof t.save&&\"function\"==typeof t.restore&&\"function\"==typeof t.isEmpty&&\"function\"==typeof t.readUInt8&&\"function\"==typeof t.skip&&\"function\"==typeof t.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){const e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1\u003C=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||\"DecoderBuffer overrun\")},s.prototype.skip=function(t,e){if(!(this.offset+t\u003C=this.length))return this.error(e||\"DecoderBuffer overrun\");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=a,a.isEncoderBuffer=function(t){if(t instanceof a)return!0;return\"object\"==typeof t&&\"EncoderBuffer\"===t.constructor.name&&\"number\"==typeof t.length&&\"function\"==typeof t.join},a.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):(\"number\"==typeof this.value?t[e]=this.value:\"string\"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},84798:(t,e,r)=>{\"use strict\";const n=e;n.Reporter=r(80126).b,n.DecoderBuffer=r(47362).C,n.EncoderBuffer=r(47362).R,n.Node=r(80847)},80847:(t,e,r)=>{\"use strict\";const n=r(80126).b,i=r(47362).R,o=r(47362).C,s=r(79561),a=[\"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\"],u=[\"key\",\"obj\",\"use\",\"optional\",\"explicit\",\"implicit\",\"def\",\"choice\",\"any\",\"contains\"].concat(a);function h(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=h;const c=[\"enc\",\"parent\",\"children\",\"tag\",\"args\",\"reverseArgs\",\"choice\",\"optional\",\"any\",\"obj\",\"use\",\"alteredUse\",\"key\",\"default\",\"explicit\",\"implicit\",\"contains\"];h.prototype.clone=function(){const t=this._baseState,e={};c.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},h.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},h.prototype._init=function(t){const e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,\"Root node can have only one child\")},h.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if(\"object\"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const n=t[r];e[n]=r})),e})))},[\"_peekTag\",\"_decodeTag\",\"_use\",\"_decodeStr\",\"_decodeObjid\",\"_decodeTime\",\"_decodeNull\",\"_decodeInt\",\"_decodeBool\",\"_decodeList\",\"_encodeComposite\",\"_encodeStr\",\"_encodeObjid\",\"_encodeTime\",\"_encodeNull\",\"_encodeInt\",\"_encodeBool\"].forEach((function(t){h.prototype[t]=function(){const e=this._baseState;throw new Error(t+\" not implemented for encoding: \"+e.enc)}})),a.forEach((function(t){h.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),h.prototype.use=function(t){s(t);const e=this._baseState;return s(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){const e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){const e=this._baseState;return s(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(t){const e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},h.prototype.contains=function(t){const e=this._baseState;return s(null===e.use),e.contains=t,this},h.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(t,n,r.any),t.isError(s))return s}else{const n=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(n)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const n=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?i=t.raw(e):t=n}if(e&&e.track&&null!==r.tag&&e.track(t.path(),n,t.length,\"tagged\"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,\"content\"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&(\"octstr\"===r.tag||\"bitstr\"===r.tag)){const n=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(n,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},h.prototype._decodeGeneric=function(t,e,r){const n=this._baseState;return\"seq\"===t||\"set\"===t?null:\"seqof\"===t||\"setof\"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):\"objid\"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):\"objid\"===t?this._decodeObjid(e,null,null,r):\"gentime\"===t||\"utctime\"===t?this._decodeTime(e,t,r):\"null_\"===t?this._decodeNull(e,r):\"bool\"===t?this._decodeBool(e,r):\"objDesc\"===t?this._decodeStr(e,t,r):\"int\"===t||\"enum\"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error(\"unknown tag: \"+t)},h.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},h.prototype._decodeChoice=function(t,e){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const s=t.save(),a=r.choice[o];try{const r=a._decode(t,e);if(t.isError(r))return!1;n={type:o,value:r},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?n:t.error(\"Choice not matched\")},h.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},h.prototype._encode=function(t,e,r){const n=this._baseState;if(null!==n.default&&n.default===t)return;const i=this._encodeValue(t,e,r);return void 0===i||this._skipDefault(i,e,r)?void 0:i},h.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);let o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(r){if(\"null_\"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error(\"Child should have a key\");const n=e.enterKey(r._baseState.key);if(\"object\"!=typeof t)return e.error(\"Child expected, but input is not object\");const i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if(\"seqof\"===i.tag||\"setof\"===i.tag){if(!i.args||1!==i.args.length)return e.error(\"Too many args for : \"+i.tag);if(!A$j���rray.isArray(t))return e.error(\"seqof/setof, but data is not Array\");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){const n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?\"universal\":\"context\";null===t?null===i.use&&e.error(\"Tag could be omitted only for .use()\"):null===i.use&&(o=this._encodeComposite(t,a,r,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,\"context\",o)),o},h.prototype._encodeChoice=function(t,e){const r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+\" not found in \"+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if(\"objid\"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if(\"objid\"===t)return this._encodeObjid(e,null,null);if(\"gentime\"===t||\"utctime\"===t)return this._encodeTime(e,t);if(\"null_\"===t)return this._encodeNull();if(\"int\"===t||\"enum\"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if(\"bool\"===t)return this._encodeBool(e);if(\"objDesc\"===t)return this._encodeStr(e,t);throw new Error(\"Unsupported tag: \"+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},80126:(t,e,r)=>{\"use strict\";const n=r(91285);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){const n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join(\"/\")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){let e;const r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return\"[\"+JSON.stringify(t)+\"]\"})).join(\"\"),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+\" at: \"+(this.path||\"(shallow)\"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},4131:(t,e)=>{\"use strict\";function r(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e}e.tagClass={0:\"universal\",1:\"application\",2:\"context\",3:\"private\"},e.tagClassByName=r(e.tagClass),e.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\"},e.tagByName=r(e.tag)},96906:(t,e,r)=>{\"use strict\";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e},n.der=r(4131)},41066:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(90735),o=r(47362).C,s=r(80847),a=r(4131);function u(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){s.call(this,\"der\",t)}function c(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r\u003C\u003C=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return t.error(\"length octect is too long\");n=0;for(let e=0;e\u003Ci;e++){n\u003C\u003C=8;const e=t.readUInt8(r);if(t.isError(e))return e;n|=e}return n}t.exports=u,u.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},n(h,s),h.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;const n=t.save(),i=c(t,'Failed to peek tag: \"'+e+'\"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+\"of\"===e||r)},h.prototype._decodeTag=function(t,e,r){const n=c(t,'Failed to decode tag of \"'+e+'\"');if(t.isError(n))return n;let i=f(t,n.primitive,'Failed to get length of \"'+e+'\"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+\"of\"!==e)return t.error('Failed to match tag: \"'+e+'\"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: \"'+e+'\"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: \"'+this.tag+'\"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: \"'+e+'\"'))},h.prototype._skipUntilEnd=function(t,e){for(;;){const r=c(t,e);if(t.isError(r))return r;const n=f(t,r.primitive,e);if(t.isError(n))return n;let i;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if(\"end\"===r.tagStr)break}},h.prototype._decodeList=function(t,e,r,n){const i=[];for(;!t.isEmpty();){const e=this._peekTag(t,\"end\");if(t.isError(e))return e;const o=r.decode(t,\"der\",n);if(t.isError(o)&&e)break;i.push(o)}return i},h.prototype._decodeStr=function(t,e){if(\"bitstr\"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if(\"bmpstr\"===e){const e=t.raw();if(e.length%2==1)return t.error(\"Decoding of string type: bmpstr length mismatch\");let r=\"\";for(let t=0;t\u003Ce.length/2;t++)r+=String.fromCharCode(e.readUInt16BE(2*t));return r}if(\"numstr\"===e){const e=t.raw().toString(\"ascii\");return this._isNumstr(e)?e:t.error(\"Decoding of string type: numstr unsupported characters\")}if(\"octstr\"===e)return t.raw();if(\"objDesc\"===e)return t.raw();if(\"printstr\"===e){const e=t.raw().toString(\"ascii\");return this._isPrintstr(e)?e:t.error(\"Decoding of string type: printstr unsupported characters\")}return/str$/.test(e)?t.raw().toString():t.error(\"Decoding of string type: \"+e+\" unsupported\")},h.prototype._decodeObjid=function(t,e,r){let n;const i=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o\u003C\u003C=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),e){let t=e[n.join(\" \")];void 0===t&&(t=e[n.join(\".\")]),void 0!==t&&(n=t)}return n},h.prototype._decodeTime=function(t,e){const r=t.raw().toString();let n,i,o,s,a,u;if(\"gentime\"===e)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if(\"utctime\"!==e)return t.error(\"Decoding \"+e+\" time is not supported yet\");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),n=n\u003C70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},h.prototype._decodeNull=function(){return null},h.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},h.prototype._decodeInt=function(t,e){const r=t.raw();let n=new i(r);return e&&(n=e[n.toString(10)]||n),n},h.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getDecoder(\"der\").tree}},18211:(t,e,r)=>{\"use strict\";const n=e;n.der=r(41066),n.pem=r(63956)},63956:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(27654).Buffer,o=r(41066);function s(t){o.call(this,t),this.enc=\"pem\"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){const r=t.toString().split(/[\\r\\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let t=0;t\u003Cr.length;t++){const e=r[t].match(s);if(null!==e&&e[2]===n){if(-1!==a){if(\"END\"!==e[1])break;u=t;break}if(\"BEGIN\"!==e[1])break;a=t}}if(-1===a||-1===u)throw new Error(\"PEM section not found for: \"+n);const h=r.slice(a+1,u).join(\"\");h.replace(/[^a-z0-9+/=]+/gi,\"\");const c=i.from(h,\"base64\");return o.prototype.decode.call(this,c,e)}},95758:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(27654).Buffer,o=r(80847),s=r(4131);function a(t){this.enc=\"der\",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,\"der\",t)}function h(t){return t\u003C10?\"0\"+t:t}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,o),u.prototype._encodeComposite=function(t,e,r,n){const o=function(t,e,r,n){let i;\"seqof\"===t?t=\"seq\":\"setof\"===t&&(t=\"set\");if(s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if(\"number\"!=typeof t||(0|t)!==t)return n.error(\"Unknown tag: \"+t);i=t}if(i>=31)return n.error(\"Multi-octet tag encoding unsupported\");e||(i|=32);return i|=s.tagClassByName[r||\"universal\"]\u003C\u003C6,i}(t,e,r,this.reporter);if(n.length\u003C128){const t=i.alloc(2);return t[0]=o,t[1]=n.length,this._createEncoderBuffer([t,n])}let a=1;for(let t=n.length;t>=256;t>>=8)a++;const u=i.alloc(2+a);u[0]=o,u[1]=128|a;for(let t=1+a,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(t,e){if(\"bitstr\"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if(\"bmpstr\"===e){const e=i.alloc(2*t.length);for(let r=0;r\u003Ct.length;r++)e.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(e)}return\"numstr\"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: numstr supports only digits and space\"):\"printstr\"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):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(e)||\"objDesc\"===e?this._createEncoderBuffer(t):this.reporter.error(\"Encoding of string type: \"+e+\" unsupported\")},u.prototype._encodeObjid=function(t,e,r){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"string objid given, but no values map found\");if(!e.hasOwnProperty(t))return this.reporter.error(\"objid not found in values map\");t=e[t].split(/[\\s.]+/g);for(let e=0;e\u003Ct.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e\u003Ct.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error(\"objid() should be either array or string, got: \"+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error(\"Second objid identifier OOB\");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e\u003Ct.length;e++){let r=t[e];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let s=o.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return\"gentime\"===e?r=[h(n.getUTCFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):\"utctime\"===e?r=[h(n.getUTCFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),\"Z\"].join(\"\"):this.reporter.error(\"Encoding \"+e+\" time is not supported yet\"),this._encodeStr(r,\"octstr\")},u.prototype._encodeNull=function(){return this._createEncoderBuffer(\"\")},u.prototype._encodeInt=function(t,e){if(\"string\"==typeof t){if(!e)return this.reporter.error(\"String int or enum given, but no values map\");if(!e.hasOwnProperty(t))return this.reporter.error(\"Values map doesn't contain: \"+JSON.stringify(t));t=e[t]}if(\"number\"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=i.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t\u003C128)return this._createEncoderBuffer(t);if(t\u003C256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return\"function\"==typeof t&&(t=t(e)),t._getEncoder(\"der\").tree},u.prototype._skipDefault=function(t,e,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i\u003Co.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},89116:(t,e,r)=>{\"use strict\";const n=e;n.der=r(95758),n.pem=r(99245)},99245:(t,e,r)=>{\"use strict\";const n=r(91285),i=r(95758);function o(t){i.call(this,t),this.enc=\"pem\"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){const r=i.prototype.encode.call(this,t).toString(\"base64\"),n=[\"-----BEGIN \"+e.label+\"-----\"];for(let t=0;t\u003Cr.length;t+=64)n.push(r.slice(t,t+64));return n.push(\"-----END \"+e.label+\"-----\"),n.join(\"\\n\")}},90735:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(83397).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.�����imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},95766:(t,e)=>{\"use strict\";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,f=u>0?s-4:s;for(r=0;r\u003Cf;r+=4)e=n[t.charCodeAt(r)]\u003C\u003C18|n[t.charCodeAt(r+1)]\u003C\u003C12|n[t.charCodeAt(r+2)]\u003C\u003C6|n[t.charCodeAt(r+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;2===u&&(e=n[t.charCodeAt(r)]\u003C\u003C2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e);1===u&&(e=n[t.charCodeAt(r)]\u003C\u003C10|n[t.charCodeAt(r+1)]\u003C\u003C4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e);return h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,h=n-i;a\u003Ch;a+=s)o.push(u(t,a,a+s>h?h:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e\u003C\u003C4&63]+\"==\")):2===i&&(e=(t[n-2]\u003C\u003C8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e\u003C\u003C2&63]+\"=\"));return o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0;s\u003C64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],a=e;a\u003Cn;a+=3)i=(t[a]\u003C\u003C16&16711680)+(t[a+1]\u003C\u003C8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},66534:(t,e)=>{\"use strict\";e.gW=void 0;const r=\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\",n={};for(let t=0;t\u003C32;t++){const e=r.charAt(t);n[e]=t}function i(t){const e=t>>25;return(33554431&t)\u003C\u003C5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r\u003Ct.length;++r){const n=t.charCodeAt(r);if(n\u003C33||n>126)return\"Invalid prefix (\"+t+\")\";e=i(e)^n>>5}e=i(e);for(let r=0;r\u003Ct.length;++r){const n=t.charCodeAt(r);e=i(e)^31&n}return e}function s(t,e,r,n){let i=0,o=0;const s=(1\u003C\u003Cr)-1,a=[];for(let n=0;n\u003Ct.length;++n)for(i=i\u003C\u003Ce|t[n],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i\u003C\u003Cr-o&s);else{if(o>=e)return\"Excess padding\";if(i\u003C\u003Cr-o&s)return\"Non-zero padding\"}return a}function a(t){return s(t,8,5,!0)}function u(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e}function h(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}function c(t){let e;function s(t,r){if(r=r||90,t.length\u003C8)return t+\" too short\";if(t.length>r)return\"Exceeds length limit\";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return\"Mixed-case string \"+t;const u=(t=s).lastIndexOf(\"1\");if(-1===u)return\"No separator character for \"+t;if(0===u)return\"Missing prefix for \"+t;const h=t.slice(0,u),c=t.slice(u+1);if(c.length\u003C6)return\"Data too short\";let f=o(h);if(\"string\"==typeof f)return f;const l=[];for(let t=0;t\u003Cc.length;++t){const e=c.charAt(t),r=n[e];if(void 0===r)return\"Unknown character \"+e;f=i(f)^r,t+6>=c.length||l.push(r)}return f!==e?\"Invalid checksum for \"+t:{prefix:h,words:l}}return e=\"bech32\"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if(\"object\"==typeof r)return r},decode:function(t,e){const r=s(t,e);if(\"object\"==typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError(\"Exceeds length limit\");let a=o(t=t.toLowerCase());if(\"string\"==typeof a)throw new Error(a);let u=t+\"1\";for(let t=0;t\u003Cn.length;++t){const e=n[t];if(e>>5!=0)throw new Error(\"Non 5-bit word\");a=i(a)^e,u+=r.charAt(e)}for(let t=0;t\u003C6;++t)a=i(a);a^=e;for(let t=0;t\u003C6;++t){u+=r.charAt(a>>5*(5-t)&31)}return u},toWords:a,fromWordsUnsafe:u,fromWords:h}}e.gW=c(\"bech32\"),c(\"bech32m\")},62197:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(33196).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r\u003C=57?r-48:r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:void n(!1,\"Invalid character in \"+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u\u003Ca;u++){var h=t.charCodeAt(u)-48;o*=i,s=h>=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s\u003Ci,\"Invalid character\"),o+=s}return o}function c(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(���D�var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){c(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},\"undefined\"!=typeof Symbol&&\"function\"==typeof Symbol.for)try{o.prototype[Symbol.for(\"nodejs.util.inspect.custom\")]=f}catch(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"}var l=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=d[t],c=p[t];r=\"\";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(c).toString(t);r=(f=f.idivn(c)).isZero()?m+r:l[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this[\"_toArrayLike\"+(\"le\"===e?\"LE\":\"BE\")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i\u003Cthis.length;i++){var s=this.words[i]\u003C\u003Co|n;t[r++]=255&s,r\u003Ct.length&&(t[r++]=s>>8&255),r\u003Ct.length&&(t[r++]=s>>16&255),6===o?(r\u003Ct.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r\u003Ct.length)for(t[r++]=n;r\u003Ct.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i\u003Cthis.length;i++){var s=this.words[i]\u003C\u003Co|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r\u003C63?m(this,t,e):r\u003C1024?y(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},v.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t\u003C0;e&&(t=-t),n(\"number\"==typeof t),n(t\u003C67108864);for(var r=0,i=0;i\u003Cthis.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003C=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a._strip(),n._strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t\u003C0;e&&(t=-t),n(t\u003C=67108863);for(var r=(1\u003C\u003C26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t\u003C0;e&&(t=-t),n(t\u003C=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip()CO�:�,this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function M(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){M.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function E(){M.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function A(){M.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function S(){M.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function x(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function B(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},M.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(t,e){t.iushrn(this.n,0,e)},M.prototype.imulK=function(t){return t.imul(this.k)},i(_,M),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,M),i(A,M),i(S,M),S.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if(\"k256\"===t)e=new _;else if(\"p224\"===t)e=new E;else if(\"p192\"===t)e=new A;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new S}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},x.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new B(t)},i(B,x),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},82745:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r\u003Ce.length;r++)e[r]=this.rand.getByte();return e},\"object\"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:\"object\"==typeof window&&(i.prototype._rand=function(){throw new Error(\"Not implemented yet\")});else try{var o=r(38087);if(\"function\"!=typeof o.randomBytes)throw new Error(\"Not supported\");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},52970:(t,e,r)=>{var n=r(77834).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i\u003Ce;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0\u003Ct.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,h=r[0],c=r[1],f=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],y=4,b=1;b\u003Ci;b++)o=h[d>>>24]^c[p>>>16&255]^f[m>>>8&255]^l[255&g]^e[y++],s=h[p>>>24]^c[m>>>16&255]^f[g>>>8&255]^l[255&d]^e[y++],a=h[m>>>24]^c[g>>>16&255]^f[d>>>8&255]^l[255&p]^e[y++],u=h[g>>>24]^c[d>>>16&255]^f[p>>>8&255]^l[255&m]^e[y++],d=o,p=s,m=a,g=u;return o=(n[d>>>24]\u003C\u003C24|n[p>>>16&255]\u003C\u003C16|n[m>>>8&255]\u003C\u003C8|n[255&g])^e[y++],s=(n[p>>>24]\u003C\u003C24|n[m>>>16&255]\u003C\u003C16|n[g>>>8&255]\u003C\u003C8|n[255&d])^e[y++],a=(n[m>>>24]\u003C\u003C24|n[g>>>16&255]\u003C\u003C16|n[d>>>8&255]\u003C\u003C8|n[255&p])^e[y++],u=(n[g>>>24]\u003C\u003C24|n[d>>>16&255]\u003C\u003C16|n[p>>>8&255]\u003C\u003C8|n[255&m])^e[y++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e\u003C256;e++)t[e]=e\u003C128?e\u003C\u003C1:e\u003C\u003C1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u\u003C256;++u){var h=a^a\u003C\u003C1^a\u003C\u003C2^a\u003C\u003C3^a\u003C\u003C4;h=h>>>8^255&h^99,r[s]=h,n[h]=s;var c=t[s],f=t[c],l=t[f],d=257*t[h]^16843008*h;i[0][s]=d\u003C\u003C24|d>>>8,i[1][s]=d\u003C\u003C16|d>>>16,i[2][s]=d\u003C\u003C8|d>>>24,i[3][s]=d,d=16843009*l^65537*f^257*c^16843008*s,o[0][h]=d\u003C\u003C24|d>>>8,o[1][h]=d\u003C\u003C16|d>>>16,o[2][h]=d\u003C\u003C8|d>>>24,o[3][h]=d,0===s?s=a=1:(s=c^t[t[t[l^c]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function h(t){this._key=i(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o\u003Ce;o++)i[o]=t[o];for(o=e;o\u003Cn;o++){var s=i[o-1];o%e==0?(s=s\u003C\u003C8|s>>>24,s=u.SBOX[s>>>24]\u003C\u003C24|u.SBOX[s>>>16&255]\u003C\u003C16|u.SBOX[s>>>8&255]\u003C\u003C8|u.SBOX[255&s],s^=a[o/e|0]\u003C\u003C24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]\u003C\u003C24|u.SBOX[s>>>16&255]\u003C\u003C16|u.SBOX[s>>>8&255]\u003C\u003C8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var h=[],c=0;c\u003Cn;c++){var f=n-c,l=i[f-(c%4?0:4)];h[c]=c\u003C4||f\u003C=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},h.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},3313:(t,e,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973),s=r(91285),a=r(42895),u=r(31313),h=r(14182);function c(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var c=this._cipher.encryptBlock(u);this._ghash=new a(c),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),t._finID=n.state;var f=i.from(t._finID);return h(f),f}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(c,o),c.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e\u003C16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error(\"Unsupported state or unable to authenticate data\");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i\u003Cn;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error(\"Unsupported state or unable to authenticate data\");this._authTag=t,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error(\"Attempting to get auth tag in unsupported state\");return this._authTag},c.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error(\"Attempting to set auth tag in unsupported state\");this._authTag=t},c.prototype.setAAD=function(t){if(this._called)throw new Error(\"Attempting to set AAD in unsupported state\");this._ghash.update(t),this._alen+=t.length},t.exports=c},10010:(t,e,r)=>{var n=r(89309),i=r(57612),o=r(49234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},57612:(t,e,r)=>{var n=r(3313),i=r(77834).Buffer,o=r(68702),s=r(37041),a=r(13973),u=r(52970),h=r(59341);function c(t,e,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof r&&(r=i.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);if(\"string\"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);return\"stream\"===a.type?new s(a.module,e,r,!0):\"auth\"===a.type?new n(a.module,e,r,!0):new c(a.module,e,r)}r(91285)(c,a),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e\u003C1||e>16)throw new Error(\"unable to decrypt data\");var r=-1;for(;++r\u003Ce;)if(t[r+(16-e)]!==e)throw new Error(\"unable to decrypt data\");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error(\"data not multiple of block length\")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=i.concat([this.cache,t])},f.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var n=h(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},89309:(t,e,r)=>{var n=r(68702),i=r(3313),o=r(77834).Buffer,s=r(37041),a=r(13973),u=r(52970),h=r(59341);function c(t,e,r){a.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(91285)(c,a),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError(\"invalid suite type\");if(\"string\"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError(\"invalid key length \"+e.length);if(\"string\"==typeof r&&(r=o.from(r)),\"GCM\"!==a.mode&&r.length!==a.iv)throw new TypeError(\"invalid iv length \"+r.length);return\"stream\"===a.type?new s(a.module,e,r):\"auth\"===a.type?new i(a.module,e,r):new c(a.module,e,r)}c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(f))throw this._cipher.scrub(),new Error(\"data not multiple of block length\")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r\u003Ct;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError(\"invalid suite type\");var i=h(e,!1,r.key,r.iv);return d(t,i.key,i.iv)}},42895:(t,e,r)=>{var n=r(77834).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e\u003Ct.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s\u003C128;){for(0!=(this.state[~~(s/8)]&1\u003C\u003C7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])\u003C\u003C31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225\u003C\u003C24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},14182:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},8796:(t,e,r)=>{var n=r(31313);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},76528:(t,e,r)=>{var n=r(77834).Buffer,i=r(31313);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length\u003C=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},60918:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s\u003C8;)n=e&1\u003C\u003C7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i\u003Cr;)o[i]=t[i]\u003C\u003C1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a\u003Co;)s[a]=i(t,e[a],r);return s}},27263:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a\u003Co;)s[a]=i(t,e[a],r);return s}},48219:(t,e,r)=>{var n=r(31313),i=r(77834).Buffer,o=r(14182);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a\u003Cr;a++){var u=s(t),h=o+16*a;t._cache.writeUInt32BE(u[0],h+0),t._cache.writeUInt32BE(u[1],h+4),t._cache.writeUInt32BE(u[2],h+8),t._cache.writeUInt32BE(u[3],h+12)}var c=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,c)}},57028:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},68702:(t,e,r)=>{var n={ECB:r(57028),CBC:r(8796),CFB:r(76528),CFB8:r(27263),CFB1:r(60918),OFB:r(34256),CTR:r(48219),GCM:r(48219)},i=r(49234);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},34256:(t,e,r)=>{var n=r(48834).Buffer,i=r(31313);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length\u003Ce.length;)t._cache=n.concat([t._cache,o(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,r)}},37041:(t,e,r)=>{var n=r(52970),i=r(77834).Buffer,o=r(13973);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(91285)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},93667:(t,e,r)=>{var n=r(37214),i=r(10010),o=r(68702),s=r(62820),a=r(59341);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError(\"invalid suite type\")}function h(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError(\"invalid suite type\")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError(\"invalid suite type\");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return h(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=h,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},37214:(t,e,r)=>{var n=r(13973),i=r(84387),o=r(91285),s=r(77834).Buffer,a={\"des-ede3-cbc\":i.CBC.instantiate(i.EDE),\"des-ede3\":i.EDE,\"des-ede-cbc\":i.CBC.instantiate(i.EDE),\"des-ede\":i.EDE,\"des-cbc\":i.CBC.instantiate(i.DES),\"des-ecb\":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?\"decrypt\":\"encrypt\";var o=t.key;s.isBuffer(o)||(o=s.from(o)),\"des-ede\"!==r&&\"des-ede-cbc\"!==r||(o=s.concat([o,o.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:e})}a.des=a[\"des-cbc\"],a.des3=a[\"des-ede3-cbc\"],t.exports=u,o(u,n),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},62820:(t,e)=>{e[\"des-ecb\"]={key:8,iv:0},e[\"des-cbc\"]=e.des={key:8,iv:8},e[\"des-ede3-cbc\"]=e.des3={key:24,iv:8},e[\"des-ede3\"]={key:24,iv:0},e[\"des-ede-cbc\"]={key:16,iv:8},e[\"des-ede\"]={key:16,iv:0}},91857:(t,e,r)=>{var n=r(48834).Buffer,i=r(62197),o=r(95003);function s(t){var e,r=t.modulus.byteLength();do{e=new i(o(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),a=new i(t).mul(r.blinder).umod(e.modulus),u=a.toRed(i.mont(e.prime1)),h=a.toRed(i.mont(e.prime2)),c=e.coefficient,f=e.prime1,l=e.prime2,d=u.redPow(e.exponent1).fromRed(),p=h.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(c).umod(f).imul(l);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(n,\"be\",o)}a.getr=s,t.exports=a},24778:(t,e,r)=>{\"use strict\";t.exports=r(40026)},95263:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(16162),o=r(67525),s=r(91285),a=r(262),u=r(5643),h=r(40026);function c(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error(\"Unknown message digest\");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error(\"Unknown message digest\");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new c(t)}function d(t){return new f(t)}Object.keys(h).forEach((function(t){h[t].id=n.from(h[t].id,\"hex\"),h[t.toLowerCase()]=h[t]})),s(c,o.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return this._hash.update(\"string\"==typeof t?n.from(t,e):t),this},c.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return this._hash.update(\"string\"==typeof t?n.from(t,e):t),this},f.prototype.verify=function(t,e,r){var i=\"string\"==typeof e?n.from(e,r):e;this.end();var o=this._hash.digest();return u(i,o,t,this._signType,this._tag)},t.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},262:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(50011),o=r(91857),s=r(87554).ec,a=r(62197),u=r(28016),h=r(39167);function c(t,e,r,o){if((t=n.from(t.toArray())).length\u003Ce.byteLength()){var s=n.alloc(e.byteLength()-t.length);t=n.concat([s,t])}var a=r.length,u=function(t,e){t=f(t,e),t=t.mod(e);var r=n.from(t.toArray());if(r.length\u003Ce.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),h=n.alloc(a);h.fill(1);var c=n.alloc(a);return c=i(o,c).update(h).update(n.from([0])).update(t).update(u).digest(),h=i(o,c).update(h).digest(),{k:c=i(o,c).update(h).update(n.from([1])).update(t).update(u).digest(),v:h=i(o,c).update(h).digest()}}function f(t,e){var r=new a(t),n=(t.length\u003C\u003C3)-e.bitLength();return n>0&&r.ishrn(n),r}function l(t,e,r){var o,s;do{for(o=n.alloc(0);8*o.length\u003Ct.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);s=f(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function d(t,e,r,n){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,p){var m=u(e);if(m.curve){if(\"ecdsa\"!==i&&\"ecdsa/rsa\"!==i)throw new Error(\"wrong private key type\");return function(t,e){var r=h[e.curve.join(\".\")];if(!r)throw new Error(\"unknown curve \"+e.curve.join(\".\"));var i=new s(r).keyFromPrivate(e.privateKey),o=i.sign(t);return n.from(o.toDER())}(t,m)}if(\"dsa\"===m.type){if(\"dsa\"!==i)throw new Error(\"wrong private key type\");return function(t,e,r){var i,o=e.params.priv_key,s=e.params.p,u=e.params.q,h=e.params.g,p=new a(0),m=f(t,u).mod(u),g=!1,y=c(o,u,t,r);for(;!1===g;)p=d(h,i=l(u,y,r),s,u),0===(g=i.invm(u).imul(m.add(o.mul(p))).mod(u)).cmpn(0)&&(g=!1,p=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var r=t.length+e.length+4,i=[48,r,2,t.length];return i=i.concat(t,[2,e.length],e),n.from(i)}(p,g)}(t,m,r)}if(\"rsa\"!==i&&\"ecdsa/rsa\"!==i)throw new Error(\"wrong private key type\");if(void 0!==e.padding&&1!==e.padding)throw new Error(\"illegal or unsupported padding mode\");t=n.concat([p,t]);for(var g=m.modulus.byteLength(),y=[0,1];t.length+y.length+1\u003Cg;)y.push(255);y.push(0);for(var b=-1;++b\u003Ct.length;)y.push(t[b]);return o(y,m)},t.exports.getKey=c,t.exports.makeKey=l},5643:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(62197),o=r(87554).ec,s=r(28016),a=r(39167);function u(t,e){if(t.cmpn(0)\u003C=0)throw new Error(\"invalid sig\");if(t.cmp(e)>=0)throw new Error(\"invalid sig\")}t.exports=function(t,e,r,h,c){var f=s(r);if(\"ec\"===f.type){if(\"ecdsa\"!==h&&\"ecdsa/rsa\"!==h)throw new Error(\"wrong public key type\");return function(t,e,r){var n=a[r.data.algorithm.curve.join(\".\")];if(!n)throw new Error(\"unknown curve \"+r.data.algorithm.curve.join(\".\"));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,f)}if(\"dsa\"===f.type){if(\"dsa\"!==h)throw new Error(\"wrong public key type\");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,h=r.data.pub_key,c=s.signature.decode(t,\"der\"),f=c.s,l=c.r;u(f,o),u(l,o);var d=i.mont(n),p=f.invm(o),m=a.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(h.toRed(d).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o);return 0===m.cmp(l)}(t,e,f)}if(\"rsa\"!==h&&\"ecdsa/rsa\"!==h)throw new Error(\"wrong public key type\");e=n.concat([c,e]);for(var l=f.modulus.byteLength(),d=[1],p=0;e.length+d.length+2\u003Cl;)d.push(255),p+=1;d.push(0);for(var m=-1;++m\u003Ce.length;)d.push(e[m]);d=n.from(d);var g=i.mont(f.modulus);t=(t=new i(t).toRed(g)).redPow(new i(f.publicExponent)),t=n.from(t.fromRed().toArray());var y=p\u003C8?1:0;for(l=Math.min(t.length,d.length),t.length!==d.length&&(y=1),m=-1;++m\u003Cl;)y|=t[m]^d[m];return 0===y}},31313:(t,e,r)=>{var n=r(48834).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o\u003Cr;++o)i[o]=t[o]^e[o];return i}},48834:(t,e,r)=>{\"use strict\";const n=r(95766),i=r(62333),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if(\"number\"==typeof t){if(\"string\"==typeof e)throw new TypeError('The \"string\" argument must be of type string. Received type number');return f(t)}return h(t,e,r)}function h(t,e,r){if(\"string\"==typeof t)return function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!u.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);const r=0|m(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){im����f(W(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(W(t,ArrayBuffer)||t&&W(t.buffer,ArrayBuffer))return d(t,e,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(W(t,SharedArrayBuffer)||t&&W(t.buffer,SharedArrayBuffer)))return d(t,e,r);if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return\"number\"!=typeof t.length||Z(t.length)?a(0):l(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function c(t){if(\"number\"!=typeof t)throw new TypeError('\"size\" argument must be of type number');if(t\u003C0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function f(t){return c(t),a(t\u003C0?0:0|p(t))}function l(t){const e=t.length\u003C0?0:0|p(t.length),r=a(e);for(let n=0;n\u003Ce;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e\u003C0||t.byteLength\u003Ce)throw new RangeError('\"offset\" is outside of buffer bounds');if(t.byteLength\u003Ce+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function p(t){if(t>=s)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s.toString(16)+\" bytes\");return 0|t}function m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||W(t,ArrayBuffer))return t.byteLength;if(\"string\"!=typeof t)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return G(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return K(t).length;default:if(i)return n?-1:G(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e\u003C0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r\u003C=0)return\"\";if((r>>>=0)\u003C=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return k(this,e,r);case\"utf8\":case\"utf-8\":return x(this,e,r);case\"ascii\":return T(this,e,r);case\"latin1\":case\"binary\":return I(this,e,r);case\"base64\":return S(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return P(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r\u003C-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:t.length-1),r\u003C0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r\u003C0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function v(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length\u003C2||e.length\u003C2)return-1;s=2,a/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o\u003Ca;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n\u003Cu;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s\u003Cn;++s){const n=parseInt(e.substr(2*s,2),16);if(Z(n))return s;t[r+s]=n}return s}function M(t,e,r,n){return J(G(e,t.length-r),t,r,n)}function _(t,e,r,n){return J(function(t){const e=[];for(let r=0;r\u003Ct.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return J(K(e),t,r,n)}function A(t,e,r,n){return J(function(t,e){let r,n,i;const o=[];for(let s=0;s\u003Ct.length&&!((e-=2)\u003C0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i\u003Cr;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s\u003C=r){let r,n,a,u;switch(s){case 1:e\u003C128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)\u003C\u003C6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)\u003C\u003C12|(63&r)\u003C\u003C6|63&n,u>2047&&(u\u003C55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)\u003C\u003C18|(63&r)\u003C\u003C12|(63&n)\u003C\u003C6|63&a,u>65535&&u\u003C1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e\u003C=B)return String.fromCharCode.apply(String,t);let r=\"\",n=0;for(;n\u003Ce;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.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(u.prototype,\"parent\",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,\"offset\",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t\u003C=0?a(t):void 0!==e?\"string\"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(W(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),W(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i\u003Co;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r\u003Cn?-1:n\u003Cr?1:0},u.isEncoding=function(t){switch(String(t).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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r\u003Ct.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r\u003Ct.length;++r){let e=t[r];if(W(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('\"list\" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let e=0;e\u003Ct;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let e=0;e\u003Ct;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let e=0;e\u003Ct;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?\"\":0===arguments.length?x(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t=\"\";const r=e.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(t+=\" ... \"),\"\u003CBuffer \"+t+\">\"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(W(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e\u003C0||r>t.length||n\u003C0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(n,i),c=t.slice(e,r);for(let t=0;t\u003Ca;++t)if(h[t]!==c[t]){o=h[t],s=c[t];break}return o\u003Cs?-1:s\u003Co?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r\u003C0||e\u003C0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let o=!1;for(;;)switch(n){case\"hex\":return w(this,t,e,r);case\"utf8\":case\"utf-8\":return M(this,t,e,r);case\"ascii\":case\"latin1\":case\"binary\":return _(this,t,e,r);case\"base64\":return E(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return A(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function T(t,e,r){let n=\"\";r=Math.min(t.length,r);for(let i=e;i\u003Cr;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){let n=\"\";r=Math.min(t.length,r);for(let i=e;i\u003Cr;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){const n=t.length;(!e||e\u003C0)&&(e=0),(!r||r\u003C0||r>n)&&(r=n);let i=\"\";for(let n=e;n\u003Cr;++n)i+=X[t[n]];return i}function P(t,e,r){const n=t.slice(e,r);let i=\"\";for(let t=0;t\u003Cn.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function C(t,e,r){if(t%1!=0||t\u003C0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function R(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||e\u003Co)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function O(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function L(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function N(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r\u003C0)throw new RangeError(\"Index out of range\")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)\u003C0?(t+=r)\u003C0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)\u003C0?(e+=r)\u003C0&&(e=0):e>r&&(e=r),e\u003Ct&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t],i=1,o=0;for(;++o\u003Ce&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]\u003C\u003C8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]\u003C\u003C8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]\u003C\u003C8|this[t+2]\u003C\u003C16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]\u003C\u003C16|this[t+2]\u003C\u003C8|this[t+3])},u.prototype.readBigUInt64LE=Y((function(t){$(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)\u003C\u003CBigInt(32))})),u.prototype.readBigUInt64BE=Y((function(t){$(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);let n=this[t],i=1,o=0;for(;++o\u003Ce&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);const r=this[t]|this[t+1]\u003C\u003C8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);const r=this[t+1]|this[t]\u003C\u003C8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]\u003C\u003C8|this[t+2]\u003C\u003C16|this[t+3]\u003C\u003C24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]\u003C\u003C24|this[t+1]\u003C\u003C16|this[t+2]\u003C\u003C8|this[t+3]},u.prototype.readBigInt64LE=Y((function(t){$(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r\u003C\u003C24);return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=Y((function(t){$(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||V(t,this.length-8);const n=(e\u003C\u003C24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o\u003Cr&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Y((function(t,e=0){return O(this,t,e,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),u.prototype.writeBigUInt64BE=Y((function(t,e=0){return L(this,t,e,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i\u003Cr&&(o*=256);)t\u003C0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t\u003C0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t\u003C0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t\u003C0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Y((function(t,e=0){return O(this,t,e,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),u.prototype.writeBigInt64BE=Y((function(t,e=0){return L(this,t,e,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n\u003Cr&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e\u003C0)throw new RangeError(\"targetStart out of bounds\");if(r\u003C0||r>=this.length)throw new RangeError(\"Index out of range\");if(n\u003C0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),t.length-e\u003Cn-r&&(n=t.length-e+r);const i=n-r;return this===t&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!u.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===t.length){const e=t.charCodeAt(0);(\"utf8\"===n&&e\u003C128||\"latin1\"===n)&&(t=e)}}else\"number\"==typeof t?t&=255:\"boolean\"==typeof t&&(t=Number(t));if(e\u003C0||this.length\u003Ce||this.length\u003Cr)throw new RangeError(\"Out of range index\");if(r\u003C=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(i=e;i\u003Cr;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(i=0;i\u003Cr-e;++i)this[i+e]=o[i%s]}return this};const D={};function z(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function H(t){let e=\"\",r=t.length;const n=\"-\"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function F(t,e,r,n,i,o){if(t>r||t\u003Ce){const n=\"bigint\"==typeof e?\"n\":\"\";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and \u003C 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and \u003C 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and \u003C= ${r}${n}`,new D.ERR_OUT_OF_RANGE(\"value\",i,t)}!function(t,e,r){$(e,\"offset\"),void 0!==t[e]&&void 0!==t[e+r]||V(e,t.length-(r+1))}(n,i,o)}function $(t,e){if(\"number\"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,\"number\",t)}function V(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new D.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",t);if(e\u003C0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and \u003C= ${e}`,t)}z(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(t){return t?`${t} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),z(\"ERR_INVALID_ARG_TYPE\",(function(t,e){return`The \"${t}\" argument must be of type number. Received type ${typeof e}`}),TypeError),z(\"ERR_OUT_OF_RANGE\",(function(t,e,r){let n=`The value of \"${t}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):\"bigint\"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r\u003C-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+=\"n\"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s\u003Cn;++s){if(r=t.charCodeAt(s),r>55295&&r\u003C57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r\u003C56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296\u003C\u003C10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r\u003C128){if((e-=1)\u003C0)break;o.push(r)}else if(r\u003C2048){if((e-=2)\u003C0)break;o.push(r>>6|192,63&r|128)}else if(r\u003C65536){if((e-=3)\u003C0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r\u003C1114112))throw new Error(\"Invalid code point\");if((e-=4)\u003C0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(t){return n.toByteArray(function(t){if((t=(t=t.split(\"=\")[0]).trim().replace(q,\"\")).length\u003C2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function J(t,e,r,n){let i;for(i=0;i\u003Cn&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function W(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const X=function(){const t=\"0123456789abcdef\",e=new Array(256);for(let r=0;r\u003C16;++r){const n=16*r;for(let i=0;i\u003C16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return\"undefined\"==typeof BigInt?Q:t}function Q(){throw new Error(\"BigInt not supported\")}},62680:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(89429),o=i(n(\"String.prototype.indexOf\"));t.exports=function(t,e){var r=n(t,!!e);return\"function\"==typeof r&&o(t,\".prototype.\")>-1?i(r):r}},89429:(t,e,r)=>{\"use strict\";var n=r(4090),i=r(67286),o=r(47669),s=r(5408),a=i(\"%Function.prototype.apply%\"),u=i(\"%Function.prototype.call%\"),h=i(\"%Reflect.apply%\",!0)||n.call(u,a),c=r(70999),f=i(\"%Math.max%\");t.exports=function(t){if(\"function\"!=typeof t)throw new s(\"a function is required\");var e=h(n,u,arguments);return o(e,1+f(0,t.length-(arguments.length-1)),!0)};var l=function(){return h(n,a,arguments)};c?c(t.exports,\"apply\",{value:l}):t.exports.apply=l},13973:(t,e,r)=>{var n=r(77834).Buffer,i=r(54851).Transform,o=r(30214).s;function s(t){i.call(this),this.hashMode=\"string\"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(91285)(s,i),s.prototype.update=function(t,e,r){\"string\"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error(\"trying to get auth tag in unsupported state\")},s.prototype.setAuthTag=function(){throw new Error(\"trying to set auth tag in unsupported state\")},s.prototype.setAAD=function(){throw new Error(\"trying to set aad in unsupported state\")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error(\"can't switch encodings\");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},97108:(t,e)=>{var r;r=function(t){t.version=\"1.2.2\";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return\"undefined\"!=typeof Int32Array?new Int32Array(e):e}(),r=function(t){var e=0,r=0,n=0,i=\"undefined\"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=t[n];for(n=0;256!=n;++n)for(r=t[n],e=256+n;e\u003C4096;e+=256)r=i[e]=r>>>8^t[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]=\"undefined\"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(e),n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],h=r[6],c=r[7],f=r[8],l=r[9],d=r[10],p=r[11],m=r[12],g=r[13],y=r[14];t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=0,o=t.length;i\u003Co;)n=n>>>8^e[255&(n^t.charCodeAt(i++))];return~n},t.buf=function(t,r){for(var b=-1^r,v=t.length-15,w=0;w\u003Cv;)b=y[t[w++]^255&b]^g[t[w++]^b>>8&255]^m[t[w++]^b>>16&255]^p[t[w++]^b>>>24]^d[t[w++]]^l[t[w++]]^f[t[w++]]^c[t[w++]]^h[t[w++]]^u[t[w++]]^a[t[w++]]^s[t[w++]]^o[t[w++]]^i[t[w++]]^n[t[w++]]^e[t[w++]];for(v+=15;w\u003Cv;)b=b>>>8^e[255&(b^t[w++])];return~b},t.str=function(t,r){for(var n=-1^r,i=0,o=t.length,s=0,a=0;i\u003Co;)(s=t.charCodeAt(i++))\u003C128?n=n>>>8^e[255&(n^s)]:s\u003C2048?n=(n=n>>>8^e[255&(n^(192|s>>6&31))])>>>8^e[255&(n^(128|63&s))]:s>=55296&&s\u003C57344?(s=64+(1023&s),a=1023&t.charCodeAt(i++),n=(n=(n=(n=n>>>8^e[255&(n^(240|s>>8&7))])>>>8^e[255&(n^(128|s>>2&63))])>>>8^e[255&(n^(128|a>>6&15|(3&s)\u003C\u003C4))])>>>8^e[255&(n^(128|63&a))]):n=(n=(n=n>>>8^e[255&(n^(224|s>>12&15))])>>>8^e[255&(n^(128|s>>6&63))])>>>8^e[255&(n^(128|63&s))];return~n}},\"undefined\"==typeof DO_NOT_EXPORT_CRC?r(e):r({})},95363:(t,e,r)=>{var n=r(48834).Buffer,i=r(87554),o=r(59239);t.exports=function(t){return new a(t)};var s={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 a(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length\u003Cr){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return e?i.toString(e):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,r){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic(\"compressed\"===e,!0);return\"hybrid\"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,t)},a.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e));var r=new o(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},59239:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(88351).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype�u��._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cth�Λn�is.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},16162:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(27993),o=r(51445),s=r(9065),a=r(13973);function u(t){a.call(this,\"digest\"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return\"md5\"===(t=t.toLowerCase())?new i:\"rmd160\"===t||\"ripemd160\"===t?new o:new u(s(t))}},22511:(t,e,r)=>{var n=r(27993);t.exports=function(t){return(new n).update(t).digest()}},50011:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(6456),o=r(13973),s=r(77834).Buffer,a=r(22511),u=r(51445),h=r(9065),c=s.alloc(128);function f(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=s.from(e));var r=\"sha512\"===t||\"sha384\"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=(\"rmd160\"===t?new u:h(t)).update(e).digest():e.length\u003Cr&&(e=s.concat([e,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a\u003Cr;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash=\"rmd160\"===t?new u:h(t),this._hash.update(n)}n(f,o),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){var t=this._hash.digest();return(\"rmd160\"===this._alg?new u:h(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return\"rmd160\"===(t=t.toLowerCase())||\"ripemd160\"===t?new f(\"rmd160\",e):\"md5\"===t?new i(a,e):new f(t,e)}},6456:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(77834).Buffer,o=r(13973),s=i.alloc(128),a=64;function u(t,e){o.call(this,\"digest\"),\"string\"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length\u003Ca&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u\u003Ca;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},5634:(t,e,r)=>{\"use strict\";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(95003),e.createHash=e.Hash=r(16162),e.createHmac=e.Hmac=r(50011);var n=r(24778),i=Object.keys(n),o=[\"sha1\",\"sha224\",\"sha256\",\"sha384\",\"sha512\",\"md5\",\"rmd160\"].concat(i);e.getHashes=function(){return o};var s=r(30499);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(93667);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var u=r(67602);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var h=r(95263);e.createSign=h.createSign,e.Sign=h.Sign,e.createVerify=h.createVerify,e.Verify=h.Verify,e.createECDH=r(95363);var c=r(8493);e.publicEncrypt=c.publicEncrypt,e.privateEncrypt=c.privateEncrypt,e.publicDecrypt=c.publicDecrypt,e.privateDecrypt=c.privateDecrypt;var f=r(69631);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error([\"sorry, createCredentials is not implemented yet\",\"we accept pull requests\",\"https://github.com/crypto-browserify/crypto-browserify\"].join(\"\\n\"))},e.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}},25130:(t,e,r)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+e[0]+(this.useColors?\"%c \":\" \")+\"+\"+t.exports.humanize(this.diff),!this.useColors)return;const r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{\"%%\"!==t&&(n++,\"%c\"===t&&(i=n))})),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem(\"debug\",t):e.storage.removeItem(\"debug\")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem(\"debug\")}catch(t){}!t&&\"undefined\"!=typeof process&&\"env\"in process&&(t=\"false\");return t},e.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&(\"renderer\"===window.process.type||window.process.__nwjs))return!0;if(\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})(),e.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"],e.log=console.debug||console.log||(()=>{}),t.exports=r(87123)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}}},87123:(t,e,r)=>{t.exports=function(t){function e(t){let r,i,o,s=null;function a(...t){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,t[0]=e.coerce(t[0]),\"string\"!=typeof t[0]&&t.unshift(\"%O\");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if(\"%%\"===r)return\"%\";s++;const o=e.formatters[i];if(\"function\"==typeof o){const e=t[s];r=o.call(n,e),t.splice(s,1),s--}return r})),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,\"enabled\",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),\"function\"==typeof e.init&&e.init(a),a}function n(t,r){const n=e(this.namespace+(void 0===r?\":\":r)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\\.\\*\\?$/,\"*\")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>\"-\"+t))].join(\",\");return e.enable(\"\"),t},e.enable=function(t){let r;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const n=(\"string\"==typeof t?t:\"\").split(/[\\s,]+/),i=n.length;for(r=0;r\u003Ci;r++)n[r]&&(\"-\"===(t=n[r].replace(/\\*/g,\".*?\"))[0]?e.skips.push(new RegExp(\"^\"+t.slice(1)+\"$\")):e.names.push(new RegExp(\"^\"+t+\"$\")))},e.enabled=function(t){if(\"*\"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r\u003Cn;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r\u003Cn;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(11378),e.destroy=function(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")},Object.keys(t).forEach((r=>{e[r]=t[r]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e\u003Ct.length;e++)r=(r\u003C\u003C5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},75195:(t,e,r)=>{\"use strict\";var n=r(70999),i=r(48342),o=r(5408),s=r(50326);t.exports=function(t,e,r){if(!t||\"object\"!=typeof t&&\"function\"!=typeof t)throw new o(\"`obj` must be an object or a function`\");if(\"string\"!=typeof e&&\"symbol\"!=typeof e)throw new o(\"`property` must be a string or a symbol`\");if(arguments.length>3&&\"boolean\"!=typeof arguments[3]&&null!==arguments[3])throw new o(\"`nonEnumerable`, if provided, must be a boolean or null\");if(arguments.length>4&&\"boolean\"!=typeof arguments[4]&&null!==arguments[4])throw new o(\"`nonWritable`, if provided, must be a boolean or null\");if(arguments.length>5&&\"boolean\"!=typeof arguments[5]&&null!==arguments[5])throw new o(\"`nonConfigurable`, if provided, must be a boolean or null\");if(arguments.length>6&&\"boolean\"!=typeof arguments[6])throw new o(\"`loose`, if provided, must be a boolean\");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!s&&s(t,e);if(n)n(t,e,{configurable:null===h&&f?f.configurable:!h,enumerable:null===a&&f?f.enumerable:!a,value:r,writable:null===u&&f?f.writable:!u});else{if(!c&&(a||u||h))throw new i(\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\");t[e]=r}}},84387:(t,e,r)=>{\"use strict\";e.utils=r(94112),e.Cipher=r(43639),e.DES=r(4225),e.CBC=r(59692),e.EDE=r(4335)},59692:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o={};function s(t){n.equal(t.length,8,\"Invalid IV length\"),this.iv=new Array(8);for(var e=0;e\u003Cthis.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n\u003Cr.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if(\"encrypt\"===this.type){for(var a=0;a\u003Cthis.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a\u003Cthis.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a\u003Cthis.blockSize;a++)r[n+a]^=s[a];for(a=0;a\u003Cthis.blockSize;a++)s[a]=t[e+a]}}},43639:(t,e,r)=>{\"use strict\";var n=r(79561);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:\"decrypt\"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n\u003Cr;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e\u003Co;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e\u003Ct.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r=\"encrypt\"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e\u003Ct.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,\"Not enough data to decrypt\");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},4225:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o=r(94112),s=r(43639);function a(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,\"Invalid key length\");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s\u003Ct.keys.length;s+=2){var a=h[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],\"encrypt\"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n\u003Ct.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r\u003Ct.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var s=e,a=r,u=0;u\u003Ct.keys.length;u+=2){var h=t.keys[u],c=t.keys[u+1];o.expand(a,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var f=o.substitute(h,c),l=a;a=(s^o.permute(f))>>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],c=t.keys[u+1];o.expand(s,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var f=o.substitute(h,c),l=s;s=(a^o.permute(f))>>>0,a=l}o.rip(s,a,n,i)}},4335:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285),o=r(43639),s=r(4225);function a(t,e){n.equal(e.length,24,\"Invalid key length\");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers=\"encrypt\"===t?[s.create({type:\"encrypt\",key:r}),s.create({type:\"decrypt\",key:i}),s.create({type:\"encrypt\",key:o})]:[s.create({type:\"decrypt\",key:o}),s.create({type:\"encrypt\",key:i}),s.create({type:\"decrypt\",key:r})]}function u(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},94112:(t,e)=>{\"use strict\";e.readUInt32BE=function(t,e){return(t[0+e]\u003C\u003C24|t[1+e]\u003C\u003C16|t[2+e]\u003C\u003C8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a\u003C=24;a+=8)i\u003C\u003C=1,i|=e>>>a+s&1;for(a=0;a\u003C=24;a+=8)i\u003C\u003C=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a\u003C=25;a+=8)o\u003C\u003C=1,o|=e>>>a+s&1;for(a=1;a\u003C=25;a+=8)o\u003C\u003C=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s\u003C4;s++)for(var a=24;a>=0;a-=8)i\u003C\u003C=1,i|=e>>>a+s&1,i\u003C\u003C=1,i|=t>>>a+s&1;for(s=4;s\u003C8;s++)for(a=24;a>=0;a-=8)o\u003C\u003C=1,o|=e>>>a+s&1,o\u003C\u003C=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a\u003C=24;a+=8)i\u003C\u003C=1,i|=e>>a+s&1;for(a=0;a\u003C=24;a+=8)i\u003C\u003C=1,i|=t>>a+s&1}for(a=0;a\u003C=24;a+=8)i\u003C\u003C=1,i|=e>>a+s&1;for(s=1;s\u003C=3;s++){for(a=0;a\u003C=24;a+=8)o\u003C\u003C=1,o|=e>>a+s&1;for(a=0;a\u003C=24;a+=8)o\u003C\u003C=1,o|=t>>a+s&1}for(a=0;a\u003C=24;a+=8)o\u003C\u003C=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t\u003C\u003Ce&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u\u003Ca;u++)o\u003C\u003C=1,o|=t>>>r[u]&1;for(u=a;u\u003Cr.length;u++)s\u003C\u003C=1,s|=e>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)\u003C\u003C5|t>>>27;for(var o=23;o>=15;o-=4)n\u003C\u003C=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i\u003C\u003C=6;i|=(31&t)\u003C\u003C1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i\u003C4;i++){r\u003C\u003C=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i\u003C4;i++){r\u003C\u003C=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r\u003Ci.length;r++)e\u003C\u003C=1,e|=t>>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length\u003Ce;)n=\"0\"+n;for(var i=[],o=0;o\u003Ce;o+=r)i.push(n.slice(o,o+r));return i.join(\" \")}},67602:(t,e,r)=>{var n=r(48834).Buffer,i=r(32808),o=r(23418),s=r(30767);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,\"hex\"),r=new n(o[t].gen,\"hex\");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,u){return n.isBuffer(r)||void 0===a[r]?t(e,\"binary\",r,o):(r=r||\"binary\",u=u||\"binary\",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),\"number\"==typeof e?new s(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new s(e,o,!0)))}},30767:(t,e,r)=>{var n=r(48834).Buffer,i=r(3908),o=new(r(46676)),s=new i(24),a=new i(11),u=new i(10),h=new i(3),c=new i(7),f=r(32808),l=r(95003);function d(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function p(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=g;var m={};function g(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(g.prototype,\"verifyError\",{enumerable:!0,get:function(){return\"number\"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString(\"hex\"),n=[r,t.toString(16)].join(\"_\");if(n in m)return m[n];var i,l=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!o.test(t))return l+=1,l+=\"02\"===r||\"05\"===r?8:4,m[n]=l,l;switch(o.test(t.shrn(1))||(l+=2),r){case\"02\":t.mod(s).cmp(a)&&(l+=8);break;case\"05\":(i=t.mod(u)).cmp(h)&&i.cmp(c)&&(l+=8);break;default:l+=4}return m[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length\u003Co.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,e){return e=e||\"utf8\",n.isBuffer(t)||(t=new n(t,e)),this.__gen=t,this._gen=new i(t),this}},32808:(t,e,r)=>{var n=r(95003);t.exports=b,b.simpleSieve=g,b.fermatTest=y;var i=r(3908),o=new i(24),s=new(r(46676)),a=new i(1),u=new i(2),h=new i(5),c=(new i(16),new i(8),new i(10)),f=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r\u003C1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i\u003Ce&&t[i]\u003C=n&&r%t[i]!=0;i++);e!==i&&t[i]\u003C=n||(t[e++]=r)}return p=t,t}function g(t){for(var e=m(),r=0;r\u003Ce.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function y(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function b(t,e){if(t\u003C16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;r.mod(c).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},3908:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.]�8�red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(20395).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0�=�t�;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},87554:(t,e,r)=>{\"use strict\";var n=e;n.version=r(40763).i8,n.utils=r(18288),n.rand=r(82745),n.curve=r(82284),n.curves=r(41479),n.ec=r(38596),n.eddsa=r(39208)},48919:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error(\"Not implemented\")},u.prototype.validate=function(){throw new Error(\"Not implemented\")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1\u003C\u003Cr.step+1)-(r.step%2==0?2:1);i/=3;var s,u,h=[];for(s=0;s\u003Cn.length;s+=r.step){u=0;for(var c=s+r.step-1;c>=s;c--)u=(u\u003C\u003C1)+n[c];h.push(u)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s\u003Ch.length;s++)(u=h[s])===d?l=l.mixedAdd(r.points[s]):u===-d&&(l=l.mixedAdd(r.points[s].neg()));f=f.add(l)}return f.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),h=s.length-1;h>=0;h--){for(var c=0;h>=0&&0===s[h];h--)c++;if(h>=0&&c++,u=u.dblp(c),h\u003C0)break;var f=s[h];a(0!==f),u=\"affine\"===t.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return\"affine\"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,h,c=this._wnafT1,f=this._wnafT2,l=this._wnafT3,d=0;for(a=0;a\u003Cn;a++){var p=(h=e[a])._getNAFPoints(t);c[a]=p.wnd,f[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,g=a;if(1===c[m]&&1===c[g]){var y=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[m],r[g]);for(d=Math.max(v[0].length,d),l[m]=new Array(d),l[g]=new Array(d),u=0;u\u003Cd;u++){var w=0|v[0][u],M=0|v[1][u];l[m][u]=b[3*(w+1)+(M+1)],l[g][u]=0,f[m]=y}}else l[m]=o(r[m],c[m],this._bitLength),l[g]=o(r[g],c[g],this._bitLength),d=Math.max(l[m].length,d),d=Math.max(l[g].length,d)}var _=this.jpoint(null,null,null),E=this._wnafT4;for(a=d;a>=0;a--){for(var A=0;a>=0;){var S=!0;for(u=0;u\u003Cn;u++)E[u]=0|l[u][a],0!==E[u]&&(S=!1);if(!S)break;A++,a--}if(a>=0&&A++,_=_.dblp(A),a\u003C0)break;for(u=0;u\u003Cn;u++){var x=E[u];0!==x&&(x>0?h=f[u][x-1>>1]:x\u003C0&&(h=f[u][-x-1>>1].neg()),_=\"affine\"===h.type?_.mixedAdd(h):_.add(h))}}for(a=0;a\u003Cn;a++)f[a]=null;return i?_:_.toP()},u.BasePoint=h,h.prototype.eq=function(){throw new Error(\"Not implemented\")},h.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error(\"Unknown point format\")},h.prototype.encodeCompressed=function(t){return this.encode(t,!0)},h.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray(\"be\",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray(\"be\",e))},h.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},h.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},h.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i\u003Ce;i+=t){for(var o=0;o\u003Ct;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},h.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1\u003C\u003Ct)-1,n=1===r?null:this.dbl(),i=1;i\u003Cr;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},h.prototype._getBeta=function(){return null},h.prototype.dblp=function(t){for(var e=this,r=0;r\u003Ct;r++)e=e.dbl();return e}},37105:(t,e,r)=>{\"use strict\";var n=r(18288),i=r(72140),o=r(91285),s=r(48919),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,\"edwards\",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,r,n,o){s.BasePoint.call(this,t,\"projective\"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error(\"invalid point\");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error(\"invalid point\");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(h,s.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new h(this,t,e,r,n)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?\"\u003CEC Point Infinity>\":\"\u003CEC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),h=o.redMul(a),c=i.redMul(a),f=s.redMul(o);return this.curve.point(u,h,f,c)},h.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var h=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(h.redSub(this.curve.two)),e=h.redMul(n.redSub(u)),r=h.redSqr().redSub(h).redSub(h)):(i=this.z.redSqr(),o=h.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=h.redMul(n.redSub(u)),r=h.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),h=o.redMul(s),c=a.redMul(u),f=o.redMul(u),l=s.redMul(a);return this.curve.point(h,c,l,f)},h.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),h=i.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),f=n.redMul(u).redMul(c);return this.curve.twisted?(e=n.redMul(h).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(h)):(e=n.redMul(h).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(h)),this.curve.point(f,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},82284:(t,e,r)=>{\"use strict\";var n=e;n.base=r(48919),n.short=r(27715),n.mont=r(95125),n.edwards=r(37105)},95125:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(91285),o=r(48919),s=r(18288);function a(t){o.call(this,\"mont\",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,\"projective\"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray(\"be\",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?\"\u003CEC Point Infinity>\":\"\u003CEC Point x: \"+this.x.fromRed().toString(16,2)+\" z: \"+this.z.fromRed().toString(16,2)+\">\"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.jumlAdd=function(){throw new Error(\"Not supported on Montgomery curve\")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},27715:(t,e,r)=>{\"use strict\";var n=r(18288),i=r(72140),o=r(91285),s=r(48919),a=n.assert;function u(t){s.call(this,\"short\",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(t,e,r,n){s.BasePoint.call(this,t,\"affine\"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(t,e,r,n){s.BasePoint.call(this,t,\"jacobian\"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])\u003C0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,h,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),b=0;0!==l.cmpn(0);){var v=d.div(l);h=d.sub(v.mul(l)),c=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&h.cmp(f)\u003C0)e=u.neg(),r=p,n=h.neg(),o=c;else if(n&&2==++b)break;u=h,d=l,l=h,g=p,p=c,y=m,m=w}s=h.neg(),a=c;var M=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(M)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),h=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error(\"invalid point\");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o\u003Ct.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var h=this._wnafMulAdd(1,n,i,2*o,r),c=0;c\u003C2*o;c++)n[c]=null,i[c]=null;return h},o(h,s.BasePoint),u.prototype.point=function(t,e,r){return new h(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return h.fromJSON(this,t,e)},h.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},h.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},h.fromJSON=function(t,e,r){\"string\"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},h.prototype.inspect=function(){return this.isInfinity()?\"\u003CEC Point Infinity>\":\"\u003CEC Point x: \"+this.x.fromRed().toString(16,2)+\" y: \"+this.y.fromRed().toString(16,2)+\">\"},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},h.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new c(this,t,e,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.i�~�z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),c=h.redMul(a),f=n.redMul(h),l=u.redSqr().redIAdd(c).redISub(f).redISub(f),d=u.redMul(f.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,d,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),c=r.redMul(u),f=a.redSqr().redIAdd(h).redISub(c).redISub(c),l=a.redMul(c.redISub(f)).redISub(i.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(f,l,d)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e\u003Ct;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),h=s.redAdd(s);for(e=0;e\u003Ct;e++){var c=o.redSqr(),f=h.redSqr(),l=f.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(l);var b=h.redMul(a);e+1\u003Ct&&(u=u.redMul(l)),o=m,a=b,h=y}return this.curve.jpoint(o,h.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),t=u,e=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),f=this.y.redSqr(),l=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(c).redISub(l);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},c.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),e=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),f=this.y.redSqr(),l=this.x.redMul(f),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(c);var g=f.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},c.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),h=(u=u.redIAdd(u)).redMul(s),c=a.redSqr().redISub(h.redAdd(h)),f=h.redISub(c),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=a.redMul(f).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var h=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),c=e.redMul(h);c=(c=c.redIAdd(c)).redIAdd(c);var f=this.x.redMul(a).redISub(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.y.redMul(h.redMul(u.redISub(h)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,l,d)},c.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},c.prototype.eq=function(t){if(\"affine\"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},c.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?\"\u003CEC JPoint Infinity>\":\"\u003CEC JPoint x: \"+this.x.toString(16,2)+\" y: \"+this.y.toString(16,2)+\" z: \"+this.z.toString(16,2)+\">\"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},41479:(t,e,r)=>{\"use strict\";var n,i=e,o=r(34485),s=r(82284),a=r(18288).assert;function u(t){\"short\"===t.type?this.curve=new s.short(t):\"edwards\"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),\"Invalid curve\"),a(this.g.mul(this.n).isInfinity(),\"Invalid curve, G*N != O\")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,h(\"p192\",{type:\"short\",prime:\"p192\",p:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",b:\"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",n:\"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",hash:o.sha256,gRed:!1,g:[\"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"]}),h(\"p224\",{type:\"short\",prime:\"p224\",p:\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",a:\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",b:\"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",n:\"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",hash:o.sha256,gRed:!1,g:[\"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"]}),h(\"p256\",{type:\"short\",prime:null,p:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",a:\"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",b:\"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",n:\"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",hash:o.sha256,gRed:!1,g:[\"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"]}),h(\"p384\",{type:\"short\",prime:null,p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",a:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",b:\"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",n:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",hash:o.sha384,gRed:!1,g:[\"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"]}),h(\"p521\",{type:\"short\",prime:null,p:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",a:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",b:\"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",n:\"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",hash:o.sha512,gRed:!1,g:[\"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"]}),h(\"curve25519\",{type:\"mont\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"76d06\",b:\"1\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"9\"]}),h(\"ed25519\",{type:\"edwards\",prime:\"p25519\",p:\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",a:\"-1\",c:\"1\",d:\"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",n:\"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",hash:o.sha256,gRed:!1,g:[\"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\"6666666666666666666666666666666666666666666666666666666666666658\"]});try{n=r(47983)}catch(t){n=void 0}h(\"secp256k1\",{type:\"short\",prime:\"k256\",p:\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",a:\"0\",b:\"7\",n:\"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",h:\"1\",hash:o.sha256,beta:\"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",lambda:\"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",basis:[{a:\"3086d221a7d46bcde86c90e49284eb15\",b:\"-e4437ed6010e88286f547fa90abfe4c3\"},{a:\"114ca50f7a8e2f3f657c1108d9d44cfd8\",b:\"3086d221a7d46bcde86c90e49284eb15\"}],gRed:!1,g:[\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",n]})},38596:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(78873),o=r(18288),s=r(41479),a=r(82745),u=o.assert,h=r(22307),c=r(71798);function f(t){if(!(this instanceof f))return new f(t);\"string\"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),\"Unknown curve \"+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=f,f.prototype.keyPair=function(t){return new h(this,t)},f.prototype.keyFromPrivate=function(t,e){return h.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return h.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||\"utf8\",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||\"utf8\",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(t,e,r){var i;if(n.isBN(t)||\"number\"==typeof t)i=(t=new n(t,16)).byteLength();else if(\"object\"==typeof t)i=t.length,t=new n(t,16);else{var o=t.toString();i=o.length+1>>>1,t=new n(o,16)}\"number\"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,e,r,o){if(\"object\"==typeof r&&(o=r,r=null),o||(o={}),\"string\"!=typeof t&&\"number\"!=typeof t&&!n.isBN(t)){u(\"object\"==typeof t&&t&&\"number\"==typeof t.length,\"Expected message to be an array-like, a hex string, or a BN instance\"),u(t.length>>>0===t.length);for(var s=0;s\u003Ct.length;s++)u((255&t[s])===t[s])}e=this.keyFromPrivate(e,r),t=this._truncateToN(t,!1,o.msgBitLength),u(!t.isNeg(),\"Can not sign a negative message\");var a=this.n.byteLength(),h=e.getPrivate().toArray(\"be\",a),f=t.toArray(\"be\",a);u(new n(f).eq(t),\"Can not sign message\");for(var l=new i({hash:this.hash,entropy:h,nonce:f,pers:o.pers,persEnc:o.persEnc||\"utf8\"}),d=this.n.sub(new n(1)),p=0;;p++){var m=o.k?o.k(p):new n(l.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)\u003C=0||m.cmp(d)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new c({r:b,s:v,recoveryParam:w})}}}}}},f.prototype.verify=function(t,e,r,n,i){i||(i={}),t=this._truncateToN(t,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(e=new c(e,\"hex\")).r,s=e.s;if(o.cmpn(1)\u003C0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)\u003C0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),h=u.mul(t).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,\"The recovery param is more than two bits\"),e=new c(e,i);var o=this.n,s=new n(t),a=e.r,h=e.s,f=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error(\"Unable to find sencond key candinate\");a=l?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var d=e.r.invm(o),p=o.sub(s).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,a,m)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new c(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i\u003C4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error(\"Unable to find valid recovery factor\")}},22307:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:\"Invalid public key\"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:\"Public key * N != O\"}:{result:!1,reason:\"Public key is not a point\"}},o.prototype.getPublic=function(t,e){return\"string\"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return\"hex\"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return\"mont\"===this.ec.curve.type?i(t.x,\"Need x coordinate\"):\"short\"!==this.ec.curve.type&&\"edwards\"!==this.ec.curve.type||i(t.x&&t.y,\"Need both x and y coordinate\"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),\"public point not validated\"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},o.prototype.inspect=function(){return\"\u003CKey priv: \"+(this.priv&&this.priv.toString(16,2))+\" pub: \"+(this.pub&&this.pub.inspect())+\" >\"}},71798:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,\"Signature without r or s\"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===t[e.place])return!1;for(var i=0,o=0,s=e.place;o\u003Cn;o++,s++)i\u003C\u003C=8,i|=t[s],i>>>=0;return!(i\u003C=127)&&(e.place=s,i)}function h(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e\u003Cr;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e\u003C128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r\u003C\u003C3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;if(0!=(128&t[r.place]))return!1;var h=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var c=u(t,r);if(!1===c)return!1;if(t.length!==c+r.place)return!1;if(0!=(128&t[r.place]))return!1;var f=t.slice(r.place,c+r.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(h),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,e.length),(n=n.concat(e)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,t)}},39208:(t,e,r)=>{\"use strict\";var n=r(34485),i=r(41479),o=r(18288),s=o.assert,a=o.parseBytes,u=r(851),h=r(6117);function c(t){if(s(\"ed25519\"===t,\"only tested with ed25519 so far\"),!(this instanceof c))return new c(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=c,c.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(t,e,r){if(t=a(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e\u003Carguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function(t){return t instanceof h?t:new h(this,t)},c.prototype.encodePoint=function(t){var e=t.getY().toArray(\"le\",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},c.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},c.prototype.encodeInt=function(t){return t.toArray(\"le\",this.encodingLength)},c.prototype.decodeInt=function(t){return o.intFromLE(t)},c.prototype.isPoint=function(t){return t instanceof this.pointClass}},851:(t,e,r)=>{\"use strict\";var n=r(18288),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,\"pubBytes\",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,\"pub\",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,\"privBytes\",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,\"priv\",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,\"hash\",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,\"messagePrefix\",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,\"KeyPair can only verify\"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,\"KeyPair is public only\"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},6117:(t,e,r)=>{\"use strict\";var n=r(72140),i=r(18288),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,\"object\"!=typeof e&&(e=a(e)),Array.isArray(e)&&(o(e.length===2*t.encodingLength,\"Signature has invalid size\"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,\"Signature without R or S\"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,\"S\",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,\"R\",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,\"Rencoded\",(function(){return this.eddsa.encodePoint(this.R())})),s(u,\"Sencoded\",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),\"hex\").toUpperCase()},t.exports=u},47983:t=>{t.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\",\"a69dce4a7d6c98e8d4a1aca87ef�z���8d7003f83c230f3afa726ab40e52290be1c55\"],[\"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\"]]}}},18288:(t,e,r)=>{\"use strict\";var n=e,i=r(72140),o=r(79561),s=r(43022);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n\u003Ci.length;n+=1)i[n]=0;var o=1\u003C\u003Ce+1,s=t.clone();for(n=0;n\u003Ci.length;n++){var a,u=s.andln(o-1);s.isOdd()?(a=u>(o>>1)-1?(o>>1)-u:u,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,h=e.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=0==(1&u)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==h?u:-u,r[0].push(s),a=0==(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==u?h:-h,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n=\"_\"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return\"string\"==typeof t?n.toArray(t,\"hex\"):t},n.intFromLE=function(t){return new i(t,\"hex\",\"le\")}},72140:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(30488).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,k1a�i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},70999:(t,e,r)=>{\"use strict\";var n=r(67286)(\"%Object.defineProperty%\",!0)||!1;if(n)try{n({},\"a\",{value:1})}catch(t){n=!1}t.exports=n},69654:t=>{\"use strict\";t.exports=EvalError},42321:t=>{\"use strict\";t.exports=Error},48205:t=>{\"use strict\";t.exports=RangeError},2976:t=>{\"use strict\";t.exports=ReferenceError},48342:t=>{\"use strict\";t.exports=SyntaxError},5408:t=>{\"use strict\";t.exports=TypeError},82885:t=>{\"use strict\";t.exports=URIError},1115:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.keccak512=e.keccak384=e.keccak256=e.keccak224=void 0;const n=r(73488),i=r(10144);e.keccak224=(0,i.wrapHash)(n.keccak_224),e.keccak256=(()=>{const t=(0,i.wrapHash)(n.keccak_256);return t.create=n.keccak_256.create,t})(),e.keccak384=(0,i.wrapHash)(n.keccak_384),e.keccak512=(0,i.wrapHash)(n.keccak_512)},91839:(t,e)=>{\"use strict\";function r(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function n(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function i(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function o(t,...e){if(!i(t))throw new Error(\"Uint8Array expected\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function s(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(t.outputLen),r(t.blockLen)}function a(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function u(t,e){o(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0,e.number=r,e.bool=n,e.isBytes=i,e.bytes=o,e.hash=s,e.exists=a,e.output=u;const h={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};e.default=h},91116:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;const n=r(91839),i=r(50300);e.Chi=(t,e,r)=>t&e^~t&r;e.Maj=(t,e,r)=>t&e^t&r^e&r;class o extends i.Hash{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.createView)(this.buffer)}update(t){(0,n.exists)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.toBytes)(t)).length;for(let n=0;n\u003Cs;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(t.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(e,0),this.pos=0);else{const e=(0,i.createView)(t);for(;o\u003C=s-n;n+=o)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.exists)(this),(0,n.output)(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let t=a;t\u003Co;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(t),h=this.outputLen;if(h%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=h/4,f=this.get();if(c>f.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cc;t++)u.setUint32(4*t,f[t],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t#s."�.destroyed=o,n%e&&t.buffer.set(r),t}}e.HashMD=o},2426:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.add5L=e.add5H=e.add4H=e.add4L=e.add3H=e.add3L=e.add=e.rotlBL=e.rotlBH=e.rotlSL=e.rotlSH=e.rotr32L=e.rotr32H=e.rotrBL=e.rotrBH=e.rotrSL=e.rotrSH=e.shrSL=e.shrSH=e.toBig=e.split=e.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(t,e=!1){return e?{h:Number(t&r),l:Number(t>>n&r)}:{h:0|Number(t>>n&r),l:0|Number(t&r)}}function o(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let o=0;o\u003Ct.length;o++){const{h:s,l:a}=i(t[o],e);[r[o],n[o]]=[s,a]}return[r,n]}e.fromBig=i,e.split=o;const s=(t,e)=>BigInt(t>>>0)\u003C\u003Cn|BigInt(e>>>0);e.toBig=s;const a=(t,e,r)=>t>>>r;e.shrSH=a;const u=(t,e,r)=>t\u003C\u003C32-r|e>>>r;e.shrSL=u;const h=(t,e,r)=>t>>>r|e\u003C\u003C32-r;e.rotrSH=h;const c=(t,e,r)=>t\u003C\u003C32-r|e>>>r;e.rotrSL=c;const f=(t,e,r)=>t\u003C\u003C64-r|e>>>r-32;e.rotrBH=f;const l=(t,e,r)=>t>>>r-32|e\u003C\u003C64-r;e.rotrBL=l;const d=(t,e)=>e;e.rotr32H=d;const p=(t,e)=>t;e.rotr32L=p;const m=(t,e,r)=>t\u003C\u003Cr|e>>>32-r;e.rotlSH=m;const g=(t,e,r)=>e\u003C\u003Cr|t>>>32-r;e.rotlSL=g;const y=(t,e,r)=>e\u003C\u003Cr-32|t>>>64-r;e.rotlBH=y;const b=(t,e,r)=>t\u003C\u003Cr-32|e>>>64-r;function v(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}}e.rotlBL=b,e.add=v;const w=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);e.add3L=w;const M=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;e.add3H=M;const _=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);e.add4L=_;const E=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;e.add4H=E;const A=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);e.add5L=A;const S=(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0;e.add5H=S;const x={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:h,rotrSL:c,rotrBH:f,rotrBL:l,rotr32H:d,rotr32L:p,rotlSH:m,rotlSL:g,rotlBH:y,rotlBL:b,add:v,add3L:w,add3H:M,add4L:_,add4H:E,add5H:S,add5L:A};e.default=x},44937:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=void 0,e.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},13426:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha224=e.sha256=void 0;const n=r(91116),i=r(50300),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class u extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r\u003C16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=a[t-15],r=a[t-2],n=(0,i.rotr)(e,7)^(0,i.rotr)(e,18)^e>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:s,C:u,D:h,E:c,F:f,G:l,H:d}=this;for(let t=0;t\u003C64;t++){const e=d+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+(0,n.Chi)(c,f,l)+o[t]+a[t]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,s,u)|0;d=l,l=f,f=c,c=h+e|0,h=u,u=s,s=r,r=e+p|0}r=r+this.A|0,s=s+this.B|0,u=u+this.C|0,h=h+this.D|0,c=c+this.E|0,f=f+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,u,h,c,f,l,d)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class h extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}e.sha256=(0,i.wrapConstructor)((()=>new u)),e.sha224=(0,i.wrapConstructor)((()=>new h))},73488:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.shake256=e.shake128=e.keccak_512=e.keccak_384=e.keccak_256=e.keccak_224=e.sha3_512=e.sha3_384=e.sha3_256=e.sha3_224=e.Keccak=e.keccakP=void 0;const n=r(91839),i=r(2426),o=r(50300),s=[],a=[],u=[],h=BigInt(0),c=BigInt(1),f=BigInt(2),l=BigInt(7),d=BigInt(256),p=BigInt(113);for(let t=0,e=c,r=1,n=0;t\u003C24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t\u003C7;t++)e=(e\u003C\u003Cc^(e>>l)*p)%d,e&f&&(i^=c\u003C\u003C(c\u003C\u003CBigInt(t))-c);u.push(i)}const[m,g]=(0,i.split)(u,!0),y=(t,e,r)=>r>32?(0,i.rotlBH)(t,e,r):(0,i.rotlSH)(t,e,r),b=(t,e,r)=>r>32?(0,i.rotlBL)(t,e,r):(0,i.rotlSL)(t,e,r);function v(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n\u003C24;n++){for(let e=0;e\u003C10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e\u003C10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=b(o,s,1)^r[n+1];for(let r=0;r\u003C50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r\u003C24;r++){const n=a[r],o=y(e,i,n),u=b(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=u}for(let e=0;e\u003C50;e+=10){for(let n=0;n\u003C10;n++)r[n]=t[e+n];for(let n=0;n\u003C10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=g[n]}r.fill(0)}e.keccakP=v;class w extends o.Hash{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){o.isLE||(0,o.byteSwap32)(this.state32),v(this.state32,this.rounds),o.isLE||(0,o.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.exists)(this);const{blockLen:e,state:r}=this,i=(t=(0,o.toBytes)(t)).length;for(let n=0;n\u003Ci;){const o=Math.min(e-this.pos,i-n);for(let e=0;e\u003Co;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.exists)(this,!1),(0,n.bytes)(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n\u003Ci;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return(0,n.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.output)(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new w(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}e.Keccak=w;const M=(t,e,r)=>(0,o.wrapConstructor)((()=>new w(e,t,r)));e.sha3_224=M(6,144,28),e.sha3_256=M(6,136,32),e.sha3_384=M(6,104,48),e.sha3_512=M(6,72,64),e.keccak_224=M(1,144,28),e.keccak_256=M(1,136,32),e.keccak_384=M(1,104,48),e.keccak_512=M(1,72,64);const _=(t,e,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(e,t,void 0===n.dkLen?r:n.dkLen,!0)));e.shake128=_(31,168,16),e.shake256=_(31,136,32)},50300:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const n=r(44937),i=r(91839);e.isBytes=function(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name};e.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));e.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);e.rotr=(t,e)=>t\u003C\u003C32-e|t>>>e;e.rotl=(t,e)=>t\u003C\u003Ce|t>>>32-e>>>0,e.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];e.byteSwap=t=>t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255,e.byteSwapIfBE=e.isLE?t=>t:t=>(0,e.byteSwap)(t),e.byteSwap32=function(t){for(let r=0;r\u003Ct.length;r++)t[r]=(0,e.byteSwap)(t[r])};const o=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));e.bytesToHex=function(t){(0,i.bytes)(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=o[t[r]];return e};const s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(t){return t>=s._0&&t\u003C=s._9?t-s._0:t>=s._A&&t\u003C=s._F?t-(s._A-10):t>=s._a&&t\u003C=s._f?t-(s._a-10):void 0}e.hexToBytes=function(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=a(t.charCodeAt(i)),o=a(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n};function u(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function h(t){return\"string\"==typeof t&&(t=u(t)),(0,i.bytes)(t),t}e.nextTick=async()=>{},e.asyncLoop=async function(t,r,n){let i=Date.now();for(let o=0;o\u003Ct;o++){n(o);const t=Date.now()-i;t>=0&&t\u003Cr||(await(0,e.nextTick)(),i+=t)}},e.utf8ToBytes=u,e.toBytes=h,e.concatBytes=function(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];(0,i.bytes)(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r};e.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;e.checkOpts=function(t,e){if(void 0!==e&&\"[object Object]\"!==c.call(e))throw new Error(\"Options should be object or undefined\");return Object.assign(t,e)},e.wrapConstructor=function(t){const e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e},e.wrapConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.wrapXOFConstructorWithOpts=function(t){const e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e},e.randomBytes=function(t=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}},80101:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.secp256k1=void 0;var n=r(38358);Object.defineProperty(e,\"secp256k1\",{enumerable:!0,get:function(){return n.secp256k1}})},55806:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.sha256=void 0;const n=r(13426),i=r(10144);e.sha256=(0,i.wrapHash)(n.sha256)},10144:function(t,e,r){\"use strict\";t=r.nmd(t);var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.crypto=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0,e.bytesToUtf8=function(t){if(!(t instanceof Uint8Array))throw new TypeError(\"bytesToUtf8 expected Uint8Array, got \"+typeof t);return(new TextDecoder).decode(t)},e.hexToBytes=function(t){const e=t.startsWith(\"0x\")?t.substring(2):t;return(0,o.hexToBytes)(e)},e.equalsBytes=function(t,e){if(t.length!==e.length)return!1;for(let r=0;r\u003Ct.length;r++)if(t[r]!==e[r])return!1;return!0},e.wrapHash=function(t){return e=>(i.default.bytes(e),t(e))};const i=n(r(91839)),o=r(50300),s=i.default.bool;e.assertBool=s;const a=i.default.bytes;e.assertBytes=a;var u=r(50300);Object.defineProperty(e,\"bytesToHex\",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(e,\"toHex\",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(e,\"concatBytes\",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(e,\"createView\",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(e,\"utf8ToBytes\",{enumerable:!0,get:function(){return u.utf8ToBytes}}),e.crypto=(()=>{const e=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,r=\"function\"==typeof t.require&&t.require.bind(t);return{node:r&&!e?r(\"crypto\"):void 0,web:e}})()},22699:t=>{\"use strict\";var e,r=\"object\"==typeof Reflect?Reflect:null,n=r&&\"function\"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&\"function\"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){\"function\"==typeof t.removeListener&&t.removeListener(\"error\",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),\"error\"!==e&&function(t,e,r){\"function\"==typeof t.on&&m(t,\"error\",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if(\"function\"!=typeof t)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,h;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit(\"newListener\",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if(\"function\"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");c.name=\"MaxListenersExceededWarning\",c.emitter=t,c.type=e,c.count=s.length,h=c,console&&console.warn&&console.warn(h)}return t}function c(){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 f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r\u003Ce.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n\u003Ce;++n)r[n]=t[n];return r}function m(t,e,r,n){if(\"function\"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if(\"function\"!=typeof t.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,\"defaultMaxListeners\",{enumerable:!0,get:function(){return s},set:function(t){if(\"number\"!=typeof t||t\u003C0||i(t))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+t+\".\");s=t}}),o.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},o.prototype.setMaxListeners=function(t){if(\"number\"!=typeof t||t\u003C0||i(t))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+t+\".\");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r\u003Carguments.length;r++)e.push(arguments[r]);var i=\"error\"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error(\"Unhandled error.\"+(s?\" (\"+s.message+\")\":\"\"));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if(\"function\"==typeof u)n(u,this,e);else{var h=u.length,c=p(u,h);for(r=0;r\u003Ch;++r)n(c[r],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit(\"removeListener\",t,r.listener||e));else if(\"function\"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i\u003C0)return this;0===i?r.shift():function(t,e){for(;e+1\u003Ct.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n\u003Co.length;++n)\"removeListener\"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return\"function\"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},59341:(t,e,r)=>{var n=r(77834).Buffer,i=r(27993);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,\"binary\")),e&&(n.isBuffer(e)||(e=n.from(e,\"binary\")),8!==e.length))throw new RangeError(\"salt should be Buffer with 8 byte length\");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),h=n.alloc(0);s>0||o>0;){var c=new i;c.update(h),c.update(t),e&&c.update(e),h=c.digest();var f=0;if(s>0){var l=a.length-s;f=Math.min(s,h.length),h.copy(a,l,0,f),s-=f}if(f\u003Ch.length&&o>0){var d=u.length-o,p=Math.min(o,h.length-f);h.copy(u,d,f,f+p),o-=p}}return h.fill(0),{key:a,iv:u}}},77847:t=>{t.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var e=\"[...]\",r=\"[Circular]\",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=o()),u(t,\"\",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,l(e),r)}catch(t){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var h=n.pop();4===h.length?Object.defineProperty(h[0],h[1],h[3]):h[0][h[1]]=h[2]}}return a}function a(t,e,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,s])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function u(t,n,i,o,s,h,c){var f;if(h+=1,\"object\"==typeof t&&null!==t){for(f=0;f\u003Co.length;f++)if(o[f]===t)return void a(r,t,n,s);if(void 0!==c.depthLimit&&h>c.depthLimit)return void a(e,t,n,s);if(void 0!==c.edgesLimit&&i+1>c.edgesLimit)return void a(e,t,n,s);if(o.push(t),Array.isArray(t))for(f=0;f\u003Ct.length;f++)u(t[f],f,f,o,t,h,c);else{var l=Object.keys(t);for(f=0;f\u003Cl.length;f++){var d=l[f];u(t[d],d,f,o,t,h,c)}}o.pop()}}function h(t,e){return t\u003Ce?-1:t>e?1:0}function c(t,e,r,s){void 0===s&&(s=o());var a,u=f(t,\"\",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(u,e,r):JSON.stringify(u,l(e),r)}catch(t){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var h=n.pop();4===h.length?Object.defineProperty(h[0],h[1],h[3]):h[0][h[1]]=h[2]}}return a}function f(t,i,o,s,u,c,l){var d;if(c+=1,\"object\"==typeof t&&null!==t){for(d=0;d\u003Cs.length;d++)if(s[d]===t)return void a(r,t,i,u);try{if(\"function\"==typeof t.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(e,t,i,u);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(e,t,i,u);if(s.push(t),Array.isArray(t))for(d=0;d\u003Ct.length;d++)f(t[d],d,d,s,t,c,l);else{var p={},m=Object.keys(t).sort(h);for(d=0;d\u003Cm.length;d++){var g=m[d];f(t[g],g,d,s,t,c,l),p[g]=t[g]}if(void 0===u)return p;n.push([u,i,t]),u[i]=p}s.pop()}}function l(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n\u003Ci.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},83243:(t,e,r)=>{\"use strict\";var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError(\"iterator must be a function\");var s;arguments.length>=3&&(s=r),\"[object Array]\"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n\u003Ci;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):\"string\"==typeof t?function(t,e,r){for(var n=0,i=t.length;n\u003Ci;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},37795:t=>{\"use strict\";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n\u003Ct.length;n+=1)r[n]=t[n];for(var i=0;i\u003Ce.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if(\"function\"!=typeof i||\"[object Function]\"!==e.apply(i))throw new TypeError(\"Function.prototype.bind called on incompatible \"+i);for(var o,s=function(t,e){for(var r=[],n=e||0,i=0;n\u003Ct.length;n+=1,i+=1)r[i]=t[n];return r}(arguments,1),a=r(0,i.length-s.length),u=[],h=0;h\u003Ca;h++)u[h]=\"$\"+h;if(o=Function(\"binder\",\"return function (\"+function(t,e){for(var r=\"\",n=0;n\u003Ct.length;n+=1)r+=t[n],n+1\u003Ct.length&&(r+=e);return r}(u,\",\")+\"){ return binder.apply(this,arguments); }\")((function(){if(this instanceof o){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(t,n(s,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,o.prototype=new c,c.prototype=null}return o}},4090:(t,e,r)=>{\"use strict\";var n=r(37795);t.exports=Function.prototype.bind||n},67286:(t,e,r)=>{\"use strict\";var n,i=r(42321),o=r(69654),s=r(48205),a=r(2976),u=r(48342),h=r(5408),c=r(82885),f=Function,l=function(t){try{return f('\"use strict\"; return ('+t+\").constructor;\")()}catch(t){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},\"\")}catch(t){d=null}var p=function(){throw new h},m=d?function(){try{return p}catch(t){try{return d(arguments,\"callee\").get}catch(t){return p}}}():p,g=r(32636)(),y=r(18486)(),b=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),v={},w=\"undefined\"!=typeof Uint8Array&&b?b(Uint8Array):n,M={__proto__:null,\"%AggregateError%\":\"undefined\"==typeof AggregateError?n:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?n:ArrayBuffer,\"%ArrayIteratorPrototype%\":g&&b?b([][Symbol.iterator]()):n,\"%AsyncFromSyncIteratorPrototype%\":n,\"%AsyncFunction%\":v,\"%AsyncGenerator%\":v,\"%AsyncGeneratorFunction%\":v,\"%AsyncIteratorPrototype%\":v,\"%Atomics%\":\"undefined\"==typeof Atomics?n:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?n:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?n:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?n:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?n:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":i,\"%eval%\":eval,\"%EvalError%\":o,\"%Float32Array%\":\"undefined\"==typeof Float32Array?n:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?n:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?n:FinalizationRegistry,\"%Function%\":f,\"%GeneratorFunction%\":v,\"%Int8Array%\":\"undefined\"==typeof Int8Array?n:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?n:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?n:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":g&&b?b(b([][Symbol.iterator]())):n,\"%JSON%\":\"object\"==typeof JSON?JSON:n,\"%Map%\":\"undefined\"==typeof Map?n:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?n:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?n:Proxy,\"%RangeError%\":s,\"%ReferenceError%\":a,\"%Reflect%\":\"undefined\"==typeof Reflect?n:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?n:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?n:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":g&&b?b(\"\"[Symbol.iterator]()):n,\"%Symbol%\":g?Symbol:n,\"%SyntaxError%\":u,\"%ThrowTypeError%\":m,\"%TypedArray%\":w,\"%TypeError%\":h,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?n:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?n:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?n:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?n:Uint32Array,\"%URIError%\":c,\"%WeakMap%\":\"undefined\"==typeof WeakMap?n:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?n:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var _=b(b(t));M[\"%Error.prototype%\"]=_}var E=function t(e){var r;if(\"%AsyncFunction%\"===e)r=l(\"async function () {}\");else if(\"%GeneratorFunction%\"===e)r=l(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===e)r=l(\"async function* () {}\");else if(\"%AsyncGenerator%\"===e){var n=t(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(\"%AsyncIteratorPrototype%\"===e){var i=t(\"%AsyncGenerator%\");i&&b&&(r=b(i.prototype))}return M[e]=r,r},A={__proto__:null,\"%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\"]},S=r(4090),x=r(72196),B=S.call(Function.call,Array.prototype.concat),T=S.call(Function.apply,Array.prototype.splice),I=S.call(Function.call,String.prototype.replace),k=S.call(Function.call,String.prototype.slice),P=S.call(Function.call,RegExp.prototype.exec),C=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,R=/\\\\(\\\\)?/g,O=function(t,e){var r,n=t;if(x(A,n)&&(n=\"%\"+(r=A[n])[0]+\"%\"),x(M,n)){var i=M[n];if(i===v&&(i=E(n)),void 0===i&&!e)throw new h(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:r,name:n,value:i}}throw new u(\"intrinsic \"+t+\" does not exist!\")};t.exports=function(t,e){if(\"string\"!=typeof t||0===t.length)throw new h(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof e)throw new h('\"allowMissing\" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new u(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var r=function(t){var e=k(t,0,1),r=k(t,-1);if(\"%\"===e&&\"%\"!==r)throw new u(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===r&&\"%\"!==e)throw new u(\"invalid intrinsic syntax, expected opening `%`\");var n=[];return I(t,C,(function(t,e,r,i){n[n.length]=r?I(i,R,\"$1\"):e||t})),n}(t),n=r.length>0?r[0]:\"\",i=O(\"%\"+n+\"%\",e),o=i.name,s=i.value,a=!1,c=i.alias;c&&(n=c[0],T(r,B([0,1],c)));for(var f=1,l=!0;f\u003Cr.length;f+=1){var p=r[f],m=k(p,0,1),g=k(p,-1);if(('\"'===m||\"'\"===m||\"`\"===m||'\"'===g||\"'\"===g||\"`\"===g)&&m!==g)throw new u(\"property names with quotes must have matching quotes\");if(\"constructor\"!==p&&l||(a=!0),x(M,o=\"%\"+(n+=\".\"+p)+\"%\"))s=M[o];else if(null!=s){if(!(p in s)){if(!e)throw new h(\"base intrinsic for \"+t+\" exists, but th��q��e property is not available.\");return}if(d&&f+1>=r.length){var y=d(s,p);s=(l=!!y)&&\"get\"in y&&!(\"originalValue\"in y.get)?y.get:s[p]}else l=x(s,p),s=s[p];l&&!a&&(M[o]=s)}}return s}},50326:(t,e,r)=>{\"use strict\";var n=r(67286)(\"%Object.getOwnPropertyDescriptor%\",!0);if(n)try{n([],\"length\")}catch(t){n=null}t.exports=n},81181:(t,e,r)=>{\"use strict\";var n=r(70999),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],\"length\",{value:1}).length}catch(t){return!0}},t.exports=i},18486:t=>{\"use strict\";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},32636:(t,e,r)=>{\"use strict\";var n=\"undefined\"!=typeof Symbol&&Symbol,i=r(66679);t.exports=function(){return\"function\"==typeof n&&(\"function\"==typeof Symbol&&(\"symbol\"==typeof n(\"foo\")&&(\"symbol\"==typeof Symbol(\"bar\")&&i())))}},66679:t=>{\"use strict\";t.exports=function(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var t={},e=Symbol(\"test\"),r=Object(e);if(\"string\"==typeof e)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(e))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},67226:(t,e,r)=>{\"use strict\";var n=r(66679);t.exports=function(){return n()&&!!Symbol.toStringTag}},84485:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=r(67525).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(91285)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&\"string\"!=typeof t)throw new TypeError(e+\" must be a string or a buffer\")}(t,\"Data\"),this._finalized)throw new Error(\"Digest already called\");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o\u003Cthis._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i\u003Ct.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error(\"_update is not implemented\")},o.prototype.digest=function(t){if(this._finalized)throw new Error(\"Digest already called\");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r\u003C4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error(\"_digest is not implemented\")},t.exports=o},34485:(t,e,r)=>{var n=e;n.utils=r(50212),n.common=r(74495),n.sha=r(45530),n.ripemd=r(91396),n.hmac=r(15047),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},74495:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(79561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian=\"big\",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i\u003Ct.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i\u003Cr;i++)n[i]=0;if(t\u003C\u003C=3,\"big\"===this.endian){for(var o=8;o\u003Cthis.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o\u003Cthis.padLength;o++)n[i++]=0;return n}},15047:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(79561);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length\u003C=this.blockSize);for(var e=t.length;e\u003Cthis.blockSize;e++)t.push(0);for(e=0;e\u003Ct.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e\u003Ct.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},91396:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,h=i.BlockHash;function c(){if(!(this instanceof c))return new c;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian=\"little\"}function f(t,e,r,n){return t\u003C=15?e^r^n:t\u003C=31?e&r|~e&n:t\u003C=47?(e|~r)^n:t\u003C=63?e&n|r&~n:e^(r|~n)}function l(t){return t\u003C=15?0:t\u003C=31?1518500249:t\u003C=47?1859775393:t\u003C=63?2400959708:2840853838}function d(t){return t\u003C=15?1352829926:t\u003C=31?1548603684:t\u003C=47?1836072691:t\u003C=63?2053994217:0}n.inherits(c,h),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],h=this.h[3],c=this.h[4],b=r,v=n,w=i,M=h,_=c,E=0;E\u003C80;E++){var A=s(o(u(r,f(E,n,i,h),t[p[E]+e],l(E)),g[E]),c);r=c,c=h,h=o(i,10),i=n,n=A,A=s(o(u(b,f(79-E,v,w,M),t[m[E]+e],d(E)),y[E]),_),b=_,_=M,M=o(w,10),w=v,v=A}A=a(this.h[1],i,M),this.h[1]=a(this.h[2],h,_),this.h[2]=a(this.h[3],c,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},c.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"little\"):n.split32(this.h,\"little\")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[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],g=[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],y=[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]},45530:(t,e,r)=>{\"use strict\";e.sha1=r(35079),e.sha224=r(63823),e.sha256=r(68032),e.sha384=r(25328),e.sha512=r(20168)},35079:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(40713),s=n.rotl32,a=n.sum32,u=n.sum32_5,h=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n\u003C16;n++)r[n]=t[e+n];for(;n\u003Cr.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n\u003Cr.length;n++){var p=~~(n/20),m=u(s(i,5),h(p,o,c,l),d,r[n],f[p]);d=l,l=c,c=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],d)},l.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},63823:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(68032);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,7),\"big\"):n.split32(this.h.slice(0,7),\"big\")}},68032:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(40713),s=r(79561),a=n.sum32,u=n.sum32_4,h=n.sum32_5,c=o.ch32,f=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,g),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var r=this.W,n=0;n\u003C16;n++)r[n]=t[e+n];for(;n\u003Cr.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],M=this.h[7];for(s(this.k.length===r.length),n=0;n\u003Cr.length;n++){var _=h(M,d(b),c(b,v,w),this.k[n],r[n]),E=a(l(i),f(i,o,g));M=w,w=v,v=b,b=a(y,_),y=g,g=o,o=i,i=a(_,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],M)},b.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},25328:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(20168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h.slice(0,12),\"big\"):n.split32(this.h.slice(0,12),\"big\")}},20168:(t,e,r)=>{\"use strict\";var n=r(50212),i=r(74495),o=r(79561),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,h=n.shr64_lo,c=n.sum64,f=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o\u003C0&&(o+=4294967296),o}function M(t,e,r,n,i,o){var s=e&n^~e&o;return s\u003C0&&(s+=4294967296),s}function _(t,e,r,n,i){var o=t&r^t&i^r&i;return o\u003C0&&(o+=4294967296),o}function E(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s\u003C0&&(s+=4294967296),s}function A(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r\u003C0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r\u003C0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r\u003C0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r\u003C0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r\u003C0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,1)^a(t,e,8)^h(t,e,7);return r\u003C0&&(r+=4294967296),r}function k(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r\u003C0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,19)^a(e,t,29)^h(t,e,6);return r\u003C0&&(r+=4294967296),r}n.inherits(v,y),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n\u003C32;n++)r[n]=t[e+n];for(;n\u003Cr.length;n+=2){var i=k(r[n-4],r[n-3]),o=P(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=T(r[n-30],r[n-29]),h=I(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=d(i,o,s,a,u,h,c,f),r[n+1]=p(i,o,s,a,u,h,c,f)}},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],h=this.h[5],d=this.h[6],p=this.h[7],y=this.h[8],b=this.h[9],v=this.h[10],T=this.h[11],I=this.h[12],k=this.h[13],P=this.h[14],C=this.h[15];o(this.k.length===r.length);for(var R=0;R\u003Cr.length;R+=2){var O=P,L=C,N=x(y,b),U=B(y,b),j=w(y,b,v,T,I),D=M(y,b,v,T,I,k),z=this.k[R],H=this.k[R+1],F=r[R],$=r[R+1],V=m(O,L,N,U,j,D,z,H,F,$),q=g(O,L,N,U,j,D,z,H,F,$);O=A(n,i),L=S(n,i),N=_(n,i,s,a,u),U=E(n,i,s,a,u,h);var G=f(O,L,N,U),K=l(O,L,N,U);P=I,C=k,I=v,k=T,v=y,T=b,y=f(d,p,V,q),b=l(p,p,V,q),d=u,p=h,u=s,h=a,s=n,a=i,n=f(V,q,G,K),i=l(V,q,G,K)}c(this.h,0,n,i),c(this.h,2,s,a),c(this.h,4,u,h),c(this.h,6,d,p),c(this.h,8,y,b),c(this.h,10,v,T),c(this.h,12,I,k),c(this.h,14,P,C)},v.prototype._digest=function(t){return\"hex\"===t?n.toHex32(this.h,\"big\"):n.split32(this.h,\"big\")}},40713:(t,e,r)=>{\"use strict\";var n=r(50212).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},50212:(t,e,r)=>{\"use strict\";var n=r(79561),i=r(91285);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e\u003C0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t\u003C\u003C8&16711680|(255&t)\u003C\u003C24)>>>0}function a(t){return 1===t.length?\"0\"+t:t}function u(t){return 7===t.length?\"0\"+t:6===t.length?\"00\"+t:5===t.length?\"000\"+t:4===t.length?\"0000\"+t:3===t.length?\"00000\"+t:2===t.length?\"000000\"+t:1===t.length?\"0000000\"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"==typeof t)if(e){if(\"hex\"===e)for((t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t),i=0;i\u003Ct.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i\u003Ct.length;i++){var s=t.charCodeAt(i);s\u003C128?r[n++]=s:s\u003C2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)\u003C\u003C10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i\u003Ct.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e=\"\",r=0;r\u003Ct.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r=\"\",n=0;n\u003Ct.length;n++){var i=t[n];\"little\"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a\u003Cs.length;a++,u+=4){var h;h=\"big\"===i?t[u]\u003C\u003C24|t[u+1]\u003C\u003C16|t[u+2]\u003C\u003C8|t[u+3]:t[u+3]\u003C\u003C24|t[u+2]\u003C\u003C16|t[u+1]\u003C\u003C8|t[u],s[a]=h>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n\u003Ct.length;n++,i+=4){var o=t[n];\"big\"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t\u003C\u003C32-e},e.rotl32=function(t,e){return t\u003C\u003Ce|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o\u003Cn?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0\u003Ce?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,h=e;return u+=(h=h+n>>>0)\u003Ce?1:0,u+=(h=h+o>>>0)\u003Co?1:0,t+r+i+s+(u+=(h=h+a>>>0)\u003Ca?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,h){var c=0,f=e;return c+=(f=f+n>>>0)\u003Ce?1:0,c+=(f=f+o>>>0)\u003Co?1:0,c+=(f=f+a>>>0)\u003Ca?1:0,t+r+i+s+u+(c+=(f=f+h>>>0)\u003Ch?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,h){return e+n+o+a+h>>>0},e.rotr64_hi=function(t,e,r){return(e\u003C\u003C32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t\u003C\u003C32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t\u003C\u003C32-r|e>>>r)>>>0}},72196:(t,e,r)=>{\"use strict\";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(4090);t.exports=o.call(n,i)},78873:(t,e,r)=>{\"use strict\";var n=r(34485),i=r(43022),o=r(79561);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||\"hex\"),r=i.toArray(t.nonce,t.nonceEnc||\"hex\"),n=i.toArray(t.pers,t.persEnc||\"hex\");o(e.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i\u003Cthis.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){\"string\"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,\"Not enough entropy. Minimum is: \"+this.minEntropy+\" bits\"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error(\"Reseed is required\");\"string\"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||\"hex\"),this._update(r));for(var o=[];o.length\u003Ct;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},62333:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1\u003C\u003Ca)-1,h=u>>1,c=-7,f=r?i-1:0,l=r?-1:1,d=t[e+f];for(f+=l,o=d&(1\u003C\u003C-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+f],f+=l,c-=8);for(s=o&(1\u003C\u003C-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=l,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=h}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,h=8*o-i-1,c=(1\u003C\u003Ch)-1,f=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e\u003C0||0===e&&1/e\u003C0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))\u003C1&&(s--,u*=2),(e+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s\u003C\u003Ci|a,h+=i;h>0;t[r+d]=255&s,d+=p,s/=256,h-=8);t[r+d-p]|=128*m}},91285:t=>{\"function\"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},52635:(t,e,r)=>{\"use strict\";var n=r(67226)(),i=r(62680)(\"Object.prototype.toString\"),o=function(t){return!(n&&t&&\"object\"==typeof t&&Symbol.toStringTag in t)&&\"[object Arguments]\"===i(t)},s=function(t){return!!o(t)||null!==t&&\"object\"==typeof t&&\"number\"==typeof t.length&&t.length>=0&&\"[object Array]\"!==i(t)&&\"[object Function]\"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},9680:t=>{\"use strict\";var e,r,n=Function.prototype.toString,i=\"object\"==typeof Reflect&&null!==Reflect&&Reflect.apply;if(\"function\"==typeof i&&\"function\"==typeof Object.defineProperty)try{e=Object.defineProperty({},\"length\",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\\s*class\\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,h=\"function\"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if(\"object\"==typeof document){var l=document.all;u.call(l)===u.call(document.all)&&(f=function(t){if((c||!t)&&(void 0===t||\"object\"==typeof t))try{var e=u.call(t);return(\"[object HTMLAllCollection]\"===e||\"[object HTML document.all class]\"===e||\"[object HTMLCollection]\"===e||\"[object Object]\"===e)&&null==t(\"\")}catch(t){}return!1})}t.exports=i?function(t){if(f(t))return!0;if(!t)return!1;if(\"function\"!=typeof t&&\"object\"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!s(t)&&a(t)}:function(t){if(f(t))return!0;if(!t)return!1;if(\"function\"!=typeof t&&\"object\"!=typeof t)return!1;if(h)return a(t);if(s(t))return!1;var e=u.call(t);return!(\"[object Function]\"!==e&&\"[object GeneratorFunction]\"!==e&&!/^\\[object HTML/.test(e))&&a(t)}},43138:(t,e,r)=>{\"use strict\";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\\s*(?:function)?\\*/,a=r(67226)(),u=Object.getPrototypeOf;t.exports=function(t){if(\"function\"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return\"[object GeneratorFunction]\"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function(\"return function*() {}\")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},50198:(t,e,r)=>{\"use strict\";var n=r(32094);t.exports=function(t){return!!n(t)}},27993:(t,e,r)=>{\"use strict\";var n=r(91285),i=r(84485),o=r(77834).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t\u003C\u003Ce|t>>>32-e}function h(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e\u003C16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=h(r,n,i,o,t[0],3614090360,7),o=h(o,r,n,i,t[1],3905402710,12),i=h(i,o,r,n,t[2],606105819,17),n=h(n,i,o,r,t[3],3250441966,22),r=h(r,n,i,o,t[4],4118548399,7),o=h(o,r,n,i,t[5],1200080426,12),i=h(i,o,r,n,t[6],2821735955,17),n=h(n,i,o,r,t[7],4249261313,22),r=h(r,n,i,o,t[8],1770035416,7),o=h(o,r,n,i,t[9],2336552879,12),i=h(i,o,r,n,t[10],4294925233,17),n=h(n,i,o,r,t[11],2304563134,22),r=h(r,n,i,o,t[12],1804603682,7),o=h(o,r,n,i,t[13],4254626195,12),i=h(i,o,r,n,t[14],2792965006,17),r=c(r,n=h(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=c(o,r,n,i,t[6],3225465664,9),i=c(i,o,r,n,t[11],643717713,14),n=c(n,i,o,r,t[0],3921069994,20),r=c(r,n,i,o,t[5],3593408605,5),o=c(o,r,n,i,t[10],38016083,9),i=c(i,o,r,n,t[15],3634488961,14),n=c(n,i,o,r,t[4],3889429448,20),r=c(r,n,i,o,t[9],568446438,5),o=c(o,r,n,i,t[14],3275163606,9),i=c(i,o,r,n,t[3],4107603335,14),n=c(n,i,o,r,t[8],1163531501,20),r=c(r,n,i,o,t[13],2850285829,5),o=c(o,r,n,i,t[2],4243563512,9),i=c(i,o,r,n,t[7],1735328473,14),r=f(r,n=c(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=l(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.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 t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},42973:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.InvalidStatusCodeError=e.InvalidCertError=void 0;const i=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class o extends Error{constructor(t,e){super(t),this.fingerprint256=e}}e.InvalidCertError=o;class s extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}function a(t,e){if(!e||\"text\"===e||\"json\"===e)try{let r=new TextDecoder(\"utf8\",{fatal:!0}).decode(t);if(\"text\"===e)return r;try{return JSON.parse(r)}catch(t){if(\"json\"===e)throw t;return r}}catch(t){if(\"text\"===e||\"json\"===e)throw t}return t}e.InvalidStatusCodeError=s;let u={};function h(t,e){let c={...i,...e};const f=r(732),l=r(99640),d=r(94087),{promisify:p}=r(43335),{resolve:m}=r(883),g=!!/^https/.test(t);let y={method:c.method||\"GET\",headers:{\"Accept-Encoding\":\"gzip, deflate, br\"}};const b=t=>t.replace(/:| /g,\"\").toLowerCase();if(c.keepAlive){const t={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},e=[g,g&&c.sslPinnedCertificates?.map((t=>b(t))).sort()].join();y.agent=u[e]||(u[e]=new(g?l:f).Agent(t))}\"json\"===c.type&&(y.headers[\"Content-Type\"]=\"application/json\"),c.data&&(c.method||(y.method=\"POST\"),y.body=\"json\"===c.type?JSON.stringify(c.data):c.data),y.headers={...y.headers,...c.headers},c.sslAllowSelfSigned&&(y.rejectUnauthorized=!1);return new Promise(((e,r)=>{const i=async e=>{if(e&&\"DEPTH_ZERO_SELF_SIGNED_CERT\"===e.code)try{await h(t,{...c,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(t){t&&t.fingerprint256&&(e=new o(`Self-signed SSL certificate: ${t.fingerprint256}`,t.fingerprint256))}r(e)},u=(g?l:f).request(t,y,(o=>{o.on(\"error\",i),(async()=>{try{e(await(async e=>{const r=e.statusCode;if(c.redirect&&300\u003C=r&&r\u003C400&&e.headers.location){if(10==c._redirectCount)throw new Error(\"Request failed. Too much redirects.\");return c._redirectCount+=1,await h(m(t,e.headers.location),c)}if(c.expectStatusCode&&r!==c.expectStatusCode)throw e.resume(),new s(r);let i=[];for await(const t of e)i.push(t);let o=n.concat(i);const u=e.headers[\"content-encoding\"];\"br\"===u&&(o=await p(d.brotliDecompress)(o)),\"gzip\"!==u&&\"deflate\"!==u||(o=await p(d.unzip)(o));const f=a(o,c.type);return c.full?{headers:e.headers,status:r,body:f}:f})(o))}catch(t){r(t)}})()}));u.on(\"error\",i);const v=c.sslPinnedCertificates?.map((t=>b(t))),w=t=>{const e=b(t.getPeerCertificate()?.fingerprint256||\"\");if((e||!t.isSessionReused())&&!v.includes(e))return u.emit(\"error\",new o(`Invalid SSL certificate: ${e} Expected: ${v}`,e)),u.abort()};c.sslPinnedCertificates&&u.on(\"socket\",(t=>{const e=t.listeners(\"secureConnect\").map((t=>(t.name||\"\").replace(\"bound \",\"\"))).includes(\"mfetchSecureConnect\");e||t.on(\"secureConnect\",w.bind(null,t))})),c.keepAlive&&u.setNoDelay(!0),y.body&&u.write(y.body),u.end()}))}const c=new Set([\"Accept\",\"Accept-Language\",\"Content-Language\",\"Content-Type\"].map((t=>t.toLowerCase()))),f=new Set([\"Accept-Charset\",\"Accept-Encoding\",\"Access-Control-Request-Headers\",\"Access-Control-Request-Method\",\"Connection\",\"Content-Length\",\"Cookie\",\"Cookie2\",\"Date\",\"DNT\",\"Expect\",\"Host\",\"Keep-Alive\",\"Origin\",\"Referer\",\"TE\",\"Trailer\",\"Transfer-Encoding\",\"Upgrade\",\"Via\"].map((t=>t.toLowerCase())));async function l(t,e){let r={...i,...e};const n=new Headers;\"json\"===r.type&&n.set(\"Content-Type\",\"application/json\");let o=new URL(t);if(o.username){const t=btoa(`${o.username}:${o.password}`);n.set(\"Authorization\",`Basic ${t}`),o.username=\"\",o.password=\"\"}t=\"\"+o;for(let t in r.headers){const e=t.toLowerCase();(c.has(e)||r.cors&&!f.has(e))&&n.set(t,r.headers[t])}let u={headers:n,redirect:r.redirect?\"follow\":\"manual\"};r.referrer||(u.referrerPolicy=\"no-referrer\"),r.cors&&(u.mode=\"cors\"),r.data&&(r.method||(u.method=\"POST\"),u.body=\"json\"===r.type?JSON.stringify(r.data):r.data);const h=await fetch(t,u);if(r.expectStatusCode&&h.status!==r.expectStatusCode)throw new s(h.status);cons;	L�t l=a(new Uint8Array(await h.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(h.headers.entries()),status:h.status,body:l}:l}const d=!!(\"object\"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);e.default=function(t,e){return(d?h:l)(t,e)}},46676:(t,e,r)=>{var n=r(1466),i=r(82745);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var h=t.shrn(u),c=a.toRed(o);e>0;e--){var f=this._randrange(new n(2),a);r&&r(f);var l=f.toRed(o).redPow(h);if(0!==l.cmp(s)&&0!==l.cmp(c)){for(var d=1;d\u003Cu;d++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(c))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),h=s.toRed(i);e>0;e--){var c=this._randrange(new n(2),s),f=t.gcd(c);if(0!==f.cmpn(1))return f;var l=c.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(h)){for(var d=1;d\u003Ca;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(h))break}if(d===a)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},1466:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6024).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negau�%��tive&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},79561:t=>{function e(t,e){if(!t)throw new Error(e||\"Assertion failed\")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||\"Assertion failed: \"+t+\" != \"+e)}},43022:(t,e)=>{\"use strict\";var r=e;function n(t){return 1===t.length?\"0\"+t:t}function i(t){for(var e=\"\",r=0;r\u003Ct.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(\"string\"!=typeof t){for(var n=0;n\u003Ct.length;n++)r[n]=0|t[n];return r}if(\"hex\"===e){(t=t.replace(/[^a-z0-9]+/gi,\"\")).length%2!=0&&(t=\"0\"+t);for(n=0;n\u003Ct.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n\u003Ct.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return\"hex\"===e?i(t):t}},11378:t=>{var e=1e3,r=60*e,n=60*r,i=24*n,o=7*i,s=365.25*i;function a(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+\" \"+n+(i?\"s\":\"\")}t.exports=function(t,u){u=u||{};var h=typeof t;if(\"string\"===h&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return u*s;case\"weeks\":case\"week\":case\"w\":return u*o;case\"days\":case\"day\":case\"d\":return u*i;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return u*n;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return u*r;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return u*e;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return u;default:return}}(t);if(\"number\"===h&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return a(t,o,i,\"day\");if(o>=n)return a(t,o,n,\"hour\");if(o>=r)return a(t,o,r,\"minute\");if(o>=e)return a(t,o,e,\"second\");return t+\" ms\"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+\"d\";if(o>=n)return Math.round(t/n)+\"h\";if(o>=r)return Math.round(t/r)+\"m\";if(o>=e)return Math.round(t/e)+\"s\";return t+\"ms\"}(t);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(t))}},99500:(t,e,r)=>{var n=\"function\"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,\"size\"):null,o=n&&i&&\"function\"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a=\"function\"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,\"size\"):null,h=a&&u&&\"function\"==typeof u.get?u.get:null,c=a&&Set.prototype.forEach,f=\"function\"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l=\"function\"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d=\"function\"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,M=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,S=Array.prototype.slice,x=Math.floor,B=\"function\"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,I=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?Symbol.prototype.toString:null,k=\"function\"==typeof Symbol&&\"object\"==typeof Symbol.iterator,P=\"function\"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===k||\"symbol\")?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,R=(\"function\"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function O(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t\u003C1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(\"number\"==typeof t){var n=t\u003C0?-x(-t):x(t);if(n!==t){var i=String(n),o=b.call(e,i.length+1);return v.call(i,r,\"$&_\")+\".\"+v.call(v.call(o,/([0-9]{3})/g,\"$&_\"),/_$/,\"\")}}return v.call(e,r,\"$&_\")}var L=r(53260),N=L.custom,U=F(N)?N:null;function j(t,e,r){var n=\"double\"===(r.quoteStyle||e)?'\"':\"'\";return n+t+n}function D(t){return v.call(String(t),/\"/g,\"&quot;\")}function z(t){return!(\"[object Array]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}function H(t){return!(\"[object RegExp]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}function F(t){if(k)return t&&\"object\"==typeof t&&t instanceof Symbol;if(\"symbol\"==typeof t)return!0;if(!t||\"object\"!=typeof t||!I)return!1;try{return I.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,i,a){var u=n||{};if(V(u,\"quoteStyle\")&&\"single\"!==u.quoteStyle&&\"double\"!==u.quoteStyle)throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');if(V(u,\"maxStringLength\")&&(\"number\"==typeof u.maxStringLength?u.maxStringLength\u003C0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');var m=!V(u,\"customInspect\")||u.customInspect;if(\"boolean\"!=typeof m&&\"symbol\"!==m)throw new TypeError(\"option \\\"customInspect\\\", if provided, must be `true`, `false`, or `'symbol'`\");if(V(u,\"indent\")&&null!==u.indent&&\"\\t\"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');if(V(u,\"numericSeparator\")&&\"boolean\"!=typeof u.numericSeparator)throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');var w=u.numericSeparator;if(void 0===e)return\"undefined\";if(null===e)return\"null\";if(\"boolean\"==typeof e)return e?\"true\":\"false\";if(\"string\"==typeof e)return K(e,u);if(\"number\"==typeof e){if(0===e)return 1/0/e>0?\"0\":\"-0\";var _=String(e);return w?O(e,_):_}if(\"bigint\"==typeof e){var x=String(e)+\"n\";return w?O(e,x):x}var T=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=T&&T>0&&\"object\"==typeof e)return z(e)?\"[Array]\":\"[Object]\";var N=function(t,e){var r;if(\"\\t\"===t.indent)r=\"\\t\";else{if(!(\"number\"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1),\" \")}return{base:r,prev:A.call(Array(e+1),r)}}(u,i);if(void 0===a)a=[];else if(G(a,e)>=0)return\"[Circular]\";function $(e,r,n){if(r&&(a=S.call(a)).push(r),n){var o={depth:u.depth};return V(u,\"quoteStyle\")&&(o.quoteStyle=u.quoteStyle),t(e,o,i+1,a)}return t(e,u,i+1,a)}if(\"function\"==typeof e&&!H(e)){var J=function(t){if(t.name)return t.name;var e=y.call(g.call(t),/^function\\s*([\\w$]+)/);if(e)return e[1];return null}(e),tt=Q(e,$);return\"[Function\"+(J?\": \"+J:\" (anonymous)\")+\"]\"+(tt.length>0?\" { \"+A.call(tt,\", \")+\" }\":\"\")}if(F(e)){var et=k?v.call(String(e),/^(Symbol\\(.*\\))_[^)]*$/,\"$1\"):I.call(e);return\"object\"!=typeof e||k?et:W(et)}if(function(t){if(!t||\"object\"!=typeof t)return!1;if(\"undefined\"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return\"string\"==typeof t.nodeName&&\"function\"==typeof t.getAttribute}(e)){for(var rt=\"\u003C\"+M.call(String(e.nodeName)),nt=e.attributes||[],it=0;it\u003Cnt.length;it++)rt+=\" \"+nt[it].name+\"=\"+j(D(nt[it].value),\"double\",u);return rt+=\">\",e.childNodes&&e.childNodes.length&&(rt+=\"...\"),rt+=\"\u003C/\"+M.call(String(e.nodeName))+\">\"}if(z(e)){if(0===e.length)return\"[]\";var ot=Q(e,$);return N&&!function(t){for(var e=0;e\u003Ct.length;e++)if(G(t[e],\"\\n\")>=0)return!1;return!0}(ot)?\"[\"+Y(ot,N)+\"]\":\"[ \"+A.call(ot,\", \")+\" ]\"}if(function(t){return!(\"[object Error]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e)){var st=Q(e,$);return\"cause\"in Error.prototype||!(\"cause\"in e)||C.call(e,\"cause\")?0===st.length?\"[\"+String(e)+\"]\":\"{ [\"+String(e)+\"] \"+A.call(st,\", \")+\" }\":\"{ [\"+String(e)+\"] \"+A.call(E.call(\"[cause]: \"+$(e.cause),st),\", \")+\" }\"}if(\"object\"==typeof e&&m){if(U&&\"function\"==typeof e[U]&&L)return L(e,{depth:T-i});if(\"symbol\"!==m&&\"function\"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||\"object\"!=typeof t)return!1;try{o.call(t);try{h.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return s&&s.call(e,(function(t,r){at.push($(r,e,!0)+\" => \"+$(t,e))})),X(\"Map\",o.call(e),at,N)}if(function(t){if(!h||!t||\"object\"!=typeof t)return!1;try{h.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return c&&c.call(e,(function(t){ut.push($(t,e))})),X(\"Set\",h.call(e),ut,N)}if(function(t){if(!f||!t||\"object\"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Z(\"WeakMap\");if(function(t){if(!l||!t||\"object\"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Z(\"WeakSet\");if(function(t){if(!d||!t||\"object\"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return Z(\"WeakRef\");if(function(t){return!(\"[object Number]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W($(Number(e)));if(function(t){if(!t||\"object\"!=typeof t||!B)return!1;try{return B.call(t),!0}catch(t){}return!1}(e))return W($(B.call(e)));if(function(t){return!(\"[object Boolean]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W(p.call(e));if(function(t){return!(\"[object String]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e))return W($(String(e)));if(\"undefined\"!=typeof window&&e===window)return\"{ [object Window] }\";if(\"undefined\"!=typeof globalThis&&e===globalThis||void 0!==r.g&&e===r.g)return\"{ [object globalThis] }\";if(!function(t){return!(\"[object Date]\"!==q(t)||P&&\"object\"==typeof t&&P in t)}(e)&&!H(e)){var ht=Q(e,$),ct=R?R(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?\"\":\"null prototype\",lt=!ct&&P&&Object(e)===e&&P in e?b.call(q(e),8,-1):ft?\"Object\":\"\",dt=(ct||\"function\"!=typeof e.constructor?\"\":e.constructor.name?e.constructor.name+\" \":\"\")+(lt||ft?\"[\"+A.call(E.call([],lt||[],ft||[]),\": \")+\"] \":\"\");return 0===ht.length?dt+\"{}\":N?dt+\"{\"+Y(ht,N)+\"}\":dt+\"{ \"+A.call(ht,\", \")+\" }\"}return String(e)};var $=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return $.call(t,e)}function q(t){return m.call(t)}function G(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r\u003Cn;r++)if(t[r]===e)return r;return-1}function K(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n=\"... \"+r+\" more character\"+(r>1?\"s\":\"\");return K(b.call(t,0,e.maxStringLength),e)+n}return j(v.call(v.call(t,/(['\\\\])/g,\"\\\\$1\"),/[\\x00-\\x1f]/g,J),\"single\",e)}function J(t){var e=t.charCodeAt(0),r={8:\"b\",9:\"t\",10:\"n\",12:\"f\",13:\"r\"}[e];return r?\"\\\\\"+r:\"\\\\x\"+(e\u003C16?\"0\":\"\")+w.call(e.toString(16))}function W(t){return\"Object(\"+t+\")\"}function Z(t){return t+\" { ? }\"}function X(t,e,r,n){return t+\" (\"+e+\") {\"+(n?Y(r,n):A.call(r,\", \"))+\"}\"}function Y(t,e){if(0===t.length)return\"\";var r=\"\\n\"+e.prev+e.base;return r+A.call(t,\",\"+r)+\"\\n\"+e.prev}function Q(t,e){var r=z(t),n=[];if(r){n.length=t.length;for(var i=0;i\u003Ct.length;i++)n[i]=V(t,i)?e(t[i],t):\"\"}var o,s=\"function\"==typeof T?T(t):[];if(k){o={};for(var a=0;a\u003Cs.length;a++)o[\"$\"+s[a]]=s[a]}for(var u in t)V(t,u)&&(r&&String(Number(u))===u&&u\u003Ct.length||k&&o[\"$\"+u]instanceof Symbol||(_.call(/[^\\w$]/,u)?n.push(e(u,t)+\": \"+e(t[u],t)):n.push(u+\": \"+e(t[u],t))));if(\"function\"==typeof T)for(var h=0;h\u003Cs.length;h++)C.call(t,s[h])&&n.push(\"[\"+e(s[h])+\"]: \"+e(t[s[h]],t));return n}},58045:(t,e,r)=>{\"use strict\";var n=r(22812);e.certificate=r(27832);var i=n.define(\"RSAPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"modulus\").int(),this.key(\"publicExponent\").int(),this.key(\"privateExponent\").int(),this.key(\"prime1\").int(),this.key(\"prime2\").int(),this.key(\"exponent1\").int(),this.key(\"exponent2\").int(),this.key(\"coefficient\").int())}));e.RSAPrivateKey=i;var o=n.define(\"RSAPublicKey\",(function(){this.seq().obj(this.key(\"modulus\").int(),this.key(\"publicExponent\").int())}));e.RSAPublicKey=o;var s=n.define(\"SubjectPublicKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").use(a),this.key(\"subjectPublicKey\").bitstr())}));e.PublicKey=s;var a=n.define(\"AlgorithmIdentifier\",(function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"none\").null_().optional(),this.key(\"curve\").objid().optional(),this.key(\"params\").seq().obj(this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int()).optional())})),u=n.define(\"PrivateKeyInfo\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"algorithm\").use(a),this.key(\"subjectPrivateKey\").octstr())}));e.PrivateKey=u;var h=n.define(\"EncryptedPrivateKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").seq().obj(this.key(\"id\").objid(),this.key(\"decrypt\").seq().obj(this.key(\"kde\").seq().obj(this.key(\"id\").objid(),this.key(\"kdeparams\").seq().obj(this.key(\"salt\").octstr(),this.key(\"iters\").int())),this.key(\"cipher\").seq().obj(this.key(\"algo\").objid(),this.key(\"iv\").octstr()))),this.key(\"subjectPrivateKey\").octstr())}));e.EncryptedPrivateKey=h;var c=n.define(\"DSAPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"p\").int(),this.key(\"q\").int(),this.key(\"g\").int(),this.key(\"pub_key\").int(),this.key(\"priv_key\").int())}));e.DSAPrivateKey=c,e.DSAparam=n.define(\"DSAparam\",(function(){this.int()}));var f=n.define(\"ECPrivateKey\",(function(){this.seq().obj(this.key(\"version\").int(),this.key(\"privateKey\").octstr(),this.key(\"parameters\").optional().explicit(0).use(l),this.key(\"publicKey\").optional().explicit(1).bitstr())}));e.ECPrivateKey=f;var l=n.define(\"ECParameters\",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define(\"signature\",(function(){this.seq().obj(this.key(\"r\").int(),this.key(\"s\").int())}))},27832:(t,e,r)=>{\"use strict\";var n=r(22812),i=n.define(\"Time\",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define(\"AttributeTypeValue\",(function(){this.seq().obj(this.key(\"type\").objid(),this.key(\"value\").any())})),s=n.define(\"AlgorithmIdentifier\",(function(){this.seq().obj(this.key(\"algorithm\").objid(),this.key(\"parameters\").optional(),this.key(\"curve\").objid().optional())})),a=n.define(\"SubjectPublicKeyInfo\",(function(){this.seq().obj(this.key(\"algorithm\").use(s),this.key(\"subjectPublicKey\").bitstr())})),u=n.define(\"RelativeDistinguishedName\",(function(){this.setof(o)})),h=n.define(\"RDNSequence\",(function(){this.seqof(u)})),c=n.define(\"Name\",(function(){this.choice({rdnSequence:this.use(h)})})),f=n.define(\"Validity\",(function(){this.seq().obj(this.key(\"notBefore\").use(i),this.key(\"notAfter\").use(i))})),l=n.define(\"Extension\",(function(){this.seq().obj(this.key(\"extnID\").objid(),this.key(\"critical\").bool().def(!1),this.key(\"extnValue\").octstr())})),d=n.define(\"TBSCertificate\",(function(){this.seq().obj(this.key(\"version\").explicit(0).int().optional(),this.key(\"serialNumber\").int(),this.key(\"signature\").use(s),this.key(\"issuer\").use(c),this.key(\"validity\").use(f),this.key(\"subject\").use(c),this.key(\"subjectPublicKeyInfo\").use(a),this.key(\"issuerUniqueID\").implicit(1).bitstr().optional(),this.key(\"subjectUniqueID\").implicit(2).bitstr().optional(),this.key(\"extensions\").explicit(3).seqof(l).optional())})),p=n.define(\"X509Certificate\",(function(){this.seq().obj(this.key(\"tbsCertificate\").use(d),this.key(\"signatureAlgorithm\").use(s),this.key(\"signatureValue\").bitstr())}));t.exports=p},82968:(t,e,r)=>{var n=/Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m,s=r(59341),a=r(10010),u=r(77834).Buffer;t.exports=function(t,e){var r,h=t.toString(),c=h.match(n);if(c){var f=\"aes\"+c[1],l=u.from(c[2],\"hex\"),d=u.from(c[3].replace(/[\\r\\n]/g,\"\"),\"base64\"),p=s(e,l.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(f,p,l);m.push(g.update(d)),m.push(g.final()),r=u.concat(m)}else{var y=h.match(o);r=u.from(y[2].replace(/[\\r\\n]/g,\"\"),\"base64\")}return{tag:h.match(i)[1],data:r}}},28016:(t,e,r)=>{var n=r(58045),i=r(68675),o=r(82968),s=r(10010),a=r(30499),u=r(77834).Buffer;function h(t){var e;\"object\"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),\"string\"==typeof t&&(t=u.from(t));var r,h,c=o(t,e),f=c.tag,l=c.data;switch(f){case\"CERTIFICATE\":h=n.certificate.decode(l,\"der\").tbsCertificate.subjectPublicKeyInfo;case\"PUBLIC KEY\":switch(h||(h=n.PublicKey.decode(l,\"der\")),r=h.algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPublicKey.decode(h.subjectPublicKey.data,\"der\");case\"1.2.840.10045.2.1\":return h.subjectPrivateKey=h.subjectPublicKey,{type:\"ec\",data:h};case\"1.2.840.10040.4.1\":return h.algorithm.params.pub_key=n.DSAparam.decode(h.subjectPublicKey.data,\"der\"),{type:\"dsa\",data:h.algorithm.params};default:throw new Error(\"unknown key id \"+r)}case\"ENCRYPTED PRIVATE KEY\":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(\".\")],h=t.algorithm.decrypt.cipher.iv,c=t.subjectPrivateKey,f=parseInt(o.split(\"-\")[1],10)/8,l=a.pbkdf2Sync(e,r,n,f,\"sha1\"),d=s.createDecipheriv(o,l,h),p=[];return p.push(d.update(c)),p.push(d.final()),u.concat(p)}(l=n.EncryptedPrivateKey.decode(l,\"der\"),e);case\"PRIVATE KEY\":switch(r=(h=n.PrivateKey.decode(l,\"der\")).algorithm.algorithm.join(\".\")){case\"1.2.840.113549.1.1.1\":return n.RSAPrivateKey.decode(h.subjectPrivateKey,\"der\");case\"1.2.840.10045.2.1\":return{curve:h.algorithm.curve,privateKey:n.ECPrivateKey.decode(h.subjectPrivateKey,\"der\").privateKey};case\"1.2.840.10040.4.1\":return h.algorithm.params.priv_key=n.DSAparam.decode(h.subjectPrivateKey,\"der\"),{type:\"dsa\",params:h.algorithm.params};default:throw new Error(\"unknown key id \"+r)}case\"RSA PUBLIC KEY\":return n.RSAPublicKey.decode(l,\"der\");case\"RSA PRIVATE KEY\":return n.RSAPrivateKey.decode(l,\"der\");case\"DSA PRIVATE KEY\":return{type:\"dsa\",params:n.DSAPrivateKey.decode(l,\"der\")};case\"EC PRIVATE KEY\":return{curve:(l=n.ECPrivateKey.decode(l,\"der\")).parameters.value,privateKey:l.privateKey};default:throw new Error(\"unknown key type \"+f)}}t.exports=h,h.signature=n.signature},30499:(t,e,r)=>{e.pbkdf2=r(14874),e.pbkdf2Sync=r(88840)},14874:(t,e,r)=>{var n,i,o=r(77834).Buffer,s=r(87351),a=r(25214),u=r(88840),h=r(97232),c=r.g.crypto&&r.g.crypto.subtle,f={sha:\"SHA-1\",\"sha-1\":\"SHA-1\",sha1:\"SHA-1\",sha256:\"SHA-256\",\"sha-256\":\"SHA-256\",sha384:\"SHA-384\",\"sha-384\":\"SHA-384\",\"sha-512\":\"SHA-512\",sha512:\"SHA-512\"},l=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,n,i){��]��return c.importKey(\"raw\",t,{name:\"PBKDF2\"},!1,[\"deriveBits\"]).then((function(t){return c.deriveBits({name:\"PBKDF2\",salt:e,iterations:r,hash:{name:i}},t,n\u003C\u003C3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,m,g,y){\"function\"==typeof g&&(y=g,g=void 0);var b=f[(g=g||\"sha1\").toLowerCase()];if(b&&\"function\"==typeof r.g.Promise){if(s(i,m),t=h(t,a,\"Password\"),e=h(e,a,\"Salt\"),\"function\"!=typeof y)throw new Error(\"No callback provided to pbkdf2\");!function(t,e){t.then((function(t){d()((function(){e(null,t)}))}),(function(t){d()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var e=p(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=e,e}(b).then((function(r){return r?p(t,e,i,m,b):u(t,e,i,m,g)})),y)}else d()((function(){var r;try{r=u(t,e,i,m,g)}catch(t){return y(t)}y(null,r)}))}},25214:(t,e,r)=>{var n;if(r.g.process&&r.g.process.browser)n=\"utf-8\";else if(r.g.process&&r.g.process.version){n=parseInt(process.version.split(\".\")[0].slice(1),10)>=6?\"utf-8\":\"binary\"}else n=\"utf-8\";t.exports=n},87351:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if(\"number\"!=typeof t)throw new TypeError(\"Iterations not a number\");if(t\u003C0)throw new TypeError(\"Bad iterations\");if(\"number\"!=typeof r)throw new TypeError(\"Key length not a number\");if(r\u003C0||r>e||r!=r)throw new TypeError(\"Bad key length\")}},88840:(t,e,r)=>{var n=r(22511),i=r(51445),o=r(9065),s=r(77834).Buffer,a=r(87351),u=r(25214),h=r(97232),c=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var a=function(t){function e(e){return o(t).update(e).digest()}function r(t){return(new i).update(t).digest()}return\"rmd160\"===t||\"ripemd160\"===t?r:\"md5\"===t?n:e}(t),u=\"sha512\"===t||\"sha384\"===t?128:64;e.length>u?e=a(e):e.length\u003Cu&&(e=s.concat([e,c],u));for(var h=s.allocUnsafe(u+f[t]),l=s.allocUnsafe(u+f[t]),d=0;d\u003Cu;d++)h[d]=54^e[d],l[d]=92^e[d];var p=s.allocUnsafe(u+r+4);h.copy(p,0,0,u),this.ipad1=p,this.ipad2=h,this.opad=l,this.alg=t,this.blocksize=u,this.hash=a,this.size=f[t]}l.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){a(r,n);var o=new l(i=i||\"sha1\",t=h(t,u,\"Password\"),(e=h(e,u,\"Salt\")).length),c=s.allocUnsafe(n),d=s.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var p=0,m=f[i],g=Math.ceil(n/m),y=1;y\u003C=g;y++){d.writeUInt32BE(y,e.length);for(var b=o.run(d,o.ipad1),v=b,w=1;w\u003Cr;w++){v=o.run(v,o.ipad2);for(var M=0;M\u003Cm;M++)b[M]^=v[M]}b.copy(c,p),p+=m}return c}},97232:(t,e,r)=>{var n=r(77834).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if(\"string\"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+\" must be a string, a Buffer, a typed array or a DataView\")}},89498:(t,e,r)=>{\"use strict\";const{ErrorWithCause:n}=r(61261),{findCauseByReference:i,getErrorCause:o,messageWithCauses:s,stackWithCauses:a}=r(91662);t.exports={ErrorWithCause:n,findCauseByReference:i,getErrorCause:o,stackWithCauses:a,messageWithCauses:s}},61261:t=>{\"use strict\";class e extends Error{constructor(t,{cause:r}={}){super(t),this.name=e.name,r&&(this.cause=r),this.message=t}}t.exports={ErrorWithCause:e}},91662:t=>{\"use strict\";const e=t=>{if(t&&\"object\"==typeof t&&\"cause\"in t){if(\"function\"==typeof t.cause){const e=t.cause();return e instanceof Error?e:void 0}return t.cause instanceof Error?t.cause:void 0}},r=(t,n)=>{if(!(t instanceof Error))return\"\";const i=t.stack||\"\";if(n.has(t))return i+\"\\ncauses have become circular...\";const o=e(t);return o?(n.add(t),i+\"\\ncaused by: \"+r(o,n)):i},n=(t,r,i)=>{if(!(t instanceof Error))return\"\";const o=i?\"\":t.message||\"\";if(r.has(t))return o+\": ...\";const s=e(t);if(s){r.add(t);const e=\"cause\"in t&&\"function\"==typeof t.cause;return o+(e?\"\":\": \")+n(s,r,e)}return o};t.exports={findCauseByReference:(t,r)=>{if(!t||!r)return;if(!(t instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let i=t;for(;i&&!n.has(i);){if(n.add(i),i instanceof r)return i;i=e(i)}},getErrorCause:e,stackWithCauses:t=>r(t,new Set),messageWithCauses:t=>n(t,new Set)}},35962:t=>{\"use strict\";t.exports=[\"Float32Array\",\"Float64Array\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"BigInt64Array\",\"BigUint64Array\"]},8493:(t,e,r)=>{e.publicEncrypt=r(61896),e.privateDecrypt=r(76932),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},78525:(t,e,r)=>{var n=r(16162),i=r(77834).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length\u003Ce;)r=o(a++),s=i.concat([s,n(\"sha1\").update(t).update(r).digest()]);return s.slice(0,e)}},62216:function(t,e,r){!function(t,e){\"use strict\";function n(t,e){if(!t)throw new Error(e||\"Assertion failed\")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(\"le\"!==e&&\"be\"!==e||(r=e,e=10),this._init(t||0,e||10,r||\"be\"))}var s;\"object\"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=\"undefined\"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(15862).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r\u003C=70?r-55:r>=97&&r\u003C=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)\u003C\u003C4),n}function h(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s\u003Co;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&\"object\"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)\u003C0?t:e},o.prototype._init=function(t,e,r){if(\"number\"==typeof t)return this._initNumber(t,e,r);if(\"object\"==typeof t)return this._initArray(t,e,r);\"hex\"===e&&(e=16),n(e===(0|e)&&e>=2&&e\u003C=36);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[0]&&(i++,this.negative=1),i\u003Ct.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),\"le\"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t\u003C0&&(this.negative=1,t=-t),t\u003C67108864?(this.words=[67108863&t],this.length=1):t\u003C4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t\u003C9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),\"le\"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n(\"number\"==typeof t.length),t.length\u003C=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i\u003Cthis.length;i++)this.words[i]=0;var o,s,a=0;if(\"be\"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]\u003C\u003C8|t[i-2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if(\"le\"===r)for(i=0,o=0;i\u003Ct.length;i+=3)s=t[i]|t[i+1]\u003C\u003C8|t[i+2]\u003C\u003C16,this.words[o]|=s\u003C\u003Ca&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n\u003Cthis.length;n++)this.words[n]=0;var i,o=0,s=0;if(\"be\"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n\u003Ct.length;n+=2)i=u(t,e,n)\u003C\u003Co,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i\u003C=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c\u003Ca;c+=n)u=h(t,c,c+n,e),this.imuln(i),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=h(t,c,t.length,e),c=0;c\u003Cs;c++)f*=e;this.imuln(f),this.words[0]+u\u003C67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e\u003Cthis.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length\u003Ct;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?\"\u003CBN-R: \":\"\u003CBN: \")+this.toString(16)+\">\"};var c=[\"\",\"0\",\"00\",\"000\",\"0000\",\"00000\",\"000000\",\"0000000\",\"00000000\",\"000000000\",\"0000000000\",\"00000000000\",\"000000000000\",\"0000000000000\",\"00000000000000\",\"000000000000000\",\"0000000000000000\",\"00000000000000000\",\"000000000000000000\",\"0000000000000000000\",\"00000000000000000000\",\"000000000000000000000\",\"0000000000000000000000\",\"00000000000000000000000\",\"000000000000000000000000\",\"0000000000000000000000000\"],f=[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],l=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h\u003Cn;h++){for(var c=u>>>26,f=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d\u003C=l;d++){var p=h-d|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||\"hex\"===t){r=\"\";for(var i=0,o=0,s=0;s\u003Cthis.length;s++){var a=this.words[s],u=(16777215&(a\u003C\u003Ci|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}if(t===(0|t)&&t>=2&&t\u003C=36){var h=f[t],d=l[t];r=\"\";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r=\"0\"+r);r.length%e!=0;)r=\"0\"+r;return 0!==this.negative&&(r=\"-\"+r),r}n(!1,\"Base should be between 2 and 36\")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,\"Number can only safely store up to 53 bits\"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i\u003C=o,\"byte array longer than desired length\"),n(o>0,\"Requested array length \u003C= 0\"),this.strip();var s,a,u=\"le\"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a\u003Co;a++)h[a]=0}else{for(a=0;a\u003Co-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e\u003Cthis.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length\u003Ct.length;)this.words[this.length++]=0;for(var e=0;e\u003Ct.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r\u003Ce.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n\u003Cr.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n\u003Ce.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(\"number\"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i\u003Ce;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n(\"number\"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1\u003C\u003Ci:this.words[r]&~(1\u003C\u003Ci),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o\u003Cn.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o\u003Cr.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o\u003Cr.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s\u003Cn.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s\u003Cr.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s\u003Cr.length&&r!==this)for(;s\u003Cr.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,h=0,c=0|s[0],f=8191&c,l=c>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,M=v>>>13,_=0|s[4],E=8191&_,A=_>>>13,S=0|s[5],x=8191&S,B=S>>>13,T=0|s[6],I=8191&T,k=T>>>13,P=0|s[7],C=8191&P,R=P>>>13,O=0|s[8],L=8191&O,N=O>>>13,U=0|s[9],j=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,$=0|a[1],V=8191&$,q=$>>>13,G=0|a[2],K=8191&G,J=G>>>13,W=0|a[3],Z=8191&W,X=W>>>13,Y=0|a[4],Q=8191&Y,tt=Y>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],ft=8191&ct,lt=ct>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,F))+Math.imul(l,H)|0))\u003C\u003C13)|0;h=((o=Math.imul(l,F))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,F))+Math.imul(m,H)|0,o=Math.imul(m,F);var yt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(l,V)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,F))+Math.imul(b,H)|0,o=Math.imul(b,F),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,q)|0;var bt=(h+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(l,K)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,F))+Math.imul(M,H)|0,o=Math.imul(M,F),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,q)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var vt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(l,Z)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,F))+Math.imul(A,H)|0,o=Math.imul(A,F),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(h+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,Q)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,H),i=(i=Math.imul(x,F))+Math.imul(B,H)|0,o=Math.imul(B,F),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,F))+Math.imul(k,H)|0,o=Math.imul(k,F),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var _t=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,H),i=(i=Math.imul(C,F))+Math.imul(R,H)|0,o=Math.imul(R,F),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Et=(h+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,ut)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,F))+Math.imul(N,H)|0,o=Math.imul(N,F),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var At=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(j,H),i=(i=Math.imul(j,F))+Math.imul(D,H)|0,o=Math.imul(D,F),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,q)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,q)|0,n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var St=(h+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(j,V),i=(i=Math.imul(j,q))+Math.imul(D,V)|0,o=Math.imul(D,q),n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,lt)|0;var xt=(h+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,J))+Math.imul(D,K)|0,o=Math.imul(D,J),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,lt)|0;var Bt=(h+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,X))+Math.imul(D,Z)|0,o=Math.imul(D,X),n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(j,rt),i=(i=Math.imul(j,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,lt)|0;var kt=(h+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(B,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(j,ot),i=(i=Math.imul(j,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ht)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,lt)|0;var Pt=(h+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(j,ut),i=(i=Math.imul(j,ht))+Math.imul(D,ut)|0,o=Math.imul(D,ht),n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,lt)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,lt)|0;var Ct=(h+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(R,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(j,ft),i=(i=Math.imul(j,lt))+Math.imul(D,ft)|0,o=Math.imul(D,lt);var Rt=(h+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))\u003C\u003C13)|0;h=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(n=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(D,pt)|0))\u003C\u003C13)|0;return h=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=yt,u[2]=bt,u[3]=vt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=St,u[10]=xt,u[11]=Bt,u[12]=Tt,u[13]=It,u[14]=kt,u[15]=Pt,u[16]=Ct,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n\u003C63?d(this,t,e):n\u003C1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o\u003Cr.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h\u003C=u;h++){var c=o-h,f=(0|t.words[c])*(0|e.words[h]),l=67108863&f;a=67108863&(l=l+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n\u003Ct;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i\u003Ce;i++)n|=(1&t)\u003C\u003Ce-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s\u003Co;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s\u003Ci;s\u003C\u003C=1)for(var a=s\u003C\u003C1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c\u003Ci;c+=a)for(var f=u,l=h,d=0;d\u003Cs;d++){var p=r[c+d],m=n[c+d],g=r[c+d+s],y=n[c+d+s],b=f*g-l*y;y=f*y+l*g,g=b,r[c+d]=p+g,n[c+d]=m+y,r[c+d+s]=p-g,n[c+d+s]=m-y,d!==a&&(b=u*f-h*l,l=u*l+h*f,f=b)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1\u003C\u003Ci+1+n},g.prototype.conjugate=function(t,e,r){if(!(r\u003C=1))for(var n=0;n\u003Cr/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n\u003Ce/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i\u003C67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s\u003Ce;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s\u003Ci;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r\u003Ct;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),f=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,a,u,n,i),this.transform(h,o,c,f,n,i);for(var d=0;d\u003Cn;d++){var p=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n(\"number\"==typeof t),n(t\u003C67108864);for(var e=0,r=0;r\u003Cthis.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r\u003Ce.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1\u003C\u003Ci)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n\u003Ce.length&&0===e[n];n++,r=r.sqr());if(++n\u003Ce.length)for(var i=r.sqr();n\u003Ce.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r\u003C\u003C26-r;if(0!==r){var s=0;for(e=0;e\u003Cthis.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a\u003C\u003Cr;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e\u003Ci;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n(\"number\"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o\u003C\u003Co,u=r;if(i-=s,i=Math.max(0,i),u){for(var h=0;h\u003Cs;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h\u003Cthis.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c\u003C\u003C26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=Q�G�c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;return!(this.length\u003C=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,\"imaskn works only with positive numbers\"),this.length\u003C=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e\u003C\u003Ce;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])\u003Ct?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e\u003Cthis.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n(\"number\"==typeof t),n(t\u003C67108864),t\u003C0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]\u003C0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e\u003Cthis.length&&this.words[e]\u003C0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i\u003Ct.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i\u003Cthis.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i\u003Cthis.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if(\"mod\"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h\u003Ca.length;h++)a.words[h]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=l)}return a&&a.strip(),n.strip(),\"div\"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),\"mod\"!==e&&(i=a.div.neg()),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),\"mod\"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),\"div\"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)\u003C0?{div:new o(0),mod:this}:1===t.length?\"div\"===e?{div:this.divn(t.words[0]),mod:null}:\"mod\"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,\"div\",!1).div},o.prototype.mod=function(t){return this.divmod(t,\"mod\",!1).mod},o.prototype.umod=function(t){return this.divmod(t,\"mod\",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o\u003C0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t\u003C=67108863);for(var e=(1\u003C\u003C26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t\u003C=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,d=1;0==(e.words[0]&d)&&l\u003C26;++l,d\u003C\u003C=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p\u003C26;++p,m\u003C\u003C=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h\u003C26;++h,c\u003C\u003C=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f\u003C26;++f,l\u003C\u003C=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)\u003C0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i\u003C0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(\"number\"==typeof t);var e=t%26,r=(t-e)/26,i=1\u003C\u003Ce;if(this.length\u003C=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s\u003Cthis.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t\u003C0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t\u003C=67108863,\"Number is too big\");var i=0|this.words[0];e=i===t?0:i\u003Ct?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length\u003Ct.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n\u003Ci?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)\u003C=0},o.prototype.lte=function(t){return this.cmp(t)\u003C=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,\"Already a number in reduction context\"),n(0===this.negative,\"red works only with positives\"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,\"fromRed works only with numbers in reduction context\"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,\"Already a number in reduction context\"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,\"redAdd works only with red numbers\"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,\"redIAdd works only with red numbers\"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,\"redSub works only with red numbers\"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,\"redISub works only with red numbers\"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,\"redShl works only with red numbers\"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,\"redMul works only with red numbers\"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,\"redSqr works only with red numbers\"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,\"redISqr works only with red numbers\"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,\"redSqrt works only with red numbers\"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,\"redInvm works only with red numbers\"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,\"redNeg works only with red numbers\"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,\"redPow(normalNum)\"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function w(){b.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function M(){b.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function _(){b.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function E(t){if(\"string\"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),\"modulus must be greater than 1\"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e\u003Cthis.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i\u003Cn;i++)e.words[i]=t.words[i];if(e.length=n,t.length\u003C=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i\u003Ct.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)\u003C\u003C4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r\u003Ct.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(M,b),i(_,b),_.prototype.imulK=function(t){for(var e=0,r=0;r\u003Ct.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if(\"k256\"===t)e=new v;else if(\"p224\"===t)e=new w;else if(\"p192\"===t)e=new M;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new _}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),\"red works only with positives\"),n(t.red&&t.red===e.red,\"red works only with red numbers\")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)\u003C0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g\u003Cp);var y=this.pow(f,new o(1).iushln(p-g-1));l=l.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n\u003Cr.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s\u003C\u003C=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)\u003C0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)\u003C0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},76932:(t,e,r)=>{var n=r(28016),i=r(78525),o=r(11273),s=r(62216),a=r(91857),u=r(16162),h=r(46112),c=r(77834).Buffer;t.exports=function(t,e,r){var f;f=t.padding?t.padding:r?1:4;var l,d=n(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error(\"decryption error\");l=r?h(new s(e),d):a(e,d);var m=c.alloc(p-l.length);if(l=c.concat([m,l],p),4===f)return function(t,e){var r=t.modulus.byteLength(),n=u(\"sha1\").update(c.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error(\"decryption error\");var a=e.slice(1,s+1),h=e.slice(s+1),f=o(a,i(h,s)),l=o(h,i(f,r-s-1));if(function(t,e){t=c.from(t),e=c.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i\u003Cn;)r+=t[i]^e[i];return r}(n,l.slice(0,s)))throw new Error(\"decryption error\");var d=s;for(;0===l[d];)d++;if(1!==l[d++])throw new Error(\"decryption error\");return l.slice(d)}(d,l);if(1===f)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);(\"0002\"!==n.toString(\"hex\")&&!r||\"0001\"!==n.toString(\"hex\")&&r)&&o++;s.length\u003C8&&o++;if(o)throw new Error(\"decryption error\");return e.slice(i)}(0,l,r);if(3===f)return l;throw new Error(\"unknown padding\")}},61896:(t,e,r)=>{var n=r(28016),i=r(95003),o=r(16162),s=r(78525),a=r(11273),u=r(62216),h=r(46112),c=r(91857),f=r(77834).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===l)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,h=o(\"sha1\").update(f.alloc(0)).digest(),c=h.length,l=2*c;if(n>r-l-2)throw new Error(\"message too long\");var d=f.alloc(r-n-l-2),p=r-c-1,m=i(c),g=a(f.concat([h,d,f.alloc(1,1),e],p),s(m,p)),y=a(m,s(g,c));return new u(f.concat([f.alloc(1),y,g],r))}(p,e);else if(1===l)d=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error(\"message too long\");n=r?f.alloc(s-o-3,255):function(t){var e,r=f.allocUnsafe(t),n=0,o=i(2*t),s=0;for(;n\u003Ct;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3);return new u(f.concat([f.from([0,r?1:2]),n,f.alloc(1),e],s))}(p,e,r);else{if(3!==l)throw new Error(\"unknown padding\");if((d=new u(e)).cmp(p.modulus)>=0)throw new Error(\"data too long for modulus\")}return r?c(d,p):h(d,p)}},46112:(t,e,r)=>{var n=r(62216),i=r(77834).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},11273:t=>{t.exports=function(t,e){for(var r=t.length,n=-1;++n\u003Cr;)t[n]^=e[n];return t}},85527:t=>{\"use strict\";var e=String.prototype.replace,r=/%20/g,n=\"RFC1738\",i=\"RFC3986\";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,r,\"+\")},RFC3986:function(t){return String(t)}},RFC1738:n,RFC3986:i}},19126:(t,e,r)=>{\"use strict\";var n=r(66845),i=r(29166),o=r(85527);t.exports={formats:o,parse:i,stringify:n}},29166:(t,e,r)=>{\"use strict\";var n=r(12493),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:\"utf-8\",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:\"&\",depth:5,duplicates:\"combine\",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},u=function(t,e){return t&&\"string\"==typeof t&&e.comma&&t.indexOf(\",\")>-1?t.split(\",\"):t},h=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\\.([^.[]+)/g,\"[$1]\"):t,s=/(\\[[^[\\]]*])/g,a=r.depth>0&&/(\\[[^[\\]]*])/.exec(o),h=a?o.slice(0,a.index):o,c=[];if(h){if(!r.plainObjects&&i.call(Object.prototype,h)&&!r.allowPrototypes)return;c.push(h)}for(var f=0;r.depth>0&&null!==(a=s.exec(o))&&f\u003Cr.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}if(a){if(!0===r.strictDepth)throw new RangeError(\"Input depth exceeded depth option of \"+r.depth+\" and strictDepth is true\");c.push(\"[\"+o.slice(a.index)+\"]\")}return function(t,e,r,n){for(var i=n?e:u(e,r),o=t.length-1;o>=0;--o){var s,a=t[o];if(\"[]\"===a&&r.parseArrays)s=r.allowEmptyArrays&&(\"\"===i||r.strictNullHandling&&null===i)?[]:[].concat(i);else{s=r.plainObjects?Object.create(null):{};var h=\"[\"===a.charAt(0)&&\"]\"===a.charAt(a.length-1)?a.slice(1,-1):a,c=r.decodeDotInKeys?h.replace(/%2E/g,\".\"):h,f=parseInt(c,10);r.parseArrays||\"\"!==c?!isNaN(f)&&a!==c&&String(f)===c&&f>=0&&r.parseArrays&&f\u003C=r.arrayLimit?(s=[])[f]=i:\"__proto__\"!==c&&(s[c]=i):s={0:i}}i=s}return i}(c,e,r,n)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(void 0!==t.allowEmptyArrays&&\"boolean\"!=typeof t.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==t.decodeDotInKeys&&\"boolean\"!=typeof t.decodeDotInKeys)throw new TypeError(\"`decodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==t.decoder&&void 0!==t.decoder&&\"function\"!=typeof t.decoder)throw new TypeError(\"Decoder has to be a function.\");if(void 0!==t.charset&&\"utf-8\"!==t.charset&&\"iso-8859-1\"!==t.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var e=void 0===t.charset?s.charset:t.charset,r=void 0===t.duplicates?s.duplicates:t.duplicates;if(\"combine\"!==r&&\"first\"!==r&&\"last\"!==r)throw new TypeError(\"The duplicates option must be either combine, first, or last\");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||s.allowDots:!!t.allowDots,allowEmptyArrays:\"boolean\"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:\"boolean\"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:\"boolean\"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:\"number\"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:\"boolean\"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:\"boolean\"==typeof t.comma?t.comma:s.comma,decodeDotInKeys:\"boolean\"==typeof t.decodeDotInKeys?t.decodeDotInKeys:s.decodeDotInKeys,decoder:\"function\"==typeof t.decoder?t.decoder:s.decoder,delimiter:\"string\"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:\"number\"==typeof t.depth||!1===t.depth?+t.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:\"boolean\"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:\"number\"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:\"boolean\"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictDepth:\"boolean\"==typeof t.strictDepth?!!t.strictDepth:s.strictDepth,strictNullHandling:\"boolean\"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(\"\"===t||null==t)return r.plainObjects?Object.create(null):{};for(var c=\"string\"==typeof t?function(t,e){var r={__proto__:null},h=e.ignoreQueryPrefix?t.replace(/^\\?/,\"\"):t;h=h.replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\");var c,f=e.parameterLimit===1/0?void 0:e.parameterLimit,l=h.split(e.delimiter,f),d=-1,p=e.charset;if(e.charsetSentinel)for(c=0;c\u003Cl.length;++c)0===l[c].indexOf(\"utf8=\")&&(\"utf8=%E2%9C%93\"===l[c]?p=\"utf-8\":\"utf8=%26%2310003%3B\"===l[c]&&(p=\"iso-8859-1\"),d=c,c=l.length);for(c=0;c\u003Cl.length;++c)if(c!==d){var m,g,y=l[c],b=y.indexOf(\"]=\"),v=-1===b?y.indexOf(\"=\"):b+1;-1===v?(m=e.decoder(y,s.decoder,p,\"key\"),g=e.strictNullHandling?null:\"\"):(m=e.decoder(y.slice(0,v),s.decoder,p,\"key\"),g=n.maybeMap(u(y.slice(v+1),e),(function(t){return e.decoder(t,s.decoder,p,\"value\")}))),g&&e.interpretNumericEntities&&\"iso-8859-1\"===p&&(g=a(g)),y.indexOf(\"[]=\")>-1&&(g=o(g)?[g]:g);var w=i.call(r,m);w&&\"combine\"===e.duplicates?r[m]=n.combine(r[m],g):w&&\"last\"!==e.duplicates||(r[m]=g)}return r}(t,r):t,f=r.plainObjects?Object.create(null):{},l=Object.keys(c),d=0;d\u003Cl.length;++d){var p=l[d],m=h(p,c[p],r,\"string\"==typeof t);f=n.merge(f,m,r)}return!0===r.allowSparse?f:n.compact(f)}},66845:(t,e,r)=>{\"use strict\";var n=r(74294),i=r(12493),o=r(85527),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+\"[]\"},comma:\"comma\",indices:function(t,e){return t+\"[\"+e+\"]\"},repeat:function(t){return t}},u=Array.isArray,h=Array.prototype.push,c=function(t,e){h.apply(t,u(e)?e:[e])},f=Date.prototype.toISOString,l=o.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:\"indices\",charset:\"utf-8\",charsetSentinel:!1,delimiter:\"&\",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:l,formatter:o.formatters[l],indices:!1,serializeDate:function(t){return f.call(t)},skipNulls:!1,strictNullHandling:!1},p={},m=function t(e,r,o,s,a,h,f,l,m,g,y,b,v,w,M,_,E,A){for(var S,x=e,B=A,T=0,I=!1;void 0!==(B=B.get(p))&&!I;){var k=B.get(e);if(T+=1,void 0!==k){if(k===T)throw new RangeError(\"Cyclic object value\");I=!0}void 0===B.get(p)&&(T=0)}if(\"function\"==typeof g?x=g(r,x):x instanceof Date?x=v(x):\"comma\"===o&&u(x)&&(x=i.maybeMap(x,(function(t){return t instanceof Date?v(t):t}))),null===x){if(h)return m&&!_?m(r,d.encoder,E,\"key\",w):r;x=\"\"}if(\"string\"==typeof(S=x)||\"number\"==typeof S||\"boolean\"==typeof S||\"symbol\"==typeof S||\"bigint\"==typeof S||i.isBuffer(x))return m?[M(_?r:m(r,d.encoder,E,\"key\",w))+\"=\"+M(m(x,d.encoder,E,\"value\",w))]:[M(r)+\"=\"+M(String(x))];var P,C=[];if(void 0===x)return C;if(\"comma\"===o&&u(x))_&&m&&(x=i.maybeMap(x,m)),P=[{value:x.length>0?x.join(\",\")||null:void 0}];else if(u(g))P=g;else{var R=Object.keys(x);P=y?R.sort(y):R}var O=l?r.replace(/\\./g,\"%2E\"):r,L=s&&u(x)&&1===x.length?O+\"[]\":O;if(a&&u(x)&&0===x.length)return L+\"[]\";for(var N=0;N\u003CP.length;++N){var U=P[N],j=\"object\"==typeof U&&void 0!==U.value?U.value:x[U];if(!f||null!==j){var D=b&&l?U.replace(/\\./g,\"%2E\"):U,z=u(x)?\"function\"==typeof o?o(L,D):L:L+(b?\".\"+D:\"[\"+D+\"]\");A.set(e,T);var H=n();H.set(p,A),c(C,t(j,z,o,s,a,h,f,l,\"comma\"===o&&_&&u(x)?null:m,g,y,b,v,w,M,_,E,H))}}return C};t.exports=function(t,e){var r,i=t,h=function(t){if(!t)return d;if(void 0!==t.allowEmptyArrays&&\"boolean\"!=typeof t.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==t.encodeDotInKeys&&\"boolean\"!=typeof t.encodeDotInKeys)throw new TypeError(\"`encodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==t.encoder&&void 0!==t.encoder&&\"function\"!=typeof t.encoder)throw new TypeError(\"Encoder has to be a function.\");var e=t.charset||d.charset;if(void 0!==t.charset&&\"utf-8\"!==t.charset&&\"iso-8859-1\"!==t.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var r=o.default;if(void 0!==t.format){if(!s.call(o.formatters,t.format))throw new TypeError(\"Unknown format option provided.\");r=t.format}var n,i=o.formatters[r],h=d.filter;if((\"function\"==typeof t.filter||u(t.filter))&&(h=t.filter),n=t.arrayFormat in a?t.arrayFormat:\"indices\"in t?t.indices?\"indices\":\"repeat\":d.arrayFormat,\"commaRoundTrip\"in t&&\"boolean\"!=typeof t.commaRoundTrip)throw new TypeError(\"`commaRoundTrip` must be a boolean, or absent\");var c=void 0===t.allowDots?!0===t.encodeDotInKeys||d.allowDots:!!t.allowDots;return{addQueryPrefix:\"boolean\"==typeof t.addQueryPrefix?t.addQueryPrefix:d.addQueryPrefix,allowDots:c,allowEmptyArrays:\"boolean\"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:e,charsetSentinel:\"boolean\"==typeof t.charsetSentinel?t.charsetSentinel:d.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:void 0===t.delimiter?d.delimiter:t.delimiter,encode:\"boolean\"==typeof t.encode?t.encode:d.encode,encodeDotInKeys:\"boolean\"==typeof t.encodeDotInKeys?t.encodeDotInKeys:d.encodeDotInKeys,encoder:\"function\"==typeof t.encoder?t.encoder:d.encoder,encodeValuesOnly:\"boolean\"==typeof t.encodeValuesOnly?t.encodeValuesOnly:d.encodeValuesOnly,filter:h,format:r,formatter:i,serializeDate:\"function\"==typeof t.serializeDate?t.serializeDate:d.serializeDate,skipNulls:\"boolean\"==typeof t.skipNulls?t.skipNulls:d.skipNulls,sort:\"function\"==typeof t.sort?t.sort:null,strictNullHandling:\"boolean\"==typeof t.strictNullHandling?t.strictNullHandling:d.strictNullHandling}}(e);\"function\"==typeof h.filter?i=(0,h.filter)(\"\",i):u(h.filter)&&(r=h.filter);var f=[];if(\"object\"!=typeof i||null===i)return\"\";var l=a[h.arrayFormat],p=\"comma\"===l&&h.commaRoundTrip;r||(r=Object.keys(i)),h.sort&&r.sort(h.sort);for(var g=n(),y=0;y\u003Cr.length;++y){var b=r[y];h.skipNulls&&null===i[b]||c(f,m(i[b],b,l,p,h.allowEmptyArrays,h.strictNullHandling,h.skipNulls,h.encodeDotInKeys,h.encode?h.encoder:null,h.filter,h.sort,h.allowDots,h.serializeDate,h.format,h.formatter,h.encodeValuesOnly,h.charset,g))}var v=f.join(h.delimiter),w=!0===h.addQueryPrefix?\"?\":\"\";return h.charsetSentinel&&(\"iso-8859-1\"===h.charset?w+=\"utf8=%26%2310003%3B&\":w+=\"utf8=%E2%9C%93&\"),v.length>0?w+v:\"\"}},12493:(t,e,r)=>{\"use strict\";var n=r(85527),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e\u003C256;++e)t.push(\"%\"+((e\u003C16?\"0\":\"\")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n\u003Ct.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},u=1024;t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:\"o\"}],r=[],n=0;n\u003Ce.length;++n)for(var i=e[n],s=i.obj[i.prop],a=Object.keys(s),u=0;u\u003Ca.length;++u){var h=a[u],c=s[h];\"object\"==typeof c&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:s,prop:h}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i\u003Cr.length;++i)void 0!==r[i]&&n.push(r[i]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\\+/g,\" \");if(\"iso-8859-1\"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,i,o){if(0===t.length)return t;var a=t;if(\"symbol\"==typeof t?a=Symbol.prototype.toString.call(t):\"string\"!=typeof t&&(a=String(t)),\"iso-8859-1\"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return\"%26%23\"+parseInt(t.slice(2),16)+\"%3B\"}));for(var h=\"\",c=0;c\u003Ca.length;c+=u){for(var f=a.length>=u?a.slice(c,c+u):a,l=[],d=0;d\u003Cf.length;++d){var p=f.charCodeAt(d);45===p||46===p||95===p||126===p||p>=48&&p\u003C=57||p>=65&&p\u003C=90||p>=97&&p\u003C=122||o===n.RFC1738&&(40===p||41===p)?l[l.length]=f.charAt(d):p\u003C128?l[l.length]=s[p]:p\u003C2048?l[l.length]=s[192|p>>6]+s[128|63&p]:p\u003C55296||p>=57344?l[l.length]=s[224|p>>12]+s[128|p>>6&63]+s[128|63&p]:(d+=1,p=65536+((1023&p)\u003C\u003C10|1023&f.charCodeAt(d)),l[l.length]=s[240|p>>18]+s[128|p>>12&63]+s[128|p>>6&63]+s[128|63&p])}h+=l.join(\"\")}return h},isBuffer:function(t){return!(!t||\"object\"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return\"[object RegExp]\"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;n\u003Ct.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if(\"object\"!=typeof r){if(o(e))e.push(r);else{if(!e||\"object\"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||\"object\"!=typeof e)return[e].concat(r);var s=e;return o(e)&&!o(r)&&(s=a(e,n)),o(e)&&o(r)?(r.forEach((function(r�s+��,o){if(i.call(e,o)){var s=e[o];s&&\"object\"==typeof s&&r&&\"object\"==typeof r?e[o]=t(s,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var s=r[o];return i.call(e,o)?e[o]=t(e[o],s,n):e[o]=s,e}),s)}}},95003:(t,e,r)=>{\"use strict\";var n=65536,i=4294967295;var o=r(77834).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>i)throw new RangeError(\"requested too many random bytes\");var r=o.allocUnsafe(t);if(t>0)if(t>n)for(var a=0;a\u003Ct;a+=n)s.getRandomValues(r.slice(a,a+n));else s.getRandomValues(r);if(\"function\"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},69631:(t,e,r)=>{\"use strict\";function n(){throw new Error(\"secure random number generation not supported by this browser\\nuse chrome, FireFox or Internet Explorer 11\")}var i=r(77834),o=r(95003),s=i.Buffer,a=i.kMaxLength,u=r.g.crypto||r.g.msCrypto,h=Math.pow(2,32)-1;function c(t,e){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"offset must be a number\");if(t>h||t\u003C0)throw new TypeError(\"offset must be a uint32\");if(t>a||t>e)throw new RangeError(\"offset out of range\")}function f(t,e,r){if(\"number\"!=typeof t||t!=t)throw new TypeError(\"size must be a number\");if(t>h||t\u003C0)throw new TypeError(\"size must be a uint32\");if(t+e>r||t>a)throw new RangeError(\"buffer too small\")}function l(t,e,r,n){if(process.browser){var i=t.buffer,s=new Uint8Array(i,e,r);return u.getRandomValues(s),n?void process.nextTick((function(){n(null,t)})):t}if(!n)return o(r).copy(t,e),t;o(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}u&&u.getRandomValues||!process.browser?(e.randomFill=function(t,e,n,i){if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');if(\"function\"==typeof e)i=e,e=0,n=t.length;else if(\"function\"==typeof n)i=n,n=t.length-e;else if(\"function\"!=typeof i)throw new TypeError('\"cb\" argument must be a function');return c(e,t.length),f(n,e,t.length),l(t,e,n,i)},e.randomFillSync=function(t,e,n){void 0===e&&(e=0);if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('\"buf\" argument must be a Buffer or Uint8Array');c(e,t.length),void 0===n&&(n=t.length-e);return f(n,e,t.length),l(t,e,n)}):(e.randomFill=n,e.randomFillSync=n)},64452:t=>{\"use strict\";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return\"string\"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?\"one of \".concat(e,\" \").concat(t.slice(0,r-1).join(\", \"),\", or \")+t[r-1]:2===r?\"one of \".concat(e,\" \").concat(t[0],\" or \").concat(t[1]):\"of \".concat(e,\" \").concat(t[0])}return\"of \".concat(e,\" \").concat(String(t))}r(\"ERR_INVALID_OPT_VALUE\",(function(t,e){return'The value \"'+e+'\" is invalid for option \"'+t+'\"'}),TypeError),r(\"ERR_INVALID_ARG_TYPE\",(function(t,e,r){var i,o,s,a;if(\"string\"==typeof e&&(o=\"not \",e.substr(!s||s\u003C0?0:+s,o.length)===o)?(i=\"must not be\",e=e.replace(/^not /,\"\")):i=\"must be\",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t,\" argument\"))a=\"The \".concat(t,\" \").concat(i,\" \").concat(n(e,\"type\"));else{var u=function(t,e,r){return\"number\"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,\".\")?\"property\":\"argument\";a='The \"'.concat(t,'\" ').concat(u,\" \").concat(i,\" \").concat(n(e,\"type\"))}return a+=\". Received type \".concat(typeof r)}),TypeError),r(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),r(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(t){return\"The \"+t+\" method is not implemented\"})),r(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),r(\"ERR_STREAM_DESTROYED\",(function(t){return\"Cannot call \"+t+\" after a stream was destroyed\"})),r(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),r(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),r(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),r(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),r(\"ERR_UNKNOWN_ENCODING\",(function(t){return\"Unknown encoding: \"+t}),TypeError),r(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),t.exports.q=e},77073:(t,e,r)=>{\"use strict\";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var i=r(28051),o=r(2557);r(91285)(h,i);for(var s=n(o.prototype),a=0;a\u003Cs.length;a++){var u=s[a];h.prototype[u]||(h.prototype[u]=o.prototype[u])}function h(t){if(!(this instanceof h))return new h(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",c)))}function c(){this._writableState.ended||process.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},95163:(t,e,r)=>{\"use strict\";t.exports=i;var n=r(27640);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(91285)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},28051:(t,e,r)=>{\"use strict\";var n;t.exports=A,A.ReadableState=E;r(22699).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=r(15010),s=r(48834).Buffer,a=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var u,h=r(66602);u=h&&h.debuglog?h.debuglog(\"stream\"):function(){};var c,f,l,d=r(56637),p=r(12262),m=r(87605).getHighWaterMark,g=r(64452).q,y=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(91285)(A,o);var M=p.errorOrDestroy,_=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function E(t,e,i){n=n||r(77073),t=t||{},\"boolean\"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,\"readableHighWaterMark\",i),this.buffer=new d,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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(30214).s),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function A(t){if(n=n||r(77073),!(this instanceof A))return new A(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function S(t,e,r,n,i){u(\"readableAddChunk\",e);var o,h=t._readableState;if(null===e)h.reading=!1,function(t,e){if(u(\"onEofChunk\"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,k(t)))}(t,h);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof a||\"string\"==typeof e||void 0===e||t.objectMode||(r=new y(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],e));var n;return r}(h,e)),o)M(t,o);else if(h.objectMode||e&&e.length>0)if(\"string\"==typeof e||h.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)h.endEmitted?M(t,new w):x(t,h,e,!0);else if(h.ended)M(t,new b);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(e=h.decoder.write(e),h.objectMode||0!==e.length?x(t,h,e,!1):P(t,h)):x(t,h,e,!1)}else n||(h.reading=!1,P(t,h));return!h.ended&&(h.length\u003Ch.highWaterMark||0===h.length)}function x(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit(\"data\",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&I(t)),P(t,e)}Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(t,e){e(t)},A.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=s.from(t,e),e=\"\"),r=!0),S(this,t,e,!1,r)},A.prototype.unshift=function(t){return S(this,t,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){c||(c=r(30214).s);var e=new c(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i=\"\";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),\"\"!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var B=1073741824;function T(t,e){return t\u003C=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=B?t=B:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t\u003C=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;u(\"emitReadable\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u(\"emitReadable\",e.flowing),e.emittedReadable=!0,process.nextTick(k,t))}function k(t){var e=t._readableState;u(\"emitReadable_\",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit(\"readable\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length\u003C=e.highWaterMark,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length\u003Ce.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u(\"maybeReadMore read 0\"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount(\"readable\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\"data\")>0&&t.resume()}function O(t){u(\"readable nexttick read 0\"),t.read(0)}function L(t,e){u(\"resume\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\"resume\"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(u(\"flow\",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;u(\"endReadable\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(D,e,t))}function D(t,e){if(u(\"endReadableNT\",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function z(t,e){for(var r=0,n=t.length;r\u003Cn;r++)if(t[r]===e)return r;return-1}A.prototype.read=function(t){u(\"read\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?j(this):I(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return u(\"need readable\",i),(0===e.length||e.length-t\u003Ce.highWaterMark)&&u(\"length less than watermark\",i=!0),e.ended||e.reading?u(\"reading or ended\",i=!1):i&&(u(\"do read\"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?U(t,e):null)?(e.needReadable=e.length\u003C=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit(\"data\",n),n},A.prototype._read=function(t){M(this,new v(\"_read()\"))},A.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u(\"pipe count=%d opts=%j\",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?a:m;function s(e,i){u(\"onunpipe\"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u(\"cleanup\"),t.removeListener(\"close\",d),t.removeListener(\"finish\",p),t.removeListener(\"drain\",h),t.removeListener(\"error\",l),t.removeListener(\"unpipe\",s),r.removeListener(\"end\",a),r.removeListener(\"end\",m),r.removeListener(\"data\",f),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function a(){u(\"onend\"),t.end()}n.endEmitted?process.nextTick(o):r.once(\"end\",o),t.on(\"unpipe\",s);var h=function(t){return function(){var e=t._readableState;u(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,\"data\")&&(e.flowing=!0,N(t))}}(r);t.on(\"drain\",h);var c=!1;function f(e){u(\"ondata\");var i=t.write(e);u(\"dest.write\",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==z(n.pipes,t))&&!c&&(u(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){u(\"onerror\",e),m(),t.removeListener(\"error\",l),0===i(t,\"error\")&&M(t,e)}function d(){t.removeListener(\"finish\",p),m()}function p(){u(\"onfinish\"),t.removeListener(\"close\",d),m()}function m(){u(\"unpipe\"),r.unpipe(t)}return r.on(\"data\",f),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",l),t.once(\"close\",d),t.once(\"finish\",p),t.emit(\"pipe\",r),n.flowing||(u(\"pipe resume\"),r.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o\u003Ci;o++)n[o].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var s=z(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit(\"unpipe\",this,r)),this},A.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),n=this._readableState;return\"data\"===t?(n.readableListening=this.listenerCount(\"readable\")>0,!1!==n.flowing&&this.resume()):\"readable\"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u(\"on readable\",n.length,n.reading),n.length?I(this):n.reading||process.nextTick(O,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return\"readable\"===t&&process.nextTick(R,this),r},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==t&&void 0!==t||process.nextTick(R,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(u(\"resume\"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(L,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return u(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(u(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on(\"end\",(function(){if(u(\"wrapped end\"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on(\"data\",(function(i){(u(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&\"function\"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o\u003C_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){u(\"wrapped _read\",e),n&&(n=!1,t.resume())},this},\"function\"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(1029)),f(this)}),Object.defineProperty(A.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=U,Object.defineProperty(A.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}}),\"function\"==typeof Symbol&&(A.from=function(t,e){return void 0===l&&(l=r(90352)),l(A,t,e)})},27640:(t,e,r)=>{\"use strict\";t.exports=c;var n=r(64452).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(77073);function h(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit(\"error\",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length\u003Ci.highWaterMark)&&this._read(i.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(\"function\"==typeof t.transform&&(this._transform=t.transform),\"function\"==typeof t.flush&&(this._flush=t.flush)),this.on(\"prefinish\",f)}function f(){var t=this;\"function\"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit(\"error\",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(91285)(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new i(\"_transform()\"))},c.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length\u003Ci.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},2557:(t,e,r)=>{\"use strict\";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=A,A.WritableState=E;var o={deprecate:r(5803)},s=r(15010),a=r(48834).Buffer,u=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var h,c=r(12262),f=r(87605).getHighWaterMark,l=r(64452).q,d=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,y=l.ERR_STREAM_DESTROYED,b=l.ERR_STREAM_NULL_VALUES,v=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING,M=c.errorOrDestroy;function _(){}function E(t,e,o){i=i||r(77073),t=t||{},\"boolean\"!=typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,\"writableHighWaterMark\",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(\"function\"!=typeof i)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(k,t,e),t._writableState.errorEmitted=!0,M(t,n)):(i(n),t._writableState.errorEmitted=!0,M(t,n),k(t,e))}(t,r,n,e,i);else{var o=T(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),n?process.nextTick(x,t,r,o,i):x(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function A(t){var e=this instanceof(i=i||r(77073));if(!e&&!h.call(A,this))return new A(t);this._writableState=new E(t,this,e),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),s.call(this)}function S(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y(\"write\")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),k(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,o=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,S(t,e,!0,e.length,o,\"\",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,c=r.encoding,f=r.callback;if(S(t,e,!1,e.objectMode?1:h.length,h,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&M(t,r),e.prefinished=!0,t.emit(\"prefinish\"),k(t,e)}))}function k(t,e){var r=T(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||(\"function\"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit(\"prefinish\")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(91285)(A,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,\"buffer\",{get:o.deprecate((function(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===A&&(t&&t._writableState instanceof E)}})):h=function(t){return t instanceof this},A.prototype.pipe=function(){M(this,new g)},A.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,a.isBuffer(n)||n instanceof u);return s&&!a.isBuffer(t)&&(t=function(t){return a.from(t)}(t)),\"function\"==typeof e&&(r=e,e=null),s?e=\"buffer\":e||(e=i.defaultEncoding),\"function\"!=typeof r&&(r=_),i.ending?function(t,e){var r=new v;M(t,r),process.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i;return null===r?i=new b:\"string\"==typeof r||e.objectMode||(i=new d(\"chunk\",[\"string\",\"Buffer\"],r)),!i||(M(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=a.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i=\"buffer\",n=s)}var u=e.objectMode?1:n.length;e.length+=u;var h=e.length\u003Ce.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,u,n,i,o);return h}(this,i,s,t,e,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},A.prototype.setDefaultEncoding=function(t){if(\"string\"==typeof t&&(t=t.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((t+\"\").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new p(\"_write()\"))},A.prototype._writev=null,A.prototype.end=function(t,e,r){var n=this._writableState;return\"function\"==typeof t?(r=t,t=null,e=null):\"function\"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?process.nextTick(r):t.once(\"finish\",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=c.destroy,A.prototype._undestroy=c.undestroy,A.prototype._destroy=function(t,e){e(t)}},1029:(t,e,r)=>{\"use strict\";var n;function i(t,e,r){return(e=function(t){var e=function(t,e){if(\"object\"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)}(t,\"string\");return\"symbol\"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(59885),s=Symbol(\"lastResolve\"),a=Symbol(\"lastReject\"),u=Symbol(\"error\"),h=Symbol(\"ended\"),c=Symbol(\"lastPromise\"),f=Symbol(\"handlePromise\"),l=Symbol(\"stream\");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[l].read();null!==r&&(t[c]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){process.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[u]?r(t[u]):e(d(void 0,!0))}))}));var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[h]?r(d(void 0,!0)):e[f](r,n)}),n)}}(n,this));else{var i=this[l].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[f])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var t=this;return new Promise((function(e,r){t[l].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(y,(i(e={},l,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,h,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[l].read();n?(r[c]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[c]=null,o(t,(function(t){if(t&&\"ERR_STREAM_PREMATURE_CLOSE\"!==t.code){var e=r[a];return null!==e&&(r[c]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[h]=!0})),t.on(\"readable\",m.bind(null,r)),r}},56637:(t,e,r)=>{\"use strict\";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e\u003Carguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r\u003Ce.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if(\"object\"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)}(t,\"string\");return\"symbol\"==typeof e?e:String(e)}var u=r(48834).Buffer,h=r(74854).inspect,c=h&&h.custom||\"inspect\";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,n;return e=t,r=[{key:\"push\",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:\"unshift\",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(t){if(0===this.length)return\"\";for(var e=this.head,r=\"\"+e.data;e=e.next;)r+=t+e.data;return r}},{key:\"concat\",value:function(t){if(0===this.length)return u.alloc(0);for(var e,r,n,i=u.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,u.prototype.copy.call(e,r,n),s+=o.data.length,o=o.next;return i}},{key:\"consume\",value:function(t,e){var r;return t\u003Cthis.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(t){var e=this.head,r=1,n=e.dat��;��a;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(t){var e=u.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:c,value:function(t,e){return h(this,i(i({},e),{},{depth:0,customInspect:!1}))}}],r&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),t}()},12262:t=>{\"use strict\";function e(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\"close\")}function n(t,e){t.emit(\"error\",e)}t.exports={destroy:function(t,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,t)):process.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):i?(process.nextTick(r,o),i(t)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit(\"error\",e)}}},59885:(t,e,r)=>{\"use strict\";var n=r(64452).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if(\"function\"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i\u003Cr;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||c()},h=e._writableState&&e._writableState.finished,c=function(){a=!1,h=!0,s||o.call(e)},f=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,f=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!f?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!h?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on(\"finish\",c)};return!function(t){return t.setHeader&&\"function\"==typeof t.abort}(e)?a&&!e._writableState&&(e.on(\"end\",u),e.on(\"close\",u)):(e.on(\"complete\",c),e.on(\"abort\",p),e.req?m():e.on(\"request\",m)),e.on(\"end\",l),e.on(\"finish\",c),!1!==r.error&&e.on(\"error\",d),e.on(\"close\",p),function(){e.removeListener(\"complete\",c),e.removeListener(\"abort\",p),e.removeListener(\"request\",m),e.req&&e.req.removeListener(\"finish\",c),e.removeListener(\"end\",u),e.removeListener(\"close\",u),e.removeListener(\"finish\",c),e.removeListener(\"end\",l),e.removeListener(\"error\",d),e.removeListener(\"close\",p)}}},90352:t=>{t.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},63495:(t,e,r)=>{\"use strict\";var n;var i=r(64452).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function h(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i\u003Ct;i++)e[i]=arguments[i];var c,f=function(t){return t.length?\"function\"!=typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length\u003C2)throw new o(\"streams\");var l=e.map((function(t,i){var o=i\u003Ce.length-1;return function(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on(\"close\",(function(){a=!0})),void 0===n&&(n=r(59885)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&\"function\"==typeof t.abort}(t)?t.abort():\"function\"==typeof t.destroy?t.destroy():void o(e||new s(\"pipe\"))}}(t,o,i>0,(function(t){c||(c=t),t&&l.forEach(u),o||(l.forEach(u),f(c))}))}));return e.reduce(h)}},87605:(t,e,r)=>{\"use strict\";var n=r(64452).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o\u003C0)throw new n(i?r:\"highWaterMark\",o);return Math.floor(o)}return t.objectMode?16:16384}}},15010:(t,e,r)=>{t.exports=r(22699).EventEmitter},67525:(t,e,r)=>{(e=t.exports=r(28051)).Stream=e,e.Readable=e,e.Writable=r(2557),e.Duplex=r(77073),e.Transform=r(27640),e.PassThrough=r(95163),e.finished=r(59885),e.pipeline=r(63495)},51445:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer,i=r(91285),o=r(84485),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t\u003C\u003Ce|t>>>32-e}function m(t,e,r,n,i,o,s,a){return p(t+(e^r^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return p(t+(e&r|~e&n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return p(t+((e|~r)^n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return p(t+(e&n|r&~n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return p(t+(e^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var t=s,e=0;e\u003C16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,M=0|this._b,_=0|this._c,E=0|this._d,A=0|this._e,S=0;S\u003C80;S+=1){var x,B;S\u003C16?(x=m(r,n,i,o,d,t[a[S]],f[0],h[S]),B=v(w,M,_,E,A,t[u[S]],l[0],c[S])):S\u003C32?(x=g(r,n,i,o,d,t[a[S]],f[1],h[S]),B=b(w,M,_,E,A,t[u[S]],l[1],c[S])):S\u003C48?(x=y(r,n,i,o,d,t[a[S]],f[2],h[S]),B=y(w,M,_,E,A,t[u[S]],l[2],c[S])):S\u003C64?(x=b(r,n,i,o,d,t[a[S]],f[3],h[S]),B=g(w,M,_,E,A,t[u[S]],l[3],c[S])):(x=v(r,n,i,o,d,t[a[S]],f[4],h[S]),B=m(w,M,_,E,A,t[u[S]],l[4],c[S])),r=d,d=o,o=p(i,10),i=n,n=x,w=A,A=E,E=p(_,10),_=M,M=B}var T=this._b+i+E|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+M|0,this._e=this._a+n+_|0,this._a=T},d.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 t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},77834:(t,e,r)=>{var n=r(48834),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},s.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},s.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},27654:(t,e,r)=>{\"use strict\";var n,i=r(48834),o=i.Buffer,s={};for(n in i)i.hasOwnProperty(n)&&\"SlowBuffer\"!==n&&\"Buffer\"!==n&&(s[n]=i[n]);var a=s.Buffer={};for(n in o)o.hasOwnProperty(n)&&\"allocUnsafe\"!==n&&\"allocUnsafeSlow\"!==n&&(a[n]=o[n]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);return o(t,e,r)}),a.alloc||(a.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError('The \"size\" argument must be of type number. Received type '+typeof t);if(t\u003C0||t>=2*(1\u003C\u003C30))throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');var n=o(t);return e&&0!==e.length?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=process.binding(\"buffer\").kStringMaxLength}catch(t){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s},7847:(t,e,r)=>{const n=Symbol(\"SemVer ANY\");class i{static get ANY(){return n}constructor(t,e){if(e=o(e),t instanceof i){if(t.loose===!!e.loose)return t;t=t.value}t=t.trim().split(/\\s+/).join(\" \"),h(\"comparator\",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===n?this.value=\"\":this.value=this.operator+this.semver.version,h(\"comp\",this)}parse(t){const e=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=t.match(e);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==r[1]?r[1]:\"\",\"=\"===this.operator&&(this.operator=\"\"),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(t){if(h(\"Comparator.test\",t,this.options.loose),this.semver===n||t===n)return!0;if(\"string\"==typeof t)try{t=new c(t,this.options)}catch(t){return!1}return u(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof i))throw new TypeError(\"a Comparator is required\");return\"\"===this.operator?\"\"===this.value||new f(t.value,e).test(this.value):\"\"===t.operator?\"\"===t.value||new f(this.value,e).test(t.semver):(!(e=o(e)).includePrerelease||\"\u003C0.0.0-0\"!==this.value&&\"\u003C0.0.0-0\"!==t.value)&&(!(!e.includePrerelease&&(this.value.startsWith(\"\u003C0.0.0\")||t.value.startsWith(\"\u003C0.0.0\")))&&(!(!this.operator.startsWith(\">\")||!t.operator.startsWith(\">\"))||(!(!this.operator.startsWith(\"\u003C\")||!t.operator.startsWith(\"\u003C\"))||(!(this.semver.version!==t.semver.version||!this.operator.includes(\"=\")||!t.operator.includes(\"=\"))||(!!(u(this.semver,\"\u003C\",t.semver,e)&&this.operator.startsWith(\">\")&&t.operator.startsWith(\"\u003C\"))||!!(u(this.semver,\">\",t.semver,e)&&this.operator.startsWith(\"\u003C\")&&t.operator.startsWith(\">\")))))))}}t.exports=i;const o=r(71388),{safeRe:s,t:a}=r(94808),u=r(28117),h=r(10952),c=r(52435),f=r(66843)},66843:(t,e,r)=>{const n=/\\s+/g;class i{constructor(t,e){if(e=s(e),t instanceof i)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new i(t.raw,e);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().replace(n,\" \"),this.set=this.raw.split(\"||\").map((t=>this.parseRange(t.trim()))).filter((t=>t.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter((t=>!y(t[0]))),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&b(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted=\"\";for(let t=0;t\u003Cthis.set.length;t++){t>0&&(this.formatted+=\"||\");const e=this.set[t];for(let t=0;t\u003Ce.length;t++)t>0&&(this.formatted+=\" \"),this.formatted+=e[t].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const e=((this.options.includePrerelease&&m)|(this.options.loose&&g))+\":\"+t,r=o.get(e);if(r)return r;const n=this.options.loose,i=n?c[f.HYPHENRANGELOOSE]:c[f.HYPHENRANGE];t=t.replace(i,k(this.options.includePrerelease)),u(\"hyphen replace\",t),t=t.replace(c[f.COMPARATORTRIM],l),u(\"comparator trim\",t),t=t.replace(c[f.TILDETRIM],d),u(\"tilde trim\",t),t=t.replace(c[f.CARETTRIM],p),u(\"caret trim\",t);let s=t.split(\" \").map((t=>w(t,this.options))).join(\" \").split(/\\s+/).map((t=>I(t,this.options)));n&&(s=s.filter((t=>(u(\"loose invalid filter\",t,this.options),!!t.match(c[f.COMPARATORLOOSE]))))),u(\"range list\",s);const h=new Map,b=s.map((t=>new a(t,this.options)));for(const t of b){if(y(t))return[t];h.set(t.value,t)}h.size>1&&h.has(\"\")&&h.delete(\"\");const v=[...h.values()];return o.set(e,v),v}intersects(t,e){if(!(t instanceof i))throw new TypeError(\"a Range is required\");return this.set.some((r=>v(r,e)&&t.set.some((t=>v(t,e)&&r.every((r=>t.every((t=>r.intersects(t,e)))))))))}test(t){if(!t)return!1;if(\"string\"==typeof t)try{t=new h(t,this.options)}catch(t){return!1}for(let e=0;e\u003Cthis.set.length;e++)if(P(this.set[e],t,this.options))return!0;return!1}}t.exports=i;const o=new(r(20139)),s=r(71388),a=r(7847),u=r(10952),h=r(52435),{safeRe:c,t:f,comparatorTrimReplace:l,tildeTrimReplace:d,caretTrimReplace:p}=r(94808),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(55558),y=t=>\"\u003C0.0.0-0\"===t.value,b=t=>\"\"===t.value,v=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every((t=>i.intersects(t,e))),i=n.pop();return r},w=(t,e)=>(u(\"comp\",t,e),t=A(t,e),u(\"caret\",t),t=_(t,e),u(\"tildes\",t),t=x(t,e),u(\"xrange\",t),t=T(t,e),u(\"stars\",t),t),M=t=>!t||\"x\"===t.toLowerCase()||\"*\"===t,_=(t,e)=>t.trim().split(/\\s+/).map((t=>E(t,e))).join(\" \"),E=(t,e)=>{const r=e.loose?c[f.TILDELOOSE]:c[f.TILDE];return t.replace(r,((e,r,n,i,o)=>{let s;return u(\"tilde\",t,e,r,n,i,o),M(r)?s=\"\":M(n)?s=`>=${r}.0.0 \u003C${+r+1}.0.0-0`:M(i)?s=`>=${r}.${n}.0 \u003C${r}.${+n+1}.0-0`:o?(u(\"replaceTilde pr\",o),s=`>=${r}.${n}.${i}-${o} \u003C${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} \u003C${r}.${+n+1}.0-0`,u(\"tilde return\",s),s}))},A=(t,e)=>t.trim().split(/\\s+/).map((t=>S(t,e))).join(\" \"),S=(t,e)=>{u(\"caret\",t,e);const r=e.loose?c[f.CARETLOOSE]:c[f.CARET],n=e.includePrerelease?\"-0\":\"\";return t.replace(r,((e,r,i,o,s)=>{let a;return u(\"caret\",t,e,r,i,o,s),M(r)?a=\"\":M(i)?a=`>=${r}.0.0${n} \u003C${+r+1}.0.0-0`:M(o)?a=\"0\"===r?`>=${r}.${i}.0${n} \u003C${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} \u003C${+r+1}.0.0-0`:s?(u(\"replaceCaret pr\",s),a=\"0\"===r?\"0\"===i?`>=${r}.${i}.${o}-${s} \u003C${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} \u003C${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} \u003C${+r+1}.0.0-0`):(u(\"no pr\"),a=\"0\"===r?\"0\"===i?`>=${r}.${i}.${o}${n} \u003C${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} \u003C${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} \u003C${+r+1}.0.0-0`),u(\"caret return\",a),a}))},x=(t,e)=>(u(\"replaceXRanges\",t,e),t.split(/\\s+/).map((t=>B(t,e))).join(\" \")),B=(t,e)=>{t=t.trim();const r=e.loose?c[f.XRANGELOOSE]:c[f.XRANGE];return t.replace(r,((r,n,i,o,s,a)=>{u(\"xRange\",t,r,n,i,o,s,a);const h=M(i),c=h||M(o),f=c||M(s),l=f;return\"=\"===n&&l&&(n=\"\"),a=e.includePrerelease?\"-0\":\"\",h?r=\">\"===n||\"\u003C\"===n?\"\u003C0.0.0-0\":\"*\":n&&l?(c&&(o=0),s=0,\">\"===n?(n=\">=\",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):\"\u003C=\"===n&&(n=\"\u003C\",c?i=+i+1:o=+o+1),\"\u003C\"===n&&(a=\"-0\"),r=`${n+i}.${o}.${s}${a}`):c?r=`>=${i}.0.0${a} \u003C${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${a} \u003C${i}.${+o+1}.0-0`),u(\"xRange return\",r),r}))},T=(t,e)=>(u(\"replaceStars\",t,e),t.trim().replace(c[f.STAR],\"\")),I=(t,e)=>(u(\"replaceGTE0\",t,e),t.trim().replace(c[e.includePrerelease?f.GTE0PRE:f.GTE0],\"\")),k=t=>(e,r,n,i,o,s,a,u,h,c,f,l)=>`${r=M(n)?\"\":M(i)?`>=${n}.0.0${t?\"-0\":\"\"}`:M(o)?`>=${n}.${i}.0${t?\"-0\":\"\"}`:s?`>=${r}`:`>=${r}${t?\"-0\":\"\"}`} ${u=M(h)?\"\":M(c)?`\u003C${+h+1}.0.0-0`:M(f)?`\u003C${h}.${+c+1}.0-0`:l?`\u003C=${h}.${c}.${f}-${l}`:t?`\u003C${h}.${c}.${+f+1}-0`:`\u003C=${u}`}`.trim(),P=(t,e,r)=>{for(let r=0;r\u003Ct.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let r=0;r\u003Ct.length;r++)if(u(t[r].semver),t[r].semver!==a.ANY&&t[r].semver.prerelease.length>0){const n=t[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}},52435:(t,e,r)=>{const n=r(10952),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(55558),{safeRe:s,t:a}=r(94808),u=r(71388),{compareIdentifiers:h}=r(14935);class c{constructor(t,e){if(e=u(e),t instanceof c){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(\"string\"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof t}\".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);n(\"SemVer\",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const r=t.trim().match(e.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major\u003C0)throw new TypeError(\"Invalid major version\");if(this.minor>o||this.minor\u003C0)throw new TypeError(\"Invalid minor version\");if(this.patch>o||this.patch\u003C0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e\u003Co)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(t){if(n(\"SemVer.compare\",this.version,this.options,t),!(t instanceof c)){if(\"string\"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof c||(t=new c(t,this.options)),h(this.major,t.major)||h(this.minor,t.minor)||h(this.patch,t.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const r=this.prerelease[e],i=t.prerelease[e];if(n(\"prerelease compare\",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let e=0;do{const r=this.build[e],i=t.build[e];if(n(\"build compare\",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}inc(t,e,r){switch(t){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",e,r);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",e,r);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",e,r),this.inc(\"pre\",e,r);break;case\"prerelease\":0===this.prerelease.length&&this.inc(\"patch\",e,r),this.inc(\"pre\",e,r);break;case\"major\":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case\"pre\":{const t=Number(r)?1:0;if(!e&&!1===r)throw new Error(\"invalid increment argument: identifier is empty\");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)\"number\"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(\".\")&&!1===r)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===h(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}}t.exports=c},36694:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,\"\"),e);return r?r.version:null}},28117:(t,e,r)=>{const n=r(33276),i=r(77893),o=r(16379),s=r(8463),a=r(21897),u=r(30506);t.exports=(t,e,r,h)=>{switch(e){case\"===\":return\"object\"==typeof t&&(t=t.version),\"object\"==typeof r&&(r=r.version),t===r;case\"!==\":return\"object\"==typeof t&&(t=t.version),\"object\"==typeof r&&(r=r.version),t!==r;case\"\":case\"=\":case\"==\":return n(t,r,h);case\"!=\":return i(t,r,h);case\">\":return o(t,r,h);case\">=\":return s(t,r,h);case\"\u003C\":return a(t,r,h);case\"\u003C=\":return u(t,r,h);default:throw new TypeError(`Invalid operator: ${e}`)}}},98686:(t,e,r)=>{const n=r(52435),i=r(79943),{safeRe:o,t:s}=r(94808);t.exports=(t,e)=>{if(t instanceof n)return t;if(\"number\"==typeof t&&(t=String(t)),\"string\"!=typeof t)return null;let r=null;if((e=e||{}).rtl){const n=e.includePrerelease?o[s.COERCERTLFULL]:o[s.COERCERTL];let i;for(;(i=n.exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=t.match(e.includePrerelease?o[s.COERCEFULL]:o[s.COERCE]);if(null===r)return null;const a=r[2],u=r[3]||\"0\",h=r[4]||\"0\",c=e.includePrerelease&&r[5]?`-${r[5]}`:\"\",f=e.includePrerelease&&r[6]?`+${r[6]}`:\"\";return i(`${a}.${u}.${h}${c}${f}`,e)}},65914:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r)=>{const i=new n(t,r),o=new n(e,r);return i.compare(o)||i.compareBuild(o)}},55404:(t,e,r)=>{const n=r(92271);t.exports=(t,e)=>n(t,e,!0)},92271:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r)=>new n(t,r).compare(new n(e,r))},66007:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,null,!0),i=n(e,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,u=s?i:r,h=!!a.prerelease.length;if(!!u.prerelease.length&&!h)return u.patch||u.minor?a.patch?\"patch\":a.minor?\"minor\":\"major\":\"major\";const c=h?\"pre\":\"\";return r.major!==i.major?c+\"major\":r.minor!==i.minor?c+\"minor\":r.patch!==i.patch?c+\"patch\":\"prerelease\"}},33276:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>0===n(t,e,r)},16379:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)>0},8463:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)>=0},86360:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r,i,o)=>{\"string\"==typeof r&&(o=i,i=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,i,o).version}catch(t){return null}}},21897:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)\u003C0},30506:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(t,e,r)\u003C=0},14551:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).major},469:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).minor},77893:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>0!==n(t,e,r)},79943:(t,e,r)=>{const n=r(52435);t.exports=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(t){if(!r)return null;throw t}}},54250:(t,e,r)=>{const n=r(52435);t.exports=(t,e)=>new n(t,e).patch},58204:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null}},70733:(t,e,r)=>{const n=r(92271);t.exports=(t,e,r)=>n(e,t,r)},72961:(t,e,r)=>{const n=r(65914);t.exports=(t,e)=>t.sort(((t,r)=>n(r,t,e)))},59844:(t,e,r)=>{const n=r(66843);t.exports=(t,e,r)=>{try{e=new n(e,r)}catch(t){return!1}return e.test(t)}},51116:(t,e,r)=>{const n=r(65914);t.exports=(t,e)=>t.sort(((t,r)=>n(t,r,e)))},97230:(t,e,r)=>{const n=r(79943);t.exports=(t,e)=>{const r=n(t,e);return r?r.version:null}},97699:(t,e,r)=>{const n=r(94808),i=r(55558),o=r(52435),s=r(14935),a=r(79943),u=r(97230),h=r(36694),c=r(86360),f=r(66007),l=r(14551),d=r(469),p=r(54250),m=r(58204),g=r(92271),y=r(70733),b=r(55404),v=r(65914),w=r(51116),M=r(72961),_=r(16379),E=r(21897),A=r(33276),S=r(77893),x=r(8463),B=r(30506),T=r(28117),I=r(98686),k=r(7847),P=r(66843),C=r(59844),R=r(48865),O=r(53727),L=r(14338),N=r(21542),U=r(36240),j=r(89106),D=r(90995),z=r(47805),H=r(22013),F=r(81338),$=r(53122);t.exports={parse:a,valid:u,clean:h,inc:c,diff:f,major:l,minor:d,patch:p,prerelease:m,compare:g,rcompare:y,compareLoose:b,compareBuild:v,sort:w,rsort:M,gt:_,lt:E,eq:A,neq:S,gte:x,lte:B,cmp:T,coerce:I,Comparator:k,Range:P,satisfies:C,toComparators:R,maxSatisfying:O,minSatisfying:L,minVersion:N,validRange:U,outside:j,gtr:D,ltr:z,intersects:H,simplifyRange:F,subset:$,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},55558:t=>{const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"],SEMVER_SPEC_VERSION:\"2.0.0\",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},10952:t=>{const e=\"object\"==typeof process&&process.env&&/\\bsemver\\b/i.test(\"false\")?(...t)=>console.error(\"SEMVER\",...t):()=>{};t.exports=e},14935:t=>{const e=/^[0-9]+$/,r=(t,r)=>{const n=e.test(t),i=e.test(r);return n&&i&&(t=+t,r=+r),t===r?0:n&&!i?-1:i&&!n?1:t\u003Cr?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(t,e)=>r(e,t)}},20139:t=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(t){const e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}delete(t){return this.map.delete(t)}set(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,e)}return this}}},71388:t=>{const e=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=t=>t?\"object\"!=typeof t?e:t:r},94808:(t,e,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(55558),s=r(10952),a=(e=t.exports={}).re=[],u=e.safeRe=[],h=e.src=[],c=e.t={};let f=0;const l=\"[a-zA-Z0-9-]\",d=[[\"\\\\s\",1],[\"\\\\d\",o],[l,i]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of d)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=f++;s(t,i,e),c[t]=i,h[i]=e,a[i]=new RegExp(e,r?\"g\":void 0),u[i]=new RegExp(n,r?\"g\":void 0)};p(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),p(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\"),p(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${l}*`),p(\"MAINVERSION\",`(${h[c.NUMERICIDENTIFIER]})\\\\.(${h[c.NUMERICIDENTIFIER]})\\\\.(${h[c.NUMERICIDENTIFIER]})`),p(\"MAINVERSIONLOOSE\",`(${h[c.NUMERICIDENTIFIERLOOSE]})\\\\.(${h[c.NUMERICIDENTIFIERLOOSE]})\\\\.(${h[c.NUMERICIDENTIFIERLOOSE]})`),p(\"PRERELEASEIDENTIFIER\",`(?:${h[c.NUMERICIDENTIFIER]}|${h[c.NONNUMERICIDENTIFIER]})`),p(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${h[c.NUMERICIDENTIFIERLOOSE]}|${h[c.NONNUMERICIDENTIFIER]})`),p(\"PRERELEASE\",`(?:-(${h[c.PRERELEASEIDENTIFIER]}(?:\\\\.${h[c.PRERELEASEIDENTIFIER]})*))`),p(\"PRERELEASELOOSE\",`(?:-?(${h[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${h[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p(\"BUILDIDENTIFIER\",`${l}+`),p(\"BUILD\",`(?:\\\\+(${h[c.BUILDIDENTIFIER]}(?:\\\\.${h[c.BUILDIDENTIFIER]})*))`),p(\"FULLPLAIN\",`v?${h[c.MAINVERSION]}${h[c.PRERELEASE]}?${h[c.BUILD]}?`),p(\"FULL\",`^${h[c.FULLPLAIN]}$`),p(\"LOOSEPLAIN\",`[v=\\\\s]*${h[c.MAINVERSIONLOOSE]}${h[c.PRERELEASELOOSE]}?${h[c.BUILD]}?`),p(\"LOOSE\",`^${h[c.LOOSEPLAIN]}$`),p(\"GTLT\",\"((?:\u003C|>)?=?)\"),p(\"XRANGEIDENTIFIERLOOSE\",`${h[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`),p(\"XRANGEIDENTIFIER\",`${h[c.NUMERICIDENTIFIER]}|x|X|\\\\*`),p(\"XRANGEPLAIN\",`[v=\\\\s]*(${h[c.XRANGEIDENTIFIER]})(?:\\\\.(${h[c.XRANGEIDENTIFIER]})(?:\\\\.(${h[c.XRANGEIDENTIFIER]})(?:${h[c.PRERELEASE]})?${h[c.BUILD]}?)?)?`),p(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${h[c.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${h[c.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${h[c.XRANGEIDENTIFIERLOOSE]})(?:${h[c.PRERELEASELOOSE]})?${h[c.BUILD]}?)?)?`),p(\"XRANGE\",`^${h[c.GTLT]}\\\\s*${h[c.XRANGEPLAIN]}$`),p(\"XRANGELOOSE\",`^${h[c.GTLT]}\\\\s*${h[c.XRANGEPLAINLOOSE]}$`),p(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${n}})(?:\\\\.(\\\\d{1,${n}}))?(?:\\\\.(\\\\d{1,${n}}))?`),p(\"COERCE\",`${h[c.COERCEPLAIN]}(?:$|[^\\\\d])`),p(\"COERCEFULL\",h[c.COERCEPLAIN]+`(?:${h[c.PRERELEASE]})?`+`(?:${h[c.BUILD]})?(?:$|[^\\\\d])`),p(\"COERCERTL\",h[c.COERCE],!0),p(\"COERCERTLFULL\",h[c.COERCEFULL],!0),p(\"LONETILDE\",\"(?:~>?)\"),p(\"TILDETRIM\",`(\\\\s*)${h[c.LONETILDE]}\\\\s+`,!0),e.tildeTrimReplace=\"$1~\",p(\"TILDE\",`^${h[c.LONETILDE]}${h[c.XRANGEPLAIN]}$`),p(\"TILDELOOSE\",`^${h[c.LONETILDE]}${h[c.XRANGEPLAINLOOSE]}$`),p(\"LONECARET\",\"(?:\\\\^)\"),p(\"CARETTRIM\",`(\\\\s*)${h[c.LONECARET]}\\\\s+`,!0),e.caretTrimReplace=\"$1^\",p(\"CARET\",`^${h[c.LONECARET]}${h[c.XRANGEPLAIN]}$`),p(\"CARETLOOSE\",`^${h[c.LONECARET]}${h[c.XRANGEPLAINLOOSE]}$`),p(\"COMPARATORLOOSE\",`^${h[c.GTLT]}\\\\s*(${h[c.LOOSEPLAIN]})$|^$`),p(\"COMPARATOR\",`^${h[c.GTLT]}\\\\s*(${h[c.FULLPLAIN]})$|^$`),p(\"COMPARATORTRIM\",`(\\\\s*)${h[c.GTLT]}\\\\s*(${h[c.LOOSEPLAIN]}|${h[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=\"$1$2$3\",p(\"HYPHENRANGE\",`^\\\\s*(${h[c.XRANGEPLAIN]})\\\\s+-\\\\s+(${h[c.XRANGEPLAIN]})\\\\s*$`),p(\"HYPHENRANGELOOSE\",`^\\\\s*(${h[c.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${h[c.XRANGEPLAINLOOSE]})\\\\s*$`),p(\"STAR\",\"(\u003C|>)?=?\\\\s*\\\\*\"),p(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\"),p(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")},90995:(t,e,r)=>{const n=r(89106);t.exports=(t,e,r)=>n(t,e,\">\",r)},22013:(t,e,r)=>{const n=r(66843);t.exports=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r))},47805:(t,e,r)=>{const n=r(89106);t.exports=(t,e,r)=>n(t,e,\"\u003C\",r)},53727:(t,e,r)=>{const n=r(52435),i=r(66843);t.exports=(t,e,r)=>{let o=null,s=null,a=null;try{a=new i(e,r)}catch(t){return null}return t.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new n(o,r)))})),o}},14338:(t,e,r)=>{const n=r(52435),i=r(66843);t.exports=(t,e,r)=>{let o=null,s=null,a=null;try{a=new i(e,r)}catch(t){return null}return t.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new n(o,r)))})),o}},21542:(t,e,r)=>{const n=r(52435),i=r(66843),o=r(16379);t.exports=(t,e)=>{t=new i(t,e);let r=new n(\"0.0.0\");if(t.test(r))return r;if(r=new n(\"0.0.0-0\"),t.test(r))return r;r=null;for(let e=0;e\u003Ct.set.length;++e){const i=t.set[e];let s=null;i.forEach((t=>{const e=new n(t.semver.version);switch(t.operator){case\">\":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case\"\":case\">=\":s&&!o(e,s)||(s=e);break;case\"\u003C\":case\"\u003C=\":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&t.test(r)?r:null}},89106:(t,e,r)=>{const n=r(52435),i=r(7847),{ANY:o}=i,s=r(66843),a=r(59844),u=r(16379),h=r(21897),c=r(30506),f=r(8463);t.exports=(t,e,r,l)=>{let d,p,m,g,y;switch(t=new n(t,l),e=new s(e,l),r){case\">\":d=u,p=c,m=h,g=\">\",y=\">=\";break;case\"\u003C\":d=h,p=f,m=u,g=\"\u003C\",y=\"\u003C=\";break;default:throw new TypeError('Must provide a hilo val of \"\u003C\" or \">\"')}if(a(t,e,l))return!1;for(let r=0;r\u003Ce.set.length;++r){const n=e.set[r];let s=null,a=null;if(n.forEach((t=>{t.semver===o&&(t=new i(\">=0.0.0\")),s=s||t,a=a||t,d(t.semver,s.semver,l)?s=t:m(t.semver,a.semver,l)&&(a=t)})),s.oper�6(l�ator===g||s.operator===y)return!1;if((!a.operator||a.operator===g)&&p(t,a.semver))return!1;if(a.operator===y&&m(t,a.semver))return!1}return!0}},81338:(t,e,r)=>{const n=r(59844),i=r(92271);t.exports=(t,e,r)=>{const o=[];let s=null,a=null;const u=t.sort(((t,e)=>i(t,e,r)));for(const t of u){n(t,e,r)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null)}s&&o.push([s,null]);const h=[];for(const[t,e]of o)t===e?h.push(t):e||t!==u[0]?e?t===u[0]?h.push(`\u003C=${e}`):h.push(`${t} - ${e}`):h.push(`>=${t}`):h.push(\"*\");const c=h.join(\" || \"),f=\"string\"==typeof e.raw?e.raw:String(e);return c.length\u003Cf.length?c:e}},53122:(t,e,r)=>{const n=r(66843),i=r(7847),{ANY:o}=i,s=r(59844),a=r(92271),u=[new i(\">=0.0.0-0\")],h=[new i(\">=0.0.0\")],c=(t,e,r)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===o){if(1===e.length&&e[0].semver===o)return!0;t=r.includePrerelease?u:h}if(1===e.length&&e[0].semver===o){if(r.includePrerelease)return!0;e=h}const n=new Set;let i,c,d,p,m,g,y;for(const e of t)\">\"===e.operator||\">=\"===e.operator?i=f(i,e,r):\"\u003C\"===e.operator||\"\u003C=\"===e.operator?c=l(c,e,r):n.add(e.semver);if(n.size>1)return null;if(i&&c){if(d=a(i.semver,c.semver,r),d>0)return null;if(0===d&&(\">=\"!==i.operator||\"\u003C=\"!==c.operator))return null}for(const t of n){if(i&&!s(t,String(i),r))return null;if(c&&!s(t,String(c),r))return null;for(const n of e)if(!s(t,String(n),r))return!1;return!0}let b=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&\"\u003C\"===c.operator&&0===b.prerelease[0]&&(b=!1);for(const t of e){if(y=y||\">\"===t.operator||\">=\"===t.operator,g=g||\"\u003C\"===t.operator||\"\u003C=\"===t.operator,i)if(v&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===v.major&&t.semver.minor===v.minor&&t.semver.patch===v.patch&&(v=!1),\">\"===t.operator||\">=\"===t.operator){if(p=f(i,t,r),p===t&&p!==i)return!1}else if(\">=\"===i.operator&&!s(i.semver,String(t),r))return!1;if(c)if(b&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===b.major&&t.semver.minor===b.minor&&t.semver.patch===b.patch&&(b=!1),\"\u003C\"===t.operator||\"\u003C=\"===t.operator){if(m=l(c,t,r),m===t&&m!==c)return!1}else if(\"\u003C=\"===c.operator&&!s(c.semver,String(t),r))return!1;if(!t.operator&&(c||i)&&0!==d)return!1}return!(i&&g&&!c&&0!==d)&&(!(c&&y&&!i&&0!==d)&&(!v&&!b))},f=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n>0?t:n\u003C0||\">\"===e.operator&&\">=\"===t.operator?e:t},l=(t,e,r)=>{if(!t)return e;const n=a(t.semver,e.semver,r);return n\u003C0?t:n>0||\"\u003C\"===e.operator&&\"\u003C=\"===t.operator?e:t};t.exports=(t,e,r={})=>{if(t===e)return!0;t=new n(t,r),e=new n(e,r);let i=!1;t:for(const n of t.set){for(const t of e.set){const e=c(n,t,r);if(i=i||null!==e,e)continue t}if(i)return!1}return!0}},48865:(t,e,r)=>{const n=r(66843);t.exports=(t,e)=>new n(t,e).set.map((t=>t.map((t=>t.value)).join(\" \").trim().split(\" \")))},36240:(t,e,r)=>{const n=r(66843);t.exports=(t,e)=>{try{return new n(t,e).range||\"*\"}catch(t){return null}}},47669:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(75195),o=r(81181)(),s=r(50326),a=r(5408),u=n(\"%Math.floor%\");t.exports=function(t,e){if(\"function\"!=typeof t)throw new a(\"`fn` is not a function\");if(\"number\"!=typeof e||e\u003C0||e>4294967295||u(e)!==e)throw new a(\"`length` must be a positive 32-bit integer\");var r=arguments.length>2&&!!arguments[2],n=!0,h=!0;if(\"length\"in t&&s){var c=s(t,\"length\");c&&!c.configurable&&(n=!1),c&&!c.writable&&(h=!1)}return(n||h||!r)&&(o?i(t,\"length\",e,!0,!0):i(t,\"length\",e)),t}},73327:(t,e,r)=>{var n=r(77834).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){\"string\"==typeof t&&(e=e||\"utf8\",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a\u003Co;){for(var u=s%i,h=Math.min(o-a,i-u),c=0;c\u003Ch;c++)r[u+c]=t[a+c];a+=h,(s+=h)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r\u003C=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},t.exports=i},9065:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+\" is not supported (we accept pull requests)\");return new e};n.sha=r(8820),n.sha1=r(17885),n.sha224=r(58321),n.sha256=r(74424),n.sha384=r(90213),n.sha512=r(55596)},8820:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t\u003C\u003C30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f\u003C16;++f)r[f]=t.readInt32BE(4*f);for(;f\u003C80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var l=0;l\u003C80;++l){var d=~~(l/20),p=0|((e=n)\u003C\u003C5|e>>>27)+c(d,i,o,a)+u+r[l]+s[d];u=a,a=o,o=h(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},17885:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t\u003C\u003C5|t>>>27}function c(t){return t\u003C\u003C30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l\u003C16;++l)r[l]=t.readInt32BE(4*l);for(;l\u003C80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])\u003C\u003C1|e>>>31;for(var d=0;d\u003C80;++d){var p=~~(d/20),m=h(n)+f(p,i,o,a)+u+r[d]+s[p]|0;u=a,a=o,o=c(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},58321:(t,e,r)=>{var n=r(91285),i=r(74424),o=r(73327),s=r(77834).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},74424:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t\u003C\u003C30)^(t>>>13|t\u003C\u003C19)^(t>>>22|t\u003C\u003C10)}function l(t){return(t>>>6|t\u003C\u003C26)^(t>>>11|t\u003C\u003C21)^(t>>>25|t\u003C\u003C7)}function d(t){return(t>>>7|t\u003C\u003C25)^(t>>>18|t\u003C\u003C14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y\u003C16;++y)r[y]=t.readInt32BE(4*y);for(;y\u003C64;++y)r[y]=0|(((e=r[y-2])>>>17|e\u003C\u003C15)^(e>>>19|e\u003C\u003C13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var b=0;b\u003C64;++b){var v=g+l(u)+h(u,p,m)+s[b]+r[b]|0,w=f(n)+c(n,i,o)|0;g=m,m=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},90213:(t,e,r)=>{var n=r(91285),i=r(55596),o=r(73327),s=r(77834).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},55596:(t,e,r)=>{var n=r(91285),i=r(73327),o=r(77834).Buffer,s=[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],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e\u003C\u003C4)^(e>>>2|t\u003C\u003C30)^(e>>>7|t\u003C\u003C25)}function l(t,e){return(t>>>14|e\u003C\u003C18)^(t>>>18|e\u003C\u003C14)^(e>>>9|t\u003C\u003C23)}function d(t,e){return(t>>>1|e\u003C\u003C31)^(t>>>8|e\u003C\u003C24)^t>>>7}function p(t,e){return(t>>>1|e\u003C\u003C31)^(t>>>8|e\u003C\u003C24)^(t>>>7|e\u003C\u003C25)}function m(t,e){return(t>>>19|e\u003C\u003C13)^(e>>>29|t\u003C\u003C3)^t>>>6}function g(t,e){return(t>>>19|e\u003C\u003C13)^(e>>>29|t\u003C\u003C3)^(t>>>6|e\u003C\u003C26)}function y(t,e){return t>>>0\u003Ce>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,M=0|this._bl,_=0|this._cl,E=0|this._dl,A=0|this._el,S=0|this._fl,x=0|this._gl,B=0|this._hl,T=0;T\u003C32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T\u003C160;T+=2){var I=e[T-30],k=e[T-30+1],P=d(I,k),C=p(k,I),R=m(I=e[T-4],k=e[T-4+1]),O=g(k,I),L=e[T-14],N=e[T-14+1],U=e[T-32],j=e[T-32+1],D=C+N|0,z=P+L+y(D,C)|0;z=(z=z+R+y(D=D+O|0,O)|0)+U+y(D=D+j|0,j)|0,e[T]=z,e[T+1]=D}for(var H=0;H\u003C160;H+=2){z=e[H],D=e[H+1];var F=c(r,n,i),$=c(w,M,_),V=f(r,w),q=f(w,r),G=l(a,A),K=l(A,a),J=s[H],W=s[H+1],Z=h(a,u,b),X=h(A,S,x),Y=B+K|0,Q=v+G+y(Y,B)|0;Q=(Q=(Q=Q+Z+y(Y=Y+X|0,X)|0)+J+y(Y=Y+W|0,W)|0)+z+y(Y=Y+D|0,D)|0;var tt=q+$|0,et=V+F+y(tt,q)|0;v=b,B=x,b=u,x=S,u=a,S=A,a=o+Q+y(A=E+Y|0,E)|0,o=i,E=_,i=n,_=M,n=r,M=w,r=Q+et+y(w=Y+tt|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+S|0,this._gl=this._gl+x|0,this._hl=this._hl+B|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,M)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,E)|0,this._eh=this._eh+a+y(this._el,A)|0,this._fh=this._fh+u+y(this._fl,S)|0,this._gh=this._gh+b+y(this._gl,x)|0,this._hh=this._hh+v+y(this._hl,B)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},74294:(t,e,r)=>{\"use strict\";var n=r(67286),i=r(62680),o=r(99500),s=r(5408),a=n(\"%WeakMap%\",!0),u=n(\"%Map%\",!0),h=i(\"WeakMap.prototype.get\",!0),c=i(\"WeakMap.prototype.set\",!0),f=i(\"WeakMap.prototype.has\",!0),l=i(\"Map.prototype.get\",!0),d=i(\"Map.prototype.set\",!0),p=i(\"Map.prototype.has\",!0),m=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new s(\"Side channel does not contain \"+o(t))},get:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(t)return h(t,n)}else if(u){if(e)return l(e,n)}else if(r)return function(t,e){var r=m(t,e);return r&&r.value}(r,n)},has:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(t)return f(t,n)}else if(u){if(e)return p(e,n)}else if(r)return function(t,e){return!!m(t,e)}(r,n);return!1},set:function(n,i){a&&n&&(\"object\"==typeof n||\"function\"==typeof n)?(t||(t=new a),c(t,n,i)):u?(e||(e=new u),d(e,n,i)):(r||(r={key:{},next:null}),function(t,e,r){var n=m(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,i))}};return n}},54851:(t,e,r)=>{t.exports=i;var n=r(22699).EventEmitter;function i(){n.call(this)}r(91285)(i,n),i.Readable=r(28051),i.Writable=r(2557),i.Duplex=r(77073),i.Transform=r(27640),i.PassThrough=r(95163),i.finished=r(59885),i.pipeline=r(63495),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on(\"data\",i),t.on(\"drain\",o),t._isStdio||e&&!1===e.end||(r.on(\"end\",a),r.on(\"close\",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,\"function\"==typeof t.destroy&&t.destroy())}function h(t){if(c(),0===n.listenerCount(this,\"error\"))throw t}function c(){r.removeListener(\"data\",i),t.removeListener(\"drain\",o),r.removeListener(\"end\",a),r.removeListener(\"close\",u),r.removeListener(\"error\",h),t.removeListener(\"error\",h),r.removeListener(\"end\",c),r.removeListener(\"close\",c),t.removeListener(\"close\",c)}return r.on(\"error\",h),t.on(\"error\",h),r.on(\"end\",c),r.on(\"close\",c),t.on(\"close\",c),t.emit(\"pipe\",r),t}},30214:(t,e,r)=>{\"use strict\";var n=r(77834).Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=u,this.end=h,e=4;break;case\"utf8\":this.fillLast=a,e=4;break;case\"base64\":this.text=c,this.end=f,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t\u003C=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"�\";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\"}}(this,t);return void 0!==r?r:this.lastNeed\u003C=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n\u003C=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):\"\"}e.s=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r\u003Ct.length?e?e+this.text(t,r):this.text(t,r):e||\"\"},o.prototype.end=function(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+\"�\":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n\u003Cr)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n\u003Cr||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n\u003Cr||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed\u003C=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},251:function(t,e,r){var n=r(66396).Buffer;!function(e,r){\"use strict\";t.exports?t.exports=r():(e.nacl||(e.nacl={}),e.nacl.util=r())}(this,(function(){\"use strict\";var t={};function e(t){if(!/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$/.test(t))throw new TypeError(\"invalid encoding\")}return t.decodeUTF8=function(t){if(\"string\"!=typeof t)throw new TypeError(\"expected string\");var e,r=unescape(encodeURIComponent(t)),n=new Uint8Array(r.length);for(e=0;e\u003Cr.length;e++)n[e]=r.charCodeAt(e);return n},t.encodeUTF8=function(t){var e,r=[];for(e=0;e\u003Ct.length;e++)r.push(String.fromCharCode(t[e]));return decodeURIComponent(escape(r.join(\"\")))},\"undefined\"==typeof atob?void 0!==n.from?(t.encodeBase64=function(t){return n.from(t).toString(\"base64\")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(n.from(t,\"base64\"),0))}):(t.encodeBase64=function(t){return new n(t).toString(\"base64\")},t.decodeBase64=function(t){return e(t),new Uint8Array(Array.prototype.slice.call(new n(t,\"base64\"),0))}):(t.encodeBase64=function(t){var e,r=[],n=t.length;for(e=0;e\u003Cn;e++)r.push(String.fromCharCode(t[e]));return btoa(r.join(\"\"))},t.decodeBase64=function(t){e(t);var r,n=atob(t),i=new Uint8Array(n.length);for(r=0;r\u003Cn.length;r++)i[r]=n.charCodeAt(r);return i}),t}))},10717:(t,e,r)=>{!function(t){\"use strict\";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e\u003Ct.length;e++)r[e]=t[e];return r},n=function(){throw new Error(\"no PRNG\")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),u=e([56129,1]),h=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function m(t,e,r,n,i){var o,s=0;for(o=0;o\u003Ci;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function g(t,e,r,n){return m(t,e,r,n,16)}function y(t,e,r,n){return m(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])\u003C\u003C8|(255&n[2])\u003C\u003C16|(255&n[3])\u003C\u003C24,s=255&r[0]|(255&r[1])\u003C\u003C8|(255&r[2])\u003C\u003C16|(255&r[3])\u003C\u003C24,a=255&r[4]|(255&r[5])\u003C\u003C8|(255&r[6])\u003C\u003C16|(255&r[7])\u003C\u003C24,u=255&r[8]|(255&r[9])\u003C\u003C8|(255&r[10])\u003C\u003C16|(255&r[11])\u003C\u003C24,h=255&r[12]|(255&r[13])\u003C\u003C8|(255&r[14])\u003C\u003C16|(255&r[15])\u003C\u003C24,c=255&n[4]|(255&n[5])\u003C\u003C8|(255&n[6])\u003C\u003C16|(255&n[7])\u003C\u003C24,f=255&e[0]|(255&e[1])\u003C\u003C8|(255&e[2])\u003C\u003C16|(255&e[3])\u003C\u003C24,l=255&e[4]|(255&e[5])\u003C\u003C8|(255&e[6])\u003C\u003C16|(255&e[7])\u003C\u003C24,d=255&e[8]|(255&e[9])\u003C\u003C8|(255&e[10])\u003C\u003C16|(255&e[11])\u003C\u003C24,p=255&e[12]|(255&e[13])\u003C\u003C8|(255&e[14])\u003C\u003C16|(255&e[15])\u003C\u003C24,m=255&n[8]|(255&n[9])\u003C\u003C8|(255&n[10])\u003C\u003C16|(255&n[11])\u003C\u003C24,g=255&r[16]|(255&r[17])\u003C\u003C8|(255&r[18])\u003C\u003C16|(255&r[19])\u003C\u003C24,y=255&r[20]|(255&r[21])\u003C\u003C8|(255&r[22])\u003C\u003C16|(255&r[23])\u003C\u003C24,b=255&r[24]|(255&r[25])\u003C\u003C8|(255&r[26])\u003C\u003C16|(255&r[27])\u003C\u003C24,v=255&r[28]|(255&r[29])\u003C\u003C8|(255&r[30])\u003C\u003C16|(255&r[31])\u003C\u003C24,w=255&n[12]|(255&n[13])\u003C\u003C8|(255&n[14])\u003C\u003C16|(255&n[15])\u003C\u003C24,M=o,_=s,E=a,A=u,S=h,x=c,B=f,T=l,I=d,k=p,P=m,C=g,R=y,O=b,L=v,N=w,U=0;U\u003C20;U+=2)M^=(i=(R^=(i=(I^=(i=(S^=(i=M+R|0)\u003C\u003C7|i>>>25)+M|0)\u003C\u003C9|i>>>23)+S|0)\u003C\u003C13|i>>>19)+I|0)\u003C\u003C18|i>>>14,x^=(i=(_^=(i=(O^=(i=(k^=(i=x+_|0)\u003C\u003C7|i>>>25)+x|0)\u003C\u003C9|i>>>23)+k|0)\u003C\u003C13|i>>>19)+O|0)\u003C\u003C18|i>>>14,P^=(i=(B^=(i=(E^=(i=(L^=(i=P+B|0)\u003C\u003C7|i>>>25)+P|0)\u003C\u003C9|i>>>23)+L|0)\u003C\u003C13|i>>>19)+E|0)\u003C\u003C18|i>>>14,N^=(i=(C^=(i=(T^=(i=(A^=(i=N+C|0)\u003C\u003C7|i>>>25)+N|0)\u003C\u003C9|i>>>23)+A|0)\u003C\u003C13|i>>>19)+T|0)\u003C\u003C18|i>>>14,M^=(i=(A^=(i=(E^=(i=(_^=(i=M+A|0)\u003C\u003C7|i>>>25)+M|0)\u003C\u003C9|i>>>23)+_|0)\u003C\u003C13|i>>>19)+E|0)\u003C\u003C18|i>>>14,x^=(i=(S^=(i=(T^=(i=(B^=(i=x+S|0)\u003C\u003C7|i>>>25)+x|0)\u003C\u003C9|i>>>23)+B|0)\u003C\u003C13|i>>>19)+T|0)\u003C\u003C18|i>>>14,P^=(i=(k^=(i=(I^=(i=(C^=(i=P+k|0)\u003C\u003C7|i>>>25)+P|0)\u003C\u003C9|i>>>23)+C|0)\u003C\u003C13|i>>>19)+I|0)\u003C\u003C18|i>>>14,N^=(i=(L^=(i=(O^=(i=(R^=(i=N+L|0)\u003C\u003C7|i>>>25)+N|0)\u003C\u003C9|i>>>23)+R|0)\u003C\u003C13|i>>>19)+O|0)\u003C\u003C18|i>>>14;M=M+o|0,_=_+s|0,E=E+a|0,A=A+u|0,S=S+h|0,x=x+c|0,B=B+f|0,T=T+l|0,I=I+d|0,k=k+p|0,P=P+m|0,C=C+g|0,R=R+y|0,O=O+b|0,L=L+v|0,N=N+w|0,t[0]=M>>>0&255,t[1]=M>>>8&255,t[2]=M>>>16&255,t[3]=M>>>24&255,t[4]=_>>>0&255,t[5]=_>>>8&255,t[6]=_>>>16&255,t[7]=_>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=x>>>0&255,t[21]=x>>>8&255,t[22]=x>>>16&255,t[23]=x>>>24&255,t[24]=B>>>0&255,t[25]=B>>>8&255,t[26]=B>>>16&255,t[27]=B>>>24&255,t[28]=T>>>0&255,t[29]=T>>>8&255,t[30]=T>>>16&255,t[31]=T>>>24&255,t[32]=I>>>0&255,t[33]=I>>>8&255,t[34]=I>>>16&255,t[35]=I>>>24&255,t[36]=k>>>0&255,t[37]=k>>>8&255,t[38]=k>>>16&255,t[39]=k>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=C>>>0&255,t[45]=C>>>8&255,t[46]=C>>>16&255,t[47]=C>>>24&255,t[48]=R>>>0&255,t[49]=R>>>8&255,t[50]=R>>>16&255,t[51]=R>>>24&255,t[52]=O>>>0&255,t[53]=O>>>8&255,t[54]=O>>>16&255,t[55]=O>>>24&255,t[56]=L>>>0&255,t[57]=L>>>8&255,t[58]=L>>>16&255,t[59]=L>>>24&255,t[60]=N>>>0&255,t[61]=N>>>8&255,t[62]=N>>>16&255,t[63]=N>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])\u003C\u003C8|(255&n[2])\u003C\u003C16|(255&n[3])\u003C\u003C24,s=255&r[0]|(255&r[1])\u003C\u003C8|(255&r[2])\u003C\u003C16|(255&r[3])\u003C\u003C24,a=255&r[4]|(255&r[5])\u003C\u003C8|(255&r[6])\u003C\u003C16|(255&r[7])\u003C\u003C24,u=255&r[8]|(255&r[9])\u003C\u003C8|(255&r[10])\u003C\u003C16|(255&r[11])\u003C\u003C24,h=255&r[12]|(255&r[13])\u003C\u003C8|(255&r[14])\u003C\u003C16|(255&r[15])\u003C\u003C24,c=255&n[4]|(255&n[5])\u003C\u003C8|(255&n[6])\u003C\u003C16|(255&n[7])\u003C\u003C24,f=255&e[0]|(255&e[1])\u003C\u003C8|(255&e[2])\u003C\u003C16|(255&e[3])\u003C\u003C24,l=255&e[4]|(255&e[5])\u003C\u003C8|(255&e[6])\u003C\u003C16|(255&e[7])\u003C\u003C24,d=255&e[8]|(255&e[9])\u003C\u003C8|(255&e[10])\u003C\u003C16|(255&e[11])\u003C\u003C24,p=255&e[12]|(255&e[13])\u003C\u003C8|(255&e[14])\u003C\u003C16|(255&e[15])\u003C\u003C24,m=255&n[8]|(255&n[9])\u003C\u003C8|(255&n[10])\u003C\u003C16|(255&n[11])\u003C\u003C24,g=255&r[16]|(255&r[17])\u003C\u003C8|(255&r[18])\u003C\u003C16|(255&r[19])\u003C\u003C24,y=255&r[20]|(255&r[21])\u003C\u003C8|(255&r[22])\u003C\u003C16|(255&r[23])\u003C\u003C24,b=255&r[24]|(255&r[25])\u003C\u003C8|(255&r[26])\u003C\u003C16|(255&r[27])\u003C\u003C24,v=255&r[28]|(255&r[29])\u003C\u003C8|(255&r[30])\u003C\u003C16|(255&r[31])\u003C\u003C24,w=255&n[12]|(255&n[13])\u003C\u003C8|(255&n[14])\u003C\u003C16|(255&n[15])\u003C\u003C24,M=0;M\u003C20;M+=2)o^=(i=(y^=(i=(d^=(i=(h^=(i=o+y|0)\u003C\u003C7|i>>>25)+o|0)\u003C\u003C9|i>>>23)+h|0)\u003C\u003C13|i>>>19)+d|0)\u003C\u003C18|i>>>14,c^=(i=(s^=(i=(b^=(i=(p^=(i=c+s|0)\u003C\u003C7|i>>>25)+c|0)\u003C\u003C9|i>>>23)+p|0)\u003C\u003C13|i>>>19)+b|0)\u003C\u003C18|i>>>14,m^=(i=(f^=(i=(a^=(i=(v^=(i=m+f|0)\u003C\u003C7|i>>>25)+m|0)\u003C\u003C9|i>>>23)+v|0)\u003C\u003C13|i>>>19)+a|0)\u003C\u003C18|i>>>14,w^=(i=(g^=(i=(l^=(i=(u^=(i=w+g|0)\u003C\u003C7|i>>>25)+w|0)\u003C\u003C9|i>>>23)+u|0)\u003C\u003C13|i>>>19)+l|0)\u003C\u003C18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)\u003C\u003C7|i>>>25)+o|0)\u003C\u003C9|i>>>23)+s|0)\u003C\u003C13|i>>>19)+a|0)\u003C\u003C18|i>>>14,c^=(i=(h^=(i=(l^=(i=(f^=(i=c+h|0)\u003C\u003C7|i>>>25)+c|0)\u003C\u003C9|i>>>23)+f|0)\u003C\u003C13|i>>>19)+l|0)\u003C\u003C18|i>>>14,m^=(i=(p^=(i=(d^=(i=(g^=(i=m+p|0)\u003C\u003C7|i>>>25)+m|0)\u003C\u003C9|i>>>23)+g|0)\u003C\u003C13|i>>>19)+d|0)\u003C\u003C18|i>>>14,w^=(i=(v^=(i=(b^=(i=(y^=(i=w+v|0)\u003C\u003C7|i>>>25)+w|0)\u003C\u003C9|i>>>23)+y|0)\u003C\u003C13|i>>>19)+b|0)\u003C\u003C18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=c>>>0&255,t[5]=c>>>8&255,t[6]=c>>>16&255,t[7]=c>>>24&255,t[8]=m>>>0&255,t[9]=m>>>8&255,t[10]=m>>>16&255,t[11]=m>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=f>>>0&255,t[17]=f>>>8&255,t[18]=f>>>16&255,t[19]=f>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=d>>>0&255,t[25]=d>>>8&255,t[26]=d>>>16&255,t[27]=d>>>24&255,t[28]=p>>>0&255,t[29]=p>>>8&255,t[30]=p>>>16&255,t[31]=p>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function M(t,e,r,n,i,o,s){var a,u,h=new Uint8Array(16),c=new Uint8Array(64);for(u=0;u\u003C16;u++)h[u]=0;for(u=0;u\u003C8;u++)h[u]=o[u];for(;i>=64;){for(b(c,h,s,w),u=0;u\u003C64;u++)t[e+u]=r[n+u]^c[u];for(a=1,u=8;u\u003C16;u++)a=a+(255&h[u])|0,h[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(c,h,s,w),u=0;u\u003Ci;u++)t[e+u]=r[n+u]^c[u];return 0}function _(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s\u003C16;s++)a[s]=0;for(s=0;s\u003C8;s++)a[s]=n[s];for(;r>=64;){for(b(u,a,i,w),s=0;s\u003C64;s++)t[e+s]=u[s];for(o=1,s=8;s\u003C16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,a,i,w),s=0;s\u003Cr;s++)t[e+s]=u[s];return 0}function E(t,e,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var s=new Uint8Array(8),a=0;a\u003C8;a++)s[a]=n[a+16];return _(t,e,r,s,o)}function A(t,e,r,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,w);for(var u=new Uint8Array(8),h=0;h\u003C8;h++)u[h]=o[h+16];return M(t,e,r,n,i,u,a)}var S=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])\u003C\u003C8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])\u003C\u003C8,this.r[1]=8191&(e>>>13|r\u003C\u003C3),n=255&t[4]|(255&t[5])\u003C\u003C8,this.r[2]=7939&(r>>>10|n\u003C\u003C6),i=255&t[6]|(255&t[7])\u003C\u003C8,this.r[3]=8191&(n>>>7|i\u003C\u003C9),o=255&t[8]|(255&t[9])\u003C\u003C8,this.r[4]=255&(i>>>4|o\u003C\u003C12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])\u003C\u003C8,this.r[6]=8191&(o>>>14|s\u003C\u003C2),a=255&t[12]|(255&t[13])\u003C\u003C8,this.r[7]=8065&(s>>>11|a\u003C\u003C5),u=255&t[14]|(255&t[15])\u003C\u003C8,this.r[8]=8191&(a>>>8|u\u003C\u003C8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])\u003C\u003C8,this.pad[1]=255&t[18]|(255&t[19])\u003C\u003C8,this.pad[2]=255&t[20]|(255&t[21])\u003C\u003C8,this.pad[3]=255&t[22]|(255&t[23])\u003C\u003C8,this.pad[4]=255&t[24]|(255&t[25])\u003C\u003C8,this.pad[5]=255&t[26]|(255&t[27])\u003C\u003C8,this.pad[6]=255&t[28]|(255&t[29])\u003C\u003C8,this.pad[7]=255&t[30]|(255&t[31])\u003C
�vo�\u003C8};function x(t,e,r,n,i,o){var s=new S(o);return s.update(r,n,i),s.finish(t,e),0}function B(t,e,r,n,i,o){var s=new Uint8Array(16);return x(s,0,r,n,i,o),g(t,e,s,0)}function T(t,e,r,n,i){var o;if(r\u003C32)return-1;for(A(t,0,e,0,r,n,i),x(t,16,t,32,r-32,t),o=0;o\u003C16;o++)t[o]=0;return 0}function I(t,e,r,n,i){var o,s=new Uint8Array(32);if(r\u003C32)return-1;if(E(s,0,32,n,i),0!==B(e,16,e,32,r-32,s))return-1;for(A(t,0,e,0,r,n,i),o=0;o\u003C32;o++)t[o]=0;return 0}function k(t,e){var r;for(r=0;r\u003C16;r++)t[r]=0|e[r]}function P(t){var e,r,n=1;for(e=0;e\u003C16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function C(t,e,r){for(var n,i=~(r-1),o=0;o\u003C16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function R(t,r){var n,i,o,s=e(),a=e();for(n=0;n\u003C16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i\u003C2;i++){for(s[0]=a[0]-65517,n=1;n\u003C15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,C(a,s,1-o)}for(n=0;n\u003C16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function O(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,t),R(n,e),y(r,0,n,0)}function L(t){var e=new Uint8Array(32);return R(e,t),1&e[0]}function N(t,e){var r;for(r=0;r\u003C16;r++)t[r]=e[2*r]+(e[2*r+1]\u003C\u003C8);t[15]&=32767}function U(t,e,r){for(var n=0;n\u003C16;n++)t[n]=e[n]+r[n]}function j(t,e,r){for(var n=0;n\u003C16;n++)t[n]=e[n]-r[n]}function D(t,e,r){var n,i,o=0,s=0,a=0,u=0,h=0,c=0,f=0,l=0,d=0,p=0,m=0,g=0,y=0,b=0,v=0,w=0,M=0,_=0,E=0,A=0,S=0,x=0,B=0,T=0,I=0,k=0,P=0,C=0,R=0,O=0,L=0,N=r[0],U=r[1],j=r[2],D=r[3],z=r[4],H=r[5],F=r[6],$=r[7],V=r[8],q=r[9],G=r[10],K=r[11],J=r[12],W=r[13],Z=r[14],X=r[15];o+=(n=e[0])*N,s+=n*U,a+=n*j,u+=n*D,h+=n*z,c+=n*H,f+=n*F,l+=n*$,d+=n*V,p+=n*q,m+=n*G,g+=n*K,y+=n*J,b+=n*W,v+=n*Z,w+=n*X,s+=(n=e[1])*N,a+=n*U,u+=n*j,h+=n*D,c+=n*z,f+=n*H,l+=n*F,d+=n*$,p+=n*V,m+=n*q,g+=n*G,y+=n*K,b+=n*J,v+=n*W,w+=n*Z,M+=n*X,a+=(n=e[2])*N,u+=n*U,h+=n*j,c+=n*D,f+=n*z,l+=n*H,d+=n*F,p+=n*$,m+=n*V,g+=n*q,y+=n*G,b+=n*K,v+=n*J,w+=n*W,M+=n*Z,_+=n*X,u+=(n=e[3])*N,h+=n*U,c+=n*j,f+=n*D,l+=n*z,d+=n*H,p+=n*F,m+=n*$,g+=n*V,y+=n*q,b+=n*G,v+=n*K,w+=n*J,M+=n*W,_+=n*Z,E+=n*X,h+=(n=e[4])*N,c+=n*U,f+=n*j,l+=n*D,d+=n*z,p+=n*H,m+=n*F,g+=n*$,y+=n*V,b+=n*q,v+=n*G,w+=n*K,M+=n*J,_+=n*W,E+=n*Z,A+=n*X,c+=(n=e[5])*N,f+=n*U,l+=n*j,d+=n*D,p+=n*z,m+=n*H,g+=n*F,y+=n*$,b+=n*V,v+=n*q,w+=n*G,M+=n*K,_+=n*J,E+=n*W,A+=n*Z,S+=n*X,f+=(n=e[6])*N,l+=n*U,d+=n*j,p+=n*D,m+=n*z,g+=n*H,y+=n*F,b+=n*$,v+=n*V,w+=n*q,M+=n*G,_+=n*K,E+=n*J,A+=n*W,S+=n*Z,x+=n*X,l+=(n=e[7])*N,d+=n*U,p+=n*j,m+=n*D,g+=n*z,y+=n*H,b+=n*F,v+=n*$,w+=n*V,M+=n*q,_+=n*G,E+=n*K,A+=n*J,S+=n*W,x+=n*Z,B+=n*X,d+=(n=e[8])*N,p+=n*U,m+=n*j,g+=n*D,y+=n*z,b+=n*H,v+=n*F,w+=n*$,M+=n*V,_+=n*q,E+=n*G,A+=n*K,S+=n*J,x+=n*W,B+=n*Z,T+=n*X,p+=(n=e[9])*N,m+=n*U,g+=n*j,y+=n*D,b+=n*z,v+=n*H,w+=n*F,M+=n*$,_+=n*V,E+=n*q,A+=n*G,S+=n*K,x+=n*J,B+=n*W,T+=n*Z,I+=n*X,m+=(n=e[10])*N,g+=n*U,y+=n*j,b+=n*D,v+=n*z,w+=n*H,M+=n*F,_+=n*$,E+=n*V,A+=n*q,S+=n*G,x+=n*K,B+=n*J,T+=n*W,I+=n*Z,k+=n*X,g+=(n=e[11])*N,y+=n*U,b+=n*j,v+=n*D,w+=n*z,M+=n*H,_+=n*F,E+=n*$,A+=n*V,S+=n*q,x+=n*G,B+=n*K,T+=n*J,I+=n*W,k+=n*Z,P+=n*X,y+=(n=e[12])*N,b+=n*U,v+=n*j,w+=n*D,M+=n*z,_+=n*H,E+=n*F,A+=n*$,S+=n*V,x+=n*q,B+=n*G,T+=n*K,I+=n*J,k+=n*W,P+=n*Z,C+=n*X,b+=(n=e[13])*N,v+=n*U,w+=n*j,M+=n*D,_+=n*z,E+=n*H,A+=n*F,S+=n*$,x+=n*V,B+=n*q,T+=n*G,I+=n*K,k+=n*J,P+=n*W,C+=n*Z,R+=n*X,v+=(n=e[14])*N,w+=n*U,M+=n*j,_+=n*D,E+=n*z,A+=n*H,S+=n*F,x+=n*$,B+=n*V,T+=n*q,I+=n*G,k+=n*K,P+=n*J,C+=n*W,R+=n*Z,O+=n*X,w+=(n=e[15])*N,s+=38*(_+=n*j),a+=38*(E+=n*D),u+=38*(A+=n*z),h+=38*(S+=n*H),c+=38*(x+=n*F),f+=38*(B+=n*$),l+=38*(T+=n*V),d+=38*(I+=n*q),p+=38*(k+=n*G),m+=38*(P+=n*K),g+=38*(C+=n*J),y+=38*(R+=n*W),b+=38*(O+=n*Z),v+=38*(L+=n*X),o=(n=(o+=38*(M+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=h,t[5]=c,t[6]=f,t[7]=l,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=y,t[13]=b,t[14]=v,t[15]=w}function z(t,e){D(t,e,e)}function H(t,r){var n,i=e();for(n=0;n\u003C16;n++)i[n]=r[n];for(n=253;n>=0;n--)z(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n\u003C16;n++)t[n]=i[n]}function F(t,r){var n,i=e();for(n=0;n\u003C16;n++)i[n]=r[n];for(n=250;n>=0;n--)z(i,i),1!==n&&D(i,i,r);for(n=0;n\u003C16;n++)t[n]=i[n]}function $(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),h=e(),c=e(),f=e(),l=e(),d=e(),p=e();for(o=0;o\u003C31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,N(a,n),o=0;o\u003C16;o++)c[o]=a[o],l[o]=h[o]=f[o]=0;for(h[0]=l[0]=1,o=254;o>=0;--o)C(h,c,i=s[o>>>3]>>>(7&o)&1),C(f,l,i),U(d,h,f),j(h,h,f),U(f,c,l),j(c,c,l),z(l,d),z(p,h),D(h,f,h),D(f,c,d),U(d,h,f),j(h,h,f),z(c,h),j(f,l,p),D(h,f,u),U(h,h,l),D(f,f,h),D(h,l,p),D(l,c,a),z(c,d),C(h,c,i),C(f,l,i);for(o=0;o\u003C16;o++)a[o+16]=h[o],a[o+32]=f[o],a[o+48]=c[o],a[o+64]=l[o];var m=a.subarray(32),g=a.subarray(16);return H(m,m),D(g,g,m),R(t,g),0}function V(t,e){return $(t,e,o)}function q(t,e){return n(e,32),V(t,e)}function G(t,e,r){var n=new Uint8Array(32);return $(n,r,e),v(t,i,n,w)}S.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,h,c,f,l,d,p,m,g,y,b,v,w,M,_=this.fin?0:2048,E=this.h[0],A=this.h[1],S=this.h[2],x=this.h[3],B=this.h[4],T=this.h[5],I=this.h[6],k=this.h[7],P=this.h[8],C=this.h[9],R=this.r[0],O=this.r[1],L=this.r[2],N=this.r[3],U=this.r[4],j=this.r[5],D=this.r[6],z=this.r[7],H=this.r[8],F=this.r[9];r>=16;)l=f=0,l+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])\u003C\u003C8))*R,l+=(A+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])\u003C\u003C8)\u003C\u003C3))*(5*F),l+=(S+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])\u003C\u003C8)\u003C\u003C6))*(5*H),l+=(x+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])\u003C\u003C8)\u003C\u003C9))*(5*z),f=(l+=(B+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])\u003C\u003C8)\u003C\u003C12))*(5*D))>>>13,l&=8191,l+=(T+=a>>>1&8191)*(5*j),l+=(I+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])\u003C\u003C8)\u003C\u003C2))*(5*U),l+=(k+=8191&(u>>>11|(h=255&t[e+12]|(255&t[e+13])\u003C\u003C8)\u003C\u003C5))*(5*N),l+=(P+=8191&(h>>>8|(c=255&t[e+14]|(255&t[e+15])\u003C\u003C8)\u003C\u003C8))*(5*L),d=f+=(l+=(C+=c>>>5|_)*(5*O))>>>13,d+=E*O,d+=A*R,d+=S*(5*F),d+=x*(5*H),f=(d+=B*(5*z))>>>13,d&=8191,d+=T*(5*D),d+=I*(5*j),d+=k*(5*U),d+=P*(5*N),f+=(d+=C*(5*L))>>>13,d&=8191,p=f,p+=E*L,p+=A*O,p+=S*R,p+=x*(5*F),f=(p+=B*(5*H))>>>13,p&=8191,p+=T*(5*z),p+=I*(5*D),p+=k*(5*j),p+=P*(5*U),m=f+=(p+=C*(5*N))>>>13,m+=E*N,m+=A*L,m+=S*O,m+=x*R,f=(m+=B*(5*F))>>>13,m&=8191,m+=T*(5*H),m+=I*(5*z),m+=k*(5*D),m+=P*(5*j),g=f+=(m+=C*(5*U))>>>13,g+=E*U,g+=A*N,g+=S*L,g+=x*O,f=(g+=B*R)>>>13,g&=8191,g+=T*(5*F),g+=I*(5*H),g+=k*(5*z),g+=P*(5*D),y=f+=(g+=C*(5*j))>>>13,y+=E*j,y+=A*U,y+=S*N,y+=x*L,f=(y+=B*O)>>>13,y&=8191,y+=T*R,y+=I*(5*F),y+=k*(5*H),y+=P*(5*z),b=f+=(y+=C*(5*D))>>>13,b+=E*D,b+=A*j,b+=S*U,b+=x*N,f=(b+=B*L)>>>13,b&=8191,b+=T*O,b+=I*R,b+=k*(5*F),b+=P*(5*H),v=f+=(b+=C*(5*z))>>>13,v+=E*z,v+=A*D,v+=S*j,v+=x*U,f=(v+=B*N)>>>13,v&=8191,v+=T*L,v+=I*O,v+=k*R,v+=P*(5*F),w=f+=(v+=C*(5*H))>>>13,w+=E*H,w+=A*z,w+=S*D,w+=x*j,f=(w+=B*U)>>>13,w&=8191,w+=T*N,w+=I*L,w+=k*O,w+=P*R,M=f+=(w+=C*(5*F))>>>13,M+=E*F,M+=A*H,M+=S*z,M+=x*D,f=(M+=B*j)>>>13,M&=8191,M+=T*U,M+=I*N,M+=k*L,M+=P*O,E=l=8191&(f=(f=((f+=(M+=C*R)>>>13)\u003C\u003C2)+f|0)+(l&=8191)|0),A=d+=f>>>=13,S=p&=8191,x=m&=8191,B=g&=8191,T=y&=8191,I=b&=8191,k=v&=8191,P=w&=8191,C=M&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=S,this.h[3]=x,this.h[4]=B,this.h[5]=T,this.h[6]=I,this.h[7]=k,this.h[8]=P,this.h[9]=C},S.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o\u003C16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o\u003C10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o\u003C10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o\u003C10;o++)s[o]&=n;for(n=~n,o=0;o\u003C10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]\u003C\u003C13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]\u003C\u003C10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]\u003C\u003C7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]\u003C\u003C4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]\u003C\u003C1|this.h[6]\u003C\u003C14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]\u003C\u003C11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]\u003C\u003C8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]\u003C\u003C5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o\u003C8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},S.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n\u003Ci;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover\u003C16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n\u003Cr;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var K=T,J=I;var W=[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 Z(t,e,r,n){for(var i,o,s,a,u,h,c,f,l,d,p,m,g,y,b,v,w,M,_,E,A,S,x,B,T,I,k=new Int32Array(16),P=new Int32Array(16),C=t[0],R=t[1],O=t[2],L=t[3],N=t[4],U=t[5],j=t[6],D=t[7],z=e[0],H=e[1],F=e[2],$=e[3],V=e[4],q=e[5],G=e[6],K=e[7],J=0;n>=128;){for(_=0;_\u003C16;_++)E=8*_+J,k[_]=r[E+0]\u003C\u003C24|r[E+1]\u003C\u003C16|r[E+2]\u003C\u003C8|r[E+3],P[_]=r[E+4]\u003C\u003C24|r[E+5]\u003C\u003C16|r[E+6]\u003C\u003C8|r[E+7];for(_=0;_\u003C80;_++)if(i=C,o=R,s=O,a=L,u=N,h=U,c=j,D,l=z,d=H,p=F,m=$,g=V,y=q,b=G,K,x=65535&(S=K),B=S>>>16,T=65535&(A=D),I=A>>>16,x+=65535&(S=(V>>>14|N\u003C\u003C18)^(V>>>18|N\u003C\u003C14)^(N>>>9|V\u003C\u003C23)),B+=S>>>16,T+=65535&(A=(N>>>14|V\u003C\u003C18)^(N>>>18|V\u003C\u003C14)^(V>>>9|N\u003C\u003C23)),I+=A>>>16,x+=65535&(S=V&q^~V&G),B+=S>>>16,T+=65535&(A=N&U^~N&j),I+=A>>>16,A=W[2*_],x+=65535&(S=W[2*_+1]),B+=S>>>16,T+=65535&A,I+=A>>>16,A=k[_%16],B+=(S=P[_%16])>>>16,T+=65535&A,I+=A>>>16,T+=(B+=(x+=65535&S)>>>16)>>>16,x=65535&(S=M=65535&x|B\u003C\u003C16),B=S>>>16,T=65535&(A=w=65535&T|(I+=T>>>16)\u003C\u003C16),I=A>>>16,x+=65535&(S=(z>>>28|C\u003C\u003C4)^(C>>>2|z\u003C\u003C30)^(C>>>7|z\u003C\u003C25)),B+=S>>>16,T+=65535&(A=(C>>>28|z\u003C\u003C4)^(z>>>2|C\u003C\u003C30)^(z>>>7|C\u003C\u003C25)),I+=A>>>16,B+=(S=z&H^z&F^H&F)>>>16,T+=65535&(A=C&R^C&O^R&O),I+=A>>>16,f=65535&(T+=(B+=(x+=65535&S)>>>16)>>>16)|(I+=T>>>16)\u003C\u003C16,v=65535&x|B\u003C\u003C16,x=65535&(S=m),B=S>>>16,T=65535&(A=a),I=A>>>16,B+=(S=M)>>>16,T+=65535&(A=w),I+=A>>>16,R=i,O=o,L=s,N=a=65535&(T+=(B+=(x+=65535&S)>>>16)>>>16)|(I+=T>>>16)\u003C\u003C16,U=u,j=h,D=c,C=f,H=l,F=d,$=p,V=m=65535&x|B\u003C\u003C16,q=g,G=y,K=b,z=v,_%16==15)for(E=0;E\u003C16;E++)A=k[E],x=65535&(S=P[E]),B=S>>>16,T=65535&A,I=A>>>16,A=k[(E+9)%16],x+=65535&(S=P[(E+9)%16]),B+=S>>>16,T+=65535&A,I+=A>>>16,w=k[(E+1)%16],x+=65535&(S=((M=P[(E+1)%16])>>>1|w\u003C\u003C31)^(M>>>8|w\u003C\u003C24)^(M>>>7|w\u003C\u003C25)),B+=S>>>16,T+=65535&(A=(w>>>1|M\u003C\u003C31)^(w>>>8|M\u003C\u003C24)^w>>>7),I+=A>>>16,w=k[(E+14)%16],B+=(S=((M=P[(E+14)%16])>>>19|w\u003C\u003C13)^(w>>>29|M\u003C\u003C3)^(M>>>6|w\u003C\u003C26))>>>16,T+=65535&(A=(w>>>19|M\u003C\u003C13)^(M>>>29|w\u003C\u003C3)^w>>>6),I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,k[E]=65535&T|I\u003C\u003C16,P[E]=65535&x|B\u003C\u003C16;x=65535&(S=z),B=S>>>16,T=65535&(A=C),I=A>>>16,A=t[0],B+=(S=e[0])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[0]=C=65535&T|I\u003C\u003C16,e[0]=z=65535&x|B\u003C\u003C16,x=65535&(S=H),B=S>>>16,T=65535&(A=R),I=A>>>16,A=t[1],B+=(S=e[1])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[1]=R=65535&T|I\u003C\u003C16,e[1]=H=65535&x|B\u003C\u003C16,x=65535&(S=F),B=S>>>16,T=65535&(A=O),I=A>>>16,A=t[2],B+=(S=e[2])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[2]=O=65535&T|I\u003C\u003C16,e[2]=F=65535&x|B\u003C\u003C16,x=65535&(S=$),B=S>>>16,T=65535&(A=L),I=A>>>16,A=t[3],B+=(S=e[3])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[3]=L=65535&T|I\u003C\u003C16,e[3]=$=65535&x|B\u003C\u003C16,x=65535&(S=V),B=S>>>16,T=65535&(A=N),I=A>>>16,A=t[4],B+=(S=e[4])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[4]=N=65535&T|I\u003C\u003C16,e[4]=V=65535&x|B\u003C\u003C16,x=65535&(S=q),B=S>>>16,T=65535&(A=U),I=A>>>16,A=t[5],B+=(S=e[5])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[5]=U=65535&T|I\u003C\u003C16,e[5]=q=65535&x|B\u003C\u003C16,x=65535&(S=G),B=S>>>16,T=65535&(A=j),I=A>>>16,A=t[6],B+=(S=e[6])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[6]=j=65535&T|I\u003C\u003C16,e[6]=G=65535&x|B\u003C\u003C16,x=65535&(S=K),B=S>>>16,T=65535&(A=D),I=A>>>16,A=t[7],B+=(S=e[7])>>>16,T+=65535&A,I+=A>>>16,I+=(T+=(B+=(x+=65535&S)>>>16)>>>16)>>>16,t[7]=D=65535&T|I\u003C\u003C16,e[7]=K=65535&x|B\u003C\u003C16,J+=128,n-=128}return n}function X(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Z(i,o,e,r),r%=128,n=0;n\u003Cr;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r\u003C112?1:0))-9]=0,p(s,r-8,a/536870912|0,a\u003C\u003C3),Z(i,o,s,r),n=0;n\u003C8;n++)p(t,8*n,i[n],o[n]);return 0}function Y(t,r){var n=e(),i=e(),o=e(),s=e(),a=e(),u=e(),h=e(),f=e(),l=e();j(n,t[1],t[0]),j(l,r[1],r[0]),D(n,n,l),U(i,t[0],t[1]),U(l,r[0],r[1]),D(i,i,l),D(o,t[3],r[3]),D(o,o,c),D(s,t[2],r[2]),U(s,s,s),j(a,i,n),j(u,s,o),U(h,s,o),U(f,i,n),D(t[0],a,u),D(t[1],f,h),D(t[2],h,u),D(t[3],a,f)}function Q(t,e,r){var n;for(n=0;n\u003C4;n++)C(t[n],e[n],r)}function tt(t,r){var n=e(),i=e(),o=e();H(o,r[2]),D(n,r[0],o),D(i,r[1],o),R(t,i),t[31]^=L(n)\u003C\u003C7}function et(t,e,r){var n,i;for(k(t[0],s),k(t[1],a),k(t[2],a),k(t[3],s),i=255;i>=0;--i)Q(t,e,n=r[i/8|0]>>(7&i)&1),Y(e,t),Y(t,t),Q(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];k(n[0],f),k(n[1],l),k(n[2],a),D(n[3],f,l),et(t,n,r)}function nt(t,r,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||n(r,32),X(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,rt(a,s),tt(t,a),o=0;o\u003C32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i\u003Co;++i)e[i]+=r-16*e[n]*it[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i\u003C32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i\u003C32;i++)e[i]-=r*it[i];for(n=0;n\u003C32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function st(t){var e,r=new Float64Array(64);for(e=0;e\u003C64;e++)r[e]=t[e];for(e=0;e\u003C64;e++)t[e]=0;ot(t,r)}function at(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),h=new Uint8Array(64),c=new Float64Array(64),f=[e(),e(),e(),e()];X(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=n+64;for(o=0;o\u003Cn;o++)t[64+o]=r[o];for(o=0;o\u003C32;o++)t[32+o]=a[32+o];for(X(h,t.subarray(32),n+32),st(h),rt(f,h),tt(t,f),o=32;o\u003C64;o++)t[o]=i[o];for(X(u,t,n+64),st(u),o=0;o\u003C64;o++)c[o]=0;for(o=0;o\u003C32;o++)c[o]=h[o];for(o=0;o\u003C32;o++)for(s=0;s\u003C32;s++)c[o+s]+=u[o]*a[s];return ot(t.subarray(32),c),l}function ut(t,r,n,i){var o,u=new Uint8Array(32),c=new Uint8Array(64),f=[e(),e(),e(),e()],l=[e(),e(),e(),e()];if(n\u003C64)return-1;if(function(t,r){var n=e(),i=e(),o=e(),u=e(),c=e(),f=e(),l=e();return k(t[2],a),N(t[1],r),z(o,t[1]),D(u,o,h),j(o,o,t[2]),U(u,t[2],u),z(c,u),z(f,c),D(l,f,c),D(n,l,o),D(n,n,u),F(n,n),D(n,n,o),D(n,n,u),D(n,n,u),D(t[0],n,u),z(i,t[0]),D(i,i,u),O(i,o)&&D(t[0],t[0],d),z(i,t[0]),D(i,i,u),O(i,o)?-1:(L(t[0])===r[31]>>7&&j(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}(l,i))return-1;for(o=0;o\u003Cn;o++)t[o]=r[o];for(o=0;o\u003C32;o++)t[o+32]=i[o];if(X(c,t,n),st(c),et(f,l,c),rt(l,r.subarray(32)),Y(f,l),tt(u,f),n-=64,y(r,0,u,0)){for(o=0;o\u003Cn;o++)t[o]=0;return-1}for(o=0;o\u003Cn;o++)t[o]=r[o+64];return n}var ht=16,ct=64,ft=32,lt=64;function dt(t,e){if(32!==t.length)throw new Error(\"bad key size\");if(24!==e.length)throw new Error(\"bad nonce size\")}function pt(){for(var t=0;t\u003Carguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError(\"unexpected type, use Uint8Array\")}function mt(t){for(var e=0;e\u003Ct.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:M,crypto_stream_salsa20:_,crypto_onetimeauth:x,crypto_onetimeauth_verify:B,crypto_verify_16:g,crypto_verify_32:y,crypto_secretbox:T,crypto_secretbox_open:I,crypto_scalarmult:$,crypto_scalarmult_base:V,crypto_box_beforenm:G,crypto_box_afternm:K,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),K(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),J(t,e,r,n,s)},crypto_box_keypair:q,crypto_hash:X,crypto_sign:at,crypto_sign_keypair:nt,crypto_sign_open:ut,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ht,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ct,crypto_sign_PUBLICKEYBYTES:ft,crypto_sign_SECRETKEYBYTES:lt,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:h,L:it,pack25519:R,unpack25519:N,M:D,A:U,S:z,Z:j,pow2523:F,add:Y,set25519:k,modL:ot,scalarmult:et,scalarbase:rt},t.randomBytes=function(t){var e=new Uint8Array(t);return n(e,t),e},t.secretbox=function(t,e,r){pt(t,e,r),dt(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o\u003Ct.length;o++)n[o+32]=t[o];return T(i,n,n.length,e,r),i.subarray(ht)},t.secretbox.open=function(t,e,r){pt(t,e,r),dt(r,e);for(var n=new Uint8Array(ht+t.length),i=new Uint8Array(n.length),o=0;o\u003Ct.length;o++)n[o+ht]=t[o];return n.length\u003C32||0!==I(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=ht,t.scalarMult=function(t,e){if(pt(t,e),32!==t.length)throw new Error(\"bad n size\");if(32!==e.length)throw new Error(\"bad p size\");var r=new Uint8Array(32);return $(r,t,e),r},t.scalarMult.base=function(t){if(pt(t),32!==t.length)throw new Error(\"bad n size\");var e=new Uint8Array(32);return V(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){pt(t,e),function(t,e){if(32!==t.length)throw new Error(\"bad public key size\");if(32!==e.length)throw new Error(\"bad secret key size\")}(t,e);var r=new Uint8Array(32);return G(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return q(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(pt(t),32!==t.length)throw new Error(\"bad secret key size\");var e=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(pt(t,e),e.length!==lt)throw new Error(\"bad secret key size\");var r=new Uint8Array(ct+t.length);return at(r,t,t.length,e),r},t.sign.open=function(t,e){if(pt(t,e),e.length!==ft)throw new Error(\"bad public key size\");var r=new Uint8Array(t.length),n=ut(r,t,t.length,e);if(n\u003C0)return null;for(var i=new Uint8Array(n),o=0;o\u003Ci.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(ct),o=0;o\u003Ci.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(pt(t,e,r),e.length!==ct)throw new Error(\"bad signature size\");if(r.length!==ft)throw new Error(\"bad public key size\");var n,i=new Uint8Array(ct+t.length),o=new Uint8Array(ct+t.length);for(n=0;n\u003Cct;n++)i[n]=e[n];for(n=0;n\u003Ct.length;n++)i[n+ct]=t[n];return ut(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(ft),e=new Uint8Array(lt);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(pt(t),t.length!==lt)throw new Error(\"bad secret key size\");for(var e=new Uint8Array(ft),r=0;r\u003Ce.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(pt(t),32!==t.length)throw new Error(\"bad seed size\");for(var e=new Uint8Array(ft),r=new Uint8Array(lt),n=0;n\u003C32;n++)r[n]=t[n];return nt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=ft,t.sign.secretKeyLength=lt,t.sign.seedLength=32,t.sign.signatureLength=ct,t.hash=function(t){pt(t);var e=new Uint8Array(64);return X(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return pt(t,e),0!==t.length&&0!==e.length&&(t.length===e.length&&0===m(t,0,e,0,t.length))},t.setPRNG=function(t){n=t},function(){var e=\"undefined\"!=typeof self?self.crypto||self.msCrypto:null;if(e&&e.getRandomValues){t.setPRNG((function(t,r){var n,i=new Uint8Array(r);for(n=0;n\u003Cr;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n\u003Cr;n++)t[n]=i[n];mt(i)}))}else(e=r(85338))&&e.randomBytes&&t.setPRNG((function(t,r){var n,i=e.randomBytes(r);for(n=0;n\u003Cr;n++)t[n]=i[n];mt(i)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},59639:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o=\"object\"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,h=1,c=26,f=38,l=700,d=72,p=128,m=\"-\",g=/^xn--/,y=/[^\\x20-\\x7E]/,b=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,v={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},w=u-h,M=Math.floor,_=String.fromCharCode;function E(t){throw new RangeError(v[t])}function A(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function S(t,e){var r=t.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",t=r[1]),n+A((t=t.replace(b,\".\")).split(\".\"),e).join(\".\")}function x(t){for(var e,r,n=[],i=0,o=t.length;i\u003Co;)(e=t.charCodeAt(i++))>=55296&&e\u003C=56319&&i\u003Co?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)\u003C\u003C10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function B(t){return A(t,(function(t){var e=\"\";return t>65535&&(e+=_((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=_(t)})).join(\"\")}function T(t,e){return t+22+75*(t\u003C26)-((0!=e)\u003C\u003C5)}function I(t,e,r){var n=0;for(t=r?M(t/l):t>>1,t+=M(t/e);t>w*c>>1;n+=u)t=M(t/w);return M(n+(w+1)*t/(t+f))}function k(t){var e,r,n,i,o,s,f,l,g,y,b,v=[],w=t.length,_=0,A=p,S=d;for((r=t.lastIndexOf(m))\u003C0&&(r=0),n=0;n\u003Cr;++n)t.charCodeAt(n)>=128&&E(\"not-basic\"),v.push(t.charCodeAt(n));for(i=r>0?r+1:0;i\u003Cw;){for(o=_,s=1,f=u;i>=w&&E(\"invalid-input\"),((l=(b=t.charCodeAt(i++))-48\u003C10?b-22:b-65\u003C26?b-65:b-97\u003C26?b-97:u)>=u||l>M((a-_)/s))&&E(\"overflow\"),_+=l*s,!(l\u003C(g=f\u003C=S?h:f>=S+c?c:f-S));f+=u)s>M(a/(y=u-g))&&E(\"overflow\"),s*=y;S=I(_-o,e=v.length+1,0==o),M(_/e)>a-A&&E(\"overflow\"),A+=M(_/e),_%=e,v.splice(_++,0,A)}return B(v)}function P(t){var e,r,n,i,o,s,f,l,g,y,b,v,w,A,S,B=[];for(v=(t=x(t)).length,e=p,r=0,o=d,s=0;s\u003Cv;++s)(b=t[s])\u003C128&&B.push(_(b));for(n=i=B.length,i&&B.push(m);n\u003Cv;){for(f=a,s=0;s\u003Cv;++s)(b=t[s])>=e&&b\u003Cf&&(f=b);for(f-e>M((a-r)/(w=n+1))&&E(\"overflow\"),r+=(f-e)*w,e=f,s=0;s\u003Cv;++s)if((b=t[s])\u003Ce&&++r>a&&E(\"overflow\"),b==e){for(l=r,g=u;!(l\u003C(y=g\u003C=o?h:g>=o+c?c:g-o));g+=u)S=l-y,A=u-y,B.push(_(T(y+S%A,0))),l=M(S/A);B.push(_(T(l,0))),o=I(r,w,n==i),r=0,++n}++r,++e}return B.join(\"\")}s={version:\"1.4.1\",ucs2:{decode:x,encode:B},decode:k,encode:P,toASCII:function(t){return S(t,(function(t){return y.test(t)?\"xn--\"+P(t):t}))},toUnicode:function(t){return S(t,(function(t){return g.test(t)?k(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},883:(t,e,r)=>{\"use strict\";var n=r(59639);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,u=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"\u003C\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),h=[\"'\"].concat(u),c=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(h),f=[\"/\",\"?\",\"#\"],l=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,\"javascript:\":!0},m={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},y=r(19126);function b(t,e,r){if(t&&\"object\"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(\"string\"!=typeof t)throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),s=-1!==i&&i\u003Ct.indexOf(\"#\")?\"?\":\"#\",u=t.split(s);u[0]=u[0].replace(/\\\\/g,\"/\");var b=t=u.join(s);if(b=b.trim(),!r&&1===t.split(\"#\").length){var v=a.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search=\"\",this.query={}),this}var w=o.exec(b);if(w){var M=(w=w[0]).toLowerCase();this.protocol=M,b=b.substr(w.length)}if(r||w||b.match(/^\\/\\/[^@/]+@[^@/]+/)){var _=\"//\"===b.substr(0,2);!_||w&&m[w]||(b=b.substr(2),this.slashes=!0)}if(!m[w]&&(_||w&&!g[w])){for(var E,A,S=-1,x=0;x\u003Cf.length;x++){-1!==(B=b.indexOf(f[x]))&&(-1===S||B\u003CS)&&(S=B)}-1!==(A=-1===S?b.lastIndexOf(\"@\"):b.lastIndexOf(\"@\",S))&&(E=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(E)),S=-1;for(x=0;x\u003Cc.length;x++){var B;-1!==(B=b.indexOf(c[x]))&&(-1===S||B\u003CS)&&(S=B)}-1===S&&(S=b.length),this.host=b.slice(0,S),b=b.slice(S),this.parseHost(),this.hostname=this.hostname||\"\";var T=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!T)for(var I=this.hostname.split(/\\./),k=(x=0,I.length);x\u003Ck;x++){var P=I[x];if(P&&!P.match(l)){for(var C=\"\",R=0,O=P.length;R\u003CO;R++)P.charCodeAt(R)>127?C+=\"x\":C+=P[R];if(!C.match(l)){var L=I.slice(0,x),N=I.slice(x+1),U=P.match(d);U&&(L.push(U[1]),N.unshift(U[2])),N.length&&(b=\"/\"+N.join(\".\")+b),this.hostname=L.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var j=this.port?\":\"+this.port:\"\",D=this.hostname||\"\";this.host=D+j,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==b[0]&&(b=\"/\"+b))}if(!p[M])for(x=0,k=h.length;x\u003Ck;x++){var z=h[x];if(-1!==b.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),b=b.split(z).join(H)}}var F=b.indexOf(\"#\");-1!==F&&(this.hash=b.substr(F),b=b.slice(0,F));var $=b.indexOf(\"?\");if(-1!==$?(this.search=b.substr($),this.query=b.substr($+1),e&&(this.query=y.parse(this.query)),b=b.slice(0,$)):e&&(this.search=\"\",this.query={}),b&&(this.pathname=b),g[M]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){j=this.pathname||\"\";var V=this.search||\"\";this.path=j+V}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||\"\";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,\":\"),t+=\"@\");var e=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,o=\"\";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&\"object\"==typeof this.query&&Object.keys(this.query).length&&(o=y.stringify(this.query,{arrayFormat:\"repeat\",addQueryPrefix:!1}));var s=this.search||o&&\"?\"+o||\"\";return e&&\":\"!==e.substr(-1)&&(e+=\":\"),this.slashes||(!e||g[e])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),s&&\"?\"!==s.charAt(0)&&(s=\"?\"+s),e+i+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace(\"#\",\"%23\"))+n},i.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(\"string\"==typeof t){var e=new i;e.parse(t,!1,!0),t=e}for(var r=new i,n=Object.keys(this),o=0;o\u003Cn.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=t.hash,\"\"===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u\u003Ca.length;u++){var h=a[u];\"protocol\"!==h&&(r[h]=t[h])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname=\"/\",r.path=r.pathname),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var c=Object.keys(t),f=0;f\u003Cc.length;f++){var l=c[f];r[l]=t[l]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{fop�s�r(var d=(t.pathname||\"\").split(\"/\");d.length&&!(t.host=d.shift()););t.host||(t.host=\"\"),t.hostname||(t.hostname=\"\"),\"\"!==d[0]&&d.unshift(\"\"),d.length\u003C2&&d.unshift(\"\"),r.pathname=d.join(\"/\")}if(r.search=t.search,r.query=t.query,r.host=t.host||\"\",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var p=r.pathname||\"\",y=r.search||\"\";r.path=p+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var b=r.pathname&&\"/\"===r.pathname.charAt(0),v=t.host||t.pathname&&\"/\"===t.pathname.charAt(0),w=v||b||r.host&&t.pathname,M=w,_=r.pathname&&r.pathname.split(\"/\")||[],E=(d=t.pathname&&t.pathname.split(\"/\")||[],r.protocol&&!g[r.protocol]);if(E&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===_[0]?_[0]=r.host:_.unshift(r.host)),r.host=\"\",t.protocol&&(t.hostname=null,t.port=null,t.host&&(\"\"===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),w=w&&(\"\"===d[0]||\"\"===_[0])),v)r.host=t.host||\"\"===t.host?t.host:r.host,r.hostname=t.hostname||\"\"===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=t.search,r.query=t.query;else if(null!=t.search){if(E)r.host=_.shift(),r.hostname=r.host,(T=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],S=(r.host||t.host||_.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,x=0,B=_.length;B>=0;B--)\".\"===(A=_[B])?_.splice(B,1):\"..\"===A?(_.splice(B,1),x++):x&&(_.splice(B,1),x--);if(!w&&!M)for(;x--;x)_.unshift(\"..\");!w||\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0)||_.unshift(\"\"),S&&\"/\"!==_.join(\"/\").substr(-1)&&_.push(\"\");var T,I=\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0);E&&(r.hostname=I?\"\":_.length?_.shift():\"\",r.host=r.hostname,(T=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=T.shift(),r.hostname=T.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!I&&_.unshift(\"\"),_.length>0?r.pathname=_.join(\"/\"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return\"string\"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},5803:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&\"true\"===String(e).toLowerCase()}t.exports=function(t,e){if(n(\"noDeprecation\"))return t;var r=!1;return function(){if(!r){if(n(\"throwDeprecation\"))throw new Error(e);n(\"traceDeprecation\")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},10082:t=>{t.exports=function(t){return t&&\"object\"==typeof t&&\"function\"==typeof t.copy&&\"function\"==typeof t.fill&&\"function\"==typeof t.readUInt8}},54895:(t,e,r)=>{\"use strict\";var n=r(52635),i=r(43138),o=r(32094),s=r(50198);function a(t){return t.call.bind(t)}var u=\"undefined\"!=typeof BigInt,h=\"undefined\"!=typeof Symbol,c=a(Object.prototype.toString),f=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(h)var m=a(Symbol.prototype.valueOf);function g(t,e){if(\"object\"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function y(t){return\"[object Map]\"===c(t)}function b(t){return\"[object Set]\"===c(t)}function v(t){return\"[object WeakMap]\"===c(t)}function w(t){return\"[object WeakSet]\"===c(t)}function M(t){return\"[object ArrayBuffer]\"===c(t)}function _(t){return\"undefined\"!=typeof ArrayBuffer&&(M.working?M(t):t instanceof ArrayBuffer)}function E(t){return\"[object DataView]\"===c(t)}function A(t){return\"undefined\"!=typeof DataView&&(E.working?E(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return\"undefined\"!=typeof Promise&&t instanceof Promise||null!==t&&\"object\"==typeof t&&\"function\"==typeof t.then&&\"function\"==typeof t.catch},e.isArrayBufferView=function(t){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||A(t)},e.isUint8Array=function(t){return\"Uint8Array\"===o(t)},e.isUint8ClampedArray=function(t){return\"Uint8ClampedArray\"===o(t)},e.isUint16Array=function(t){return\"Uint16Array\"===o(t)},e.isUint32Array=function(t){return\"Uint32Array\"===o(t)},e.isInt8Array=function(t){return\"Int8Array\"===o(t)},e.isInt16Array=function(t){return\"Int16Array\"===o(t)},e.isInt32Array=function(t){return\"Int32Array\"===o(t)},e.isFloat32Array=function(t){return\"Float32Array\"===o(t)},e.isFloat64Array=function(t){return\"Float64Array\"===o(t)},e.isBigInt64Array=function(t){return\"BigInt64Array\"===o(t)},e.isBigUint64Array=function(t){return\"BigUint64Array\"===o(t)},y.working=\"undefined\"!=typeof Map&&y(new Map),e.isMap=function(t){return\"undefined\"!=typeof Map&&(y.working?y(t):t instanceof Map)},b.working=\"undefined\"!=typeof Set&&b(new Set),e.isSet=function(t){return\"undefined\"!=typeof Set&&(b.working?b(t):t instanceof Set)},v.working=\"undefined\"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return\"undefined\"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},w.working=\"undefined\"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},M.working=\"undefined\"!=typeof ArrayBuffer&&M(new ArrayBuffer),e.isArrayBuffer=_,E.working=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=A;var S=\"undefined\"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function x(t){return\"[object SharedArrayBuffer]\"===c(t)}function B(t){return void 0!==S&&(void 0===x.working&&(x.working=x(new S)),x.working?x(t):t instanceof S)}function T(t){return g(t,f)}function I(t){return g(t,l)}function k(t){return g(t,d)}function P(t){return u&&g(t,p)}function C(t){return h&&g(t,m)}e.isSharedArrayBuffer=B,e.isAsyncFunction=function(t){return\"[object AsyncFunction]\"===c(t)},e.isMapIterator=function(t){return\"[object Map Iterator]\"===c(t)},e.isSetIterator=function(t){return\"[object Set Iterator]\"===c(t)},e.isGeneratorObject=function(t){return\"[object Generator]\"===c(t)},e.isWebAssemblyCompiledModule=function(t){return\"[object WebAssembly.Module]\"===c(t)},e.isNumberObject=T,e.isStringObject=I,e.isBooleanObject=k,e.isBigIntObject=P,e.isSymbolObject=C,e.isBoxedPrimitive=function(t){return T(t)||I(t)||k(t)||P(t)||C(t)},e.isAnyArrayBuffer=function(t){return\"undefined\"!=typeof Uint8Array&&(_(t)||B(t))},[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+\" is not supported in userland\")}})}))},43335:(t,e,r)=>{var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n\u003Ce.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r\u003Carguments.length;r++)e.push(u(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if(\"%%\"===t)return\"%\";if(r>=o)return t;switch(t){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return t}})),a=n[r];r\u003Co;a=n[++r])g(a)||!M(a)?s+=\" \"+a:s+=\" \"+u(a);return s},e.deprecate=function(t,r){if(\"undefined\"!=typeof process&&!0===process.noDeprecation)return t;if(\"undefined\"==typeof process)return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var o={},s=/^$/,a=\"false\";function u(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),f(n,t,n.depth)}function h(t,e){var r=u.styles[e];return r?\"\u001B[\"+u.colors[r][0]+\"m\"+t+\"\u001B[\"+u.colors[r][1]+\"m\":t}function c(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=f(t,i,n)),i}var o=function(t,e){if(v(e))return t.stylize(\"undefined\",\"undefined\");if(b(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}if(y(e))return t.stylize(\"\"+e,\"number\");if(m(e))return t.stylize(\"\"+e,\"boolean\");if(g(e))return t.stylize(\"null\",\"null\")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf(\"message\")>=0||s.indexOf(\"description\")>=0))return l(r);if(0===s.length){if(A(r)){var u=r.name?\": \"+r.name:\"\";return t.stylize(\"[Function\"+u+\"]\",\"special\")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(_(r))return t.stylize(Date.prototype.toString.call(r),\"date\");if(E(r))return l(r)}var h,c=\"\",M=!1,S=[\"{\",\"}\"];(p(r)&&(M=!0,S=[\"[\",\"]\"]),A(r))&&(c=\" [Function\"+(r.name?\": \"+r.name:\"\")+\"]\");return w(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),_(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),E(r)&&(c=\" \"+l(r)),0!==s.length||M&&0!=r.length?n\u003C0?w(r)?t.stylize(RegExp.prototype.toString.call(r),\"regexp\"):t.stylize(\"[Object]\",\"special\"):(t.seen.push(r),h=M?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s\u003Ca;++s)T(e,String(s))?o.push(d(t,e,r,n,String(s),!0)):o.push(\"\");return i.forEach((function(i){i.match(/^\\d+$/)||o.push(d(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return d(t,r,n,a,e,M)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf(\"\\n\")>=0&&0,t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0);if(n>60)return r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n  \")+\" \"+r[1];return r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(h,c,S)):S[0]+c+S[1]}function l(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function d(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):u.set&&(a=t.stylize(\"[Setter]\",\"special\")),T(n,i)||(s=\"[\"+i+\"]\"),a||(t.seen.indexOf(u.value)\u003C0?(a=g(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf(\"\\n\")>-1&&(a=o?a.split(\"\\n\").map((function(t){return\"  \"+t})).join(\"\\n\").slice(2):\"\\n\"+a.split(\"\\n\").map((function(t){return\"   \"+t})).join(\"\\n\")):a=t.stylize(\"[Circular]\",\"special\")),v(s)){if(o&&i.match(/^\\d+$/))return a;(s=JSON.stringify(\"\"+i)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.slice(1,-1),s=t.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=t.stylize(s,\"string\"))}return s+\": \"+a}function p(t){return Array.isArray(t)}function m(t){return\"boolean\"==typeof t}function g(t){return null===t}function y(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function v(t){return void 0===t}function w(t){return M(t)&&\"[object RegExp]\"===S(t)}function M(t){return\"object\"==typeof t&&null!==t}function _(t){return M(t)&&\"[object Date]\"===S(t)}function E(t){return M(t)&&(\"[object Error]\"===S(t)||t instanceof Error)}function A(t){return\"function\"==typeof t}function S(t){return Object.prototype.toString.call(t)}function x(t){return t\u003C10?\"0\"+t.toString(10):t.toString(10)}a=a.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\$&\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),s=new RegExp(\"^\"+a+\"$\",\"i\"),e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=process.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error(\"%s %d: %s\",t,r,n)}}else o[t]=function(){};return o[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},e.types=r(54895),e.isArray=p,e.isBoolean=m,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=b,e.isSymbol=function(t){return\"symbol\"==typeof t},e.isUndefined=v,e.isRegExp=w,e.types.isRegExp=w,e.isObject=M,e.isDate=_,e.types.isDate=_,e.isError=E,e.types.isNativeError=E,e.isFunction=A,e.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},e.isBuffer=r(10082);var B=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log(\"%s - %s\",(t=new Date,r=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(\":\"),[t.getDate(),B[t.getMonth()],r].join(\" \")),e.format.apply(e,arguments))},e.inherits=r(91285),e._extend=function(t,e){if(!e||!M(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var I=\"undefined\"!=typeof Symbol?Symbol(\"util.promisify.custom\"):void 0;function k(t,e){if(!t){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=t,t=r}return e(t)}e.promisify=function(t){if(\"function\"!=typeof t)throw new TypeError('The \"original\" argument must be of type Function');if(I&&t[I]){var e;if(\"function\"!=typeof(e=t[I]))throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o\u003Carguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),I&&Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=I,e.callbackify=function(t){if(\"function\"!=typeof t)throw new TypeError('The \"original\" argument must be of type Function');function e(){for(var e=[],r=0;r\u003Carguments.length;r++)e.push(arguments[r]);var n=e.pop();if(\"function\"!=typeof n)throw new TypeError(\"The last argument must be of type Function\");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(k.bind(null,t,o))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,n(t)),e}},32094:(t,e,r)=>{\"use strict\";var n=r(83243),i=r(62191),o=r(89429),s=r(62680),a=r(50326),u=s(\"Object.prototype.toString\"),h=r(67226)(),c=\"undefined\"==typeof globalThis?r.g:globalThis,f=i(),l=s(\"String.prototype.slice\"),d=Object.getPrototypeOf,p=s(\"Array.prototype.indexOf\",!0)||function(t,e){for(var r=0;r\u003Ct.length;r+=1)if(t[r]===e)return r;return-1},m={__proto__:null};n(f,h&&a&&d?function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=d(e),n=a(r,Symbol.toStringTag);if(!n){var i=d(r);n=a(i,Symbol.toStringTag)}m[\"$\"+t]=o(n.get)}}:function(t){var e=new c[t],r=e.slice||e.set;r&&(m[\"$\"+t]=o(r))});t.exports=function(t){if(!t||\"object\"!=typeof t)return!1;if(!h){var e=l(u(t),8,-1);return p(f,e)>-1?e:\"Object\"===e&&function(t){var e=!1;return n(m,(function(r,n){if(!e)try{r(t),e=l(n,1)}catch(t){}})),e}(t)}return a?function(t){var e=!1;return n(m,(function(r,n){if(!e)try{\"$\"+r(t)===n&&(e=l(n,1))}catch(t){}})),e}(t):null}},65652:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BaseTransaction=void 0;const n=r(31664),i=r(77913),o=r(2074),s=r(9939);e.BaseTransaction=class{constructor(t,e){this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=n.Chain.Mainnet,this.DEFAULT_HARDFORK=n.Hardfork.Merge;const{nonce:r,gasLimit:o,to:a,value:u,data:h,v:c,r:f,s:l,type:d}=t;this._type=Number((0,i.bufferToBigInt)((0,i.toBuffer)(d))),this.txOptions=e;const p=(0,i.toBuffer)(\"\"===a?\"0x\":a),m=(0,i.toBuffer)(\"\"===c?\"0x\":c),g=(0,i.toBuffer)(\"\"===f?\"0x\":f),y=(0,i.toBuffer)(\"\"===l?\"0x\":l);this.nonce=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===r?\"0x\":r)),this.gasLimit=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===o?\"0x\":o)),this.to=p.length>0?new i.Address(p):void 0,this.value=(0,i.bufferToBigInt)((0,i.toBuffer)(\"\"===u?\"0x\":u)),this.data=(0,i.toBuffer)(\"\"===h?\"0x\":h),this.v=m.length>0?(0,i.bufferToBigInt)(m):void 0,this.r=g.length>0?(0,i.bufferToBigInt)(g):void 0,this.s=y.length>0?(0,i.bufferToBigInt)(y):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const b=void 0===this.to||null===this.to,v=e.allowUnlimitedInitCodeSize??!1,w=e.common??this._getCommon();b&&w.isActivatedEIP(3860)&&!1===v&&(0,s.checkMaxInitCodeSize)(w,this.data.length)}get type(){return this._type}supports(t){return this.activeCapabilities.includes(t)}validate(t=!1){const e=[];return this.getBaseFee()>this.gasLimit&&e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&e.push(\"Invalid Signature\"),t?e:0===e.length}_validateYParity(){const{v:t}=this;if(void 0!==t&&t!==BigInt(0)&&t!==BigInt(1)){const t=this._errorMsg(\"The y-parity of the transaction should either be 0 or 1\");throw new Error(t)}}_validateHighS(){const{s:t}=this;if(this.common.gteHardfork(\"homestead\")&&void 0!==t&&t>i.SECP256K1_ORDER_DIV_2){const t=this._errorMsg(\"Invalid Signature: s-values greater than secp256k1n/2 are considered invalid\");throw new Error(t)}}getBaseFee(){const t=this.common.param(\"gasPrices\",\"tx\");let e=this.getDataFee();if(t&&(e+=t),this.common.gteHardfork(\"homestead\")&&this.toCreationAddress()){const t=this.common.param(\"gasPrices\",\"txCreation\");t&&(e+=t)}return e}getDataFee(){const t=this.common.param(\"gasPrices\",\"txDataZero\"),e=this.common.param(\"gasPrices\",\"txDataNonZero\");let r=BigInt(0);for(let n=0;n\u003Cthis.data.length;n++)0===this.data[n]?r+=t:r+=e;if((void 0===this.to||null===this.to)&&this.common.isActivatedEIP(3860)){const t=BigInt(Math.ceil(this.data.length/32));r+=this.common.param(\"gasPrices\",\"initCodeWordCost\")*t}return r}toCreationAddress(){return void 0===this.to||0===this.to.buf.length}isSigned(){const{v:t,r:e,s:r}=this;return void 0!==t&&void 0!==e&&void 0!==r}verifySignature(){try{const t=this.getSenderPublicKey();return 0!==(0,i.unpadBuffer)(t).length}catch(t){return!1}}getSenderAddress(){return new i.Address((0,i.publicToAddress)(this.getSenderPublicKey()))}sign(t){if(32!==t.length){const t=this._errorMsg(\"Private key must be 32 bytes in length.\");throw new Error(t)}let e=!1;0===this.type&&this.common.gteHardfork(\"spuriousDragon\")&&!this.supports(o.Capability.EIP155ReplayProtection)&&(this.activeCapabilities.push(o.Capability.EIP155ReplayProtection),e=!0);const r=this.getMessageToSign(!0),{v:n,r:s,s:a}=(0,i.ecsign)(r,t),u=this._processSignature(n,s,a);if(e){const t=this.activeCapabilities.indexOf(o.Capability.EIP155ReplayProtection);t>-1&&this.activeCapabilities.splice(t,1)}return u}_getCommon(t,e){if(void 0!==e){const r=(0,i.bufferToBigInt)((0,i.toBuffer)(e));if(t){if(t.chainId()!==r){const t=this._errorMsg(\"The chain ID does not match the chain ID of Common\");throw new Error(t)}return t.copy()}return n.Common.isSupportedChainId(r)?new n.Common({chain:r,hardfork:this.DEFAULT_HARDFORK}):n.Common.custom({name:\"custom-chain\",networkId:r,chainId:r},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}return t?.copy()??new n.Common({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(t,e=256,r=!1){for(const[n,o]of Object.entries(t))switch(e){case 64:if(r){if(void 0!==o&&o>=i.MAX_UINT64){const t=this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(t)}}else if(void 0!==o&&o>i.MAX_UINT64){const t=this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${o}`);throw new Error(t)}break;case 256:if(r){if(void 0!==o&&o>=i.MAX_INTEGER){const t=this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(t)}}else if(void 0!==o&&o>i.MAX_INTEGER){const t=this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${o}`);throw new Error(t)}break;default:{const t=this._errorMsg(\"unimplemented bits value\");throw new Error(t)}}}static _validateNotArray(t){const e=[\"nonce\",\"gasPrice\",\"gasLimit\",\"to\",\"value\",\"data\",\"v\",\"r\",\"s\",\"type\",\"baseFee\",\"maxFeePerGas\",\"chainId\"];for(const[r,n]of Object.entries(t))if(e.includes(r)&&Array.isArray(n))throw new Error(`${r} cannot be an array`)}_getSharedErrorPostfix(){let t=\"\";try{t=this.isSigned()?(0,i.bufferToHex)(this.hash()):\"not available (unsigned)\"}catch(e){t=\"error\"}let e=\"\";try{e=this.isSigned().toString()}catch(e){t=\"error\"}let r=\"\";try{r=this.common.hardfork()}catch(t){r=\"error\"}let n=`tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} `;return n+=`signed=${e} hf=${r}`,n}}},75902:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BYTES_PER_FIELD_ELEMENT=e.FIELD_ELEMENTS_PER_BLOB=e.MAX_TX_WRAP_KZG_COMMITMENTS=e.LIMIT_BLOBS_PER_TX=e.MAX_VERSIONED_HASHES_LIST_SIZE=e.MAX_ACCESS_LIST_SIZE=e.MAX_CALLDATA_SIZE=void 0,e.MAX_CALLDATA_SIZE=16777216,e.MAX_ACCESS_LIST_SIZE=16777216,e.MAX_VERSIONED_HASHES_LIST_SIZE=16777216,e.LIMIT_BLOBS_PER_TX=16777216,e.MAX_TX_WRAP_KZG_COMMITMENTS=16777216,e.FIELD_ELEMENTS_PER_BLOB=4096,e.BYTES_PER_FIELD_ELEMENT=32},37365:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.FeeMarketEIP1559Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(9939),h=n.from(2..toString(16).padStart(2,\"0\"),\"hex\");class c extends a.BaseTransaction{constructor(t,e={}){super({...t,type:2},e),this.DEFAULT_HARDFORK=\"london\";const{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:s}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw new Error(\"EIP-1559 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const h=u.AccessLists.getAccessListData(n??[]);if(this.accessList=h.accessList,this.AccessListJSON=h.AccessListJSON,u.AccessLists.verifyAccessList(this.accessList),this.maxFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this.maxPriorityFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===s?\"0x\":s)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),a.BaseTransaction._validateNotArray(t),this.gasLimit*this.maxFeePerGas>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}if(this.maxFeePerGas\u003Cthis.maxPriorityFeePerGas){const t=this._errorMsg(\"maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)\");throw new Error(t)}this._validateYParity(),this._validateHighS();(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){if(!t.slice(0,1).equals(h))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: ${t.slice(0,1).toString(\"hex\")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(t.slice(1)));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input: must be array\");return c.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(9!==t.length&&12!==t.length)throw new Error(\"Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l,d,p,m]=t;return this._validateNotArray({chainId:r,v:d}),(0,o.validateNoLeadingZeroes)({nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:a,value:h,v:d,r:p,s:m}),new c({chainId:(0,o.bufferToBigInt)(r),nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:s,gasLimit:a,to:u,value:h,data:f,accessList:l??[],v:void 0!==d?(0,o.bufferToBigInt)(d):void 0,r:p,s:m},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(u.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(t=BigInt(0)){const e=this.maxPriorityFeePerGas,r=this.maxFeePerGas-t,n=(e\u003Cr?e:r)+t;return this.gasLimit*n+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.maxFeePerGas),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const t=this.raw();return n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))])}getMessageToSign(t=!0){const e=this.raw().slice(0,9),r=n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))]);return t?n.from((0,s.keccak256)(r)):r}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(this.serialize()))),this.cache.hash):n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return c.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const t=u.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bigIntToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bigIntToHex)(this.maxFeePerGas),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.FeeMarketEIP1559Transaction=c},56769:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.AccessListEIP2930Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(9939),h=n.from(1..toString(16).padStart(2,\"0\"),\"hex\");class c extends a.BaseTransaction{constructor(t,e={}){super({...t,type:1},e),this.DEFAULT_HARDFORK=\"berlin\";const{chainId:r,accessList:n,gasPrice:i}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error(\"EIP-2930 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const s=u.AccessLists.getAccessListData(n??[]);if(this.accessList=s.accessList,this.AccessListJSON=s.AccessListJSON,u.AccessLists.verifyAccessList(this.accessList),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),a.BaseTransaction._validateNotArray(t),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * gasPrice cannot exceed MAX_INTEGER\");throw new Error(t)}this._validateYParity(),this._validateHighS();(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){if(!t.slice(0,1).equals(h))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: ${t.slice(0,1).toString(\"hex\")}`);const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(t.slice(1))));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input: must be array\");return c.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(8!==t.length&&11!==t.length)throw new Error(\"Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l,d,p]=t;this._validateNotArray({chainId:r,v:l}),(0,o.validateNoLeadingZeroes)({nonce:n,gasPrice:i,gasLimit:s,value:u,v:l,r:d,s:p});return new c({chainId:(0,o.bufferToBigInt)(r),nonce:n,gasPrice:i,gasLimit:s,to:a,value:u,data:h,accessList:f??[],v:void 0!==l?(0,o.bufferToBigInt)(l):void 0,r:d,s:p},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(u.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.chainId),(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){const t=this.raw();return n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(t)))])}getMessageToSign(t=!0){const e=this.raw().slice(0,8),r=n.concat([h,n.from(i.RLP.encode((0,o.bufArrToArr)(e)))]);return t?n.from((0,s.keccak256)(r)):r}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(this.serialize()))),this.cache.hash):n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return c.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.a�N��ccessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){const t=u.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}errorStr(){let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice} accessListCount=${this.accessList?.length??0}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.AccessListEIP2930Transaction=c},88516:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.BlobEIP4844Transaction=void 0;const i=r(60557),o=r(77913),s=r(1115),a=r(65652),u=r(75902),h=r(48274),c=r(2074),f=r(9939),l=r(23411),d=n.from(5..toString(16).padStart(2,\"0\"),\"hex\");class p extends a.BaseTransaction{constructor(t,e={}){super({...t,type:5},e);const{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:s,maxFeePerDataGas:h}=t;if(this.common=this._getCommon(e.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw new Error(\"EIP-1559 not enabled on Common\");if(!1===this.common.isActivatedEIP(4844))throw new Error(\"EIP-4844 not enabled on Common\");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const c=f.AccessLists.getAccessListData(n??[]);if(this.accessList=c.accessList,this.AccessListJSON=c.AccessListJSON,f.AccessLists.verifyAccessList(this.accessList),this.maxFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===i?\"0x\":i)),this.maxPriorityFeePerGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===s?\"0x\":s)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),a.BaseTransaction._validateNotArray(t),this.gasLimit*this.maxFeePerGas>o.MAX_INTEGER){const t=this._errorMsg(\"gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}if(this.maxFeePerGas\u003Cthis.maxPriorityFeePerGas){const t=this._errorMsg(\"maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)\");throw new Error(t)}this.maxFeePerDataGas=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===(h??\"\")?\"0x\":h)),this.versionedHashes=(t.versionedHashes??[]).map((t=>(0,o.toBuffer)(t))),this._validateYParity(),this._validateHighS();for(const t of this.versionedHashes){if(32!==t.length){const t=this._errorMsg(\"versioned hash is invalid length\");throw new Error(t)}if(BigInt(t[0])!==this.common.paramByEIP(\"sharding\",\"blobCommitmentVersionKzg\",4844)){const t=this._errorMsg(\"versioned hash does not start with KZG commitment version\");throw new Error(t)}}if(this.versionedHashes.length>u.LIMIT_BLOBS_PER_TX){const t=this._errorMsg(`tx can contain at most ${u.LIMIT_BLOBS_PER_TX} blobs`);throw new Error(t)}this.blobs=t.blobs?.map((t=>(0,o.toBuffer)(t))),this.kzgCommitments=t.kzgCommitments?.map((t=>(0,o.toBuffer)(t))),this.aggregateKzgProof=(0,o.toBuffer)(t.kzgProof);(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e){return new p(t,e)}static minimalFromNetworkWrapper(t,e){return p.fromTxData({...t,blobs:void 0,kzgCommitments:void 0,kzgProof:void 0},e)}static fromSerializedBlobTxNetworkWrapper(t,e){if(!e||!e.common)throw new Error(\"common instance required to validate versioned hashes\");const r=c.BlobNetworkTransactionWrapper.deserialize(t.slice(1)),s=r.tx.message,a=Number(e.common.paramByEIP(\"sharding\",\"blobCommitmentVersionKzg\",4844));((t,e,r,n,o)=>{if(t.length!==e.length||e.length!==r.length)throw new Error(\"Number of versionedHashes, blobs, and commitments not all equal\");try{h.kzg.verifyAggregateKzgProof(e,r,n)}catch(t){throw new Error(\"KZG proof cannot be verified from blobs/commitments\")}for(let e=0;e\u003Ct.length;e++){const n=(0,l.computeVersionedHash)(r[e],o);if(!(0,i.byteArrayEquals)(n,t[e]))throw new Error(`commitment for blob at index ${e} does not match versionedHash`)}})(s.blobVersionedHashes,r.blobs,r.blobKzgs,r.kzgAggregatedProof,a);const u=[];for(const t of s.accessList){const e=[n.from(t.address),t.storageKeys.map((t=>n.from(t)))];u.push(e)}const f=null===s.to.value?void 0:o.Address.fromString((0,o.bufferToHex)(n.from(s.to.value))),d=s.blobVersionedHashes.map((t=>n.from(t))),m=r.blobKzgs.map((t=>n.from(t))),g=r.blobs.map((t=>n.from(t))),y={...s,versionedHashes:d,accessList:u,to:f,blobs:g,kzgCommitments:m,kzgProof:n.from(r.kzgAggregatedProof),r:r.tx.signature.r,s:r.tx.signature.s,v:BigInt(r.tx.signature.yParity),gasLimit:s.gas,maxFeePerGas:s.maxFeePerGas,maxPriorityFeePerGas:s.maxPriorityFeePerGas};return new p(y,e)}static fromSerializedTx(t,e){const r=c.SignedBlobTransactionType.deserialize(t.slice(1)),i=r.message,s=[];for(const t of i.accessList){const e=[n.from(t.address),t.storageKeys.map((t=>n.from(t)))];s.push(e)}const a=null===i.to.value?void 0:o.Address.fromString((0,o.bufferToHex)(n.from(i.to.value))),u=i.blobVersionedHashes.map((t=>n.from(t))),h={...i,versionedHashes:u,to:a,accessList:s,r:r.signature.r,s:r.signature.s,v:BigInt(r.signature.yParity),gasLimit:r.message.gas};return new p(h,e)}getUpfrontCost(t=BigInt(0)){const e=this.maxPriorityFeePerGas,r=this.maxFeePerGas-t,n=(e\u003Cr?e:r)+t;return this.gasLimit*n+this.value}raw(){throw new Error(\"Method not implemented.\")}toValue(){const t={selector:void 0!==this.to?1:0,value:this.to?.toBuffer()??null};return{message:{chainId:this.common.chainId(),nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gas:this.gasLimit,to:t,value:this.value,data:this.data,accessList:this.accessList.map((t=>({address:t[0],storageKeys:t[1]}))),blobVersionedHashes:this.versionedHashes,maxFeePerDataGas:this.maxFeePerDataGas},signature:{r:this.r??BigInt(0),s:this.s??BigInt(0),yParity:this.v===BigInt(1)}}}serialize(){const t=c.SignedBlobTransactionType.serialize(this.toValue());return n.concat([d,t])}serializeNetworkWrapper(){if(void 0===this.blobs||void 0===this.kzgCommitments||void 0===this.aggregateKzgProof)throw new Error(\"cannot serialize network wrapper without blobs, KZG commitments and aggregate KZG proof provided\");const t={selector:void 0!==this.to?1:0,value:this.to?.toBuffer()??null},e=this.blobs?.map((t=>Uint8Array.from(t)))??[],r=c.BlobNetworkTransactionWrapper.serialize({blobs:e,blobKzgs:this.kzgCommitments?.map((t=>Uint8Array.from(t)))??[],tx:{...(0,f.blobTxToNetworkWrapperDataFormat)(this),...t},kzgAggregatedProof:Uint8Array.from(this.aggregateKzgProof??[])});return n.concat([n.from([5]),r])}getMessageToSign(t){return this.unsignedHash()}unsignedHash(){const t=c.BlobTransactionType.serialize(this.toValue().message);return n.from((0,s.keccak256)(n.concat([d,t])))}hash(){return n.from((0,s.keccak256)(this.serialize()))}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call this method if transaction is not signed\");throw new Error(t)}const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e+BigInt(27),(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n))}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}toJSON(){const t=f.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,o.bigIntToHex)(this.chainId),nonce:(0,o.bigIntToHex)(this.nonce),maxPriorityFeePerGas:(0,o.bigIntToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,o.bigIntToHex)(this.maxFeePerGas),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),accessList:t,v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0,maxFeePerDataGas:(0,o.bigIntToHex)(this.maxFeePerDataGas),versionedHashes:this.versionedHashes.map((t=>(0,o.bufferToHex)(t)))}}_processSignature(t,e,r){const n={...this.txOptions,common:this.common};return p.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r),maxFeePerDataGas:this.maxFeePerDataGas,versionedHashes:this.versionedHashes,blobs:this.blobs,kzgCommitments:this.kzgCommitments,kzgProof:this.aggregateKzgProof},n)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}numBlobs(){return this.versionedHashes.length}}e.BlobEIP4844Transaction=p},72346:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.normalizeTxParams=void 0;const n=r(77913);e.normalizeTxParams=t=>{const e=Object.assign({},t);return e.gasLimit=(0,n.toType)(e.gasLimit??e.gas,n.TypeOutput.BigInt),e.data=void 0===e.data?e.input:e.data,e.gasPrice=void 0!==e.gasPrice?BigInt(e.gasPrice):void 0,e.value=void 0!==e.value?BigInt(e.value):void 0,e.to=null!==e.to&&void 0!==e.to?(0,n.setLengthLeft)((0,n.toBuffer)(e.to),20):null,e.v=\"0x0\"===e.v?\"0x\":e.v,e.r=\"0x0\"===e.r?\"0x\":e.r,e.s=\"0x0\"===e.s?\"0x\":e.s,\"0x\"!==e.v&&(e.v=(0,n.toType)(e.v,n.TypeOutput.BigInt)),e}},59353:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.computeVersionedHash=e.TransactionFactory=e.Transaction=e.kzg=e.initKZG=e.BlobEIP4844Transaction=e.AccessListEIP2930Transaction=e.FeeMarketEIP1559Transaction=void 0;var o=r(37365);Object.defineProperty(e,\"FeeMarketEIP1559Transaction\",{enumerable:!0,get:function(){return o.FeeMarketEIP1559Transaction}});var s=r(56769);Object.defineProperty(e,\"AccessListEIP2930Transaction\",{enumerable:!0,get:function(){return s.AccessListEIP2930Transaction}});var a=r(88516);Object.defineProperty(e,\"BlobEIP4844Transaction\",{enumerable:!0,get:function(){return a.BlobEIP4844Transaction}});var u=r(48274);Object.defineProperty(e,\"initKZG\",{enumerable:!0,get:function(){return u.initKZG}}),Object.defineProperty(e,\"kzg\",{enumerable:!0,get:function(){return u.kzg}});var h=r(91453);Object.defineProperty(e,\"Transaction\",{enumerable:!0,get:function(){return h.Transaction}});var c=r(75481);Object.defineProperty(e,\"TransactionFactory\",{enumerable:!0,get:function(){return c.TransactionFactory}}),i(r(2074),e);var f=r(23411);Object.defineProperty(e,\"computeVersionedHash\",{enumerable:!0,get:function(){return f.computeVersionedHash}})},48274:(t,e)=>{\"use strict\";function r(){throw Error(\"kzg library not loaded\")}Object.defineProperty(e,\"__esModule\",{value:!0}),e.initKZG=e.kzg=void 0,e.kzg={freeTrustedSetup:r,loadTrustedSetup:r,blobToKzgCommitment:r,computeAggregateKzgProof:r,verifyKzgProof:r,verifyAggregateKzgProof:r},e.initKZG=function(t,r){e.kzg=t,e.kzg.loadTrustedSetup(r)}},91453:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Transaction=void 0;const i=r(57256),o=r(77913),s=r(1115),a=r(65652),u=r(2074);function h(t,e){const r=Number(t),n=2*Number(e);return r===n+35||r===n+36}class c extends a.BaseTransaction{constructor(t,e={}){if(super({...t,type:0},e),this.common=this._validateTxV(this.v,e.common),this.gasPrice=(0,o.bufferToBigInt)((0,o.toBuffer)(\"\"===t.gasPrice?\"0x\":t.gasPrice)),this.gasPrice*this.gasLimit>o.MAX_INTEGER){const t=this._errorMsg(\"gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)\");throw new Error(t)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),a.BaseTransaction._validateNotArray(t),this.common.gteHardfork(\"spuriousDragon\")&&(this.isSigned()?h(this.v,this.common.chainId())&&this.activeCapabilities.push(u.Capability.EIP155ReplayProtection):this.activeCapabilities.push(u.Capability.EIP155ReplayProtection));(e?.freeze??!0)&&Object.freeze(this)}static fromTxData(t,e={}){return new c(t,e)}static fromSerializedTx(t,e={}){const r=(0,o.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(r))throw new Error(\"Invalid serialized tx input. Must be array\");return this.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(6!==t.length&&9!==t.length)throw new Error(\"Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).\");const[r,n,i,s,a,u,h,f,l]=t;return(0,o.validateNoLeadingZeroes)({nonce:r,gasPrice:n,gasLimit:i,value:a,v:h,r:f,s:l}),new c({nonce:r,gasPrice:n,gasLimit:i,to:s,value:a,data:u,v:h,r:f,s:l},e)}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,o.bigIntToUnpaddedBuffer)(this.v):n.from([]),void 0!==this.r?(0,o.bigIntToUnpaddedBuffer)(this.r):n.from([]),void 0!==this.s?(0,o.bigIntToUnpaddedBuffer)(this.s):n.from([])]}serialize(){return n.from(i.RLP.encode((0,o.bufArrToArr)(this.raw())))}_getMessageToSign(){const t=[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.gasPrice),(0,o.bigIntToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:n.from([]),(0,o.bigIntToUnpaddedBuffer)(this.value),this.data];return this.supports(u.Capability.EIP155ReplayProtection)&&(t.push((0,o.toBuffer)(this.common.chainId())),t.push((0,o.unpadBuffer)((0,o.toBuffer)(0))),t.push((0,o.unpadBuffer)((0,o.toBuffer)(0)))),t}getMessageToSign(t=!0){const e=this._getMessageToSign();return t?n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(e)))):e}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const t=this._errorMsg(\"Cannot call hash method if transaction is not signed\");throw new Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))),this.cache.hash):n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(this.raw()))))}getMessageToVerifySignature(){if(!this.isSigned()){const t=this._errorMsg(\"This transaction is not signed\");throw new Error(t)}const t=this._getMessageToSign();return n.from((0,s.keccak256)(i.RLP.encode((0,o.bufArrToArr)(t))))}getSenderPublicKey(){const t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return(0,o.ecrecover)(t,e,(0,o.bigIntToUnpaddedBuffer)(r),(0,o.bigIntToUnpaddedBuffer)(n),this.supports(u.Capability.EIP155ReplayProtection)?this.common.chainId():void 0)}catch(t){const e=this._errorMsg(\"Invalid Signature\");throw new Error(e)}}_processSignature(t,e,r){this.supports(u.Capability.EIP155ReplayProtection)&&(t+=this.common.chainId()*BigInt(2)+BigInt(8));const n={...this.txOptions,common:this.common};return c.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:t,r:(0,o.bufferToBigInt)(e),s:(0,o.bufferToBigInt)(r)},n)}toJSON(){return{nonce:(0,o.bigIntToHex)(this.nonce),gasPrice:(0,o.bigIntToHex)(this.gasPrice),gasLimit:(0,o.bigIntToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,o.bigIntToHex)(this.value),data:\"0x\"+this.data.toString(\"hex\"),v:void 0!==this.v?(0,o.bigIntToHex)(this.v):void 0,r:void 0!==this.r?(0,o.bigIntToHex)(this.r):void 0,s:void 0!==this.s?(0,o.bigIntToHex)(this.s):void 0}}_validateTxV(t,e){let r;const n=void 0!==t?Number(t):void 0;if(void 0!==n&&n\u003C37&&27!==n&&28!==n)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${n}`);if(void 0!==n&&0!==n&&(!e||e.gteHardfork(\"spuriousDragon\"))&&27!==n&&28!==n)if(e){if(!h(BigInt(n),e.chainId()))throw new Error(`Incompatible EIP155-based V ${n} and chain id ${e.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let t;t=(n-35)%2==0?35:36,r=BigInt(n-t)/BigInt(2)}return this._getCommon(e,r)}errorStr(){let t=this._getSharedErrorPostfix();return t+=` gasPrice=${this.gasPrice}`,t}_errorMsg(t){return`${t} (${this.errorStr()})`}}e.Transaction=c},75481:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.TransactionFactory=void 0;const i=r(77913),o=r(37365),s=r(56769),a=r(88516),u=r(72346),h=r(91453);class c{constructor(){}static fromTxData(t,e={}){if(\"type\"in t&&void 0!==t.type){const r=Number((0,i.bufferToBigInt)((0,i.toBuffer)(t.type)));if(0===r)return h.Transaction.fromTxData(t,e);if(1===r)return s.AccessListEIP2930Transaction.fromTxData(t,e);if(2===r)return o.FeeMarketEIP1559Transaction.fromTxData(t,e);if(5===r)return a.BlobEIP4844Transaction.fromTxData(t,e);throw new Error(`Tx instantiation with type ${r} not supported`)}return h.Transaction.fromTxData(t,e)}static fromSerializedData(t,e={}){if(!(t[0]\u003C=127))return h.Transaction.fromSerializedTx(t,e);switch(t[0]){case 1:return s.AccessListEIP2930Transaction.fromSerializedTx(t,e);case 2:return o.FeeMarketEIP1559Transaction.fromSerializedTx(t,e);case 5:return a.BlobEIP4844Transaction.fromSerializedTx(t,e);default:throw new Error(`TypedTransaction with ID ${t[0]} unknown`)}}static fromBlockBodyData(t,e={}){if(n.isBuffer(t))return this.fromSerializedData(t,e);if(Array.isArray(t))return h.Transaction.fromValuesArray(t,e);throw new Error(\"Cannot decode transaction: unknown type input\")}static async fromEthersProvider(t,e,r){const n=(0,i.getProvider)(t),o=await(0,i.fetchFromProvider)(n,{method:\"eth_getTransactionByHash\",params:[e]});if(null===o)throw new Error(\"No data returned from provider\");return c.fromRPCTx(o,r)}static async fromRPCTx(t,e={}){return c.fromTxData((0,u.normalizeTxParams)(t),e)}}e.TransactionFactory=c},2074:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.BlobNetworkTransactionWrapper=e.KZGProofType=e.KZGCommitmentType=e.SignedBlobTransactionType=e.ECDSASignatureType=e.BlobTransactionType=e.AccessTupleType=e.AddressType=e.isAccessList=e.isAccessListBuffer=e.Capability=void 0;const n=r(60557),i=r(75902),o=new n.ByteVectorType(20),s=new n.ByteVectorType(32),a=new n.ByteVectorType(48),u=new n.UintBigintType(8),h=new n.UintBigintType(32);function c(t){if(0===t.length)return!0;const e=t[0];return!!Array.isArray(e)}!function(t){t[t.EIP155ReplayProtection=155]=\"EIP155ReplayProtection\",t[t.EIP1559FeeMarket=1559]=\"EIP1559FeeMarket\",t[t.EIP2718TypedTransaction=2718]=\"EIP2718TypedTransaction\",t[t.EIP2930AccessLists=2930]=\"EIP2930AccessLists\"}(e.Capability||(e.Capability={})),e.isAccessListBuffer=c,e.isAccessList=function(t){return!c(t)},e.AddressType=o,e.AccessTupleType=new n.ContainerType({address:e.AddressType,storageKeys:new n.ListCompositeType(s,i.MAX_VERSIONED_HASHES_LIST_SIZE)}),e.BlobTransactionType=new n.ContainerType({chainId:h,nonce:u,maxPriorityFeePerGas:h,maxFeePerGas:h,gas:u,to:new n.UnionType([new n.NoneType,e.AddressType]),value:h,data:new n.ByteListType(i.MAX_CALLDATA_SIZE),accessList:new n.ListCompositeType(e.AccessTupleType,i.MAX_ACCESS_LIST_SIZE),maxFeePerDataGas:h,blobVersionedHashes:new n.ListCompositeType(s,i.MAX_VERSIONED_HASHES_LIST_SIZE)}),e.ECDSASignatureType=new n.ContainerType({yParity:new n.BooleanType,r:h,s:h}),e.SignedBlobTransactionType=new n.ContainerType({message:e.BlobTransactionType,signature:e.ECDSASignatureType}),e.KZGCommitmentType=a,e.KZGProofType=e.KZGCommitmentType,e.BlobNetworkTransactionWrapper=new n.ContainerType({tx:e.SignedBlobTransactionType,blobKzgs:new n.ListCompositeType(e.KZGCommitmentType,i.MAX_TX_WRAP_KZG_COMMITMENTS),blobs:new n.ListCompositeType(new n.ByteVectorType(i.FIELD_ELEMENTS_PER_BLOB*i.BYTES_PER_FIELD_ELEMENT),i.LIMIT_BLOBS_PER_TX),kzgAggregatedProof:e.KZGProofType})},9939:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.blobTxToNetworkWrapperDataFormat=e.AccessLists=e.checkMaxInitCodeSize=void 0;const n=r(77913),i=r(2074);e.checkMaxInitCodeSize=function(t,e){const r=t.param(\"vm\",\"maxInitCodeSize\");if(r&&BigInt(e)>r)throw new Error(`the initcode size of this transaction is too large: it is ${e} while the max is ${t.param(\"vm\",\"maxInitCodeSize\")}`)};e.AccessLists=class{static getAccessListData(t){let e,r;if((0,i.isAccessList)(t)){e=t;const i=[];for(let e=0;e\u003Ct.length;e++){const r=t[e],o=(0,n.toBuffer)(r.address),s=[];for(let t=0;t\u003Cr.storageKeys.length;t++)s.push((0,n.toBuffer)(r.storageKeys[t]));i.push([o,s])}r=i}else{r=t??[];const i=[];for(let t=0;t\u003Cr.length;t++){const e=r[t],o=(0,n.bufferToHex)(e[0]),s=[];for(let t=0;t\u003Ce[1].length;t++)s.push((0,n.bufferToHex)(e[1][t]));const a={address:o,storageKeys:s};i.push(a)}e=i}return{AccessListJSON:e,accessList:r}}static verifyAccessList(t){for(let e=0;e\u003Ct.length;e++){const r=t[e],n=r[0],i=r[1];if(void 0!==r[2])throw new Error(\"Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.\");if(20!==n.length)throw new Error(\"Invalid EIP-2930 transaction: address length should be 20 bytes\");for(let t=0;t\u003Ci.length;t++)if(32!==i[t].length)throw new Error(\"Invalid EIP-2930 transaction: storage slot length should be 32 bytes\")}}static getAccessListJSON(t){const e=[];for(let r=0;r\u003Ct.length;r++){const i=t[r],o={address:\"0x\"+(0,n.setLengthLeft)(i[0],20).toString(\"hex\"),storageKeys:[]},s=i[1];for(let t=0;t\u003Cs.length;t++){const e=s[t];o.storageKeys.push(\"0x\"+(0,n.setLengthLeft)(e,32).toString(\"hex\"))}e.push(o)}return e}static getDataFeeEIP2930(t,e){const r=e.param(\"gasPrices\",\"accessListStorageKeyCost\"),n=e.param(\"gasPrices\",\"accessListAddressCost\");let i=0;for(let e=0;e\u003Ct.length;e++){i+=t[e][1].length}return t.length*Number(n)+i*Number(r)}};e.blobTxToNetworkWrapperDataFormat=t=>{const e={selector:void 0!==t.to?1:0,value:t.to?.toBuffer()??null};return{message:{chainId:t.common.chainId(),nonce:t.nonce,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas,gas:t.gasLimit,to:e,value:t.value,data:t.data,accessList:t.accessList.map((t=>({address:t[0],storageKeys:t[1]}))),blobVersionedHashes:t.versionedHashes,maxFeePerDataGas:t.maxFeePerDataGas},signature:{r:t.r??BigInt(0),s:t.s??BigInt(0),yParity:t.v===BigInt(1)}}}},23411:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.commitmentsToVersionedHashes=e.computeVersionedHash=e.blobsToCommitments=e.getBlobs=void 0;const i=r(55806),o=r(48274),s=4096,a=131072;function u(t){const e=n.alloc(131072,\"binary\");for(let r=0;r\u003Cs;r++){const i=n.alloc(32,\"binary\");i.fill(t.subarray(31*r,31*(r+1)),0,31),e.fill(i,32*r,32*(r+1))}return e}e.getBlobs=t=>{const e=n.from(t,\"binary\"),r=n.byteLength(e);if(0===r)throw Error(\"invalid blob data\");if(r>262143)throw Error(\"blob data is too large\");const i=Math.ceil(r/a),o=function(t,e){const r=n.alloc(e*a),i=n.byteLength(t);return r.fill(t,0,i),r[i]=128,r}(e,i),s=[];for(let t=0;t\u003Ci;t++){const e=u(o.subarray(t*a,(t+1)*a));s.push(e)}return s};e.blobsToCommitments=t=>{const e=[];for(const r of t)e.push(n.from(o.kzg.blobToKzgCommitment(r)));return e};e.computeVersionedHash=(t,e)=>{const r=new Uint8Array(32);return r.set([e],0),r.set((0,i.sha256)(t).slice(1),1),r};e.commitmentsToVersionedHashes=t=>{const r=[];for(const i of t)r.push(n.from((0,e.computeVersionedHash)(i,1)));return r}},52769:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const i=r(57256),o=r(1115),s=r(80101),a=r(10144),u=r(29267),h=r(25576),c=r(81958),f=r(11976),l=BigInt(0);class d{constructor(t=l,e=l,r=h.KECCAK256_RLP,n=h.KECCAK256_NULL){this.nonce=t,this.balance=e,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(t){const{nonce:e,balance:r,storageRoot:n,codeHash:i}=t;return new d(void 0!==e?(0,u.bufferToBigInt)((0,u.toBuffer)(e)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(t){const e=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(e))throw new Error(\"Invalid serialized account input. Must be array\");return this.fromValuesArray(e)}static fromValuesArray(t){const[e,r,n,i]=t;return new d((0,u.bufferToBigInt)(e),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce\u003Cl)throw new Error(\"nonce must be greater than zero\");if(this.balance\u003Cl)throw new Error(\"balance must be greater than zero\");if(32!==this.storageRoot.length)throw new Error(\"storageRoot must have a length of 32\");if(32!==this.codeHash.length)throw new Error(\"codeHash must have a length of 32\")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(h.KECCAK256_NULL)}isEmpty(){return this.balance===l&&this.nonce===l&&this.codeHash.equals(h.KECCAK256_NULL)}}e.Account=d;e.isValidAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)};e.toChecksumAddress=function(t,e){(0,c.assertIsHexString)(t);const r=(0,f.stripHexPrefix)(t).toLowerCase();let i=\"\";if(void 0!==e){i=(0,u.bufferToBigInt)((0,u.toBuffer)(e)).toString()+\"0x\"}const s=n.from(i+r,\"utf8\"),h=(0,a.bytesToHex)((0,o.keccak256)(s));let l=\"0x\";for(let t=0;t\u003Cr.length;t++)parseInt(h[t],16)>=8?l+=r[t].toUpperCase():l+=r[t];return l};e.isValidChecksumAddress=function(t,r){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,r)===t};e.generateAddress=function(t,e){return(0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,u.bufferToBigInt)(e)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([t,e])))).slice(-20)};e.generateAddress2=function(t,e,r){if((0,c.assertIsBuffer)(t),(0,c.assertIsBuffer)(e),(0,c.assertIsBuffer)(r),20!==t.length)throw new Error(\"Expected from to be of length 20\");if(32!==e.length)throw new Error(\"Expected salt to be of length 32\");const i=(0,o.keccak256)(n.concat([n.from(\"ff\",\"hex\"),t,e,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)};e.isValidPrivate=function(t){return s.secp256k1.utils.isValidPrivateKey(t)};e.isValidPublic=function(t,e=!1){if((0,c.assertIsBuffer)(t),64===t.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),t])),!0}catch(t){return!1}if(!e)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}};e.pubToAddress=function(t,e=!1){if((0,c.assertIsBuffer)(t),e&&64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw new Error(\"Expected pubKey to be of length 64\");return n.from((0,o.keccak256)(t)).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(t){return(0,c.assertIsBuffer)(t),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(t){return(0,c.assertIsBuffer)(t),64!==t.length&&(t=n.from(s.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t};e.zeroAddress=function(){const t=(0,u.zeros)(20);return(0,u.bufferToHex)(t)};function p(t){const[e,r,n,i]=t;return[e,r,0===(0,u.arrToBufArr)(n).length?h.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?h.KECCAK256_NULL:i]}e.isZeroAddress=function(t){try{(0,c.assertIsString)(t)}catch(t){return!1}return(0,e.zeroAddress)()===t},e.accountBodyFromSlim=p;const m=new Uint8Array(0);e.accountBodyToSlim=function(t){const[e,r,n,i]=t;return[e,r,(0,u.arrToBufArr)(n).equals(h.KECCAK256_RLP)?m:n,(0,u.arrToBufArr)(i).equals(h.KECCAK256_NULL)?m:i]},e.accountBodyToRLP=function(t,e=!0){const r=e?p(t):t;return(0,u.arrToBufArr)(i.RLP.encode(r))}},49409:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address=void 0;const i=r(52769),o=r(29267);class s{constructor(t){if(20!==t.length)throw new Error(\"Invalid address length\");this.buf=t}static zero(){return new s((0,o.zeros)(20))}static fromString(t){if(!(0,i.isValidAddress)(t))throw new Error(\"Invalid address\");return new s((0,o.toBuffer)(t))}static fromPublicKey(t){if(!n.isBuffer(t))throw new Error(\"Public key should be Buffer\");const e=(0,i.pubToAddress)(t);return new s(e)}static fromPrivateKey(t){if(!n.isBuffer(t))throw new Error(\"Private key should be Buffer\");const e=(0,i.privateToAddress)(t);return new s(e)}static generate(t,e){if(\"bigint\"!=typeof e)throw new Error(\"Expected nonce to be a bigint\");return new s((0,i.generateAddress)(t.buf,(0,o.bigIntToBuffer)(e)))}static generate2(t,e,r){if(!n.isBuffer(e))throw new Error(\"Expected salt to be a Buffer\");if(!n.isBuffer(r))throw new Error(\"Expected initCode to be a Buffer\");return new s((0,i.generateAddress2)(t.buf,e,r))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const t=(0,o.bufferToBigInt)(this.buf),e=BigInt(0),r=BigInt(\"0xffff\");return t>=e&&t\u003C=r}toString(){return\"0x\"+this.buf.toString(\"hex\")}toBuffer(){return n.from(this.buf)}}e.Address=s},45209:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.AsyncEventEmitter=void 0;const n=r(22699);class i extends n.EventEmitter{emit(t,...e){let[r,n]=e;const i=this;let o=i._events[t]??[];return void 0===n&&\"function\"==typeof r&&(n=r,r=void 0),\"newListener\"!==t&&\"removeListener\"!==t||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(t,e,r){let n;for await(const i of e)try{i.length\u003C2?i.call(t,r):await new Promise(((e,n)=>{i.call(t,r,(t=>{t?n(t):e()}))}))}catch(t){n=t}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(t)>0}once(t,e){const r=this;let n;if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return n=e.length>=2?function(i,o){r.removeListener(t,n),e(i,o)}:function(i){r.removeListener(t,n),e(i,n)},r.on(t,n),r}first(t,e){let r=this._events[t]??[];if(\"function\"!=typeof e)throw new TypeError(\"listener must be a function\");return Array.isArray(r)||(this._events[t]=r=[r]),r.unshift(e),this}before(t,e,r){return this.beforeOrAfter(t,e,r)}after(t,e,r){return this.beforeOrAfter(t,e,r,\"after\")}beforeOrAfter(t,e,r,n){let i,o,s=this._events[t]??[];const a=\"after\"===n?1:0;if(\"function\"!=typeof r)throw new TypeError(\"listener must be a function\");if(\"function\"!=typeof e)throw new TypeError(\"target must be a function\");for(Array.isArray(s)||(this._events[t]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===e){o=i+a;break}return s.splice(o,0,r),this}on(t,e){return super.on(t,e)}addListener(t,e){return super.addListener(t,e)}prependListener(t,e){return super.prependListener(t,e)}prependOnceListener(t,e){return super.prependOnceListener(t,e)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,e){return super.removeListener(t,e)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}e.AsyncEventEmitter=i},29267:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.ad@����dHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const i=r(81958),o=r(11976);e.intToHex=function(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return n.from((0,o.padToEven)(r.slice(2)),\"hex\")};e.zeros=function(t){return n.allocUnsafe(t).fill(0)};const s=function(t,r,n){const i=(0,e.zeros)(r);return n?t.length\u003Cr?(t.copy(i),i):t.slice(0,r):t.length\u003Cr?(t.copy(i,r-t.length),i):t.slice(-r)};e.setLengthLeft=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!1)};e.setLengthRight=function(t,e){return(0,i.assertIsBuffer)(t),s(t,e,!0)};const a=function(t){let e=t[0];for(;t.length>0&&\"0\"===e.toString();)e=(t=t.slice(1))[0];return t};e.unpadBuffer=function(t){return(0,i.assertIsBuffer)(t),a(t)};e.unpadArray=function(t){return(0,i.assertIsArray)(t),a(t)};e.unpadHexString=function(t){return(0,i.assertIsHexString)(t),t=(0,o.stripHexPrefix)(t),\"0x\"+a(t)};e.toBuffer=function(t){if(null==t)return n.allocUnsafe(0);if(n.isBuffer(t))return n.from(t);if(Array.isArray(t)||t instanceof Uint8Array)return n.from(t);if(\"string\"==typeof t){if(!(0,o.isHexString)(t))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(t)),\"hex\")}if(\"number\"==typeof t)return(0,e.intToBuffer)(t);if(\"bigint\"==typeof t){if(t\u003CBigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),n.from(e,\"hex\")}if(t.toArray)return n.from(t.toArray());if(t.toBuffer)return n.from(t.toBuffer());throw new Error(\"invalid type\")};function u(t){const r=(0,e.bufferToHex)(t);return\"0x\"===r?BigInt(0):BigInt(r)}function h(t){return(0,e.toBuffer)(\"0x\"+t.toString(16))}e.bufferToHex=function(t){return\"0x\"+(t=(0,e.toBuffer)(t)).toString(\"hex\")},e.bufferToBigInt=u,e.bigIntToBuffer=h;e.bufferToInt=function(t){const e=Number(u(t));if(!Number.isSafeInteger(e))throw new Error(\"Number exceeds 53 bits\");return e};e.fromSigned=function(t){return BigInt.asIntN(256,u(t))};e.toUnsigned=function(t){return h(BigInt.asUintN(256,t))};e.addHexPrefix=function(t){return\"string\"!=typeof t||(0,o.isHexPrefixed)(t)?t:\"0x\"+t},e.short=function(t,e=50){const r=n.isBuffer(t)?t.toString(\"hex\"):t;return r.length\u003C=e?r:r.slice(0,e)+\"…\"};e.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error(\"Invalid non-even hex string input for toUtf8() provided\");return n.from(t.replace(/^(00)+|(00)+$/g,\"\"),\"hex\").toString(\"utf8\")};e.baToJSON=function(t){if(n.isBuffer(t))return`0x${t.toString(\"hex\")}`;if(t instanceof Array){const r=[];for(let n=0;n\u003Ct.length;n++)r.push((0,e.baToJSON)(t[n]));return r}};e.validateNoLeadingZeroes=function(t){for(const[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${e} cannot have leading zeroes, received: ${r.toString(\"hex\")}`)},e.arrToBufArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):n.from(e)},e.bufArrToArr=function t(e){return Array.isArray(e)?e.map((e=>t(e))):Uint8Array.from(e??[])};e.bigIntToHex=t=>\"0x\"+t.toString(16),e.bigIntToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)(h(t))},e.intToUnpaddedBuffer=function(t){return(0,e.unpadBuffer)((0,e.intToBuffer)(t))}},25576:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const n=r(48834),i=r(80101);e.MAX_UINT64=BigInt(\"0xffffffffffffffff\"),e.MAX_INTEGER=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),e.MAX_INTEGER_BIGINT=BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),e.SECP256K1_ORDER=i.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),e.KECCAK256_NULL_S=\"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\",e.KECCAK256_NULL=n.Buffer.from(e.KECCAK256_NULL_S,\"hex\"),e.KECCAK256_RLP_ARRAY_S=\"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",e.KECCAK256_RLP_ARRAY=n.Buffer.from(e.KECCAK256_RLP_ARRAY_S,\"hex\"),e.KECCAK256_RLP_S=\"56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",e.KECCAK256_RLP=n.Buffer.from(e.KECCAK256_RLP_S,\"hex\"),e.RLP_EMPTY_STRING=n.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16},61151:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;e.hasTerminator=t=>t.length>0&&16===t[t.length-1];e.nibblesToBytes=(t,e)=>{for(let r=0,n=0;n\u003Ct.length;r+=1,n+=2)e[r]=t[n]\u003C\u003C4|t[n+1]};e.nibblesToCompactBytes=t=>{let r=0;(0,e.hasTerminator)(t)&&(r=1,t=t.subarray(0,t.length-1));const n=new Uint8Array(t.length/2+1);return n[0]=r\u003C\u003C5,1==(1&t.length)&&(n[0]|=16,n[0]|=t[0],t=t.subarray(1)),(0,e.nibblesToBytes)(t,n.subarray(1)),n};e.bytesToNibbles=t=>{const e=2*t.length+1,r=new Uint8Array(e);for(let e=0;e\u003Ct.length;e++){const n=t[e];r[2*e]=n/16,r[2*e+1]=n%16}return r[e-1]=16,r};e.compactBytesToNibbles=t=>{if(0===t.length)return t;let r=(0,e.bytesToNibbles)(t);r[0]\u003C2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},81958:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertIsString=e.assertIsArray=e.assertIsBuffer=e.assertIsHexString=void 0;const i=r(11976);e.assertIsHexString=function(t){if(!(0,i.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};e.assertIsBuffer=function(t){if(!n.isBuffer(t)){throw new Error(`This method only supports Buffer but input was: ${t}`)}};e.assertIsArray=function(t){if(!Array.isArray(t)){throw new Error(`This method only supports number arrays but input was: ${t}`)}};e.assertIsString=function(t){if(\"string\"!=typeof t){throw new Error(`This method only supports strings but input was: ${t}`)}}},77913:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,i(r(25576),e),i(r(6288),e),i(r(52769),e),i(r(49409),e),i(r(93143),e),i(r(48493),e),i(r(29267),e),i(r(23041),e),i(r(61151),e),i(r(45209),e);var o=r(11976);Object.defineProperty(e,\"arrayContainsArray\",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,\"fromAscii\",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,\"fromUtf8\",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,\"getBinarySize\",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,\"getKeys\",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,\"isHexPrefixed\",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,\"isHexString\",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,\"padToEven\",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,\"stripHexPrefix\",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,\"toAscii\",{enumerable:!0,get:function(){return o.toAscii}}),i(r(22684),e),i(r(76531),e)},11976:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;function i(t){if(\"string\"!=typeof t)throw new Error(\"[isHexPrefixed] input must be type 'string', received type \"+typeof t);return\"0\"===t[0]&&\"x\"===t[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,e.isHexPrefixed=i;function o(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}e.stripHexPrefix=t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return i(t)?t.slice(2):t},e.padToEven=o,e.getBinarySize=function(t){if(\"string\"!=typeof t)throw new Error(\"[getBinarySize] method requires input type 'string', received \"+typeof t);return n.byteLength(t,\"utf8\")},e.arrayContainsArray=function(t,e,r){if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`);return e[!0===r?\"some\":\"every\"]((e=>t.indexOf(e)>=0))},e.toAscii=function(t){let e=\"\",r=0;const n=t.length;for(\"0x\"===t.substring(0,2)&&(r=2);r\u003Cn;r+=2){const n=parseInt(t.substr(r,2),16);e+=String.fromCharCode(n)}return e},e.fromUtf8=function(t){return`0x${o(n.from(t,\"utf8\").toString(\"hex\")).replace(/^0+|0+$/g,\"\")}`},e.fromAscii=function(t){let e=\"\";for(let r=0;r\u003Ct.length;r++){const n=t.charCodeAt(r).toString(16);e+=n.length\u003C2?`0${n}`:n}return`0x${e}`},e.getKeys=function(t,e,r){if(!Array.isArray(t))throw new Error(\"[getKeys] method expects input 'params' to be an array, got \"+typeof t);if(\"string\"!=typeof e)throw new Error(\"[getKeys] method expects input 'key' to be type 'string', got \"+typeof t);const n=[];for(let i=0;i\u003Ct.length;i++){let o=t[i][e];if(!0!==r||o){if(\"string\"!=typeof o)throw new Error(\"invalid abi - expected type 'string', received \"+typeof o)}else o=\"\";n.push(o)}return n},e.isHexString=function(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}},22684:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.Lock=void 0;e.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((t=>this.promiseResolverQueue.push(t)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn(\"Lock.permits should never be > 0 when there is someone waiting.\");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}},76531:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getProvider=e.fetchFromProvider=void 0;const n=r(42973);e.fetchFromProvider=async(t,e)=>(await(0,n.default)(t,{headers:{\"content-type\":\"application/json\"},type:\"json\",data:{method:e.method,params:e.params,jsonrpc:\"2.0\",id:1}})).result;e.getProvider=t=>{if(\"string\"==typeof t)return t;if(void 0!==t?.connection?.url)return t.connection.url;throw new Error(\"Must provide valid provider URL or Web3Provider\")}},48493:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toCompactSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;const i=r(1115),o=r(80101),s=r(29267),a=r(25576),u=r(81958);function h(t,e){return t===BigInt(0)||t===BigInt(1)?t:void 0===e?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function c(t){return t===BigInt(0)||t===BigInt(1)}e.ecsign=function(t,e,r){const i=o.secp256k1.sign(t,e),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}};e.ecrecover=function(t,e,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=h(e,a);if(!c(f))throw new Error(\"Invalid signature v value\");const l=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(t);return n.from(l.toRawBytes(!1).slice(1))};e.toRpcSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(t)]))};e.toCompactSig=function(t,e,r,i){if(!c(h(t,i)))throw new Error(\"Invalid signature v value\");let o=r;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(e,32),(0,s.setLengthLeft)(o,32)]))};e.fromRpcSig=function(t){const e=(0,s.toBuffer)(t);let r,n,i;if(e.length>=65)r=e.slice(0,32),n=e.slice(32,64),i=(0,s.bufferToBigInt)(e.slice(64));else{if(64!==e.length)throw new Error(\"Invalid signature length\");r=e.slice(0,32),n=e.slice(32,64),i=BigInt((0,s.bufferToInt)(e.slice(32,33))>>7),n[0]&=127}return i\u003C27&&(i+=BigInt(27)),{v:i,r,s:n}};e.isValidSignature=function(t,e,r,n=!0,i){if(32!==e.length||32!==r.length)return!1;if(!c(h(t,i)))return!1;const o=(0,s.bufferToBigInt)(e),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER)&&!(n&&u>=a.SECP256K1_ORDER_DIV_2)};e.hashPersonalMessage=function(t){(0,u.assertIsBuffer)(t);const e=n.from(`\u0019Ethereum Signed Message:\\n${t.length}`,\"utf-8\");return n.from((0,i.keccak256)(n.concat([e,t])))}},23041:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toType=e.TypeOutput=void 0;const n=r(29267),i=r(11976);var o;!function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Buffer=2]=\"Buffer\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(o=e.TypeOutput||(e.TypeOutput={})),e.toType=function(t,e){if(null===t)return null;if(void 0===t)return;if(\"string\"==typeof t&&!(0,i.isHexString)(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(\"number\"==typeof t&&!Number.isSafeInteger(t))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)\");const r=(0,n.toBuffer)(t);switch(e){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const t=(0,n.bufferToBigInt)(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw new Error(\"The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)\");return Number(t)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error(\"unknown outputType\")}}},6288:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.GWEI_TO_WEI=void 0,e.GWEI_TO_WEI=BigInt(1e9)},93143:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Withdrawal=void 0;const i=r(49409),o=r(29267),s=r(23041);class a{constructor(t,e,r,n){this.index=t,this.validatorIndex=e,this.address=r,this.amount=n}static fromWithdrawalData(t){const{index:e,validatorIndex:r,address:n,amount:o}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt),h=(0,s.toType)(r,s.TypeOutput.BigInt),c=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,h,c,f)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[e,r,n,i]=t;return a.fromWithdrawalData({index:e,validatorIndex:r,address:n,amount:i})}static toBufferArray(t){const{index:e,validatorIndex:r,address:o,amount:a}=t,u=(0,s.toType)(e,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(e,s.TypeOutput.Buffer),h=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let c;c=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer);return[u,h,c,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:\"0x\"+this.address.buf.toString(\"hex\"),amount:(0,o.bigIntToHex)(this.amount)}}}e.Withdrawal=a},83397:()=>{},33196:()=>{},38087:()=>{},88351:()=>{},20395:()=>{},30488:()=>{},732:()=>{},99640:()=>{},94087:()=>{},6024:()=>{},53260:()=>{},15862:()=>{},74854:()=>{},66602:()=>{},66396:()=>{},85338:()=>{},2404:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;const n=r(57169),i=r(93862);function o(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class s extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}e.AssertionError=s,e.assert=function(t,e=\"Assertion failed.\",r=s){if(!t){if(e instanceof Error)throw e;throw o(r,e)}},e.assertStruct=function(t,e,r=\"Assertion failed\",a=s){try{(0,n.assert)(t,e)}catch(t){throw o(a,`${r}: ${function(t){return(0,i.getErrorMessage)(t).replace(/\\.$/u,\"\")}(t)}.`)}},e.assertExhaustive=function(t){throw new Error(\"Invalid branch reached. Should be detected during compilation.\")}},38434:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.base64=void 0;const n=r(57169),i=r(2404);e.base64=(t,e={})=>{const r=e.paddingRequired??!1,o=e.characterSet??\"base64\";let s,a;return\"base64\"===o?s=String.raw`[A-Za-z0-9+\\/]`:((0,i.assert)(\"base64url\"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,\"u\"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,\"u\"),(0,n.pattern)(t,a)}},95723:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.base64ToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToBase64=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;const i=r(36237),o=r(2404),s=r(95477),a=48,u=58,h=87;const c=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e\u003C256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function f(t){return t instanceof Uint8Array}function l(t){(0,o.assert)(f(t),\"Value must be a Uint8Array.\")}function d(t){if(l(t),0===t.length)return\"0x\";const e=c(),r=new Array(t.length);for(let n=0;n\u003Ct.length;n++)r[n]=e[t[n]];return(0,s.add0x)(r.join(\"\"))}function p(t){l(t);const e=d(t);return BigInt(e)}function m(t){if(\"0x\"===t?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(t);const e=(0,s.remove0x)(t).toLowerCase(),r=e.length%2==0?e:`0${e}`,n=new Uint8Array(r.length/2);for(let t=0;t\u003Cn.length;t++){const e=r.charCodeAt(2*t),i=r.charCodeAt(2*t+1),o=e-(e\u003Cu?a:h),s=i-(i\u003Cu?a:h);n[t]=16*o+s}return n}function g(t){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(t>=BigInt(0),\"Value must be a non-negative bigint.\");return m(t.toString(16))}function y(t){(0,o.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,o.assert)(t>=0,\"Value must be a non-negative number.\"),(0,o.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToBytes` instead.\");return m(t.toString(16))}function b(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),(new TextEncoder).encode(t)}function v(t){if(\"bigint\"==typeof t)return g(t);if(\"number\"==typeof t)return y(t);if(\"string\"==typeof t)return t.startsWith(\"0x\")?m(t):b(t);if(f(t))return t;throw new TypeError(`Unsupported value type: \"${typeof t}\".`)}e.isBytes=f,e.assertIsBytes=l,e.bytesToHex=d,e.bytesToBigInt=p,e.bytesToSignedBigInt=function(t){l(t);let e=BigInt(0);for(const r of t)e=(e\u003C\u003CBigInt(8))+BigInt(r);return BigInt.asIntN(8*t.length,e)},e.bytesToNumber=function(t){l(t);const e=p(t);return(0,o.assert)(e\u003C=BigInt(Number.MAX_SAFE_INTEGER),\"Number is not a safe integer. Use `bytesToBigInt` instead.\"),Number(e)},e.bytesToString=function(t){return l(t),(new TextDecoder).decode(t)},e.bytesToBase64=function(t){return l(t),i.base64.encode(t)},e.hexToBytes=m,e.bigIntToBytes=g,e.signedBigIntToBytes=function(t,e){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(\"number\"==typeof e,\"Byte length must be a number.\"),(0,o.assert)(e>0,\"Byte length must be greater than 0.\"),(0,o.assert)(function(t,e){(0,o.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(8*e-1))}(t,e),\"Byte length is too small to represent the given value.\");let r=t;const n=new Uint8Array(e);for(let t=0;t\u003Cn.length;t++)n[t]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},e.numberToBytes=y,e.stringToBytes=b,e.base64ToBytes=function(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),i.base64.decode(t)},e.valueToBytes=v,e.concatBytes=function(t){const e=new Array(t.length);let r=0;for(let n=0;n\u003Ct.length;n++){const i=v(t[n]);e[n]=i,r+=i.length}const n=new Uint8Array(r);for(let t=0,r=0;t\u003Ce.length;t++)n.set(e[t],r),r+=e[t].length;return n},e.createDataView=function(t){if(void 0!==n&&t instanceof n){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}},98170:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const n=r(57169);function i(t){return(0,n.is)(t,e.CaipNamespaceStruct)}function o(t){return(0,n.is)(t,e.CaipReferenceStruct)}e.CAIP_CHAIN_ID_REGEX=/^(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})):(?\u003CaccountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),function(t){t.Eip155=\"eip155\",t.Wallet=\"wallet\"}(e.KnownCaipNamespace||(e.KnownCaipNamespace={})),e.isCaipChainId=function(t){return(0,n.is)(t,e.CaipChainIdStruct)},e.isCaipNamespace=i,e.isCaipReference=o,e.isCaipAccountId=function(t){return(0,n.is)(t,e.CaipAccountIdStruct)},e.isCaipAccountAddress=function(t){return(0,n.is)(t,e.CaipAccountAddressStruct)},e.parseCaipChainId=function(t){const r=e.CAIP_CHAIN_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP chain ID.\");return{namespace:r.groups.namespace,reference:r.groups.reference}},e.parseCaipAccountId=function(t){const r=e.CAIP_ACCOUNT_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP account ID.\");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},e.toCaipChainId=function(t,r){if(!i(t))throw new Error(`Invalid \"namespace\", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid \"reference\", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${t}:${r}`}},39052:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChecksumStruct=void 0;const n=r(57169),i=r(38434);e.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},4250:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;const n=r(57169),i=r(2404),o=r(95723),s=r(95477),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),h=(0,n.coerce)((0,n.bigint)(),a,BigInt),c=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);e.createNumber=function(t){try{const e=(0,n.create)(t,u);return(0,i.assert)(Number.isFinite(e),`Expected a number-like value, got \"${t}\".`),e}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${t}\".`);throw e}},e.createBigInt=function(t){try{return(0,n.create)(t,h)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${String(t.value)}\".`);throw t}},e.createBytes=function(t){if(\"string\"==typeof t&&\"0x\"===t.toLowerCase())return new Uint8Array;try{return(0,n.create)(t,c)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}},e.createHex=function(t){if(t instanceof Uint8Array&&0===t.length||\"string\"==typeof t&&\"0x\"===t.toLowerCase())return\"0x\";try{return(0,n.create)(t,f)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}}},54489:function(t,e){\"use strict\";var r,n,i=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)},o=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;class s{get size(){return i(this,r,\"f\").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,\"f\")[Symbol.iterator]()}constructor(t){r.set(this,void 0),o(this,r,new Map(t),\"f\"),Object.freeze(this)}entries(){return i(this,r,\"f\").entries()}forEach(t,e){return i(this,r,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return i(this,r,\"f\").get(t)}has(t){return i(this,r,\"f\").has(t)}keys(){return i(this,r,\"f\").keys()}values(){return i(this,r,\"f\").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([t,e])=>`${String(t)} => ${String(e)}`)).join(\", \")} `:\"\"}}`}}e.FrozenMap=s;class a{get size(){return i(this,n,\"f\").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,\"f\")[Symbol.iterator]()}constructor(t){n.set(this,void 0),o(this,n,new Set(t),\"f\"),Object.freeze(this)}entries(){return i(this,n,\"f\").entries()}forEach(t,e){return i(this,n,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return i(this,n,\"f\").has(t)}keys(){return i(this,n,\"f\").keys()}values(){return i(this,n,\"f\").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((t=>String(t))).join(\", \")} `:\"\"}}`}}e.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},13790:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},93862:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapError=e.getErrorMessage=e.isErrorWithStack=e.isErrorWithMessage=e.isErrorWithCode=void 0;const n=r(89498),i=r(823);function o(t){return\"object\"==typeof t&&null!==t&&\"code\"in t}function s(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}e.isErrorWithCode=o,e.isErrorWithMessage=s,e.isErrorWithStack=function(t){return\"object\"==typeof t&&null!==t&&\"stack\"in t},e.getErrorMessage=function(t){return s(t)&&\"string\"==typeof t.message?t.message:(0,i.isNullOrUndefined)(t)?\"\":String(t)},e.wrapError=function(t,e){if((r=t)instanceof Error||(0,i.isObject)(r)&&\"Error\"===r.constructor.name){let r;return r=2===Error.length?new Error(e,{cause:t}):new n.ErrorWithCause(e,{cause:t}),o(t)&&(r.code=t.code),r}var r;return e.length>0?new Error(`${String(t)}: ${e}`):new Error(String(t))}},95477:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const n=r(57169),i=r(80125),o=r(2404),s=r(95723);function a(t){return(0,n.is)(t,e.HexStruct)}function u(t){return(0,n.is)(t,e.StrictHexStruct)}function h(t){(0,o.assert)((0,n.is)(t,e.HexChecksumAddressStruct),\"Invalid hex address.\");const r=f(t.toLowerCase()),a=f((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split(\"\").map(((t,e)=>{const r=a[e];return(0,o.assert)((0,n.is)(r,(0,n.string)()),\"Hash shorter than address.\"),parseInt(r,16)>7?t.toUpperCase():t})).join(\"\")}`}function c(t){return!!(0,n.is)(t,e.HexChecksumAddressStruct)&&h(t)===t}function f(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}e.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),e.isHexString=a,e.isStrictHexString=u,e.assertIsHexString=function(t){(0,o.assert)(a(t),\"Value must be a hexadecimal string.\")},e.assertIsStrictHexString=function(t){(0,o.assert)(u(t),'Value must be a hexadecimal string, starting with \"0x\".')},e.isValidHexAddress=function(t){return(0,n.is)(t,e.HexAddressStruct)||c(t)},e.getChecksumAddress=h,e.isValidChecksumAddress=c,e.add0x=function(t){return t.startsWith(\"0x\")?t:t.startsWith(\"0X\")?`0x${t.substring(2)}`:`0x${t}`},e.remove0x=f},67827:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(2404),e),i(r(38434),e),i(r(95723),e),i(r(98170),e),i(r(39052),e),i(r(4250),e),i(r(54489),e),i(r(13790),e),i(r(93862),e),i(r(95477),e),i(r(85876),e),i(r(46916),e),i(r(54716),e),i(r(823),e),i(r(94608),e),i(r(18189),e),i(r(86792),e),i(r(45688),e),i(r(25549),e),i(r(48610),e)},85876:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const n=r(57169),i=r(2404),o=r(823);function s({path:t,branc V���h:e}){const r=t[t.length-1];return(0,o.hasProperty)(e[e.length-2],r)}function a(t){return new n.Struct({...t,type:`optional ${t.type}`,validator:(e,r)=>!s(r)||t.validator(e,r),refiner:(e,r)=>!s(r)||t.refiner(e,r)})}e.object=t=>(0,n.object)(t),e.exactOptional=a;function u(t){return(0,n.create)(t,e.JsonStruct)}e.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)(\"finite number\",(t=>(0,n.is)(t,(0,n.number)())&&Number.isFinite(t))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>e.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>e.UnsafeJsonStruct)))]),e.JsonStruct=(0,n.coerce)(e.UnsafeJsonStruct,(0,n.any)(),(t=>((0,i.assertStruct)(t,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e})))))),e.isValidJson=function(t){try{return u(t),!0}catch{return!1}},e.getSafeJson=u,e.getJsonSize=function(t){(0,i.assertStruct)(t,e.JsonStruct,\"Invalid JSON value\");const r=JSON.stringify(t);return(new TextEncoder).encode(r).byteLength},e.jsonrpc2=\"2.0\",e.JsonRpcVersionStruct=(0,n.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(e.JsonStruct),stack:a((0,n.string)())}),e.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),e.JsonStruct),(0,n.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.isJsonRpcNotification=function(t){return(0,n.is)(t,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,r){(0,i.assertStruct)(t,e.JsonRpcNotificationStruct,\"Invalid JSON-RPC notification\",r)},e.isJsonRpcRequest=function(t){return(0,n.is)(t,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,r){(0,i.assertStruct)(t,e.JsonRpcRequestStruct,\"Invalid JSON-RPC request\",r)},e.PendingJsonRpcResponseStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,n.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(t){return(0,n.is)(t,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.PendingJsonRpcResponseStruct,\"Invalid pending JSON-RPC response\",r)},e.isJsonRpcResponse=function(t){return(0,n.is)(t,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.JsonRpcResponseStruct,\"Invalid JSON-RPC response\",r)},e.isJsonRpcSuccess=function(t){return(0,n.is)(t,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,r){(0,i.assertStruct)(t,e.JsonRpcSuccessStruct,\"Invalid JSON-RPC success response\",r)},e.isJsonRpcFailure=function(t){return(0,n.is)(t,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,r){(0,i.assertStruct)(t,e.JsonRpcFailureStruct,\"Invalid JSON-RPC failure response\",r)},e.isJsonRpcError=function(t){return(0,n.is)(t,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,r){(0,i.assertStruct)(t,e.JsonRpcErrorStruct,\"Invalid JSON-RPC error\",r)},e.getJsonRpcIdValidator=function(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...t};return t=>Boolean(\"number\"==typeof t&&(r||Number.isInteger(t))||\"string\"==typeof t&&(e||t.length>0)||n&&null===t)}},46916:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},54716:function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;const i=(0,n(r(25130)).default)(\"metamask\");e.createProjectLogger=function(t){return i.extend(t)},e.createModuleLogger=function(t,e){return t.extend(e)}},823:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(t){return Array.isArray(t)&&t.length>0},e.isNullOrUndefined=function(t){return null==t},e.isObject=function(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)};function r(t){return t.charCodeAt(0)\u003C=127}e.hasProperty=(t,e)=>Object.hasOwnProperty.call(t,e),e.getKnownPropertyNames=function(t){return Object.getOwnPropertyNames(t)},function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/\"|\\\\|\\n|\\r|\\t/gu,e.isPlainObject=function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}},e.isASCII=r,e.calculateStringSize=function(t){return t.split(\"\").reduce(((t,e)=>r(e)?t+1:t+2),0)+(t.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length},e.calculateNumberSize=function(t){return t.toString().length}},94608:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;const n=r(2404),i=r(95477);e.numberToHex=t=>((0,n.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,n.assert)(t>=0,\"Value must be a non-negative number.\"),(0,n.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToHex` instead.\"),(0,i.add0x)(t.toString(16)));e.bigIntToHex=t=>((0,n.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,n.assert)(t>=0,\"Value must be a non-negative bigint.\"),(0,i.add0x)(t.toString(16)));e.hexToNumber=t=>{(0,i.assertIsHexString)(t);const e=parseInt(t,16);return(0,n.assert)(Number.isSafeInteger(e),\"Value is not a safe integer. Use `hexToBigInt` instead.\"),e};e.hexToBigInt=t=>((0,i.assertIsHexString)(t),BigInt((0,i.add0x)(t)))},18189:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},86792:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDeferredPromise=void 0,e.createDeferredPromise=function({suppressUnhandledRejection:t=!1}={}){let e,r;const n=new Promise(((t,n)=>{e=t,r=n}));return t&&n.catch((t=>{})),{promise:n,resolve:e,reject:r}}},45688:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(t){t[t.Millisecond=1]=\"Millisecond\",t[t.Second=1e3]=\"Second\",t[t.Minute=6e4]=\"Minute\",t[t.Hour=36e5]=\"Hour\",t[t.Day=864e5]=\"Day\",t[t.Week=6048e5]=\"Week\",t[t.Year=31536e6]=\"Year\"}(e.Duration||(e.Duration={}));const r=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error(`\"${e}\" must be a non-negative integer. Received: \"${t}\".`)};e.inMilliseconds=function(t,e){return r(t,\"count\"),t*e},e.timeSince=function(t){return r(t,\"timestamp\"),Date.now()-t}},25549:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},48610:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const n=r(57169),i=r(97699),o=r(2404);e.VersionStruct=(0,n.refine)((0,n.string)(),\"Version\",(t=>null!==(0,i.valid)(t)||`Expected SemVer version, got \"${t}\"`)),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),\"Version range\",(t=>null!==(0,i.validRange)(t)||`Expected SemVer range, got \"${t}\"`)),e.isValidSemVerVersion=function(t){return(0,n.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,n.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,o.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,o.assertStruct)(t,e.VersionRangeStruct)},e.gtVersion=function(t,e){return(0,i.gt)(t,e)},e.gtRange=function(t,e){return(0,i.gtr)(t,e)},e.satisfiesVersionRange=function(t,e){return(0,i.satisfies)(t,e,{includePrerelease:!0})}},257:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;const n=r(57169),i=r(10107);function o(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class s extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}e.AssertionError=s,e.assert=function(t,e=\"Assertion failed.\",r=s){if(!t){if(e instanceof Error)throw e;throw o(r,e)}},e.assertStruct=function(t,e,r=\"Assertion failed\",a=s){try{(0,n.assert)(t,e)}catch(t){throw o(a,`${r}: ${function(t){return(0,i.getErrorMessage)(t).replace(/\\.$/u,\"\")}(t)}.`)}},e.assertExhaustive=function(t){throw new Error(\"Invalid branch reached. Should be detected during compilation.\")}},98732:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.base64=void 0;const n=r(57169),i=r(257);e.base64=(t,e={})=>{const r=e.paddingRequired??!1,o=e.characterSet??\"base64\";let s,a;return\"base64\"===o?s=String.raw`[A-Za-z0-9+\\/]`:((0,i.assert)(\"base64url\"===o),s=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,\"u\"):new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,\"u\"),(0,n.pattern)(t,a)}},24585:(t,e,r)=>{\"use strict\";var n=r(48834).Buffer;Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.base64ToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToBase64=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;const i=r(36237),o=r(257),s=r(54126),a=48,u=58,h=87;const c=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e\u003C256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function f(t){return t instanceof Uint8Array}function l(t){(0,o.assert)(f(t),\"Value must be a Uint8Array.\")}function d(t){if(l(t),0===t.length)return\"0x\";const e=c(),r=new Array(t.length);for(let n=0;n\u003Ct.length;n++)r[n]=e[t[n]];return(0,s.add0x)(r.join(\"\"))}function p(t){l(t);const e=d(t);return BigInt(e)}function m(t){if(\"0x\"===t?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(t);const e=(0,s.remove0x)(t).toLowerCase(),r=e.length%2==0?e:`0${e}`,n=new Uint8Array(r.length/2);for(let t=0;t\u003Cn.length;t++){const e=r.charCodeAt(2*t),i=r.charCodeAt(2*t+1),o=e-(e\u003Cu?a:h),s=i-(i\u003Cu?a:h);n[t]=16*o+s}return n}function g(t){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(t>=BigInt(0),\"Value must be a non-negative bigint.\");return m(t.toString(16))}function y(t){(0,o.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,o.assert)(t>=0,\"Value must be a non-negative number.\"),(0,o.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToBytes` instead.\");return m(t.toString(16))}function b(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),(new TextEncoder).encode(t)}function v(t){if(\"bigint\"==typeof t)return g(t);if(\"number\"==typeof t)return y(t);if(\"string\"==typeof t)return t.startsWith(\"0x\")?m(t):b(t);if(f(t))return t;throw new TypeError(`Unsupported value type: \"${typeof t}\".`)}e.isBytes=f,e.assertIsBytes=l,e.bytesToHex=d,e.bytesToBigInt=p,e.bytesToSignedBigInt=function(t){l(t);let e=BigInt(0);for(const r of t)e=(e\u003C\u003CBigInt(8))+BigInt(r);return BigInt.asIntN(8*t.length,e)},e.bytesToNumber=function(t){l(t);const e=p(t);return(0,o.assert)(e\u003C=BigInt(Number.MAX_SAFE_INTEGER),\"Number is not a safe integer. Use `bytesToBigInt` instead.\"),Number(e)},e.bytesToString=function(t){return l(t),(new TextDecoder).decode(t)},e.bytesToBase64=function(t){return l(t),i.base64.encode(t)},e.hexToBytes=m,e.bigIntToBytes=g,e.signedBigIntToBytes=function(t,e){(0,o.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,o.assert)(\"number\"==typeof e,\"Byte length must be a number.\"),(0,o.assert)(e>0,\"Byte length must be greater than 0.\"),(0,o.assert)(function(t,e){(0,o.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(8*e-1))}(t,e),\"Byte length is too small to represent the given value.\");let r=t;const n=new Uint8Array(e);for(let t=0;t\u003Cn.length;t++)n[t]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},e.numberToBytes=y,e.stringToBytes=b,e.base64ToBytes=function(t){return(0,o.assert)(\"string\"==typeof t,\"Value must be a string.\"),i.base64.decode(t)},e.valueToBytes=v,e.concatBytes=function(t){const e=new Array(t.length);let r=0;for(let n=0;n\u003Ct.length;n++){const i=v(t[n]);e[n]=i,r+=i.length}const n=new Uint8Array(r);for(let t=0,r=0;t\u003Ce.length;t++)n.set(e[t],r),r+=e[t].length;return n},e.createDataView=function(t){if(void 0!==n&&t instanceof n){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}},3470:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.toCaipChainId=e.parseCaipAccountId=e.parseCaipChainId=e.isCaipAccountAddress=e.isCaipAccountId=e.isCaipReference=e.isCaipNamespace=e.isCaipChainId=e.KnownCaipNamespace=e.CaipAccountAddressStruct=e.CaipAccountIdStruct=e.CaipReferenceStruct=e.CaipNamespaceStruct=e.CaipChainIdStruct=e.CAIP_ACCOUNT_ADDRESS_REGEX=e.CAIP_ACCOUNT_ID_REGEX=e.CAIP_REFERENCE_REGEX=e.CAIP_NAMESPACE_REGEX=e.CAIP_CHAIN_ID_REGEX=void 0;const n=r(57169);function i(t){return(0,n.is)(t,e.CaipNamespaceStruct)}function o(t){return(0,n.is)(t,e.CaipReferenceStruct)}e.CAIP_CHAIN_ID_REGEX=/^(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})$/u,e.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,e.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,e.CAIP_ACCOUNT_ID_REGEX=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})):(?\u003CaccountAddress>[-.%a-zA-Z0-9]{1,128})$/u,e.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,e.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_CHAIN_ID_REGEX),e.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_NAMESPACE_REGEX),e.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),e.CAIP_REFERENCE_REGEX),e.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ID_REGEX),e.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),e.CAIP_ACCOUNT_ADDRESS_REGEX),function(t){t.Eip155=\"eip155\"}(e.KnownCaipNamespace||(e.KnownCaipNamespace={})),e.isCaipChainId=function(t){return(0,n.is)(t,e.CaipChainIdStruct)},e.isCaipNamespace=i,e.isCaipReference=o,e.isCaipAccountId=function(t){return(0,n.is)(t,e.CaipAccountIdStruct)},e.isCaipAccountAddress=function(t){return(0,n.is)(t,e.CaipAccountAddressStruct)},e.parseCaipChainId=function(t){const r=e.CAIP_CHAIN_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP chain ID.\");return{namespace:r.groups.namespace,reference:r.groups.reference}},e.parseCaipAccountId=function(t){const r=e.CAIP_ACCOUNT_ID_REGEX.exec(t);if(!r?.groups)throw new Error(\"Invalid CAIP account ID.\");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},e.toCaipChainId=function(t,r){if(!i(t))throw new Error(`Invalid \"namespace\", must match: ${e.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw new Error(`Invalid \"reference\", must match: ${e.CAIP_REFERENCE_REGEX.toString()}`);return`${t}:${r}`}},73497:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChecksumStruct=void 0;const n=r(57169),i=r(98732);e.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},47425:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;const n=r(57169),i=r(257),o=r(24585),s=r(54126),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),h=(0,n.coerce)((0,n.bigint)(),a,BigInt),c=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);e.createNumber=function(t){try{const e=(0,n.create)(t,u);return(0,i.assert)(Number.isFinite(e),`Expected a number-like value, got \"${t}\".`),e}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${t}\".`);throw e}},e.createBigInt=function(t){try{return(0,n.create)(t,h)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got \"${String(t.value)}\".`);throw t}},e.createBytes=function(t){if(\"string\"==typeof t&&\"0x\"===t.toLowerCase())return new Uint8Array;try{return(0,n.create)(t,c)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}},e.createHex=function(t){if(t instanceof Uint8Array&&0===t.length||\"string\"==typeof t&&\"0x\"===t.toLowerCase())return\"0x\";try{return(0,n.create)(t,f)}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a bytes-like value, got \"${String(t.value)}\".`);throw t}}},42107:function(t,e){\"use strict\";var r,n,i=this&&this.__classPrivateFieldGet||function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)},o=this&&this.__classPrivateFieldSet||function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;class s{get size(){return i(this,r,\"f\").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,\"f\")[Symbol.iterator]()}constructor(t){r.set(this,void 0),o(this,r,new Map(t),\"f\"),Object.freeze(this)}entries(){return i(this,r,\"f\").entries()}forEach(t,e){return i(this,r,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}get(t){return i(this,r,\"f\").get(t)}has(t){return i(this,r,\"f\").has(t)}keys(){return i(this,r,\"f\").keys()}values(){return i(this,r,\"f\").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([t,e])=>`${String(t)} => ${String(e)}`)).join(\", \")} `:\"\"}}`}}e.FrozenMap=s;class a{get size(){return i(this,n,\"f\").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,\"f\")[Symbol.iterator]()}constructor(t){n.set(this,void 0),o(this,n,new Set(t),\"f\"),Object.freeze(this)}entries(){return i(this,n,\"f\").entries()}forEach(t,e){return i(this,n,\"f\").forEach(((r,n,i)=>t.call(e,r,n,this)))}has(t){return i(this,n,\"f\").has(t)}keys(){return i(this,n,\"f\").keys()}values(){return i(this,n,\"f\").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((t=>String(t))).join(\", \")} `:\"\"}}`}}e.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},49624:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},10107:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.wrapError=e.getErrorMessage=e.isErrorWithStack=e.isErrorWithMessage=e.isErrorWithCode=void 0;const n=r(89498),i=r(96774);function o(t){return\"object\"==typeof t&&null!==t&&\"code\"in t}function s(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}e.isErrorWithCode=o,e.isErrorWithMessage=s,e.isErrorWithStack=function(t){return\"object\"==typeof t&&null!==t&&\"stack\"in t},e.getErrorMessage=function(t){return s(t)&&\"string\"==typeof t.message?t.message:(0,i.isNullOrUndefined)(t)?\"\":String(t)},e.wrapError=function(t,e){if((r=t)instanceof Error||(0,i.isObject)(r)&&\"Error\"===r.constructor.name){let r;return r=2===Error.length?new Error(e,{cause:t}):new n.ErrorWithCause(e,{cause:t}),o(t)&&(r.code=t.code),r}var r;return e.length>0?new Error(`${String(t)}: ${e}`):new Error(String(t))}},54126:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.remove0x=e.add0x=e.isValidChecksumAddress=e.getChecksumAddress=e.isValidHexAddress=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.HexChecksumAddressStruct=e.HexAddressStruct=e.StrictHexStruct=e.HexStruct=void 0;const n=r(57169),i=r(80125),o=r(257),s=r(24585);function a(t){return(0,n.is)(t,e.HexStruct)}function u(t){return(0,n.is)(t,e.StrictHexStruct)}function h(t){(0,o.assert)((0,n.is)(t,e.HexChecksumAddressStruct),\"Invalid hex address.\");const r=f(t.toLowerCase()),a=f((0,s.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split(\"\").map(((t,e)=>{const r=a[e];return(0,o.assert)((0,n.is)(r,(0,n.string)()),\"Hash shorter than address.\"),parseInt(r,16)>7?t.toUpperCase():t})).join(\"\")}`}function c(t){return!!(0,n.is)(t,e.HexChecksumAddressStruct)&&h(t)===t}function f(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}e.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),e.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),e.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),e.isHexString=a,e.isStrictHexString=u,e.assertIsHexString=function(t){(0,o.assert)(a(t),\"Value must be a hexadecimal string.\")},e.assertIsStrictHexString=function(t){(0,o.assert)(u(t),'Value must be a hexadecimal string, starting with \"0x\".')},e.isValidHexAddress=function(t){return(0,n.is)(t,e.HexAddressStruct)||c(t)},e.getChecksumAddress=h,e.isValidChecksumAddress=c,e.add0x=function(t){return t.startsWith(\"0x\")?t:t.startsWith(\"0X\")?`0x${t.substring(2)}`:`0x${t}`},e.remove0x=f},17487:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(257),e),i(r(98732),e),i(r(24585),e),i(r(3470),e),i(r(73497),e),i(r(47425),e),i(r(42107),e),i(r(49624),e),i(r(10107),e),i(r(54126),e),i(r(30397),e),i(r(16913),e),i(r(98971),e),i(r(96774),e),i(r(21527),e),i(r(89734),e),i(r(92380),e),i(r(30633),e),i(r(10121),e),i(r(77791),e)},30397:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.getSafeJson=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=e.exactOptional=e.object=void 0;const n=r(57169),i=r(257),o=r(96774);function s({path:t,branch:e}){const r=t[t.length-1];return(0,o.hasProperty)(e[e.length-2],r)}function a(t){return new n.Struct({...t,type:`optional ${t.type}`,validator:(e,r)=>!s(r)||t.validator(e,r),refiner:(e,r)=>!s(r)||t.refiner(e,r)})}e.object=t=>(0,n.object)(t),e.exactOptional=a;function u(t){return(0,n.create)(t,e.JsonStruct)}e.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)(\"finite number\",(t=>(0,n.is)(t,(0,n.number)())&&Number.isFinite(t))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>e.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>e.UnsafeJsonStruct)))]),e.JsonStruct=(0,n.coerce)(e.UnsafeJsonStruct,(0,n.any)(),(t=>((0,i.assertStruct)(t,e.UnsafeJsonStruct),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e})))))),e.isValidJson=function(t){try{return u(t),!0}catch{return!1}},e.getSafeJson=u,e.getJsonSize=function(t){(0,i.assertStruct)(t,e.JsonStruct,\"Invalid JSON value\");const r=JSON.stringify(t);return(new TextEncoder).encode(r).byteLength},e.jsonrpc2=\"2.0\",e.JsonRpcVersionStruct=(0,n.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),e.JsonRpcErrorStruct=(0,e.object)({code:(0,n.integer)(),message:(0,n.string)(),data:a(e.JsonStruct),stack:a((0,n.string)())}),e.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),e.JsonStruct),(0,n.array)(e.JsonStruct)]),e.JsonRpcRequestStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.JsonRpcNotificationStruct=(0,e.object)({jsonrpc:e.JsonRpcVersionStruct,method:(0,n.string)(),params:a(e.JsonRpcParamsStruct)}),e.isJsonRpcNotification=function(t){return(0,n.is)(t,e.JsonRpcNotificationStruct)},e.assertIsJsonRpcNotification=function(t,r){(0,i.assertStruct)(t,e.JsonRpcNotificationStruct,\"Invalid JSON-RPC notification\",r)},e.isJsonRpcRequest=function(t){return(0,n.is)(t,e.JsonRpcRequestStruct)},e.assertIsJsonRpcRequest=function(t,r){(0,i.assertStruct)(t,e.JsonRpcRequestStruct,\"Invalid JSON-RPC request\",r)},e.PendingJsonRpcResponseStruct=(0,n.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,e.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,n.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]),e.isPendingJsonRpcResponse=function(t){return(0,n.is)(t,e.PendingJsonRpcResponseStruct)},e.assertIsPendingJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.PendingJsonRpcResponseStruct,\"Invalid pending JSON-RPC response\",r)},e.isJsonRpcResponse=function(t){return(0,n.is)(t,e.JsonRpcResponseStruct)},e.assertIsJsonRpcResponse=function(t,r){(0,i.assertStruct)(t,e.JsonRpcResponseStruct,\"Invalid JSON-RPC response\",r)},e.isJsonRpcSuccess=function(t){return(0,n.is)(t,e.JsonRpcSuccessStruct)},e.assertIsJsonRpcSuccess=function(t,r){(0,i.assertStruct)(t,e.JsonRpcSuccessStruct,\"Invalid JSON-RPC success response\",r)},e.isJsonRpcFailure=function(t){return(0,n.is)(t,e.JsonRpcFailureStruct)},e.assertIsJsonRpcFailure=function(t,r){(0,i.assertStruct)(t,e.JsonRpcFailureStruct,\"Invalid JSON-RPC failure response\",r)},e.isJsonRpcError=function(t){return(0,n.is)(t,e.JsonRpcErrorStruct)},e.assertIsJsonRpcError=function(t,r){(0,i.assertStruct)(t,e.JsonRpcErrorStruct,\"Invalid JSON-RPC error\",r)},e.getJsonRpcIdValidator=function(t){const{permitEmptyString:e,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...t};return t=>Boolean(\"number\"==typeof t&&(r||Number.isInteger(t))||\"string\"==typeof t&&(e||t.length>0)||n&&null===t)}},16913:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},98971:function(t,e,r){\"use strict\";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;const i=(0,n(r(25130)).default)(\"metamask\");e.createProjectLogger=function(t){return i.extend(t)},e.createModuleLogger=function(t,e){return t.extend(e)}},96774:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.getKnownPropertyNames=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0,e.isNonEmptyArray=function(t){return Array.isArray(t)&&t.length>0},e.isNullOrUndefined=function(t){return null==t},e.isObject=function(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)};function r(t){return t.charCodeAt(0)\u003C=127}e.hasProperty=(t,e)=>Object.hasOwnProperty.call(t,e),e.getKnownPropertyNames=function(t){return Object.getOwnPropertyNames(t)},function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/\"|\\\\|\\n|\\r|\\t/gu,e.isPlainObject=function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}},e.isASCII=r,e.calculateStringSize=function(t){return t.split(\"\").reduce(((t,e)=>r(e)?t+1:t+2),0)+(t.match(e.ESCAPE_CHARACTERS_REGEXP)??[]).length},e.calculateNumberSize=function(t){return t.toString().length}},21527:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;const n=r(257),i=r(54126);e.numberToHex=t=>((0,n.assert)(\"number\"==typeof t,\"Value must be a number.\"),(0,n.assert)(t>=0,\"Value must be a non-negative number.\"),(0,n.assert)(Number.isSafeInteger(t),\"Value is not a safe integer. Use `bigIntToHex` instead.\"),(0,i.add0x)(t.toString(16)));e.bigIntToHex=t=>((0,n.assert)(\"bigint\"==typeof t,\"Value must be a bigint.\"),(0,n.assert)(t>=0,\"Value must be a non-negative bigint.\"),(0,i.add0x)(t.toString(16)));e.hexToNumber=t=>{(0,i.assertIsHexString)(t);const e=parseInt(t,16);return(0,n.assert)(Number.isSafeInteger(e),\"Value is not a safe integer. Use `hexToBigInt` instead.\"),e};e.hexToBigInt=t=>((0,i.assertIsHexString)(t),BigInt((0,i.add0x)(t)))},89734:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},92380:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.createDeferredPromise=void 0,e.createDeferredPromise=function({suppressUnhandledRejection:t=!1}={}){let e,r;const n=new Promise(((t,n)=>{e=t,r=n}));return t&&n.catch((t=>{})),{promise:n,resolve:e,reject:r}}},30633:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(t){t[t.Millisecond=1]=\"Millisecond\",t[t.Second=1e3]=\"Second\",t[t.Minute=6e4]=\"Minute\",t[t.Hour=36e5]=\"Hour\",t[t.Day=864e5]=\"Day\",t[t.Week=6048e5]=\"Week\",t[t.Year=31536e6]=\"Year\"}(e.Duration||(e.Duration={}));const r=(t,e)=>{if(!(t=>Number.isInteger(t)&&t>=0)(t))throw new Error(`\"${e}\" must be a non-negative integer. Received: \"${t}\".`)};e.inMilliseconds=function(t,e){return r(t,\"count\"),t*e},e.timeSince=function(t){return r(t,\"timestamp\"),Date.now()-t}},10121:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0})},77791:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const n=r(57169),i=r(97699),o=r(257);e.VersionStruct=(0,n.refine)((0,n.string)(),\"Version\",(t=>null!==(0,i.valid)(t)||`Expected SemVer version, got \"${t}\"`)),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),\"Version range\",(t=>null!==(0,i.validRange)(t)||`Expected SemVer range, got \"${t}\"`)),e.isValidSemVerVersion=function(t){return(0,n.is)(t,e.VersionStruct)},e.isValidSemVerRange=function(t){return(0,n.is)(t,e.VersionRangeStruct)},e.assertIsSemVerVersion=function(t){(0,o.assertStruct)(t,e.VersionStruct)},e.assertIsSemVerRange=function(t){(0,o.assertStr�Zt�uct)(t,e.VersionRangeStruct)},e.gtVersion=function(t,e){return(0,i.gt)(t,e)},e.gtRange=function(t,e){return(0,i.gtr)(t,e)},e.satisfiesVersionRange=function(t,e){return(0,i.satisfies)(t,e,{includePrerelease:!0})}},66566:(t,e)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.StructError=void 0;class r extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(\".\")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}e.StructError=r},57169:function(t,e,r){\"use strict\";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!(\"get\"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,\"__esModule\",{value:!0}),i(r(66566),e),i(r(69695),e),i(r(64621),e),i(r(13675),e),i(r(5792),e),i(r(32712),e)},69695:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.validate=e.is=e.mask=e.create=e.assert=e.Struct=void 0;const n=r(66566),i=r(19595);function o(t,e,r){const n=h(t,e,{message:r});if(n[0])throw n[0]}function s(t,e,r){const n=h(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function a(t,e,r){const n=h(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function u(t,e){return!h(t,e)[0]}function h(t,e,r={}){const o=(0,i.run)(t,e,r),s=(0,i.shiftIterator)(o);if(s[0]){return[new n.StructError(s[0],(function*(){for(const t of o)t[0]&&(yield t[0])})),void 0]}return[void 0,s[1]]}e.Struct=class{constructor(t){const{type:e,schema:r,validator:n,refiner:o,coercer:s=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(t,e)=>{const r=n(t,e);return(0,i.toFailures)(r,e,this,t)}:()=>[],this.refiner=o?(t,e)=>{const r=o(t,e);return(0,i.toFailures)(r,e,this,t)}:()=>[]}assert(t,e){return o(t,this,e)}create(t,e){return s(t,this,e)}is(t){return u(t,this)}mask(t,e){return a(t,this,e)}validate(t,e={}){return h(t,this,e)}},e.assert=o,e.create=s,e.mask=a,e.is=u,e.validate=h},64621:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.trimmed=e.defaulted=e.coerce=void 0;const n=r(69695),i=r(19595),o=r(5792);function s(t,e,r){return new n.Struct({...t,coercer:(i,o)=>(0,n.is)(i,e)?t.coercer(r(i,o),o):t.coercer(i,o)})}e.coerce=s,e.defaulted=function(t,e,r={}){return s(t,(0,o.unknown)(),(t=>{const n=\"function\"==typeof e?e():e;if(void 0===t)return n;if(!r.strict&&(0,i.isPlainObject)(t)&&(0,i.isPlainObject)(n)){const e={...t};let r=!1;for(const t in n)void 0===e[t]&&(e[t]=n[t],r=!0);if(r)return e}return t}))},e.trimmed=function(t){return s(t,(0,o.string)(),(t=>t.trim()))}},13675:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.refine=e.size=e.pattern=e.nonempty=e.min=e.max=e.empty=void 0;const n=r(69695),i=r(19595);function o(t){return t instanceof Map||t instanceof Set?t.size:t.length}function s(t,e,r){return new n.Struct({...t,*refiner(n,o){yield*t.refiner(n,o);const s=r(n,o),a=(0,i.toFailures)(s,o,t,n);for(const t of a)yield{...t,refinement:e}}})}e.empty=function(t){return s(t,\"empty\",(e=>{const r=o(e);return 0===r||`Expected an empty ${t.type} but received one with a size of \\`${r}\\``}))},e.max=function(t,e,r={}){const{exclusive:n}=r;return s(t,\"max\",(r=>n?r\u003Ce:r\u003C=e||`Expected a ${t.type} less than ${n?\"\":\"or equal to \"}${e} but received \\`${r}\\``))},e.min=function(t,e,r={}){const{exclusive:n}=r;return s(t,\"min\",(r=>n?r>e:r>=e||`Expected a ${t.type} greater than ${n?\"\":\"or equal to \"}${e} but received \\`${r}\\``))},e.nonempty=function(t){return s(t,\"nonempty\",(e=>o(e)>0||`Expected a nonempty ${t.type} but received an empty one`))},e.pattern=function(t,e){return s(t,\"pattern\",(r=>e.test(r)||`Expected a ${t.type} matching \\`/${e.source}/\\` but received \"${r}\"`))},e.size=function(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \\`${e}\\``:`between \\`${e}\\` and \\`${r}\\``;return s(t,\"size\",(t=>{if(\"number\"==typeof t||t instanceof Date)return e\u003C=t&&t\u003C=r||`${n} ${i} but received \\`${t}\\``;if(t instanceof Map||t instanceof Set){const{size:o}=t;return e\u003C=o&&o\u003C=r||`${n} with a size ${i} but received one with a size of \\`${o}\\``}const{length:o}=t;return e\u003C=o&&o\u003C=r||`${n} with a length ${i} but received one with a length of \\`${o}\\``}))},e.refine=s},5792:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.unknown=e.union=e.type=e.tuple=e.string=e.set=e.regexp=e.record=e.optional=e.object=e.number=e.nullable=e.never=e.map=e.literal=e.intersection=e.integer=e.instance=e.func=e.enums=e.date=e.boolean=e.bigint=e.array=e.any=void 0;const n=r(69695),i=r(19595),o=r(32712);function s(){return(0,o.define)(\"never\",(()=>!1))}e.any=function(){return(0,o.define)(\"any\",(()=>!0))},e.array=function(t){return new n.Struct({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${(0,i.print)(t)}`})},e.bigint=function(){return(0,o.define)(\"bigint\",(t=>\"bigint\"==typeof t))},e.boolean=function(){return(0,o.define)(\"boolean\",(t=>\"boolean\"==typeof t))},e.date=function(){return(0,o.define)(\"date\",(t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \\`Date\\` object, but received: ${(0,i.print)(t)}`))},e.enums=function(t){const e={},r=t.map((t=>(0,i.print)(t))).join();for(const r of t)e[r]=r;return new n.Struct({type:\"enums\",schema:e,validator:e=>t.includes(e)||`Expected one of \\`${r}\\`, but received: ${(0,i.print)(e)}`})},e.func=function(){return(0,o.define)(\"func\",(t=>\"function\"==typeof t||`Expected a function, but received: ${(0,i.print)(t)}`))},e.instance=function(t){return(0,o.define)(\"instance\",(e=>e instanceof t||`Expected a \\`${t.name}\\` instance, but received: ${(0,i.print)(e)}`))},e.integer=function(){return(0,o.define)(\"integer\",(t=>\"number\"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${(0,i.print)(t)}`))},e.intersection=function(t){return new n.Struct({type:\"intersection\",schema:null,*entries(e,r){for(const{entries:n}of t)yield*n(e,r)},*validator(e,r){for(const{validator:n}of t)yield*n(e,r)},*refiner(e,r){for(const{refiner:n}of t)yield*n(e,r)}})},e.literal=function(t){const e=(0,i.print)(t),r=typeof t;return new n.Struct({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?t:null,validator:r=>r===t||`Expected the literal \\`${e}\\`, but received: ${(0,i.print)(r)}`})},e.map=function(t,e){return new n.Struct({type:\"map\",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer:t=>t instanceof Map?new Map(t):t,validator:t=>t instanceof Map||`Expected a \\`Map\\` object, but received: ${(0,i.print)(t)}`})},e.never=s,e.nullable=function(t){return new n.Struct({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})},e.number=function(){return(0,o.define)(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||`Expected a number, but received: ${(0,i.print)(t)}`))},e.object=function(t){const e=t?Object.keys(t):[],r=s();return new n.Struct({type:\"object\",schema:t??null,*entries(n){if(t&&(0,i.isObject)(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`,coercer:t=>(0,i.isObject)(t)?{...t}:t})},e.optional=function(t){return new n.Struct({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})},e.record=function(t,e){return new n.Struct({type:\"record\",schema:null,*entries(r){if((0,i.isObject)(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`})},e.regexp=function(){return(0,o.define)(\"regexp\",(t=>t instanceof RegExp))},e.set=function(t){return new n.Struct({type:\"set\",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer:t=>t instanceof Set?new Set(t):t,validator:t=>t instanceof Set||`Expected a \\`Set\\` object, but received: ${(0,i.print)(t)}`})},e.string=function(){return(0,o.define)(\"string\",(t=>\"string\"==typeof t||`Expected a string, but received: ${(0,i.print)(t)}`))},e.tuple=function(t){const e=s();return new n.Struct({type:\"tuple\",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i\u003Cn;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${(0,i.print)(t)}`})},e.type=function(t){const e=Object.keys(t);return new n.Struct({type:\"type\",schema:t,*entries(r){if((0,i.isObject)(r))for(const n of e)yield[n,r[n],t[n]]},validator:t=>(0,i.isObject)(t)||`Expected an object, but received: ${(0,i.print)(t)}`,coercer:t=>(0,i.isObject)(t)?{...t}:t})},e.union=function(t){const e=t.map((t=>t.type)).join(\" | \");return new n.Struct({type:\"union\",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const o=[];for(const e of t){const[...t]=(0,i.run)(r,e,n),[s]=t;if(!s?.[0])return[];for(const[e]of t)e&&o.push(e)}return[`Expected the value to satisfy a union of \\`${e}\\`, but received: ${(0,i.print)(r)}`,...o]}})},e.unknown=function(){return(0,o.define)(\"unknown\",(()=>!0))}},32712:(t,e,r)=>{\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.pick=e.partial=e.omit=e.lazy=e.dynamic=e.deprecated=e.define=e.assign=void 0;const n=r(69695),i=r(5792);e.assign=function(...t){const e=\"type\"===t[0]?.type,r=t.map((({schema:t})=>t)),n=Object.assign({},...r);return e?(0,i.type)(n):(0,i.object)(n)},e.define=function(t,e){return new n.Struct({type:t,schema:null,validator:e})},e.deprecated=function(t,e){return new n.Struct({...t,refiner:(e,r)=>void 0===e||t.refiner(e,r),validator:(r,n)=>void 0===r||(e(r,n),t.validator(r,n))})},e.dynamic=function(t){return new n.Struct({type:\"dynamic\",schema:null,*entries(e,r){const n=t(e,r);yield*n.entries(e,r)},validator:(e,r)=>t(e,r).validator(e,r),coercer:(e,r)=>t(e,r).coercer(e,r),refiner:(e,r)=>t(e,r).refiner(e,r)})},e.lazy=function(t){let e;return new n.Struct({type:\"lazy\",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})},e.omit=function(t,e){const{schema:r}=t,n={...r};for(const t of e)delete n[t];return\"type\"===t.type?(0,i.type)(n):(0,i.object)(n)},e.partial=function(t){const e=t instanceof n.Struct,r=e?{...t.schema}:{...t};for(const t in r)r[t]=(0,i.optional)(r[t]);return e&&\"type\"===t.type?(0,i.type)(r):(0,i.object)(r)},e.pick=function(t,e){const{schema:r}=t,n={};for(const t of e)n[t]=r[t];return\"type\"===t.type?(0,i.type)(n):(0,i.object)(n)}},19595:(t,e)=>{\"use strict\";function r(t){return\"object\"==typeof t&&null!==t}function n(t){return\"symbol\"==typeof t?t.toString():\"string\"==typeof t?JSON.stringify(t):`${t}`}function i(t,e,r,i){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:o,branch:s}=e,{type:a}=r,{refinement:u,message:h=`Expected a value of type \\`${a}\\`${u?` with refinement \\`${u}\\``:\"\"}, but received: \\`${n(i)}\\``}=t;return{value:i,type:a,refinement:u,key:o[o.length-1],path:o,branch:s,...t,message:h}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.run=e.toFailures=e.toFailure=e.shiftIterator=e.print=e.isPlainObject=e.isObject=void 0,e.isObject=r,e.isPlainObject=function(t){if(\"[object Object]\"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype},e.print=n,e.shiftIterator=function(t){const{done:e,value:r}=t.next();return e?void 0:r},e.toFailure=i,e.toFailures=function*(t,e,n,o){(function(t){return r(t)&&\"function\"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const r of t){const t=i(r,e,n,o);t&&(yield t)}},e.run=function*t(e,n,i={}){const{path:o=[],branch:s=[e],coerce:a=!1,mask:u=!1}=i,h={path:o,branch:s};if(a&&(e=n.coercer(e,h),u&&\"type\"!==n.type&&r(n.schema)&&r(e)&&!Array.isArray(e)))for(const t in e)void 0===n.schema[t]&&delete e[t];let c=\"valid\";for(const t of n.validator(e,h))t.explanation=i.message,c=\"not_valid\",yield[t,void 0];for(let[f,l,d]of n.entries(e,h)){const n=t(l,d,{path:void 0===f?o:[...o,f],branch:void 0===f?s:[...s,l],coerce:a,mask:u,message:i.message});for(const t of n)t[0]?(c=null===t[0].refinement||void 0===t[0].refinement?\"not_valid\":\"not_refined\",yield[t[0],void 0]):a&&(l=t[1],void 0===f?e=l:e instanceof Map?e.set(f,l):e instanceof Set?e.add(l):r(e)&&(void 0!==l||f in e)&&(e[f]=l))}if(\"not_valid\"!==c)for(const t of n.refiner(e,h))t.explanation=i.message,c=\"not_refined\",yield[t,void 0];\"valid\"===c&&(yield[void 0,e])}},62191:(t,e,r)=>{\"use strict\";var n=r(35962),i=\"undefined\"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e\u003Cn.length;e++)\"function\"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},24579:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"goerli\",\"chainId\":5,\"networkId\":5,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"poa\",\"algorithm\":\"clique\",\"clique\":{\"period\":15,\"epoch\":30000}},\"comment\":\"Cross-client PoA test network\",\"url\":\"https://github.com/goerli/testnet\",\"genesis\":{\"timestamp\":\"0x5c51a607\",\"gasLimit\":10485760,\"difficulty\":1,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"spuriousDragon\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"byzantium\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"constantinople\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"petersburg\",\"block\":0,\"forkHash\":\"0xa3f5ab08\"},{\"name\":\"istanbul\",\"block\":1561651,\"forkHash\":\"0xc25efa5c\"},{\"name\":\"berlin\",\"block\":4460644,\"forkHash\":\"0x757a1c47\"},{\"name\":\"london\",\"block\":5062605,\"forkHash\":\"0xb8c6299d\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818\",\"name\":\"merge\",\"ttd\":\"10790000\",\"block\":7382819,\"forkHash\":\"0xb8c6299d\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1678832736\",\"forkHash\":\"0xf9843abf\"}],\"bootstrapNodes\":[{\"ip\":\"51.141.78.53\",\"port\":30303,\"id\":\"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a\",\"location\":\"\",\"comment\":\"Upstream bootnode 1\"},{\"ip\":\"13.93.54.137\",\"port\":30303,\"id\":\"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b\",\"location\":\"\",\"comment\":\"Upstream bootnode 2\"},{\"ip\":\"94.237.54.114\",\"port\":30313,\"id\":\"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291\",\"location\":\"\",\"comment\":\"Upstream bootnode 3\"},{\"ip\":\"18.218.250.66\",\"port\":30313,\"id\":\"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949\",\"location\":\"\",\"comment\":\"Upstream bootnode 4\"},{\"ip\":\"3.11.147.67\",\"port\":30303,\"id\":\"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91\",\"location\":\"\",\"comment\":\"Ethereum Foundation bootnode\"},{\"ip\":\"51.15.116.226\",\"port\":30303,\"id\":\"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"},{\"ip\":\"51.15.119.157\",\"port\":30303,\"id\":\"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"},{\"ip\":\"51.15.119.157\",\"port\":40303,\"id\":\"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd\",\"location\":\"\",\"comment\":\"Goerli Initiative bootnode\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net\"]}')},73192:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"mainnet\",\"chainId\":1,\"networkId\":1,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"The Ethereum main chain\",\"url\":\"https://ethstats.net/\",\"genesis\":{\"gasLimit\":5000,\"difficulty\":17179869184,\"nonce\":\"0x0000000000000042\",\"extraData\":\"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xfc64ec04\"},{\"name\":\"homestead\",\"block\":1150000,\"forkHash\":\"0x97c2c34c\"},{\"name\":\"dao\",\"block\":1920000,\"forkHash\":\"0x91d1f948\"},{\"name\":\"tangerineWhistle\",\"block\":2463000,\"forkHash\":\"0x7a64da13\"},{\"name\":\"spuriousDragon\",\"block\":2675000,\"forkHash\":\"0x3edd5b10\"},{\"name\":\"byzantium\",\"block\":4370000,\"forkHash\":\"0xa00bc324\"},{\"name\":\"constantinople\",\"block\":7280000,\"forkHash\":\"0x668db0af\"},{\"name\":\"petersburg\",\"block\":7280000,\"forkHash\":\"0x668db0af\"},{\"name\":\"istanbul\",\"block\":9069000,\"forkHash\":\"0x879d6e30\"},{\"name\":\"muirGlacier\",\"block\":9200000,\"forkHash\":\"0xe029e991\"},{\"name\":\"berlin\",\"block\":12244000,\"forkHash\":\"0x0eb440f6\"},{\"name\":\"london\",\"block\":12965000,\"forkHash\":\"0xb715077d\"},{\"name\":\"arrowGlacier\",\"block\":13773000,\"forkHash\":\"0x20c327fc\"},{\"name\":\"grayGlacier\",\"block\":15050000,\"forkHash\":\"0xf0afd0e3\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393\",\"name\":\"merge\",\"ttd\":\"58750000000000000000000\",\"block\":15537394,\"forkHash\":\"0xf0afd0e3\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1681338455\",\"forkHash\":\"0xdce96c2d\"}],\"bootstrapNodes\":[{\"ip\":\"18.138.108.67\",\"port\":30303,\"id\":\"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666\",\"location\":\"ap-southeast-1-001\",\"comment\":\"bootnode-aws-ap-southeast-1-001\"},{\"ip\":\"3.209.45.79\",\"port\":30303,\"id\":\"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de\",\"location\":\"us-east-1-001\",\"comment\":\"bootnode-aws-us-east-1-001\"},{\"ip\":\"65.108.70.101\",\"port\":30303,\"id\":\"2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc\",\"location\":\"eu-west-1-001\",\"comment\":\"bootnode-hetzner-hel\"},{\"ip\":\"157.90.35.166\",\"port\":30303,\"id\":\"4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052\",\"location\":\"eu-central-1-001\",\"comment\":\"bootnode-hetzner-fsn\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net\"]}')},14002:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"rinkeby\",\"chainId\":4,\"networkId\":4,\"defaultHardfork\":\"london\",\"consensus\":{\"type\":\"poa\",\"algorithm\":\"clique\",\"clique\":{\"period\":15,\"epoch\":30000}},\"comment\":\"PoA test network\",\"url\":\"https://www.rinkeby.io\",\"genesis\":{\"timestamp\":\"0x58ee40ba\",\"gasLimit\":4700000,\"difficulty\":1,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0x3b8e0691\"},{\"name\":\"homestead\",\"block\":1,\"forkHash\":\"0x60949295\"},{\"name\":\"tangerineWhistle\",\"block\":2,\"forkHash\":\"0x8bde40dd\"},{\"name\":\"spuriousDragon\",\"block\":3,\"forkHash\":\"0xcb3a64bb\"},{\"name\":\"byzantium\",\"block\":1035301,\"forkHash\":\"0x8d748b57\"},{\"name\":\"constantinople\",\"block\":3660663,\"forkHash\":\"0xe49cab14\"},{\"name\":\"petersburg\",\"block\":4321234,\"forkHash\":\"0xafec6b27\"},{\"name\":\"istanbul\",\"block\":5435345,\"forkHash\":\"0xcbdb8838\"},{\"name\":\"berlin\",\"block\":8290928,\"forkHash\":\"0x6910c8bd\"},{\"name\":\"london\",\"block\":8897988,\"forkHash\":\"0x8e29f2f3\"},{\"name\":\"merge\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"forkHash\":null}],\"bootstrapNodes\":[{\"ip\":\"52.169.42.101\",\"port\":30303,\"id\":\"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf\",\"location\":\"\",\"comment\":\"IE\"},{\"ip\":\"52.3.158.184\",\"port\":30303,\"id\":\"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8\",\"location\":\"\",\"comment\":\"INFURA\"},{\"ip\":\"159.89.28.211\",\"port\":30303,\"id\":\"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6\",\"location\":\"\",\"comment\":\"AKASHA\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net\"]}')},27623:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"ropsten\",\"chainId\":3,\"networkId\":3,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"PoW test network\",\"url\":\"https://github.com/ethereum/ropsten\",\"genesis\":{\"gasLimit\":16777216,\"difficulty\":1048576,\"nonce\":\"0x0000000000000042\",\"extraData\":\"0x3535353535353535353535353535353535353535353535353535353535353535\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0x30c7ddbc\"},{\"name\":\"spuriousDragon\",\"block\":10,\"forkHash\":\"0x63760190\"},{\"name\":\"byzantium\",\"block\":1700000,\"forkHash\":\"0x3ea159c7\"},{\"name\":\"constantinople\",\"block\":4230000,\"forkHash\":\"0x97b544f3\"},{\"name\":\"petersburg\",\"block\":4939394,\"forkHash\":\"0xd6e2149b\"},{\"name\":\"istanbul\",\"block\":6485846,\"forkHash\":\"0x4bc66396\"},{\"name\":\"muirGlacier\",\"block\":7117117,\"forkHash\":\"0x6727ef90\"},{\"name\":\"berlin\",\"block\":9812189,\"forkHash\":\"0xa157d377\"},{\"name\":\"london\",\"block\":10499401,\"forkHash\":\"0x7119b6b3\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge\",\"name\":\"merge\",\"ttd\":\"50000000000000000\",\"block\":null,\"forkHash\":\"0x7119b6b3\"},{\"name\":\"mergeForkIdTransition\",\"block\":null,\"forkHash\":null},{\"name\":\"shanghai\",\"block\":null,\"forkHash\":null}],\"bootstrapNodes\":[{\"ip\":\"52.176.7.10\",\"port\":30303,\"id\":\"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606\",\"location\":\"\",\"comment\":\"US-Azure geth\"},{\"ip\":\"52.176.100.77\",\"port\":30303,\"id\":\"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c\",\"location\":\"\",\"comment\":\"US-Azure parity\"},{\"ip\":\"52.232.243.152\",\"port\":30303,\"id\":\"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f\",\"location\":\"\",\"comment\":\"Parity\"},{\"ip\":\"192.81.208.223\",\"port\":30303,\"id\":\"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09\",\"location\":\"\",\"comment\":\"@gpip\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net\"]}')},86369:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"sepolia\",\"chainId\":11155111,\"networkId\":11155111,\"defaultHardfork\":\"merge\",\"consensus\":{\"type\":\"pow\",\"algorithm\":\"ethash\",\"ethash\":{}},\"comment\":\"PoW test network to replace Ropsten\",\"url\":\"https://github.com/ethereum/go-ethereum/pull/23730\",\"genesis\":{\"timestamp\":\"0x6159af19\",\"gasLimit\":30000000,\"difficulty\":131072,\"nonce\":\"0x0000000000000000\",\"extraData\":\"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521\"},\"hardforks\":[{\"name\":\"chainstart\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"homestead\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"tangerineWhistle\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"spuriousDragon\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"byzantium\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"constantinople\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"petersburg\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"istanbul\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"muirGlacier\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"berlin\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"london\",\"block\":0,\"forkHash\":\"0xfe3366e7\"},{\"//_comment\":\"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408\",\"name\":\"merge\",\"ttd\":\"17000000000000000\",\"block\":1450409,\"forkHash\":\"0xfe3366e7\"},{\"name\":\"mergeForkIdTransition\",\"block\":1735371,\"forkHash\":\"0xb96cbd13\"},{\"name\":\"shanghai\",\"block\":null,\"timestamp\":\"1677557088\",\"forkHash\":\"0xf7f9bc08\"}],\"bootstrapNodes\":[{\"ip\":\"18.168.182.86\",\"port\":30303,\"id\":\"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066\",\"location\":\"\",\"comment\":\"geth\"},{\"ip\":\"52.14.151.177\",\"port\":30303,\"id\":\"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7\",\"location\":\"\",\"comment\":\"besu\"},{\"ip\":\"165.22.196.173\",\"port\":30303,\"id\":\"ce970ad2e9daa9e14593de84a8b49da3d54ccfdf83cbc4fe519cb8b36b5918ed4eab087dedd4a62479b8d50756b492d5f762367c8d20329a7854ec01547568a6\",\"location\":\"\",\"comment\":\"EF\"},{\"ip\":\"65.108.95.67\",\"port\":30303,\"id\":\"075503b13ed736244896efcde2a992ec0b451357d46cb7a8132c0384721742597fc8f0d91bbb40bb52e7d6e66728d36a1fda09176294e4a30cfac55dcce26bc6\",\"location\":\"\",\"comment\":\"lodestar\"}],\"dnsNetworks\":[\"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net\"]}')},59765:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-1153\",\"number\":1153,\"comment\":\"Transient Storage\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1153\",\"status\":\"Review\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"tstore\":{\"v\":100,\"d\":\"Base fee of the TSTORE opcode\"},\"tload\":{\"v\":100,\"d\":\"Base fee of the TLOAD opcode\"}},\"vm\":{},\"pow\":{}}')},59659:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-1559\",\"number\":1559,\"comment\":\"Fee market change for ETH 1.0 chain\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1559\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[2930],\"gasConfig\":{\"baseFeeMaxChangeDenominator\":{\"v\":8,\"d\":\"Maximum base fee change denominator\"},\"elasticityMultiplier\":{\"v\":2,\"d\":\"Maximum block gas target elasticity\"},\"initialBaseFee\":{\"v\":1000000000,\"d\":\"Initial base fee on first EIP1559 block\"}},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},609:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2315\",\"number\":2315,\"comment\":\"Simple subroutines for the EVM\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2315\",\"status\":\"Draft\",\"minimumHardfork\":\"istanbul\",\"gasConfig\":{},\"gasPrices\":{\"beginsub\":{\"v\":2,\"d\":\"Base fee of the BEGINSUB opcode\"},\"returnsub\":{\"v\":5,\"d\":\"Base fee of the RETURNSUB opcode\"},\"jumpsub\":{\"v\":10,\"d\":\"Base fee of the JUMPSUB opcode\"}},\"vm\":{},\"pow\":{}}')},34335:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2537\",\"number\":2537,\"comment\":\"BLS12-381 precompiles\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2537\",\"status\":\"Draft\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{\"Bls12381G1AddGas\":{\"v\":600,\"d\":\"Gas cost of a single BLS12-381 G1 addition precompile-call\"},\"Bls12381G1MulGas\":{\"v\":12000,\"d\":\"Gas cost of a single BLS12-381 G1 multiplication precompile-call\"},\"Bls12381G2AddGas\":{\"v\":4500,\"d\":\"Gas cost of a single BLS12-381 G2 addition precompile-call\"},\"Bls12381G2MulGas\":{\"v\":55000,\"d\":\"Gas cost of a single BLS12-381 G2 multiplication precompile-call\"},\"Bls12381PairingBaseGas\":{\"v\":115000,\"d\":\"Base gas cost of BLS12-381 pairing check\"},\"Bls12381PairingPerPairGas\":{\"v\":23000,\"d\":\"Per-pair gas cost of BLS12-381 pairing check\"},\"Bls12381MapG1Gas\":{\"v\":5500,\"d\":\"Gas cost of BLS12-381 map field element to G1\"},\"Bls12381MapG2Gas\":{\"v\":110000,\"d\":\"Gas cost of BLS12-381 map field element to G2\"},\"Bls12381MultiExpGasDiscount\":{\"v\":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],\"d\":\"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair\"}},\"vm\":{},\"pow\":{}}')},40354:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2565\",\"number\":2565,\"comment\":\"ModExp gas cost\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2565\",\"status\":\"Final\",\"minimumHardfork\":\"byzantium\",\"gasConfig\":{},\"gasPrices\":{\"modexpGquaddivisor\":{\"v\":3,\"d\":\"Gquaddivisor from modexp precompile for gas calculation\"}},\"vm\":{},\"pow\":{}}')},43928:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2718\",\"comment\":\"Typed Transaction Envelope\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2718\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},10810:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2�����929\",\"comment\":\"Gas cost increases for state access opcodes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2929\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"gasConfig\":{},\"gasPrices\":{\"coldsload\":{\"v\":2100,\"d\":\"Gas cost of the first read of storage from a given location (per transaction)\"},\"coldaccountaccess\":{\"v\":2600,\"d\":\"Gas cost of the first read of a given address (per transaction)\"},\"warmstorageread\":{\"v\":100,\"d\":\"Gas cost of reading storage locations which have already loaded \\'cold\\'\"},\"sstoreCleanGasEIP2200\":{\"v\":2900,\"d\":\"Once per SSTORE operation from clean non-zero to something else\"},\"sstoreNoopGasEIP2200\":{\"v\":100,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"sstoreDirtyGasEIP2200\":{\"v\":100,\"d\":\"Once per SSTORE operation if a dirty value is changed\"},\"sstoreInitRefundEIP2200\":{\"v\":19900,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"sstoreCleanRefundEIP2200\":{\"v\":4900,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"call\":{\"v\":0,\"d\":\"Base fee of the CALL opcode\"},\"callcode\":{\"v\":0,\"d\":\"Base fee of the CALLCODE opcode\"},\"delegatecall\":{\"v\":0,\"d\":\"Base fee of the DELEGATECALL opcode\"},\"staticcall\":{\"v\":0,\"d\":\"Base fee of the STATICCALL opcode\"},\"balance\":{\"v\":0,\"d\":\"Base fee of the BALANCE opcode\"},\"extcodesize\":{\"v\":0,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":0,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"extcodehash\":{\"v\":0,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"sload\":{\"v\":0,\"d\":\"Base fee of the SLOAD opcode\"},\"sstore\":{\"v\":0,\"d\":\"Base fee of the SSTORE opcode\"}},\"vm\":{},\"pow\":{}}')},33501:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-2930\",\"comment\":\"Optional access lists\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2930\",\"status\":\"Final\",\"minimumHardfork\":\"istanbul\",\"requiredEIPs\":[2718,2929],\"gasConfig\":{},\"gasPrices\":{\"accessListStorageKeyCost\":{\"v\":1900,\"d\":\"Gas cost per storage key in an Access List transaction\"},\"accessListAddressCost\":{\"v\":2400,\"d\":\"Gas cost per storage key in an Access List transaction\"}},\"vm\":{},\"pow\":{}}')},96973:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3074\",\"number\":3074,\"comment\":\"AUTH and AUTHCALL opcodes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3074\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{\"auth\":{\"v\":3100,\"d\":\"Gas cost of the AUTH opcode\"},\"authcall\":{\"v\":0,\"d\":\"Gas cost of the AUTHCALL opcode\"},\"authcallValueTransfer\":{\"v\":6700,\"d\":\"Paid for CALL when the value transfer is non-zero\"}},\"vm\":{},\"pow\":{}}')},24984:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3198\",\"number\":3198,\"comment\":\"BASEFEE opcode\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3198\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{\"basefee\":{\"v\":2,\"d\":\"Gas cost of the BASEFEE opcode\"}},\"vm\":{},\"pow\":{}}')},3573:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3529\",\"comment\":\"Reduction in refunds\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3529\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[2929],\"gasConfig\":{\"maxRefundQuotient\":{\"v\":5,\"d\":\"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)\"}},\"gasPrices\":{\"selfdestructRefund\":{\"v\":0,\"d\":\"Refunded following a selfdestruct operation\"},\"sstoreClearRefundEIP2200\":{\"v\":4800,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"}},\"vm\":{},\"pow\":{}}')},36685:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3540\",\"number\":3540,\"comment\":\"EVM Object Format (EOF) v1\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3540\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[3541],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},96309:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3541\",\"comment\":\"Reject new contracts starting with the 0xEF byte\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3541\",\"status\":\"Final\",\"minimumHardfork\":\"berlin\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},93609:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3554\",\"comment\":\"Reduction in refunds\",\"url\":\"Difficulty Bomb Delay to December 1st 2021\",\"status\":\"Final\",\"minimumHardfork\":\"muirGlacier\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":9500000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},4204:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3607\",\"number\":3607,\"comment\":\"Reject transactions from senders with deployed code\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3607\",\"status\":\"Final\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},69727:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3651\",\"number\":3198,\"comment\":\"Warm COINBASE\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3651\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[2929],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},18038:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3670\",\"number\":3670,\"comment\":\"EOF - Code Validation\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3670\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[3540],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},33021:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3675\",\"number\":3675,\"comment\":\"Upgrade consensus to Proof-of-Stake\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3675\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},94222:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3855\",\"number\":3855,\"comment\":\"PUSH0 instruction\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3855\",\"status\":\"Review\",\"minimumHardfork\":\"chainstart\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"push0\":{\"v\":2,\"d\":\"Base fee of the PUSH0 opcode\"}},\"vm\":{},\"pow\":{}}')},54359:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-3860\",\"number\":3860,\"comment\":\"Limit and meter initcode\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3860\",\"status\":\"Review\",\"minimumHardfork\":\"spuriousDragon\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{\"initCodeWordCost\":{\"v\":2,\"d\":\"Gas to pay for each word (32 bytes) of initcode when creating a contract\"}},\"vm\":{\"maxInitCodeSize\":{\"v\":49152,\"d\":\"Maximum length of initialization code when creating a contract\"}},\"pow\":{}}')},58444:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4345\",\"number\":4345,\"comment\":\"Difficulty Bomb Delay to June 2022\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4345\",\"status\":\"Final\",\"minimumHardfork\":\"london\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":10700000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},46401:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4399\",\"number\":4399,\"comment\":\"Supplant DIFFICULTY opcode with PREVRANDAO\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4399\",\"status\":\"Review\",\"minimumHardfork\":\"london\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},51200:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4844\",\"number\":4844,\"comment\":\"Shard Blob Transactions\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4844\",\"status\":\"Draft\",\"minimumHardfork\":\"merge\",\"requiredEIPs\":[1559,2718,2930,4895],\"gasConfig\":{\"dataGasPerBlob\":{\"v\":131072,\"d\":\"The base fee for data gas per blob\"},\"targetDataGasPerBlock\":{\"v\":262144,\"d\":\"The target data gas consumed per block\"},\"maxDataGasPerBlock\":{\"v\":524288,\"d\":\"The max data gas allowable per block\"},\"dataGasPriceUpdateFraction\":{\"v\":2225652,\"d\":\"The denominator used in the exponential when calculating a data gas price\"}},\"gasPrices\":{\"simpleGasPerBlob\":{\"v\":12000,\"d\":\"The basic gas fee for each blob\"},\"minDataGasPrice\":{\"v\":1,\"d\":\"The minimum fee per data gas\"},\"kzgPointEvaluationGasPrecompilePrice\":{\"v\":50000,\"d\":\"The fee associated with the point evaluation precompile\"},\"datahash\":{\"v\":3,\"d\":\"Base fee of the DATAHASH opcode\"}},\"sharding\":{\"blobCommitmentVersionKzg\":{\"v\":1,\"d\":\"The number indicated a versioned hash is a KZG commitment\"},\"fieldElementsPerBlob\":{\"v\":4096,\"d\":\"The number of field elements allowed per blob\"}},\"vm\":{},\"pow\":{}}')},3122:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-4895\",\"number\":4895,\"comment\":\"Beacon chain push withdrawals as operations\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4895\",\"status\":\"Review\",\"minimumHardfork\":\"merge\",\"requiredEIPs\":[],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},29694:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"EIP-5133\",\"number\":5133,\"comment\":\"Delaying Difficulty Bomb to mid-September 2022\",\"url\":\"https://eips.ethereum.org/EIPS/eip-5133\",\"status\":\"Draft\",\"minimumHardfork\":\"grayGlacier\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":11400000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},98874:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"arrowGlacier\",\"comment\":\"HF to delay the difficulty bomb\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md\",\"status\":\"Final\",\"eips\":[4345],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},45515:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"berlin\",\"comment\":\"HF targeted for July 2020 following the Muir Glacier HF\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2070\",\"status\":\"Final\",\"eips\":[2565,2929,2718,2930]}')},21773:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"byzantium\",\"comment\":\"Hardfork with new precompiles, instructions and other protocol changes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-609\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"modexpGquaddivisor\":{\"v\":20,\"d\":\"Gquaddivisor from modexp precompile for gas calculation\"},\"ecAdd\":{\"v\":500,\"d\":\"Gas costs for curve addition precompile\"},\"ecMul\":{\"v\":40000,\"d\":\"Gas costs for curve multiplication precompile\"},\"ecPairing\":{\"v\":100000,\"d\":\"Base gas costs for curve pairing precompile\"},\"ecPairingWord\":{\"v\":80000,\"d\":\"Gas costs regarding curve pairing precompile input length\"},\"revert\":{\"v\":0,\"d\":\"Base fee of the REVERT opcode\"},\"staticcall\":{\"v\":700,\"d\":\"Base fee of the STATICCALL opcode\"},\"returndatasize\":{\"v\":2,\"d\":\"Base fee of the RETURNDATASIZE opcode\"},\"returndatacopy\":{\"v\":3,\"d\":\"Base fee of the RETURNDATACOPY opcode\"}},\"vm\":{},\"pow\":{\"minerReward\":{\"v\":\"3000000000000000000\",\"d\":\"the amount a miner get rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":3000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},80021:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"chainstart\",\"comment\":\"Start of the Ethereum main chain\",\"url\":\"\",\"status\":\"\",\"gasConfig\":{\"minGasLimit\":{\"v\":5000,\"d\":\"Minimum the gas limit may ever be\"},\"gasLimitBoundDivisor\":{\"v\":1024,\"d\":\"The bound divisor of the gas limit, used in update calculations\"},\"maxRefundQuotient\":{\"v\":2,\"d\":\"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)\"}},\"gasPrices\":{\"base\":{\"v\":2,\"d\":\"Gas base cost, used e.g. for ChainID opcode (Istanbul)\"},\"tierStep\":{\"v\":[0,2,3,5,8,10,20],\"d\":\"Once per operation, for a selection of them\"},\"exp\":{\"v\":10,\"d\":\"Base fee of the EXP opcode\"},\"expByte\":{\"v\":10,\"d\":\"Times ceil(log256(exponent)) for the EXP instruction\"},\"sha3\":{\"v\":30,\"d\":\"Base fee of the SHA3 opcode\"},\"sha3Word\":{\"v\":6,\"d\":\"Once per word of the SHA3 operation\\'s data\"},\"sload\":{\"v\":50,\"d\":\"Base fee of the SLOAD opcode\"},\"sstoreSet\":{\"v\":20000,\"d\":\"Once per SSTORE operation if the zeroness changes from zero\"},\"sstoreReset\":{\"v\":5000,\"d\":\"Once per SSTORE operation if the zeroness does not change from zero\"},\"sstoreRefund\":{\"v\":15000,\"d\":\"Once per SSTORE operation if the zeroness changes to zero\"},\"jumpdest\":{\"v\":1,\"d\":\"Base fee of the JUMPDEST opcode\"},\"log\":{\"v\":375,\"d\":\"Base fee of the LOG opcode\"},\"logData\":{\"v\":8,\"d\":\"Per byte in a LOG* operation\\'s data\"},\"logTopic\":{\"v\":375,\"d\":\"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas\"},\"create\":{\"v\":32000,\"d\":\"Base fee of the CREATE opcode\"},\"call\":{\"v\":40,\"d\":\"Base fee of the CALL opcode\"},\"callStipend\":{\"v\":2300,\"d\":\"Free gas given at beginning of call\"},\"callValueTransfer\":{\"v\":9000,\"d\":\"Paid for CALL when the value transfor is non-zero\"},\"callNewAccount\":{\"v\":25000,\"d\":\"Paid for CALL when the destination address didn\\'t exist prior\"},\"selfdestructRefund\":{\"v\":24000,\"d\":\"Refunded following a selfdestruct operation\"},\"memory\":{\"v\":3,\"d\":\"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL\"},\"quadCoeffDiv\":{\"v\":512,\"d\":\"Divisor for the quadratic particle of the memory cost equation\"},\"createData\":{\"v\":200,\"d\":\"\"},\"tx\":{\"v\":21000,\"d\":\"Per transaction. NOTE: Not payable on data of calls between transactions\"},\"txCreation\":{\"v\":32000,\"d\":\"The cost of creating a contract via tx\"},\"txDataZero\":{\"v\":4,\"d\":\"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions\"},\"txDataNonZero\":{\"v\":68,\"d\":\"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions\"},\"copy\":{\"v\":3,\"d\":\"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added\"},\"ecRecover\":{\"v\":3000,\"d\":\"\"},\"sha256\":{\"v\":60,\"d\":\"\"},\"sha256Word\":{\"v\":12,\"d\":\"\"},\"ripemd160\":{\"v\":600,\"d\":\"\"},\"ripemd160Word\":{\"v\":120,\"d\":\"\"},\"identity\":{\"v\":15,\"d\":\"\"},\"identityWord\":{\"v\":3,\"d\":\"\"},\"stop\":{\"v\":0,\"d\":\"Base fee of the STOP opcode\"},\"add\":{\"v\":3,\"d\":\"Base fee of the ADD opcode\"},\"mul\":{\"v\":5,\"d\":\"Base fee of the MUL opcode\"},\"sub\":{\"v\":3,\"d\":\"Base fee of the SUB opcode\"},\"div\":{\"v\":5,\"d\":\"Base fee of the DIV opcode\"},\"sdiv\":{\"v\":5,\"d\":\"Base fee of the SDIV opcode\"},\"mod\":{\"v\":5,\"d\":\"Base fee of the MOD opcode\"},\"smod\":{\"v\":5,\"d\":\"Base fee of the SMOD opcode\"},\"addmod\":{\"v\":8,\"d\":\"Base fee of the ADDMOD opcode\"},\"mulmod\":{\"v\":8,\"d\":\"Base fee of the MULMOD opcode\"},\"signextend\":{\"v\":5,\"d\":\"Base fee of the SIGNEXTEND opcode\"},\"lt\":{\"v\":3,\"d\":\"Base fee of the LT opcode\"},\"gt\":{\"v\":3,\"d\":\"Base fee of the GT opcode\"},\"slt\":{\"v\":3,\"d\":\"Base fee of the SLT opcode\"},\"sgt\":{\"v\":3,\"d\":\"Base fee of the SGT opcode\"},\"eq\":{\"v\":3,\"d\":\"Base fee of the EQ opcode\"},\"iszero\":{\"v\":3,\"d\":\"Base fee of the ISZERO opcode\"},\"and\":{\"v\":3,\"d\":\"Base fee of the AND opcode\"},\"or\":{\"v\":3,\"d\":\"Base fee of the OR opcode\"},\"xor\":{\"v\":3,\"d\":\"Base fee of the XOR opcode\"},\"not\":{\"v\":3,\"d\":\"Base fee of the NOT opcode\"},\"byte\":{\"v\":3,\"d\":\"Base fee of the BYTE opcode\"},\"address\":{\"v\":2,\"d\":\"Base fee of the ADDRESS opcode\"},\"balance\":{\"v\":20,\"d\":\"Base fee of the BALANCE opcode\"},\"origin\":{\"v\":2,\"d\":\"Base fee of the ORIGIN opcode\"},\"caller\":{\"v\":2,\"d\":\"Base fee of the CALLER opcode\"},\"callvalue\":{\"v\":2,\"d\":\"Base fee of the CALLVALUE opcode\"},\"calldataload\":{\"v\":3,\"d\":\"Base fee of the CALLDATALOAD opcode\"},\"calldatasize\":{\"v\":2,\"d\":\"Base fee of the CALLDATASIZE opcode\"},\"calldatacopy\":{\"v\":3,\"d\":\"Base fee of the CALLDATACOPY opcode\"},\"codesize\":{\"v\":2,\"d\":\"Base fee of the CODESIZE opcode\"},\"codecopy\":{\"v\":3,\"d\":\"Base fee of the CODECOPY opcode\"},\"gasprice\":{\"v\":2,\"d\":\"Base fee of the GASPRICE opcode\"},\"extcodesize\":{\"v\":20,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":20,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"blockhash\":{\"v\":20,\"d\":\"Base fee of the BLOCKHASH opcode\"},\"coinbase\":{\"v\":2,\"d\":\"Base fee of the COINBASE opcode\"},\"timestamp\":{\"v\":2,\"d\":\"Base fee of the TIMESTAMP opcode\"},\"number\":{\"v\":2,\"d\":\"Base fee of the NUMBER opcode\"},\"difficulty\":{\"v\":2,\"d\":\"Base fee of the DIFFICULTY opcode\"},\"gaslimit\":{\"v\":2,\"d\":\"Base fee of the GASLIMIT opcode\"},\"pop\":{\"v\":2,\"d\":\"Base fee of the POP opcode\"},\"mload\":{\"v\":3,\"d\":\"Base fee of the MLOAD opcode\"},\"mstore\":{\"v\":3,\"d\":\"Base fee of the MSTORE opcode\"},\"mstore8\":{\"v\":3,\"d\":\"Base fee of the MSTORE8 opcode\"},\"sstore\":{\"v\":0,\"d\":\"Base fee of the SSTORE opcode\"},\"jump\":{\"v\":8,\"d\":\"Base fee of the JUMP opcode\"},\"jumpi\":{\"v\":10,\"d\":\"Base fee of the JUMPI opcode\"},\"pc\":{\"v\":2,\"d\":\"Base fee of the PC opcode\"},\"msize\":{\"v\":2,\"d\":\"Base fee of the MSIZE opcode\"},\"gas\":{\"v\":2,\"d\":\"Base fee of the GAS opcode\"},\"push\":{\"v\":3,\"d\":\"Base fee of the PUSH opcode\"},\"dup\":{\"v\":3,\"d\":\"Base fee of the DUP opcode\"},\"swap\":{\"v\":3,\"d\":\"Base fee of the SWAP opcode\"},\"callcode\":{\"v\":40,\"d\":\"Base fee of the CALLCODE opcode\"},\"return\":{\"v\":0,\"d\":\"Base fee of the RETURN opcode\"},\"invalid\":{\"v\":0,\"d\":\"Base fee of the INVALID opcode\"},\"selfdestruct\":{\"v\":0,\"d\":\"Base fee of the SELFDESTRUCT opcode\"}},\"vm\":{\"stackLimit\":{\"v\":1024,\"d\":\"Maximum size of VM stack allowed\"},\"callCreateDepth\":{\"v\":1024,\"d\":\"Maximum depth of call/create stack\"},\"maxExtraDataSize\":{\"v\":32,\"d\":\"Maximum size extra data may be after Genesis\"}},\"pow\":{\"minimumDifficulty\":{\"v\":131072,\"d\":\"The minimum that the difficulty may ever be\"},\"difficultyBoundDivisor\":{\"v\":2048,\"d\":\"The bound divisor of the difficulty, used in the update calculations\"},\"durationLimit\":{\"v\":13,\"d\":\"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not\"},\"epochDuration\":{\"v\":30000,\"d\":\"Duration between proof-of-work epochs\"},\"timebombPeriod\":{\"v\":100000,\"d\":\"Exponential difficulty timebomb period\"},\"minerReward\":{\"v\":\"5000000000000000000\",\"d\":\"the amount a miner get rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":0,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},29517:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"constantinople\",\"comment\":\"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1013\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"netSstoreNoopGas\":{\"v\":200,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"netSstoreInitGas\":{\"v\":20000,\"d\":\"Once per SSTORE operation from clean zero\"},\"netSstoreCleanGas\":{\"v\":5000,\"d\":\"Once per SSTORE operation from clean non-zero\"},\"netSstoreDirtyGas\":{\"v\":200,\"d\":\"Once per SSTORE operation from dirty\"},\"netSstoreClearRefund\":{\"v\":15000,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"},\"netSstoreResetRefund\":{\"v\":4800,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"netSstoreResetClearRefund\":{\"v\":19800,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"shl\":{\"v\":3,\"d\":\"Base fee of the SHL opcode\"},\"shr\":{\"v\":3,\"d\":\"Base fee of the SHR opcode\"},\"sar\":{\"v\":3,\"d\":\"Base fee of the SAR opcode\"},\"extcodehash\":{\"v\":400,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"create2\":{\"v\":32000,\"d\":\"Base fee of the CREATE2 opcode\"}},\"vm\":{},\"pow\":{\"minerReward\":{\"v\":\"2000000000000000000\",\"d\":\"The amount a miner gets rewarded for mining a block\"},\"difficultyBombDelay\":{\"v\":5000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},75774:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"dao\",\"comment\":\"DAO rescue hardfork\",\"url\":\"https://eips.ethereum.org/EIPS/eip-779\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},13292:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"grayGlacier\",\"comment\":\"Delaying the difficulty bomb to Mid September 2022\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md\",\"status\":\"Draft\",\"eips\":[5133],\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{}}')},72001:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"homestead\",\"comment\":\"Homestead hardfork with protocol and network changes\",\"url\":\"https://eips.ethereum.org/EIPS/eip-606\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"delegatecall\":{\"v\":40,\"d\":\"Base fee of the DELEGATECALL opcode\"}},\"vm\":{},\"pow\":{}}')},23316:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"istanbul\",\"comment\":\"HF targeted for December 2019 following the Constantinople/Petersburg HF\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1679\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"blake2Round\":{\"v\":1,\"d\":\"Gas cost per round for the Blake2 F precompile\"},\"ecAdd\":{\"v\":150,\"d\":\"Gas costs for curve addition precompile\"},\"ecMul\":{\"v\":6000,\"d\":\"Gas costs for curve multiplication precompile\"},\"ecPairing\":{\"v\":45000,\"d\":\"Base gas costs for curve pairing precompile\"},\"ecPairingWord\":{\"v\":34000,\"d\":\"Gas costs regarding curve pairing precompile input length\"},\"txDataNonZero\":{\"v\":16,\"d\":\"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions\"},\"sstoreSentryGasEIP2200\":{\"v\":2300,\"d\":\"Minimum gas required to be present for an SSTORE call, not consumed\"},\"sstoreNoopGasEIP2200\":{\"v\":800,\"d\":\"Once per SSTORE operation if the value doesn\\'t change\"},\"sstoreDirtyGasEIP2200\":{\"v\":800,\"d\":\"Once per SSTORE operation if a dirty value is changed\"},\"sstoreInitGasEIP2200\":{\"v\":20000,\"d\":\"Once per SSTORE operation from clean zero to non-zero\"},\"sstoreInitRefundEIP2200\":{\"v\":19200,\"d\":\"Once per SSTORE operation for resetting to the original zero value\"},\"sstoreCleanGasEIP2200\":{\"v\":5000,\"d\":\"Once per SSTORE operation from clean non-zero to something else\"},\"sstoreCleanRefundEIP2200\":{\"v\":4200,\"d\":\"Once per SSTORE operation for resetting to the original non-zero value\"},\"sstoreClearRefundEIP2200\":{\"v\":15000,\"d\":\"Once per SSTORE operation for clearing an originally existing storage slot\"},\"balance\":{\"v\":700,\"d\":\"Base fee of the BALANCE opcode\"},\"extcodehash\":{\"v\":700,\"d\":\"Base fee of the EXTCODEHASH opcode\"},\"chainid\":{\"v\":2,\"d\":\"Base fee of the CHAINID opcode\"},\"selfbalance\":{\"v\":5,\"d\":\"Base fee of the SELFBALANCE opcode\"},\"sload\":{\"v\":800,\"d\":\"Base fee of the SLOAD opcode\"}},\"vm\":{},\"pow\":{}}')},46497:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"london\",\"comment\":\"HF targeted for July 2021 following the Berlin fork\",\"url\":\"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md\",\"status\":\"Final\",\"eips\":[1559,3198,3529,3541]}')},69024:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"merge\",\"comment\":\"Hardfork to upgrade the consensus mechanism to Proof-of-Stake\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md\",\"status\":\"Final\",\"consensus\":{\"type\":\"pos\",\"algorithm\":\"casper\",\"casper\":{}},\"eips\":[3675,4399]}')},76552:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"mergeForkIdTransition\",\"comment\":\"Pre-merge hardfork to fork off non-upgraded clients\",\"url\":\"https://eips.ethereum.org/EIPS/eip-3675\",\"status\":\"Draft\",\"eips\":[]}')},68288:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"muirGlacier\",\"comment\":\"HF to delay the difficulty bomb\",\"url\":\"https://eips.ethereum.org/EIPS/eip-2384\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{},\"vm\":{},\"pow\":{\"difficultyBombDelay\":{\"v\":9000000,\"d\":\"the amount of blocks to delay the difficulty bomb with\"}}}')},76694:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"petersburg\",\"comment\":\"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople\",\"url\":\"https://eips.ethereum.org/EIPS/eip-1716\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"netSstoreNoopGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreInitGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreCleanGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreDirtyGas\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreClearRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreResetRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"},\"netSstoreResetClearRefund\":{\"v\":null,\"d\":\"Removed along EIP-1283\"}},\"vm\":{},\"pow\":{}}')},23317:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"shanghai\",\"comment\":\"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode\",\"url\":\"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md\",\"status\":\"Final\",\"eips\":[3651,3855,3860,4895]}')},68870:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"shardingFork\",\"comment\":\"Internal hardfork to test proto-danksharding (do not use in production)\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4844\",\"status\":\"Experimental\",\"eips\":[4844]}')},40610:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"spuriousDragon\",\"comment\":\"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit\",\"url\":\"https://eips.ethereum.org/EIPS/eip-607\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"expByte\":{\"v\":50,\"d\":\"Times ceil(log256(exponent)) for the EXP instruction\"}},\"vm\":{\"maxCodeSize\":{\"v\":24576,\"d\":\"Maximum length of contract code\"}},\"pow\":{}}')},70116:t=>{\"use strict\";t.exports=JSON.parse('{\"name\":\"tangerineWhistle\",\"comment\":\"Hardfork with gas cost changes for IO-heavy operations\",\"url\":\"https://eips.ethereum.org/EIPS/eip-608\",\"status\":\"Final\",\"gasConfig\":{},\"gasPrices\":{\"sload\":{\"v\":200,\"d\":\"Once per SLOAD operation\"},\"call\":{\"v\":700,\"d\":\"Once per CALL operation & message call transaction\"},\"extcodesize\":{\"v\":700,\"d\":\"Base fee of the EXTCODESIZE opcode\"},\"extcodecopy\":{\"v\":700,\"d\":\"Base fee of the EXTCODECOPY opcode\"},\"balance\":{\"v\":400,\"d\":\"Base fee of the BALANCE opcode\"},\"delegatecall\":{\"v\":700,\"d\":\"Base fee of the DELEGATECALL opcode\"},\"callcode\":{\"v\":700,\"d\":\"Base fee of the CALLCODE opcode\"},\"selfdestruct\":{\"v\":5000,\"d\":\"Base fee of the SELFDESTRUCT opcode\"}},\"vm\":{},\"pow\":{}}')},49234:t=>{\"use strict\";t.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\"}}')},40026:t=>{\"use strict\";t.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\":��S�\"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\"}}')},39167:t=>{\"use strict\";t.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\"}')},23418:t=>{\"use strict\";t.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\"}}')},40763:t=>{\"use strict\";t.exports={i8:\"6.6.1\"}},68675:t=>{\"use strict\";t.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\"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};(()=>{\"use strict\";r.r(n),r.d(n,{handleGetConnectedAccounts:()=>eu,handleOnboarding:()=>ru,handleSetDevMode:()=>hu,onCronjob:()=>su,onHomePage:()=>uu,onKeyringRequest:()=>iu,onRpcRequest:()=>nu,onUserInput:()=>au});var t={};r.r(t),r.d(t,{gk:()=>jr,dQ:()=>Xr,ci:()=>zr,bytesToNumberBE:()=>qr,ty:()=>Gr,eV:()=>Zr,n$:()=>tn,ql:()=>Wr,hexToBytes:()=>Vr,_t:()=>Ur,tL:()=>Kr,S5:()=>Jr,FF:()=>rn});class e extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(\".\")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function i(t){return\"object\"==typeof t&&null!==t}function o(t){return\"symbol\"==typeof t?t.toString():\"string\"==typeof t?JSON.stringify(t):`${t}`}function s(t,e,r,n){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:i,branch:s}=e,{type:a}=r,{refinement:u,message:h=`Expected a value of type \\`${a}\\`${u?` with refinement \\`${u}\\``:\"\"}, but received: \\`${o(n)}\\``}=t;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:s,...t,message:h}}function*a(t,e,r,n){(function(t){return i(t)&&\"function\"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const i of t){const t=s(i,e,r,n);t&&(yield t)}}function*u(t,e,r={}){const{path:n=[],branch:o=[t],coerce:s=!1,mask:a=!1}=r,h={path:n,branch:o};if(s&&(t=e.coercer(t,h),a&&\"type\"!==e.type&&i(e.schema)&&i(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let c=\"valid\";for(const n of e.validator(t,h))n.explanation=r.message,c=\"not_valid\",yield[n,void 0];for(let[f,l,d]of e.entries(t,h)){const e=u(l,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,l],coerce:s,mask:a,message:r.message});for(const r of e)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?\"not_valid\":\"not_refined\",yield[r[0],void 0]):s&&(l=r[1],void 0===f?t=l:t instanceof Map?t.set(f,l):t instanceof Set?t.add(l):i(t)&&(void 0!==l||f in t)&&(t[f]=l))}if(\"not_valid\"!==c)for(const n of e.refiner(t,h))n.explanation=r.message,c=\"not_refined\",yield[n,void 0];\"valid\"===c&&(yield[void 0,t])}class h{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(t,e)=>a(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>a(i(t,e),e,this,t):()=>[]}assert(t,e){return c(t,this,e)}create(t,e){return f(t,this,e)}is(t){return l(t,this)}mask(t,e){return function(t,e,r){const n=d(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(t,this,e)}validate(t,e={}){return d(t,this,e)}}function c(t,e,r){const n=d(t,e,{message:r});if(n[0])throw n[0]}function f(t,e,r){const n=d(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function l(t,e){return!d(t,e)[0]}function d(t,r,n={}){const i=u(t,r,n),o=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(i);if(o[0]){return[new e(o[0],(function*(){for(const t of i)t[0]&&(yield t[0])})),void 0]}return[void 0,o[1]]}function p(t,e){return new h({type:t,schema:null,validator:e})}function m(t){let e;return new h({type:\"lazy\",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})}function g(){return p(\"any\",(()=>!0))}function y(t){return new h({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${o(t)}`})}function b(){return p(\"boolean\",(t=>\"boolean\"==typeof t))}function v(t){const e={},r=t.map((t=>o(t))).join();for(const r of t)e[r]=r;return new h({type:\"enums\",schema:e,validator:e=>t.includes(e)||`Expected one of \\`${r}\\`, but received: ${o(e)}`})}function w(){return p(\"integer\",(t=>\"number\"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${o(t)}`))}function M(t){const e=o(t),r=typeof t;return new h({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?t:null,validator:r=>r===t||`Expected the literal \\`${e}\\`, but received: ${o(r)}`})}function _(){return p(\"never\",(()=>!1))}function E(t){return new h({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function A(){return p(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||`Expected a number, but received: ${o(t)}`))}function S(t){const e=t?Object.keys(t):[],r=_();return new h({type:\"object\",schema:t??null,*entries(n){if(t&&i(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`,coercer:t=>i(t)?{...t}:t})}function x(t){return new h({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function B(t,e){return new h({type:\"record\",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>i(t)||`Expected an object, but received: ${o(t)}`})}function T(){return p(\"string\",(t=>\"string\"==typeof t||`Expected a string, but received: ${o(t)}`))}function I(t){const e=t.map((t=>t.type)).join(\" | \");return new h({type:\"union\",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=u(r,e,n),[o]=t;if(!o?.[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \\`${e}\\`, but received: ${o(r)}`,...i]}})}function k(){return p(\"unknown\",(()=>!0))}function P(t,e,r){return new h({...t,coercer:(n,i)=>l(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}const C=(t,e)=>Object.hasOwnProperty.call(t,e);var R;!function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(R=R||(R={}));function O(t){return function(t){return function(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}(t)&&\"string\"==typeof t.message?t.message:null==t?\"\":String(t)}(t).replace(/\\.$/u,\"\")}function L(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class N extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}const U=t=>S(t);function j({path:t,branch:e}){const r=t[t.length-1];return C(e[e.length-2],r)}function D(t){return new h({...t,type:`optional ${t.type}`,validator:(e,r)=>!j(r)||t.validator(e,r),refiner:(e,r)=>!j(r)||t.refiner(e,r)})}const z=I([M(null),b(),p(\"finite number\",(t=>l(t,A())&&Number.isFinite(t))),T(),y(m((()=>z))),B(T(),m((()=>z)))]),H=P(z,g(),(t=>(function(t,e,r=\"Assertion failed\",n=N){try{c(t,e)}catch(t){throw L(n,`${r}: ${O(t)}.`)}}(t,z),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e}))))));const F=M(\"2.0\"),$=E(I([A(),T()])),V=U({code:w(),message:T(),data:D(H),stack:D(T())}),q=I([B(T(),H),y(H)]);U({id:$,jsonrpc:F,method:T(),params:D(q)}),U({jsonrpc:F,method:T(),params:D(q)});S({id:$,jsonrpc:F,result:x(k()),error:x(V)});const G=U({id:$,jsonrpc:F,result:H}),K=U({id:$,jsonrpc:F,error:V});I([G,K]);function J(t){return S(t)}function W(t){return t.path[t.path.length-1]in t.branch[t.branch.length-2]}function Z(t){return new h({...t,validator:(e,r)=>!W(r)||t.validator(e,r),refiner:(e,r)=>!W(r)||t.refiner(e,r)})}function X(t,e){return p(t,(t=>\"string\"==typeof t&&e.test(t)))}const Y=X(\"UuidV4\",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),Q=p(\"Url\",(t=>{try{const e=new URL(t);return\"http:\"===e.protocol||\"https:\"===e.protocol}catch{return!1}})),tt=X(\"StringNumber\",/^\\d+(\\.\\d+)?$/u);var et,rt,nt;!function(t){t.Eoa=\"eip155:eoa\",t.Erc4337=\"eip155:erc4337\"}(et||(et={})),function(t){t.P2wpkh=\"bip122:p2wpkh\"}(rt||(rt={})),function(t){t.DataAccount=\"solana:data-account\"}(nt||(nt={}));const it=J({id:Y,type:v([`${et.Eoa}`,`${et.Erc4337}`,`${rt.P2wpkh}`,`${nt.DataAccount}`]),address:T(),options:B(T(),H),methods:y(T())}),ot=J({amount:tt,unit:T()}),st=X(\"CaipAssetType\",/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})$/u);X(\"CaipAssetId\",/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})\\/(?\u003CtokenId>[-.%a-zA-Z0-9]{1,78})$/u);B(T(),H);const at=J({id:Y,scope:T(),account:Y,request:J({method:T(),params:Z(I([y(H),B(T(),H)]))})});I([J({pending:M(!0),redirect:Z(J({message:Z(T()),url:Z(T())}))}),J({pending:M(!1),result:H})]);function ut(t,e){return ht(t,\"pattern\",(r=>e.test(r)||`Expected a ${t.type} matching \\`/${e.source}/\\` but received \"${r}\"`))}function ht(t,e,r){return new h({...t,*refiner(n,i){yield*t.refiner(n,i);const o=a(r(n,i),i,t,n);for(const t of o)yield{...t,refinement:e}}})}var ct=r(66534);const ft=ht(T(),\"BtcP2wpkhAddressStruct\",(t=>{try{ct.gW.decode(t)}catch(t){return new Error(`Could not decode P2WPKH address: ${t.message}`)}return!0}));var lt;!function(t){t.SendBitcoin=\"sendBitcoin\"}(lt||(lt={}));const dt=J({...it.schema,address:ft,type:M(`${rt.P2wpkh}`),methods:y(v([`${lt.SendBitcoin}`]))}),pt=X(\"EthBytes\",/^0x[0-9a-f]*$/iu),mt=X(\"EthAddress\",/^0x[0-9a-f]{40}$/iu),gt=X(\"EthUint256\",/^0x([1-9a-f][0-9a-f]*|0)$/iu);var yt;!function(t){t.PersonalSign=\"personal_sign\",t.Sign=\"eth_sign\",t.SignTransaction=\"eth_signTransaction\",t.SignTypedDataV1=\"eth_signTypedData_v1\",t.SignTypedDataV3=\"eth_signTypedData_v3\",t.SignTypedDataV4=\"eth_signTypedData_v4\",t.PrepareUserOperation=\"eth_prepareUserOperation\",t.PatchUserOperation=\"eth_patchUserOperation\",t.SignUserOperation=\"eth_signUserOperation\"}(yt||(yt={}));const bt=J({...it.schema,address:mt,type:M(`${et.Eoa}`),methods:y(v([`${yt.PersonalSign}`,`${yt.Sign}`,`${yt.SignTransaction}`,`${yt.SignTypedDataV1}`,`${yt.SignTypedDataV3}`,`${yt.SignTypedDataV4}`]))}),vt=J({...it.schema,address:mt,type:M(`${et.Erc4337}`),methods:y(v([`${yt.PersonalSign}`,`${yt.Sign}`,`${yt.SignTypedDataV1}`,`${yt.SignTypedDataV3}`,`${yt.SignTypedDataV4}`,`${yt.PrepareUserOperation}`,`${yt.PatchUserOperation}`,`${yt.SignUserOperation}`]))});J({sender:mt,nonce:gt,initCode:pt,callData:pt,callGasLimit:gt,verificationGasLimit:gt,preVerificationGas:gt,maxFeePerGas:gt,maxPriorityFeePerGas:gt,paymasterAndData:pt,signature:pt}),J({to:mt,value:gt,data:pt}),J({nonce:gt,initCode:pt,callData:pt,gasLimits:Z(J({callGasLimit:gt,verificationGasLimit:gt,preVerificationGas:gt})),dummyPaymasterAndData:pt,dummySignature:pt,bundlerUrl:Q}),J({paymasterAndData:pt,callGasLimit:Z(gt),verificationGasLimit:Z(gt),preVerificationGas:Z(gt)});const wt=X(\"SolAddress\",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var Mt;!function(t){t.SendAndConfirmTransaction=\"sendAndConfirmTransaction\"}(Mt||(Mt={}));const _t=J({...it.schema,address:wt,type:M(`${nt.DataAccount}`),methods:y(v([`${Mt.SendAndConfirmTransaction}`]))});var Et,At;!function(t){t.AccountCreated=\"notify:accountCreated\",t.AccountUpdated=\"notify:accountUpdated\",t.AccountDeleted=\"notify:accountDeleted\",t.RequestApproved=\"notify:requestApproved\",t.RequestRejected=\"notify:requestRejected\"}(Et||(Et={})),function(t){t.ListAccounts=\"keyring_listAccounts\",t.GetAccount=\"keyring_getAccount\",t.CreateAccount=\"keyring_createAccount\",t.GetAccountBalances=\"keyring_getAccountBalances\",t.FilterAccountChains=\"keyring_filterAccountChains\",t.UpdateAccount=\"keyring_updateAccount\",t.DeleteAccount=\"keyring_deleteAccount\",t.ExportAccount=\"keyring_exportAccount\",t.ListRequests=\"keyring_listRequests\",t.GetRequest=\"keyring_getRequest\",t.SubmitRequest=\"keyring_submitRequest\",t.ApproveRequest=\"keyring_approveRequest\",t.RejectRequest=\"keyring_rejectRequest\"}(At||(At={}));const St={jsonrpc:M(\"2.0\"),id:I([T(),A(),M(null)])},xt=J({...St,method:M(\"keyring_listAccounts\")}),Bt=(y(it),J({...St,method:M(\"keyring_getAccount\"),params:J({id:Y})})),Tt=J({...St,method:M(\"keyring_createAccount\"),params:J({options:B(T(),H)})}),It=J({...St,method:M(`${At.GetAccountBalances}`),params:J({id:Y,assets:y(st)})}),kt=(B(st,ot),J({...St,method:M(\"keyring_filterAccountChains\"),params:J({id:Y,chains:y(T())})})),Pt=(y(T()),J({...St,method:M(\"keyring_updateAccount\"),params:J({account:it})})),Ct=(M(null),J({...St,method:M(\"keyring_deleteAccount\"),params:J({id:Y})})),Rt=(M(null),J({...St,method:M(\"keyring_exportAccount\"),params:J({id:Y})})),Ot=J({...St,method:M(\"keyring_listRequests\")}),Lt=(y(at),J({...St,method:M(\"keyring_getRequest\"),params:J({id:Y})})),Nt=J({...St,method:M(\"keyring_submitRequest\"),params:at}),Ut=J({...St,method:M(\"keyring_approveRequest\"),params:J({id:Y,data:B(T(),H)})}),jt=(M(null),J({...St,method:M(\"keyring_rejectRequest\"),params:J({id:Y})})),Dt=(M(null),J({method:M(`${Et.AccountCreated}`),params:J({account:it,accountNameSuggestion:Z(T()),displayConfirmation:Z(b())})}),J({method:M(`${Et.AccountUpdated}`),params:J({account:it})}),J({method:M(`${Et.AccountDeleted}`),params:J({id:Y})}),J({method:M(`${Et.RequestApproved}`),params:J({id:Y,result:H})}),J({method:M(`${Et.RequestRejected}`),params:J({id:Y})}),J({metadata:J({name:T(),nameLastUpdatedAt:Z(A()),snap:Z(J({id:T(),enabled:b(),name:T()})),lastSelected:Z(A()),importTime:A(),keyring:J({type:T()})})})),zt=J({...bt.schema,...Dt.schema}),Ht=J({...vt.schema,...Dt.schema}),Ft=J({...dt.schema,...Dt.schema}),$t=J({..._t.schema,...Dt.schema}),Vt=(et.Eoa,et.Erc4337,rt.P2wpkh,nt.DataAccount,J({...it.schema,...Dt.schema}),J({jsonrpc:M(\"2.0\"),id:I([T(),A(),M(null)]),method:T(),params:Z(I([y(H),B(T(),H)]))})),qt={randomUUID:\"undefined\"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Kt=new Uint8Array(16);function Jt(){if(!Gt&&(Gt=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");return Gt(Kt)}const Wt=[];for(let t=0;t\u003C256;++t)Wt.push((t+256).toString(16).slice(1));function Zt(t,e=0){return Wt[t[e+0]]+Wt[t[e+1]]+Wt[t[e+2]]+Wt[t[e+3]]+\"-\"+Wt[t[e+4]]+Wt[t[e+5]]+\"-\"+Wt[t[e+6]]+Wt[t[e+7]]+\"-\"+Wt[t[e+8]]+Wt[t[e+9]]+\"-\"+Wt[t[e+10]]+Wt[t[e+11]]+Wt[t[e+12]]+Wt[t[e+13]]+Wt[t[e+14]]+Wt[t[e+15]]}const Xt=function(t,e,r){if(qt.randomUUID&&!e&&!t)return qt.randomUUID();const n=(t=t||{}).random||(t.rng||Jt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(let t=0;t\u003C16;++t)e[r+t]=n[t];return e}return Zt(n)};var Yt,Qt=function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};Yt=new WeakMap,new WeakSet;new WeakMap,new WeakMap;class te extends Error{constructor(t){super(`Method not supported: ${t}`)}}async function ee(t,e){try{return await async function(t,e){switch(c(e,Vt),e.method){case`${At.ListAccounts}`:return c(e,xt),t.listAccounts();case`${At.GetAccount}`:return c(e,Bt),t.getAccount(e.params.id);case`${At.CreateAccount}`:return c(e,Tt),t.createAccount(e.params.options);case`${At.GetAccountBalances}`:if(void 0===t.getAccountBalances)throw new te(e.method);return c(e,It),t.getAccountBalances(e.params.id,e.params.assets);case`${At.FilterAccountChains}`:return c(e,kt),t.filterAccountChains(e.params.id,e.params.chains);case`${At.UpdateAccount}`:return c(e,Pt),t.updateAccount(e.params.account);case`${At.DeleteAccount}`:return c(e,Ct),t.deleteAccount(e.params.id);case`${At.ExportAccount}`:if(void 0===t.exportAccount)throw new te(e.method);return c(e,Rt),t.exportAccount(e.params.id);case`${At.ListRequests}`:if(void 0===t.listRequests)throw new te(e.method);return c(e,Ot),t.listRequests();case`${At.GetRequest}`:if(void 0===t.getRequest)throw new te(e.method);return c(e,Lt),t.getRequest(e.params.id);case`${At.SubmitRequest}`:return c(e,Nt),t.submitRequest(e.params);case`${At.ApproveRequest}`:if(void 0===t.approveRequest)throw new te(e.method);return c(e,Ut),t.approveRequest(e.params.id,e.params.data);case`${At.RejectRequest}`:if(void 0===t.rejectRequest)throw new te(e.method);return c(e,jt),t.rejectRequest(e.params.id);default:throw new te(e.method)}}(t,e)}catch(t){const e=t instanceof Error&&\"string\"==typeof t.message?t.message:\"An unknown error occurred while handling the keyring request\";throw new Error(e)}}async function re(t,e,r){await t.request({method:\"snap_manageAccounts\",params:{method:e,params:{...r}}})}function ne(t){return Boolean(t)&&\"object\"==typeof t&&!Array.isArray(t)}const ie=(t,e)=>Object.hasOwnProperty.call(t,e);var oe;!function(t){t[t.Null=4]=\"Null\",t[t.Comma=1]=\"Comma\",t[t.Wrapper=1]=\"Wrapper\",t[t.True=4]=\"True\",t[t.False=5]=\"False\",t[t.Quote=1]=\"Quote\",t[t.Colon=1]=\"Colon\",t[t.Date=24]=\"Date\"}(oe=oe||(oe={}));var se=r(77847);function ae(t){return function(t){return function(t){return\"object\"==typeof t&&null!==t&&\"message\"in t}(t)&&\"string\"==typeof t.message?t.message:null==t?\"\":String(t)}(t).replace(/\\.$/u,\"\")}function ue(t,e){return r=t,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}class he extends Error{constructor(t){super(t.message),this.code=\"ERR_ASSERTION\"}}function ce(t,e=\"Assertion failed.\",r=he){if(!t){if(e instanceof Error)throw e;throw ue(r,e)}}const fe=t=>S(t);function le({path:t,branch:e}){const r=t[t.length-1];return ie(e[e.length-2],r)}function de(t){return new h({...t,type:`optional ${t.type}`,validator:(e,r)=>!le(r)||t.validator(e,r),refiner:(e,r)=>!le(r)||t.refiner(e,r)})}function pe(t){if(null===t||\"boolean\"==typeof t||\"string\"==typeof t)return!0;if(\"number\"==typeof t&&Number.isFinite(t))return!0;if(\"object\"==typeof t){let e=!0;if(Array.isArray(t)){for(let r=0;r\u003Ct.length;r++)if(!pe(t[r])){e=!1;break}return e}const r=Object.entries(t);for(let t=0;t\u003Cr.length;t++)if(\"string\"!=typeof r[t][0]||!pe(r[t][1])){e=!1;break}return e}return!1}const me=p(\"JSON\",(t=>pe(t))),ge=P(me,g(),(t=>(function(t,e,r=\"Assertion failed\",n=he){try{c(t,e)}catch(t){throw ue(n,`${r}: ${ae(t)}.`)}}(t,me),JSON.parse(JSON.stringify(t,((t,e)=>{if(\"__proto__\"!==t&&\"constructor\"!==t)return e}))))));function ye(t){try{return function(t){f(t,ge)}(t),!0}catch{return!1}}const be=M(\"2.0\"),ve=E(I([A(),T()])),we=fe({code:w(),message:T(),data:de(ge),stack:de(T())}),Me=I([B(T(),ge),y(ge)]);fe({id:ve,jsonrpc:be,method:T(),params:de(Me)}),fe({jsonrpc:be,method:T(),params:de(Me)});S({id:ve,jsonrpc:be,result:x(k()),error:x(we)});const _e=fe({id:ve,jsonrpc:be,result:ge}),Ee=fe({id:ve,jsonrpc:be,error:we});I([_e,Ee]);const Ae={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},Se={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},xe={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}},Be=Ae.internal,Te=\"Unspecified error message. This is a bug, please report it.\",Ie=(ke(Be),\"Unspecified server error.\");function ke(t,e=Te){if(function(t){return Number.isInteger(t)}(t)){const e=t.toString();if(ie(xe,e))return xe[e].message;if(function(t){return t>=-32099&&t\u003C=-32e3}(t))return Ie}return e}function Pe(t){return Array.isArray(t)?t.map((t=>ye(t)?t:ne(t)?Ce(t):null)):ne(t)?Ce(t):ye(t)?t:null}function Ce(t){return Object.getOwnPropertyNames(t).reduce(((e,r)=>{const n=t[r];return ye(n)&&(e[r]=n),e}),{})}const Re=function(t){return t?.__esModule?t.default:t}(se);class Oe extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('\"code\" must be an integer.');if(!e||\"string\"!=typeof e)throw new Error('\"message\" must be a non-empty string.');!function(t){return ne(t)&&ie(t,\"cause\")&&ne(t.cause)}(r)?super(e):(super(e,{cause:r.cause}),ie(this,\"cause\")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=t}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,function(t){if(\"object\"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}}(this.data)&&(t.data.cause=Pe(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return Re(this.serialize(),Ne,2)}}class Le extends Oe{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t\u003C=4999}(t))throw new Error('\"code\" must be an integer such that: 1000 \u003C= code \u003C= 4999');super(t,e,r)}}function Ne(t,e){if(\"[Circular]\"!==e)return e}const Ue=t=>Qe(Ae.parse,t),je=t=>Qe(Ae.invalidRequest,t),De=t=>Qe(Ae.invalidParams,t),ze=t=>Qe(Ae.methodNotFound,t),He=t=>Qe(Ae.internal,t),Fe=t=>Qe(Ae.invalidInput,t),$e=t=>Qe(Ae.resourceNotFound,t),Ve=t=>Qe(Ae.resourceUnavailable,t),qe=t=>Qe(Ae.transactionRejected,t),Ge=t=>Qe(Ae.methodNotSupported,t),Ke=t=>Qe(Ae.limitExceeded,t),Je=t=>tr(Se.userRejectedRequest,t),We=t=>tr(Se.unauthorized,t),Ze=t=>tr(Se.unsupportedMethod,t),Xe=t=>tr(Se.disconnected,t),Ye=t=>tr(Se.chainDisconnected,t);function Qe(t,e){const[r,n]=er(e);return new Oe(t,r??ke(t),n)}function tr(t,e){const[r,n]=er(e);return new Le(t,r??ke(t),n)}function er(t){if(t){if(\"string\"==typeof t)return[t];if(\"object\"==typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&\"string\"!=typeof e)throw new Error(\"Must specify string message.\");return[e??void 0,r]}}return[]}function rr(t){return ne(t)&&ie(t,\"data\")&&\"object\"==typeof t.data&&null!==t.data&&ye(t.data)&&!Array.isArray(t.data)?t.data:{}}var���X� nr,ir,or,sr,ar=function(t,e,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof e?t!==e||!i:!e.has(t))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(t,r):i?i.value=r:e.set(t,r),r},ur=function(t,e,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof e?t!==e||!n:!e.has(t))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(t):n?n.value:e.get(t)};class hr extends Error{constructor(t,e={}){const r=function(t){return ne(t)&&ie(t,\"message\")&&\"string\"==typeof t.message?t.message:String(t)}(t);super(r),nr.set(this,void 0),ir.set(this,void 0),or.set(this,void 0),sr.set(this,void 0),ar(this,ir,r,\"f\"),ar(this,nr,function(t){return ne(t)&&ie(t,\"code\")&&\"number\"==typeof t.code&&Number.isInteger(t.code)?t.code:-32603}(t),\"f\");const n={...rr(t),...e};Object.keys(n).length>0&&ar(this,or,n,\"f\"),ar(this,sr,super.stack,\"f\")}get name(){return\"SnapError\"}get code(){return ur(this,nr,\"f\")}get message(){return ur(this,ir,\"f\")}get data(){return ur(this,or,\"f\")}get stack(){return ur(this,sr,\"f\")}toJSON(){return{code:-31002,message:\"Snap Error\",data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function cr(t){return class extends hr{constructor(e,r){if(\"object\"==typeof e){const r=t();return void super({code:r.code,message:r.message,data:e})}const n=t(e);super({code:n.code,message:n.message,data:r})}}}nr=new WeakMap,ir=new WeakMap,or=new WeakMap,sr=new WeakMap;cr(He),cr(Fe),cr(De),cr(je),cr(Ke);const fr=cr(ze),lr=(cr(Ge),cr(Ue),cr($e),cr(Ve),cr(qe),cr(Ye),cr(Xe),cr(We)),dr=(cr(Ze),cr(Je),{dev:!1}),pr=dr;function mr(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function gr(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function yr(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");mr(t.outputLen),mr(t.blockLen)}function br(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function vr(t,e){gr(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const wr=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;const Mr=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_r=(t,e)=>t\u003C\u003C32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function Er(t){return\"string\"==typeof t&&(t=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),gr(t),t}class Ar{clone(){return this._cloneInto()}}function Sr(t=32){if(wr&&\"function\"==typeof wr.getRandomValues)return wr.getRandomValues(new Uint8Array(t));throw new Error(\"crypto.getRandomValues must be defined\")}const xr=(t,e,r)=>t&e^t&r^e&r;class Br extends Ar{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Mr(this.buffer)}update(t){br(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=Er(t)).length;for(let o=0;o\u003Ci;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=Mr(t);for(;n\u003C=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){br(this),vr(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t\u003Cn;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=Mr(t),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const u=a/4,h=this.get();if(u>h.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cu;t++)s.setUint32(4*t,h[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const Tr=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]),Ir=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),kr=new Uint32Array(64);class Pr extends Br{constructor(){super(64,32,8,!1),this.A=0|Ir[0],this.B=0|Ir[1],this.C=0|Ir[2],this.D=0|Ir[3],this.E=0|Ir[4],this.F=0|Ir[5],this.G=0|Ir[6],this.H=0|Ir[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r\u003C16;r++,e+=4)kr[r]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=kr[t-15],r=kr[t-2],n=_r(e,7)^_r(e,18)^e>>>3,i=_r(r,17)^_r(r,19)^r>>>10;kr[t]=i+kr[t-7]+n+kr[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:u,H:h}=this;for(let t=0;t\u003C64;t++){const e=h+(_r(s,6)^_r(s,11)^_r(s,25))+((c=s)&a^~c&u)+Tr[t]+kr[t]|0,f=(_r(r,2)^_r(r,13)^_r(r,22))+xr(r,n,i)|0;h=u,u=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+f|0}var c;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,n,i,o,s,a,u,h)}roundClean(){kr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Cr=function(t){const e=e=>t().update(Er(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}((()=>new Pr));class Rr extends Ar{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,yr(t);const r=Er(e);if(this.iHash=t.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t\u003Ci.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t\u003Ci.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return br(this),this.iHash.update(t),this}digestInto(t){br(this),gr(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Or=(t,e,r)=>new Rr(t,e).update(r).digest();Or.create=(t,e)=>new Rr(t,e);const Lr=BigInt(1),Nr=BigInt(2);function Ur(t){return t instanceof Uint8Array||null!=t&&\"object\"==typeof t&&\"Uint8Array\"===t.constructor.name}function jr(t){if(!Ur(t))throw new Error(\"Uint8Array expected\")}const Dr=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function zr(t){jr(t);let e=\"\";for(let r=0;r\u003Ct.length;r++)e+=Dr[t[r]];return e}function Hr(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);return BigInt(\"\"===t?\"0\":`0x${t}`)}const Fr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function $r(t){return t>=Fr._0&&t\u003C=Fr._9?t-Fr._0:t>=Fr._A&&t\u003C=Fr._F?t-(Fr._A-10):t>=Fr._a&&t\u003C=Fr._f?t-(Fr._a-10):void 0}function Vr(t){if(\"string\"!=typeof t)throw new Error(\"hex string expected, got \"+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+e);const n=new Uint8Array(r);for(let e=0,i=0;e\u003Cr;e++,i+=2){const r=$r(t.charCodeAt(i)),o=$r(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character \"'+e+'\" at index '+i)}n[e]=16*r+o}return n}function qr(t){return Hr(zr(t))}function Gr(t){return jr(t),Hr(zr(Uint8Array.from(t).reverse()))}function Kr(t,e){return Vr(t.toString(16).padStart(2*e,\"0\"))}function Jr(t,e){return Kr(t,e).reverse()}function Wr(t,e,r){let n;if(\"string\"==typeof e)try{n=Vr(e)}catch(r){throw new Error(`${t} must be valid hex string, got \"${e}\". Cause: ${r}`)}else{if(!Ur(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if(\"number\"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Zr(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];jr(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}const Xr=t=>(Nr\u003C\u003CBigInt(t-1))-Lr,Yr=t=>new Uint8Array(t),Qr=t=>Uint8Array.from(t);function tn(t,e,r){if(\"number\"!=typeof t||t\u003C2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof e||e\u003C2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=Yr(t),i=Yr(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),u=(t=Yr())=>{i=a(Qr([0]),t),n=a(),0!==t.length&&(i=a(Qr([1]),t),n=a())},h=()=>{if(o++>=1e3)throw new Error(\"drbg: tried 1000 values\");let t=0;const r=[];for(;t\u003Ce;){n=a();const e=n.slice();r.push(e),t+=n.length}return Zr(...r)};return(t,e)=>{let r;for(s(),u(t);!(r=e(h()));)u();return s(),r}}const en={bigint:t=>\"bigint\"==typeof t,function:t=>\"function\"==typeof t,boolean:t=>\"boolean\"==typeof t,string:t=>\"string\"==typeof t,stringOrUint8Array:t=>\"string\"==typeof t||Ur(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>\"function\"==typeof t&&Number.isSafeInteger(t.outputLen)};function rn(t,e,r={}){const n=(e,r,n)=>{const i=en[r];if(\"function\"!=typeof i)throw new Error(`Invalid validator \"${r}\", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t}const nn=BigInt(0),on=BigInt(1),sn=BigInt(2),an=BigInt(3),un=BigInt(4),hn=BigInt(5),cn=BigInt(8);BigInt(9),BigInt(16);function fn(t,e){const r=t%e;return r>=nn?r:e+r}function ln(t,e,r){if(r\u003C=nn||e\u003Cnn)throw new Error(\"Expected power/modulo > 0\");if(r===on)return nn;let n=on;for(;e>nn;)e&on&&(n=n*t%r),t=t*t%r,e>>=on;return n}function dn(t,e,r){let n=t;for(;e-- >nn;)n*=n,n%=r;return n}function pn(t,e){if(t===nn||e\u003C=nn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=fn(t,e),n=e,i=nn,o=on,s=on,a=nn;for(;r!==nn;){const t=n/r,e=n%r,u=i-s*t,h=o-a*t;n=r,r=e,i=s,o=a,s=u,a=h}if(n!==on)throw new Error(\"invert: does not exist\");return fn(i,e)}function mn(t){if(t%un===an){const e=(t+on)/un;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(t%cn===hn){const e=(t-hn)/cn;return function(t,r){const n=t.mul(r,sn),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,sn),i),a=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(t){const e=(t-on)/sn;let r,n,i;for(r=t-on,n=0;r%sn===nn;r/=sn,n++);for(i=sn;i\u003Ct&&ln(i,e,t)!==t-on;i++);if(1===n){const e=(t+on)/un;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const o=(r+on)/sn;return function(t,s){if(t.pow(s,e)===t.neg(t.ONE))throw new Error(\"Cannot find square root\");let a=n,u=t.pow(t.mul(t.ONE,i),r),h=t.pow(s,o),c=t.pow(s,r);for(;!t.eql(c,t.ONE);){if(t.eql(c,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(c);e\u003Ca&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(u,on\u003C\u003CBigInt(a-e-1));u=t.sqr(r),h=t.mul(h,r),c=t.mul(c,u),a=e}return h}}(t)}const gn=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function yn(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function bn(t){if(\"bigint\"!=typeof t)throw new Error(\"field order must be bigint\");const e=t.toString(2).length;return Math.ceil(e/8)}function vn(t){const e=bn(t);return e+Math.ceil(e/2)}const wn=BigInt(0),Mn=BigInt(1);function _n(t){return function(t){const e=gn.reduce(((t,e)=>(t[e]=\"function\",t)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});rn(t,e)}(t.Fp),rn(t,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...yn(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:En,hexToBytes:An}=t,Sn={Err:class extends Error{constructor(t=\"\"){super(t)}},_parseInt(t){const{Err:e}=Sn;if(t.length\u003C2||2!==t[0])throw new e(\"Invalid signature integer tag\");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e(\"Invalid signature integer: wrong length\");if(128&n[0])throw new e(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new e(\"Invalid signature integer: unnecessary leading zero\");return{d:En(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=Sn,r=\"string\"==typeof t?An(t):t;jr(r);let n=r.length;if(n\u003C2||48!=r[0])throw new e(\"Invalid signature tag\");if(r[1]!==n-2)throw new e(\"Invalid signature: incorrect length\");const{d:i,l:o}=Sn._parseInt(r.subarray(2)),{d:s,l:a}=Sn._parseInt(o);if(a.length)throw new e(\"Invalid signature: left bytes after parsing\");return{r:i,s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?\"00\"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}},xn=BigInt(0),Bn=BigInt(1),Tn=(BigInt(2),BigInt(3));BigInt(4);function In(t){const e=function(t){const e=_n(t);rn(e,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{const i=e.toAffine();return Zr(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function o(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error(\"bad generator point: equation left != right\");function s(t){return\"bigint\"==typeof t&&xn\u003Ct&&t\u003Ce.n}function a(t){if(!s(t))throw new Error(\"Expected valid bigint: 0 \u003C bigint \u003C curve.n\")}function u(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=e;if(r&&\"bigint\"!=typeof t){if(Ur(t)&&(t=zr(t)),\"string\"!=typeof t||!r.includes(t.length))throw new Error(\"Invalid key\");t=t.padStart(2*n,\"0\")}let s;try{s=\"bigint\"==typeof t?t:qr(Wr(\"private key\",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return i&&(s=fn(s,o)),a(s),s}const h=new Map;function c(t){if(!(t instanceof f))throw new Error(\"ProjectivePoint expected\")}class f{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error(\"x required\");if(null==e||!r.isValid(e))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error(\"invalid affine point\");if(t instanceof f)throw new Error(\"projective point not allowed\");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?f.ZERO:new f(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(f.fromAffine)}static fromHex(t){const e=f.fromAffine(i(Wr(\"pointHex\",t)));return e.assertValidity(),e}static fromPrivateKey(t){return f.BASE.multiply(u(t))}_setWindowSize(t){this._WINDOW_SIZE=t,h.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error(\"Field doesn't support isOdd\")}equals(t){c(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),h=r.eql(r.mul(n,a),r.mul(s,i));return u&&h}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,Tn),{px:o,py:s,pz:a}=this;let u=r.ZERO,h=r.ZERO,c=r.ZERO,l=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),m=r.mul(o,s);return m=r.add(m,m),c=r.mul(o,a),c=r.add(c,c),u=r.mul(t,c),h=r.mul(i,p),h=r.add(u,h),u=r.sub(d,h),h=r.add(d,h),h=r.mul(u,h),u=r.mul(m,u),c=r.mul(i,c),p=r.mul(t,p),m=r.sub(l,p),m=r.mul(t,m),m=r.add(m,c),c=r.add(l,l),l=r.add(c,l),l=r.add(l,p),l=r.mul(l,m),h=r.add(h,l),p=r.mul(s,a),p=r.add(p,p),l=r.mul(p,m),u=r.sub(u,l),c=r.mul(p,d),c=r.add(c,c),c=r.add(c,c),new f(u,h,c)}add(t){c(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let h=r.ZERO,l=r.ZERO,d=r.ZERO;const p=e.a,m=r.mul(e.b,Tn);let g=r.mul(n,s),y=r.mul(i,a),b=r.mul(o,u),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let M=r.add(s,u);return w=r.mul(w,M),M=r.add(g,b),w=r.sub(w,M),M=r.add(i,o),h=r.add(a,u),M=r.mul(M,h),h=r.add(y,b),M=r.sub(M,h),d=r.mul(p,w),h=r.mul(m,b),d=r.add(h,d),h=r.sub(y,d),d=r.add(y,d),l=r.mul(h,d),y=r.add(g,g),y=r.add(y,g),b=r.mul(p,b),w=r.mul(m,w),y=r.add(y,b),b=r.sub(g,b),b=r.mul(p,b),w=r.add(w,b),g=r.mul(y,w),l=r.add(l,g),g=r.mul(M,w),h=r.mul(v,h),h=r.sub(h,g),g=r.mul(v,y),d=r.mul(M,d),d=r.add(d,g),new f(h,l,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(f.ZERO)}wNAF(t){return d.wNAFCached(this,h,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(f.fromAffine)}))}multiplyUnsafe(t){const n=f.ZERO;if(t===xn)return n;if(a(t),t===Bn)return this;const{endo:i}=e;if(!i)return d.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:u,k2:h}=i.splitScalar(t),c=n,l=n,p=this;for(;s>xn||h>xn;)s&Bn&&(c=c.add(p)),h&Bn&&(l=l.add(p)),p=p.double(),s>>=Bn,h>>=Bn;return o&&(c=c.negate()),u&&(l=l.negate()),l=new f(r.mul(l.px,i.beta),l.py,l.pz),c.add(l)}multiply(t){a(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:u}=s.splitScalar(o);let{p:h,f:c}=this.wNAF(e),{p:l,f:p}=this.wNAF(u);h=d.constTimeNegate(t,h),l=d.constTimeNegate(a,l),l=new f(r.mul(l.px,s.beta),l.py,l.pz),n=h.add(l),i=c.add(p)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return f.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=f.BASE,i=(t,e)=>e!==xn&&e!==Bn&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error(\"invZ was invalid\");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===Bn)return!0;if(r)return r(f,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===Bn?this:r?r(f,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(f,this,t)}toHex(t=!0){return zr(this.toRawBytes(t))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const l=e.nBitLength,d=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>wn;)r&Mn&&(n=n.add(i)),i=i.double(),r>>=Mn;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t\u003Cr;t++){a=s,o.push(a);for(let t=1;t\u003Ci;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:s,windowSize:a}=n(e);let u=t.ZERO,h=t.BASE;const c=BigInt(2**e-1),f=2**e,l=BigInt(e);for(let t=0;t\u003Cs;t++){const e=t*a;let n=Number(o&c);o>>=l,n>a&&(n-=f,o+=Mn);const s=e,d=e+Math.abs(n)-1,p=t%2!=0,m=n\u003C0;0===n?h=h.add(r(p,i[s])):u=u.add(r(m,i[d]))}return{p:u,f:h}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(f,e.endo?Math.ceil(l/2):l);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:u,weierstrassEquation:o,isWithinCurveOrder:s}}function kn(t){const e=function(t){const e=_n(t);return rn(e,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return fn(t,n)}function a(t){return pn(t,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:h,weierstrassEquation:c,isWithinCurveOrder:f}=In({...e,toBytes(t,e,n){const i=e.toAffine(),o=r.toBytes(i.x),s=Zr;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){const e=t.length,n=t[0],s=t.subarray(1);if(e!==i||2!==n&&3!==n){if(e===o&&4===n){return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const t=qr(s);if(!(xn\u003C(a=t)&&a\u003Cr.ORDER))throw new Error(\"Point is not on curve\");const e=c(t);let i;try{i=r.sqrt(e)}catch(t){const e=t instanceof Error?\": \"+t.message:\"\";throw new Error(\"Point is not on curve\"+e)}return 1==(1&n)!==((i&Bn)===Bn)&&(i=r.neg(i)),{x:t,y:i}}var a}}),l=t=>zr(Kr(t,e.nByteLength));function d(t){return t>n>>Bn}const p=(t,e,r)=>qr(t.slice(e,r));class m{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const r=e.nByteLength;return t=Wr(\"compactSignature\",t,2*r),new m(p(t,0,r),p(t,r,2*r))}static fromDER(t){const{r:e,s:r}=Sn.toSig(Wr(\"DER\",t));return new m(e,r)}assertValidity(){if(!f(this.r))throw new Error(\"r must be 0 \u003C r \u003C CURVE.n\");if(!f(this.s))throw new Error(\"s must be 0 \u003C s \u003C CURVE.n\")}addRecoveryBit(t){return new m(this.r,this.s,t)}recoverPublicKey(t){const{r:n,s:i,recovery:o}=this,h=v(Wr(\"msgHash\",t));if(null==o||![0,1,2,3].includes(o))throw new Error(\"recovery id invalid\");const c=2===o||3===o?n+e.n:n;if(c>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const f=0==(1&o)?\"02\":\"03\",d=u.fromHex(f+l(c)),p=a(c),m=s(-h*p),g=s(i*p),y=u.BASE.multiplyAndAddUnsafe(d,m,g);if(!y)throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return d(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Vr(this.toDERHex())}toDERHex(){return Sn.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vr(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const g={isValidPrivateKey(t){try{return h(t),!0}catch(t){return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const t=vn(e.n);return function(t,e,r=!1){const n=t.length,i=bn(e),o=vn(e);if(n\u003C16||n\u003Co||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=fn(r?qr(t):Gr(t),e-on)+on;return r?Jr(s,i):Kr(s,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=u.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=Ur(t),r=\"string\"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof u}const b=e.bits2int||function(t){const r=qr(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return s(b(t))},w=Xr(e.nBitLength);function M(t){if(\"bigint\"!=typeof t)throw new Error(\"bigint expected\");if(!(xn\u003C=t&&t\u003Cw))throw new Error(`bigint expected \u003C 2^${e.nBitLength}`);return Kr(t,e.nByteLength)}function _(t,n,i=E){if([\"recovered\",\"canonical\"].some((t=>t in i)))throw new Error(\"sign() legacy options not supported\");const{hash:o,randomBytes:c}=e;let{lowS:l,prehash:p,extraEntropy:g}=i;null==l&&(l=!0),t=Wr(\"msgHash\",t),p&&(t=Wr(\"prehashed msgHash\",o(t)));const y=v(t),w=h(n),_=[M(w),M(y)];if(null!=g&&!1!==g){const t=!0===g?c(r.BYTES):g;_.push(Wr(\"extraEntropy\",t))}const A=Zr(..._),S=y;return{seed:A,k2sig:function(t){const e=b(t);if(!f(e))return;const r=a(e),n=u.BASE.multiply(e).toAffine(),i=s(n.x);if(i===xn)return;const o=s(r*s(S+i*w));if(o===xn)return;let h=(n.x===i?0:2)|Number(n.y&Bn),c=o;return l&&d(o)&&(c=function(t){return d(t)?s(-t):t}(o),h^=1),new m(i,c,h)}}}const E={lowS:e.lowS,prehash:!1},A={lowS:e.lowS,prehash:!1};return u.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return u.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(y(t))throw new Error(\"first arg must be private key\");if(!y(e))throw new Error(\"second arg must be public key\");return u.fromHex(e).multiply(h(t)).toRawBytes(r)},sign:function(t,r,n=E){const{seed:i,k2sig:o}=_(t,r,n),s=e;return tn(s.hash.outputLen,s.nByteLength,s.hmac)(i,o)},verify:function(t,r,n,i=A){const o=t;if(r=Wr(\"msgHash\",r),n=Wr(\"publicKey\",n),\"strict\"in i)throw new Error(\"options.strict was renamed to lowS\");const{lowS:h,prehash:c}=i;let f,l;try{if(\"string\"==typeof o||Ur(o))try{f=m.fromDER(o)}catch(t){if(!(t instanceof Sn.Err))throw t;f=m.fromCompact(o)}else{if(\"object\"!=typeof o||\"bigint\"!=typeof o.r||\"bigint\"!=typeof o.s)throw new Error(\"PARSE\");{const{r:t,s:e}=o;f=new m(t,e)}}l=u.fromHex(n)}catch(t){if(\"PARSE\"===t.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(h&&f.hasHighS())return!1;c&&(r=e.hash(r));const{r:d,s:p}=f,g=v(r),y=a(p),b=s(g*y),w=s(d*y),M=u.BASE.multiplyAndAddUnsafe(l,b,w)?.toAffine();return!!M&&s(M.x)===d},ProjectivePoint:u,Signature:m,utils:g}}function Pn(t){return{hash:t,hmac:(e,...r)=>Or(t,e,function(...t){let e=0;for(let r=0;r\u003Ct.length;r++){const n=t[r];gr(n),e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e\u003Ct.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Sr}}const Cn=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Rn=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),On=BigInt(1),Ln=BigInt(2),Nn=(t,e)=>(t+e/Ln)/e;function Un(t){const e=Cn,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),u=BigInt(88),h=t*t*t%e,c=h*h*t%e,f=dn(c,r,e)*c%e,l=dn(f,r,e)*c%e,d=dn(l,Ln,e)*h%e,p=dn(d,i,e)*d%e,m=dn(p,o,e)*p%e,g=dn(m,a,e)*m%e,y=dn(g,u,e)*g%e,b=dn(y,a,e)*m%e,v=dn(b,r,e)*c%e,w=dn(v,s,e)*p%e,M=dn(w,n,e)*h%e,_=dn(M,Ln,e);if(!jn.eql(jn.sqr(_),t))throw new Error(\"Cannot find square root\");return _}const jn=function(t,e,r=!1,n={}){if(t\u003C=nn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=yn(t,e);if(o>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const s=mn(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:Xr(i),ZERO:nn,ONE:on,create:e=>fn(e,t),isValid:e=>{if(\"bigint\"!=typeof e)throw new Error(\"Invalid field element: expected bigint, got \"+typeof e);return nn\u003C=e&&e\u003Ct},is0:t=>t===nn,isOdd:t=>(t&on)===on,neg:e=>fn(-e,t),eql:(t,e)=>t===e,sqr:e=>fn(e*e,t),add:(e,r)=>fn(e+r,t),sub:(e,r)=>fn(e-r,t),mul:(e,r)=>fn(e*r,t),pow:(t,e)=>function(t,e,r){if(r\u003Cnn)throw new Error(\"Expected power > 0\");if(r===nn)return t.ONE;if(r===on)return e;let n=t.ONE,i=e;for(;r>nn;)r&on&&(n=t.mul(n,i)),i=t.sqr(i),r>>=on;return n}(a,t,e),div:(e,r)=>fn(e*pn(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>pn(e,t),sqrt:n.sqrt||(t=>s(a,t)),invertBatch:t=>function(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}(a,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?Jr(t,o):Kr(t,o),fromBytes:t=>{if(t.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?Gr(t):qr(t)}});return Object.freeze(a)}(Cn,void 0,void 0,{sqrt:Un}),Dn=function(t,e){const r=e=>kn({...t,...Pn(e)});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:jn,n:Rn,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:t=>{const e=Rn,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-On*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),i=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),o=r,s=BigInt(\"0x100000000000000000000000000000000\"),a=Nn(o*t,e),u=Nn(-n*t,e);let h=fn(t-a*r-u*i,e),c=fn(-a*n-u*o,e);const f=h>s,l=c>s;if(f&&(h=e-h),l&&(c=e-c),h>s||c>s)throw new Error(\"splitScalar: Endomorphism failed, k=\"+t);return{k1neg:f,k1:h,k2neg:l,k2:c}}}},Cr);BigInt(0);Dn.ProjectivePoint;function zn(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function Hn(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function Fn(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function $n(t,e){Hn(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Vn={number:zn,bool:function(t){if(\"boolean\"!=typeof t)throw new Error(`boolean expected, not ${t}`)},bytes:Hn,hash:function(t){if(\"function\"!=typeof t||\"function\"!=typeof t.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");zn(t.outputLen),zn(t.blockLen)},exists:Fn,output:$n};const qn=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Gn=(t,e)=>t\u003C\u003C32-e|t>>>e,Kn=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],Jn=t=>t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255;function Wn(t){for(let e=0;e\u003Ct.length;e++)t[e]=Jn(t[e])}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function Zn(t){if(\"string��[�\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}function Xn(t){return\"string\"==typeof t&&(t=Zn(t)),Hn(t),t}class Yn{clone(){return this._cloneInto()}}function Qn(t){const e=e=>t().update(Xn(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}Vn.bool,Vn.bytes;function ti(t){return e=>(Vn.bytes(e),t(e))}(()=>{const t=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,e=\"undefined\"!=typeof module&&\"function\"==typeof module.require&&module.require.bind(module);e&&!t&&e(\"crypto\")})();function ei(t,e){return!(\"string\"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==e&&e>0&&t.length!==2+2*e)}function ri(t){let e=t;if(\"string\"!=typeof e)throw new Error(\"[padToEven] value must be type 'string', received \"+typeof e);return e.length%2&&(e=`0${e}`),e}const ni=BigInt(0),ii={},oi={};for(let t=0;t\u003C16;t++){const e=t,r=16*t,n=t.toString(16).toLowerCase();oi[n]=e,oi[n.toUpperCase()]=e,ii[n]=r,ii[n.toUpperCase()]=r}function si(t){const e=t.length,r=new Uint8Array(e/2);for(let n=0;n\u003Ce;n+=2)r[n/2]=ii[t[n]]+oi[t[n+1]];return r}const ai=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\"))),ui=t=>{let e=\"0x\";if(void 0===t||0===t.length)return e;for(const r of t)e=`${e}${ai[r]}`;return e},hi=[];for(let t=0;t\u003C=65535;t++)hi[t]=BigInt(t);const ci=(t,e=!1)=>{e&&t.reverse();const r=ui(t);return\"0x\"===r?ni:4===r.length?hi[t[0]]:6===r.length?hi[256*t[0]+t[1]]:BigInt(r)},fi=t=>{if(\"string\"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(t))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${t}`);const e=t.slice(2);return si(e.length%2==0?e:ri(e))},li=t=>{const e=(t=>{if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`})(t);return fi(e)},di=t=>{if(null==t)return new Uint8Array;if(Array.isArray(t)||t instanceof Uint8Array)return Uint8Array.from(t);if(\"string\"==typeof t){if(!ei(t))throw new Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${t}`);return fi(t)}if(\"number\"==typeof t)return li(t);if(\"bigint\"==typeof t){if(t\u003Cni)throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${t}`);let e=t.toString(16);return e.length%2&&(e=\"0\"+e),(t=>{if(\"0x\"===t.slice(0,2))throw new Error(\"hex string is prefixed with 0x, should be unprefixed\");return si(ri(t))})(e)}if(void 0!==t.toBytes)return t.toBytes();throw new Error(\"invalid type\")};BigInt(\"0xffffffffffffffff\"),BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),BigInt(\"115792089237316195423570985008687907853269984665640564039457584007913129639935\"),Dn.CURVE.n,Dn.CURVE.n,BigInt(2),BigInt(\"0x10000000000000000000000000000000000000000000000000000000000000000\"),fi(\"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470\"),fi(\"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\"),fi(\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9);Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));const pi=BigInt(2**32-1),mi=BigInt(32);function gi(t,e=!1){return e?{h:Number(t&pi),l:Number(t>>mi&pi)}:{h:0|Number(t>>mi&pi),l:0|Number(t&pi)}}function yi(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i\u003Ct.length;i++){const{h:o,l:s}=gi(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const bi=(t,e,r)=>t\u003C\u003Cr|e>>>32-r,vi=(t,e,r)=>e\u003C\u003Cr|t>>>32-r,wi=(t,e,r)=>e\u003C\u003Cr-32|t>>>64-r,Mi=(t,e,r)=>t\u003C\u003Cr-32|e>>>64-r;const _i=[],Ei=[],Ai=[],Si=BigInt(0),xi=BigInt(1),Bi=BigInt(2),Ti=BigInt(7),Ii=BigInt(256),ki=BigInt(113);for(let t=0,e=xi,r=1,n=0;t\u003C24;t++){[r,n]=[n,(2*r+3*n)%5],_i.push(2*(5*n+r)),Ei.push((t+1)*(t+2)/2%64);let i=Si;for(let t=0;t\u003C7;t++)e=(e\u003C\u003Cxi^(e>>Ti)*ki)%Ii,e&Bi&&(i^=xi\u003C\u003C(xi\u003C\u003CBigInt(t))-xi);Ai.push(i)}const[Pi,Ci]=yi(Ai,!0),Ri=(t,e,r)=>r>32?wi(t,e,r):bi(t,e,r),Oi=(t,e,r)=>r>32?Mi(t,e,r):vi(t,e,r);class Li extends Yn{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,zn(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){Kn||Wn(this.state32),function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n\u003C24;n++){for(let e=0;e\u003C10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e\u003C10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=Ri(o,s,1)^r[n],u=Oi(o,s,1)^r[n+1];for(let r=0;r\u003C50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r\u003C24;r++){const n=Ei[r],o=Ri(e,i,n),s=Oi(e,i,n),a=_i[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e\u003C50;e+=10){for(let n=0;n\u003C10;n++)r[n]=t[e+n];for(let n=0;n\u003C10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Pi[n],t[1]^=Ci[n]}r.fill(0)}(this.state32,this.rounds),Kn||Wn(this.state32),this.posOut=0,this.pos=0}update(t){Fn(this);const{blockLen:e,state:r}=this,n=(t=Xn(t)).length;for(let i=0;i\u003Cn;){const o=Math.min(e-this.pos,n-i);for(let e=0;e\u003Co;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){Fn(this,!1),Hn(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n\u003Ci;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return zn(t),this.xofInto(new Uint8Array(t))}digestInto(t){if($n(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new Li(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Ni=(t,e,r)=>Qn((()=>new Li(e,t,r))),Ui=Ni(1,144,28),ji=Ni(1,136,32),Di=Ni(1,104,48),zi=Ni(1,72,64),Hi=(ti(Ui),(()=>{const t=ti(ji);return t.create=ji.create,t})());ti(Di),ti(zi);const Fi=function(t,e){!function(t){if(!ei(t))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}(t);const r=(t=>{if(\"string\"!=typeof t)throw new Error(\"[stripHexPrefix] input must be type 'string', received \"+typeof t);return ei(t)?t.slice(2):t})(t).toLowerCase();let n=\"\";if(void 0!==e){n=ci(di(e)).toString()+\"0x\"}const i=Zn(n+r),o=ui(Hi(i)).slice(2);let s=\"\";for(let t=0;t\u003Cr.length;t++)parseInt(o[t],16)>=8?s+=r[t].toUpperCase():s+=r[t];return`0x${s}`};new Uint8Array(0);var $i,Vi,qi;!function(t){t.String=\"string\",t.Bytes=\"view\",t.Number=\"number\"}($i||($i={})),function(t){t.String=\"string\",t.Bytes=\"view\",t.JSON=\"json\"}(Vi||(Vi={})),function(t){t[t.Number=0]=\"Number\",t[t.BigInt=1]=\"BigInt\",t[t.Uint8Array=2]=\"Uint8Array\",t[t.PrefixedHexString=3]=\"PrefixedHexString\"}(qi||(qi={}));var Gi=r(22699),Ki=r.n(Gi);const Ji=(t,e,r)=>t&e^t&r^e&r;class Wi extends Yn{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=qn(this.buffer)}update(t){Fn(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=Xn(t)).length;for(let o=0;o\u003Ci;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=qn(t);for(;n\u003C=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){Fn(this),$n(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t\u003Cn;t++)e[t]=0;!function(t,e,r,n){if(\"function\"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,s,n),t.setUint32(e+h,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=qn(t),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const u=a/4,h=this.get();if(u>h.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let t=0;t\u003Cu;t++)s.setUint32(4*t,h[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const Zi=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]),Xi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Yi=new Uint32Array(64);class Qi extends Wi{constructor(){super(64,32,8,!1),this.A=0|Xi[0],this.B=0|Xi[1],this.C=0|Xi[2],this.D=0|Xi[3],this.E=0|Xi[4],this.F=0|Xi[5],this.G=0|Xi[6],this.H=0|Xi[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r\u003C16;r++,e+=4)Yi[r]=t.getUint32(e,!1);for(let t=16;t\u003C64;t++){const e=Yi[t-15],r=Yi[t-2],n=Gn(e,7)^Gn(e,18)^e>>>3,i=Gn(r,17)^Gn(r,19)^r>>>10;Yi[t]=i+Yi[t-7]+n+Yi[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:u,H:h}=this;for(let t=0;t\u003C64;t++){const e=h+(Gn(s,6)^Gn(s,11)^Gn(s,25))+((c=s)&a^~c&u)+Zi[t]+Yi[t]|0,f=(Gn(r,2)^Gn(r,13)^Gn(r,22))+Ji(r,n,i)|0;h=u,u=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+f|0}var c;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,n,i,o,s,a,u,h)}roundClean(){Yi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}ti(Qn((()=>new Qi)));var to,eo;!function(t){t[t.Deposit=0]=\"Deposit\",t[t.Withdrawal=1]=\"Withdrawal\",t[t.Consolidation=2]=\"Consolidation\"}(to||(to={}));!function(t){t[t.Version=0]=\"Version\",t[t.Balance=1]=\"Balance\",t[t.Nonce=2]=\"Nonce\",t[t.CodeHash=3]=\"CodeHash\",t[t.CodeSize=4]=\"CodeSize\"}(eo||(eo={}));li(eo.Version),li(eo.Balance),li(eo.Nonce),li(eo.CodeHash),li(eo.CodeSize),BigInt(256),BigInt(31);var ro=r(50539);const no={randomUUID:\"undefined\"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let io;const oo=new Uint8Array(16);function so(){if(!io&&(io=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!io))throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");return io(oo)}const ao=[];for(let t=0;t\u003C256;++t)ao.push((t+256).toString(16).slice(1));function uo(t,e=0){return(ao[t[e+0]]+ao[t[e+1]]+ao[t[e+2]]+ao[t[e+3]]+\"-\"+ao[t[e+4]]+ao[t[e+5]]+\"-\"+ao[t[e+6]]+ao[t[e+7]]+\"-\"+ao[t[e+8]]+ao[t[e+9]]+\"-\"+ao[t[e+10]]+ao[t[e+11]]+ao[t[e+12]]+ao[t[e+13]]+ao[t[e+14]]+ao[t[e+15]]).toLowerCase()}const ho=function(t,e,r){if(no.randomUUID&&!e&&!t)return no.randomUUID();const n=(t=t||{}).random||(t.rng||so)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(let t=0;t\u003C16;++t)e[r+t]=n[t];return e}return uo(n)};const co=\"refresh_token_change\",fo=\"token_expired\",lo=36e5,po=36e5;async function mo(t,e){let r,n=`Error with request. Status: ${t.status} Status text: ${t.statusText}. URL: ${t.url}. ${e??\"\"}`;if(!t.ok){var i;const e=await t.json();throw(null===(i=e.error)||void 0===i?void 0:i.message)?n+=`. Error message: ${e.error.message}`:e.message&&(n+=`. Error message: ${e.message}`),new Error(n)}try{r=await t.json()}catch(t){throw new Error(`Failed to parse JSON. ${n}`)}return r}class go{#t;#e;constructor(t,e){this.#t=t,this.#e=e}getHeaders(){return{\"Content-Type\":\"application/json\",Authorization:`Bearer ${this.#e}`}}async getEthereumAccounts(){const t=this.getHeaders(),e=await fetch(`${this.#t}/wallets`,{headers:t});return(await mo(e,\"Error fetching wallet accounts\")).data}async getEthereumAccountByAddress(t){const e=this.getHeaders(),r=await fetch(`${this.#t}/mmi/wallets/address/${t}`,{headers:e}),n=`Error fetching account for address ${t}`,i=await mo(r,n);return i.data.length&&i.data[0]?i.data[0]:null}async createTransaction(t,e){const r=this.getHeaders(),n=await fetch(`${this.#t}/mmi/${t.coinId}/wallet/${t.walletId}/tx/build`,{method:\"POST\",headers:r,body:JSON.stringify({txParams:e})});return(await mo(n,\"Error creating transaction\")).data}async getTransaction(t){const e=this.getHeaders(),r=await fetch(`${this.#t}/mmi/wallets/transactions/${t}`,{headers:e}),n=`Error getting transaction with id ${t}`,i=await mo(r,n);return i.data.length&&i.data[0]?i.data[0]:null}async getTransactions(){const t=this.getHeaders(),e=await fetch(`${this.#t}/custodian/transaction`,{headers:t});return(await mo(e,\"Error getting transactions\")).data}async getCustomerProof(){const t=this.getHeaders(),e=await fetch(`${this.#t}/mmi/customer-proof`,{method:\"POST\",headers:t,body:JSON.stringify({version:\"n/a\"})});return await mo(e,\"Error getting Customer Proof\")}async signTypedData_v4(t,e,r,n,i){const o=await this.getHeaders(),s={address:t,payload:e,encodingVersion:i||\"v4\"},a=await fetch(`${this.#t}/mmi/${r}/wallet/${n}/messages/typed`,{method:\"POST\",body:JSON.stringify(s),headers:o}),u=`Error doing signTypedData from address: ${t}`;return await mo(a,u)}async signPersonalMessage(t,e,r,n){const i=await this.getHeaders(),o={address:t,message:e},s=await fetch(`${this.#t}/mmi/${r}/wallet/${n}/messages/personal`,{method:\"POST\",body:JSON.stringify(o),headers:i}),a=`Error doing signPersonalMessage from address: ${t}`;return await mo(s,a)}async getSignedMessage(t,e,r){const n=await this.getHeaders(),i=await fetch(`${this.#t}/mmi/${e}/wallet/${r}/messages/${t}`,{headers:n}),o=`Error getting signed message with id ${t}`;return await mo(i,o)}}const yo=\"https://app.bitgo.com/defi/v2\",bo={log:(...t)=>console.log(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),info:(...t)=>{pr.dev&&console.info(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t)))},warn:(...t)=>console.warn(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),error:(...t)=>{console.error(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t))),console.error(t)},debug:(...t)=>{pr.dev&&console.debug(\"[Institutional snap]\",...t.map((t=>\"object\"==typeof t?JSON.stringify(t,null,2):t)))}};function vo(t,e){switch(t){case\"created\":return{finished:!1,submitted:!1,signed:!1,success:!1,displayText:\"Created\",reason:e??\"\"};case\"signed\":return{finished:!1,submitted:!1,signed:!0,success:!1,displayText:\"Signed\",reason:e??\"\"};case\"submitted\":return{finished:!1,submitted:!0,signed:!0,success:!1,displayText:\"Submitted\",reason:e??\"\"};case\"mined\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Mined\",reason:e??\"\"};case\"completed\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Completed\",reason:e??\"\"};case\"failed\":return{finished:!0,submitted:!0,signed:!0,success:!1,displayText:\"Failed\",reason:e??\"\"};case\"rejected\":return{finished:!0,submitted:!1,signed:!1,success:!1,displayText:\"Rejected\",reason:e??\"\"};case\"aborted\":return{finished:!0,submitted:!1,signed:!1,success:!1,displayText:\"Aborted\",reason:e??\"\"};case\"confirmed\":return{finished:!0,submitted:!0,signed:!0,success:!0,displayText:\"Confirmed\",reason:e??\"\"};default:return{finished:!1,submitted:!1,signed:!1,success:!1,displayText:\"Unknown\",reason:e??\"\"}}}class wo extends Gi.EventEmitter{#r;constructor(t,e=yo,r){super();const{refreshToken:n}=t;this.#r=new go(e,n)}async getEthereumAccounts(t){const e=(await this.#r.getEthereumAccounts()).map((t=>{var e;return{name:(null===(e=t.labels.find((t=>\"Wallet Name\"===t.key)))||void 0===e?void 0:e.value)??\"Unnamed Bitgo Wallet\",address:t.address,balance:t.balance,custodianDetails:{accountId:t.custodianDetails.id,coinId:t.custodianDetails.coin},chainId:t.chainId,labels:t.labels.filter((t=>\"Wallet Name\"!==t.key))}}));return t?e.filter((e=>e.chainId===t)):e}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t){var e;const r=t.from,n=await this.getEthereumAccountsByAddress(r);if(!n.length||!(null===(e=n[0])||void 0===e?void 0:e.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails;let s;t.gasLimit=(Number(t.gasLimit)+1e5).toString();try{s=await this.#r.createTransaction({walletId:i,coinId:o},t)}catch(t){throw bo.error(\"Error creating BitGo transaction.\"),bo.error(t),t}return{transactionStatus:vo(s.transactionStatus),custodianTransactionId:s.custodianTransactionId,from:s.from,gasLimit:s.gasLimit??null,gasPrice:s.gasPrice??null,maxFeePerGas:s.maxFeePerGas??null,maxPriorityFeePerGas:s.maxPriorityFeePerGas??null,nonce:s.nonce??null,transactionHash:s.transactionHash,custodianPublishesTransaction:!0}}async getTransaction(t,e){const r=await this.#r.getTransaction(e);return r?{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodianTransactionId,from:r.from,gasLimit:r.gasLimit??null,gasPrice:r.gasPrice??null,maxFeePerGas:r.maxFeePerGas??null,maxPriorityFeePerGas:r.maxPriorityFeePerGas??null,nonce:r.nonce??null,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}:null}async getCustomerProof(){const{data:t}=await this.#r.getCustomerProof();return t}async getSupportedChains(t){const e=await this.#r.getEthereumAccountByAddress(t);return e?[e.chainId.toString()]:[]}async getTransactionLink(t){return{text:\"Complete your transaction in the BitGo App\",id:\"\",url:\"\",action:\"view\"}}async getSignedMessageLink(t){return{text:\"Complete your transaction in the BitGo App\",id:\"\",url:\"\",action:\"view\"}}changeRefreshTokenAuthDetails(t){throw new Error(\"BitGo does not support refresh tokens\")}async getSignedMessage(t,e){var r;const n=await this.getEthereumAccountsByAddress(t);if(!n.length)throw new Error(\"No such ethereum account!\");if(!(null===(r=n[0])||void 0===r?void 0:r.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails,s=await this.#r.getSignedMessage(e,o,i);return s?{id:s.data.id,signature:s.data.signature,status:s.data.status}:null}async signTypedData_v4(t,e,r){var n;const i=await this.getEthereumAccountsByAddress(t);if(!i.length||!(null===(n=i[0])||void 0===n?void 0:n.custodianDetails))throw new Error(\"No such ethereum account!\");const o=i[0].custodianDetails.accountId,{coinId:s}=i[0].custodianDetails,a=await this.#r.signTypedData_v4(t,e,s,o,r);return{id:a.data.id,signature:a.data.signature,status:a.data.status,from:t}}async signPersonalMessage(t,e){var r;const n=await this.getEthereumAccountsByAddress(t);if(!n.length||!(null===(r=n[0])||void 0===r?void 0:r.custodianDetails))throw new Error(\"No such ethereum account!\");const i=n[0].custodianDetails.accountId,{coinId:o}=n[0].custodianDetails,s=await this.#r.signPersonalMessage(t,e,o,i);return{id:s.data.id,signature:s.data.signature,status:s.data.status,from:t}}}class Mo{#n={};async tryCaching(t,e,r){if(e>=0&&this.cacheExists(t)&&this.cacheValid(t,e))return this.#n[t].results;const n=await r();return this.#n[t]={results:n,timestamp:(new Date).getTime()},n}setCache(t,e){this.#n[t]={results:e,timestamp:(new Date).getTime()}}getCache(t){return this.#n[t].results}cacheExists(t){return Boolean(Object.prototype.hasOwnProperty.call(this.#n,t)&&this.#n[t].results)}cacheValid(t,e){const r=this.#n[t],n=1e3*e;return!!r&&(new Date).getTime()-r.timestamp\u003Cn}deleteCache(t){this.cacheExists(t)&&delete this.#n[t]}}class _o{#n=new Mo;#i;#o;constructor(t,e){this.#i=t,this.#o=e}async getHeaders(){return{\"Content-Type\":\"application/json\",Authorization:`Bearer ${await this.#n.tryCaching(\"accessToken\",7200,(async()=>this.getAccessToken()))}`}}async getAccessToken(){const t=await fetch(`${this.#i}/tokens`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({grantType:\"refresh_token\",refreshToken:this.#o})}),e=await mo(t,\"Error fetching the access token\");if(!e.jwt)throw new Error(\"No access token\");return e.jwt}async getEthereumAccounts(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/eth-accounts`,{headers:t});return await mo(e,\"Error fetching accounts\")}async createTransaction(t,e){const r=await this.getHeaders(),n={to:e.to,from:e.from,value:e.value,data:e.data,gasLimit:e.gasLimit,note:t.note};\"0\"===e.type||\"1\"===e.type?n.gasPrice=e.gasPrice:\"2\"===e.type&&(n.maxPriorityFeePerGas=e.maxPriorityFeePerGas,n.maxFeePerGas=e.maxFeePerGas);const i=await fetch(`${this.#i}/transactions?chainId=${t.chainId}`,{method:\"POST\",body:JSON.stringify(n),headers:r});return await mo(i,\"Error creating transaction\")}async getSignedMessage(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/signatures?transactionId=${t}`,{headers:e}),n=`Error getting signed message with id ${t}`,i=await mo(r,n);return i.length&&i[0]?i[0]:null}async getTransaction(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/transactions?transactionId=${t}`,{headers:e}),n=`Error getting transaction with id ${t}`,i=await mo(r,n);return i.length&&i[0]?i[0]:null}async getTransactions(t){const e=await this.getHeaders(),r=await fetch(`${this.#i}/transactions?chainId=${t}`,{headers:e}),n=`Error getting transactions with chainId ${t}`;return await mo(r,n)}async getCustomerProof(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/customer-proof`,{method:\"POST\",headers:t,body:JSON.stringify({})});return await mo(e,\"Error getting Custommer Proof\")}async signTypedData_v4(t,e,r,n){const i=await this.getHeaders(),o={address:t,payload:e,signatureVersion:r};let s=`${this.#i}/signatures`;n&&(s+=`?chainId=${n}`);const a=await fetch(s,{method:\"POST\",body:JSON.stringify(o),headers:i}),u=`Error doing signTypedData from address: ${t}`;return await mo(a,u)}async signPersonalMessage(t,e){const r=await this.getHeaders(),n={address:t,payload:{message:e},signatureVersion:\"personalSign\"},i=await fetch(`${this.#i}/signatures`,{method:\"POST\",body:JSON.stringify(n),headers:r}),o=`Error doing signPersonalMessage from address: ${t}`;return await mo(i,o)}async getChainIds(){const t=await this.getHeaders(),e=await fetch(`${this.#i}/chainIds`,{headers:t});return await mo(e,\"Error getting chainIds\")}}const Eo=\"https://api.mycactus.com/custody/v1/mmi-api\";class Ao extends Gi.EventEmitter{#r;#n=new Mo;#s;constructor(t,e=Eo,r){super(),this.#s=r,this.#r=new _o(e,t.refreshToken)}async getEthereumAccounts(){return(await this.#r.getEthereumAccounts()).map((t=>({name:t.name||\"Cactus wallet\",address:t.address,balance:t.balance,custodianDetails:{walletId:t.custodianDetails.walletId,chainId:t.chainId},labels:t.labels?t.labels.map((t=>({key:\"label\",value:t}))):[]})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){const e=await this.getEthereumAccounts();return t.length?e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase()))):e}async createTransaction(t,e){const r=await this.#r.createTransaction({chainId:Number(e.chainId),note:e.note??\"\"},t);return{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodian_transactionId,from:r.from,gasLimit:r.gasLimit,gasPrice:r.gasPrice,maxFeePerGas:r.maxFeePerGas,maxPriorityFeePerGas:r.maxFeePerGas,nonce:r.nonce,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}}async getTransaction(t,e){const r=await this.#r.getTransaction(e);return r?{transactionStatus:vo(r.transactionStatus),custodianTransactionId:r.custodian_transactionId,from:r.from,gasLimit:r.gasLimit,gasPrice:r.gasPrice,maxFeePerGas:r.maxFeePerGas,maxPriorityFeePerGas:r.maxPriorityFeePerGas,nonce:r.nonce,transactionHash:r.transactionHash,custodianPublishesTransaction:!0}:null}async getSignedMessage(t,e){const r=await this.#r.getSignedMessage(e);if(!r)return null;let n;return n=\"signed\"===r.transactionStatus?{submitted:!1,finished:!0,signed:!0,success:!0,displayText:\"Signed\",reason:\"\"}:vo(r.transactionStatus),{id:r.custodian_transactionId??\"\",signature:r.signature,status:n,from:t}}async getCustomerProof(){const{jwt:t}=await this.#r.getCustomerProof();return t}async signTypedData_v4(t,e,r){var n;const i=await this.#r.signTypedData_v4(t,e,r,null===(n=e.domain)||void 0===n?void 0:n.chainId);return{id:i.custodian_transactionId,status:vo(i.transactionStatus),from:t,signature:null}}async signPersonalMessage(t,e){const r=await this.#r.signPersonalMessage(t,e);return{id:r.custodian_transactionId,status:vo(r.transactionStatus),from:t,signature:null}}async getErc20Tokens(){return{}}async getSupportedChains(){const{networks:t}=await this.#r.getChainIds();return this.#n.tryCaching(\"getSupportedChains\",this.#s,(async()=>t.map((t=>t.chainID))))}async getTransactionLink(t){return{text:\"Complete your transaction in the Cactus App\",id:\"\",url:\"\",action:\"view\"}}async getSignedMessageLink(t){return{text:\"Complete your transaction in the Cactus App\",id:\"\",url:\"\",action:\"view\"}}changeRefreshTokenAuthDetails(t){throw new Error(\"Not implemented yet\")}}var So,xo=r(5634);function Bo(t){let e=0;return async function(r,n,i){let o,s;e+=1,bo.debug(\"JSON-RPC >\",r,e,n,t);try{if(o=await fetch(t,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Authorization:`Bearer ${i}`},body:JSON.stringify({jsonrpc:\"2.0\",id:e,method:r,params:n}),credentials:\"same-origin\"}),s=await o.json(),s.error)throw bo.error(\"JSON-RPC \u003C\",r,e,s,t,s),new Error(s.error.message);bo.debug(\"JSON-RPC \u003C\",r,e,s.result,t)}catch(n){throw bo.error(\"JSON-RPC \u003C\",r,e,n,t),bo.error(n),n}return s}}class To extends Gi.EventEmitter{#a;#n;#s=null;#u;#o;#h;constructor(t,e,r){super(),this.#u=t,this.#o=e,this.#h=r,this.#a=Bo(`${t}/v1/json-rpc`),this.#n=new Mo}setRefreshToken(t){const e={oldRefreshToken:this.#o,newRefreshToken:t,apiUrl:this.#u};this.emit(co,e),this.#o=t}async getAccessToken(){if(this.#s){if(this.#n.cacheExists(\"accessToken\")&&this.#n.cacheValid(\"accessToken\",this.#s))return this.#n.getCache(\"accessToken\")}try{var t;const e=`grant_type=refresh_token&refresh_token=${encodeURIComponent(this.#o)}`,r={headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"}},n=await fetch(this.#h,{method:\"POST\",body:e,headers:r.headers,credentials:\"same-origin\"}),i=await n.json();if(401===(null===(t=n)||void 0===t?void 0:t.status)&&i.url){const t=i.url,e=this.#o,r=xo.createHash(\"sha256\").update(e+t).digest(\"hex\");throw this.emit(fo,{url:t,oldRefreshToken:r}),new Error(\"Refresh token provided is no longer valid.\")}if(!n.ok){const t=i.message;throw new Error(`Request failed with status ${n.status}: ${t}`)}if(this.#s=i.expires_in,this.#n.setCache(\"accessToken\",i.access_token),i.refresh_token&&i.refresh_token!==this.#o){const t=i.refresh_token;bo.debug(`ECA1Client: Refresh token changed to ${t.substring(0,5)}...${t.substring(t.length-5)}`);const e=this.#o;this.setRefreshToken(t);const r={apiUrl:this.#u,oldRefreshToken:e,newRefreshToken:t};this.emit(co,r)}return i.access_token}catch(t){const{message:e}=t;throw new Error(`Error getting the Access Token: ${e}`)}}async listAccounts(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccounts\",{},t)}async getCustomerProof(){const t=await this.getAccessToken();return this.#a(\"custodian_getCustomerProof\",{},t)}async createTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_createTransaction\",t,e)}async getAccountChainIds(t){const e=await this.getAccessToken();return this.#a(\"custodian_listAccountChainIds\",t,e)}async signPersonalMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_sign\",t,e)}async signTypedData(t){const e=await this.getAccessToken();return this.#a(\"custodian_signTypedData\",t,e)}async getTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionById\",t,e)}async getSignedMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageById\",t,e)}async getTransactionLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionLink\",t,e)}}function Io(t){return`0x${BigInt(t).toString(16)}`}class ko extends(Ki()){#r;#n=new Mo;#s;constructor(t,e,r){super();const{refreshToken:n}=t;this.#r=new To(e,n,t.refreshTokenUrl),this.#s=r,this.#r.on(co,(t=>{this.emit(co,t)})),this.#r.on(fo,(t=>{this.emit(fo,t)}))}async getEthereumAccounts(){return(await this.#r.listAccounts()).result.map((t=>({name:t.name,address:t.address,custodianDetails:null,labels:t.tags.map((t=>({key:t.name,value:t.value})))})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t,e){var r;const n=await this.getEthereumAccountsByAddress(t.from);if(!n.length||!(null===(r=n[0])||void 0===r?void 0:r.address))throw new Error(\"No such ethereum account!\");const i={from:n[0].address,to:t.to,...t.data&&{data:t.data},...t.value&&{value:Io(t.value)},...t.gasLimit&&{gas:Io(t.gasLimit)},...t.type&&{type:Io(t.type)}};2===Number(t.type)?(i.maxFeePerGas=Io(t.maxFeePerGas),i.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)):i.gasPrice=Io(t.gasPrice);const o={chainId:Io(e.chainId),...e.origin&&{originUrl:e.origin},...e.note&&{note:e.note},...e.transactionCategory&&{transactionCategory:e.transactionCategory}},{result:s}=await this.#r.createTransaction([i,o]);if(\"string\"!=typeof s)throw new Error(\"Failed to create transaction\");return{custodianTransactionId:s,transactionStatus:vo(\"created\"),from:n[0].address,custodianPublishesTransaction:!0}}async getTransaction(t,e){const{result:r}=await this.#r.getTransaction([e]);return r?{transactionStatus:r.status,custodianTransactionId:r.id,from:r.from,gasLimit:r.gas??null,gasPrice:r.gasPrice??null,maxFeePerGas:r.maxFeePerGas??null,maxPriorityFeePerGas:r.maxPriorityFeePerGas??null,nonce:r.nonce,transactionHash:r.hash,to:r.to,custodianPublishesTransaction:!0}:null}async getSignedMessage(t,e){const{result:r}=await this.#r.getSignedMessage([e]);return r?{id:e,signature:r.signature,status:r.status}:null}async getTransactionLink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getSignedMessageLd�{.�ink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getCustomerProof(){const{result:t}=await this.#r.getCustomerProof();return t.jwt}async signTypedData_v4(t,e,r,n){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const i=r.toLowerCase(),{result:o}=await this.#r.signTypedData([t,e,i]);return{id:o,signature:null,status:vo(\"created\"),from:t}}async signPersonalMessage(t,e,r){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const{result:n}=await this.#r.signPersonalMessage([t,e]);return{id:n,status:vo(\"created\"),signature:null,from:t}}async getSupportedChains(t){return this.#n.tryCaching(`getSupportedChains-${t}`,this.#s,(async()=>{const{result:e}=await this.#r.getAccountChainIds([t]);return e}))}changeRefreshTokenAuthDetails(t){this.#r.setRefreshToken(t.refreshToken)}}class Po extends Gi.EventEmitter{#a;#n;#u;#o;#h;#s=null;constructor(t,e,r){super(),this.#u=t,this.#o=e,this.#h=r,this.#a=Bo(`${t}/v3/json-rpc`),this.#n=new Mo}setRefreshToken(t){const e={oldRefreshToken:this.#o,newRefreshToken:t,apiUrl:this.#u};this.emit(co,e),this.#o=t}async getAccessToken(){if(this.#s){if(this.#n.cacheExists(\"accessToken\")&&this.#n.cacheValid(\"accessToken\",this.#s))return this.#n.getCache(\"accessToken\")}try{var t;const e={grant_type:\"refresh_token\",refresh_token:this.#o},r={headers:{\"Content-Type\":\"application/json\"}},n=await fetch(this.#h,{method:\"POST\",body:JSON.stringify(e),headers:r.headers,credentials:\"same-origin\"}),i=await n.json();if(401===(null===(t=n)||void 0===t?void 0:t.status)&&i.url){const t=i.url,e=this.#o,r=xo.createHash(\"sha256\").update(e+t).digest(\"hex\");throw this.emit(fo,{url:t,oldRefreshToken:r}),new Error(\"Refresh token provided is no longer valid.\")}if(!n.ok){const t=i.message;throw new Error(`Request failed with status ${n.status}: ${t}`)}if(this.#s=i.expires_in,this.#n.setCache(\"accessToken\",i.access_token),i.refresh_token&&i.refresh_token!==this.#o){const t=i.refresh_token;bo.debug(`ECA3Client: Refresh token changed to ${t.substring(0,5)}...${t.substring(t.length-5)}`);const e=this.#o;this.setRefreshToken(t);const r={apiUrl:this.#u,oldRefreshToken:e,newRefreshToken:i.refresh_token};this.emit(co,r)}return i.access_token}catch(t){const{message:e}=t;throw new Error(`Error getting the Access Token: ${e}`)}}async listAccounts(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccounts\",{},t)}async listAccountsSigned(){const t=await this.getAccessToken();return this.#a(\"custodian_listAccountsSigned\",{},t)}async replaceTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_replaceTransaction\",t,e)}async getCustomerProof(){const t=await this.getAccessToken();return this.#a(\"custodian_getCustomerProof\",{},t)}async createTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_createTransaction\",t,e)}async getAccountChainIds(t){const e=await this.getAccessToken();return this.#a(\"custodian_listAccountChainIds\",t,e)}async signPersonalMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_sign\",t,e)}async signTypedData(t){const e=await this.getAccessToken();return this.#a(\"custodian_signTypedData\",t,e)}async getTransaction(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionById\",t,e)}async getSignedMessage(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageById\",t,e)}async getTransactionLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getTransactionLink\",t,e)}async getSignedMessageLink(t){const e=await this.getAccessToken();return this.#a(\"custodian_getSignedMessageLink\",t,e)}}class Co extends Gi.EventEmitter{#r;#n=new Mo;#s;constructor(t,e,r){super();const{refreshToken:n}=t;this.#r=new Po(e,n,t.refreshTokenUrl),this.#s=r,this.#r.on(co,(t=>{this.emit(co,t)})),this.#r.on(fo,(t=>{this.emit(fo,t)}))}async getEthereumAccounts(){return(await this.#r.listAccounts()).result.map((t=>({name:t.name,address:t.address,custodianDetails:null,labels:t.tags.map((t=>({key:t.name,value:t.value}))),metadata:t.metadata})))}async getEthereumAccountsByAddress(t){return(await this.getEthereumAccounts()).filter((e=>e.address.toLowerCase().includes(t.toLowerCase())))}async getListAccountsSigned(){const{result:t}=await this.#r.listAccountsSigned();return t.jwt}async getEthereumAccountsByLabelOrAddressName(t){return(await this.getEthereumAccounts()).filter((e=>e.name.includes(t)))}async createTransaction(t,e){var r;const n=t.from,i=await this.getEthereumAccountsByAddress(n);if(!i.length||!(null===(r=i[0])||void 0===r?void 0:r.address))throw new Error(\"No such ethereum account!\");const o={from:i[0].address,to:t.to,...t.data&&{data:t.data},...t.value&&{value:Io(t.value)},...t.gasLimit&&{gas:Io(t.gasLimit)},...t.type&&{type:Io(t.type)}};2===Number(t.type)?(o.maxFeePerGas=Io(t.maxFeePerGas),o.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)):o.gasPrice=Io(t.gasPrice);const s={chainId:Io(e.chainId),...e.origin&&{originUrl:e.origin},...e.note&&{note:e.note},...e.transactionCategory&&{transactionCategory:e.transactionCategory},...\"boolean\"==typeof e.custodianPublishesTransaction&&{custodianPublishesTransaction:e.custodianPublishesTransaction},...e.rpcUrl&&{rpcUrl:e.rpcUrl}},{result:a}=await this.#r.createTransaction([o,s]);if(\"string\"!=typeof a)throw new Error(\"Failed to create transaction\");return{custodianTransactionId:a,transactionStatus:vo(\"created\"),from:i[0].address,custodianPublishesTransaction:e.custodianPublishesTransaction}}async getTransaction(t,e){var r,n;const{result:i}=await this.#r.getTransaction([e]);return i?{transactionStatus:i.transaction.status,custodianTransactionId:i.transaction.id,from:i.transaction.from,gasLimit:i.transaction.gas??null,gasPrice:i.transaction.gasPrice??null,maxFeePerGas:i.transaction.maxFeePerGas??null,maxPriorityFeePerGas:i.transaction.maxPriorityFeePerGas??null,nonce:i.transaction.nonce,transactionHash:i.transaction.hash,to:i.transaction.to,signedRawTransaction:i.transaction.signedRawTransaction??null,chainId:i.metadata.chainId,custodianPublishesTransaction:(null===(r=i.metadata)||void 0===r?void 0:r.custodianPublishesTransaction)??!0,rpcUrl:(null===(n=i.metadata)||void 0===n?void 0:n.rpcUrl)??null}:null}async replaceTransaction(t){const e={transactionId:t.transactionId,action:t.action},r={};t.gasLimit&&(r.gas=Io(t.gasLimit)),t.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=Io(t.maxPriorityFeePerGas)),t.maxFeePerGas&&(r.maxFeePerGas=Io(t.maxFeePerGas));const{result:n}=await this.#r.replaceTransaction([e,r]);return{transactionId:n.transactionId}}async getSignedMessage(t,e){const{result:r}=await this.#r.getSignedMessage([e]);return r?{id:e,signature:r.signature,status:r.status}:null}async getTransactionLink(t){const{result:e}=await this.#r.getTransactionLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getSignedMessageLink(t){const{result:e}=await this.#r.getSignedMessageLink([t]);return e?{id:t,url:e.url,text:e.text,action:e.action,ethereum:e.ethereum??{accounts:[],chainId:[]}}:null}async getCustomerProof(){const{result:t}=await this.#r.getCustomerProof();return t.jwt}async signTypedData_v4(t,e,r,n){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const i=r.toLowerCase(),{result:o}=await this.#r.signTypedData([{address:t,data:e,version:i},n]);return{id:o,status:vo(\"created\"),signature:null,from:t}}async signPersonalMessage(t,e,r){if(!(await this.getEthereumAccountsByAddress(t)).length)throw new Error(\"No such ethereum account!\");const{result:n}=await this.#r.signPersonalMessage([{address:t,message:e},r]);return{id:n,status:vo(\"created\"),signature:null,from:t}}async getSupportedChains(t){return this.#n.tryCaching(`getSupportedChains-${t}`,this.#s,(async()=>{const{result:e}=await this.#r.getAccountChainIds([t]);return e}))}changeRefreshTokenAuthDetails(t){this.#r.setRefreshToken(t.refreshToken)}}!function(t){t.ECA3=\"ECA3\",t.ECA1=\"ECA1\",t.BitGo=\"BitGo\",t.Cactus=\"Cactus\"}(So||(So={}));const Ro={[So.ECA3]:Co,[So.ECA1]:ko,[So.BitGo]:wo,[So.Cactus]:Ao},Oo=[{refreshTokenUrl:null,name:\"bitgo-test\",displayName:\"BitGo Test\",production:!1,apiBaseUrl:\"https://app.bitgo-test.com/defi/v2\",apiVersion:So.BitGo,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/bitgo-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://app.bitgo-test.com\",allowedOnboardingDomains:[\"app.bitgo-test.com\",\"localhost:3000\"]},{refreshTokenUrl:null,name:\"bitgo-prod\",legacyName:\"bitgo\",displayName:\"BitGo\",production:!0,apiBaseUrl:\"https://app.bitgo.com/defi/v2\",apiVersion:So.BitGo,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/bitgo-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://app.bitgo.com\",allowedOnboardingDomains:[\"app.bitgo.com\"]},{refreshTokenUrl:null,name:\"cactus\",displayName:\"Cactus Custody\",production:!0,apiVersion:So.Cactus,custodianPublishesTransaction:!0,iconUrl:\"https://dashboard.metamask-institutional.io/custodian-icons/cactus-icon.svg\",isManualTokenInputSupported:!1,apiBaseUrl:\"https://api.mycactus.com/custody/v1/mmi-api\",onboardingUrl:\"https://www.mycactus.com\",allowedOnboardingDomains:[\"www.mycactus.com\",\"www.mycactus.dev\",\"pre.mycactus.com\",\"debug.mycactus.dev:1443\",\"alpha.mycactus.io\"]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-prod\",displayName:\"GK8 ECA-1\",production:!1,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-eca3-prod\",displayName:\"GK8\",production:!0,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://safe-mmi.staging.gnosisdev.com/api/v1/oauth/token/\",name:\"gnosis-safe-dev\",displayName:\"Safe\",production:!1,apiBaseUrl:\"https://safe-mmi.staging.gnosisdev.com/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://safe-mmi.safe.global/api/v1/oauth/token/\",name:\"safe-prod\",displayName:\"Safe\",production:!1,apiBaseUrl:\"https://safe-mmi.safe.global/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://safe-mmi.staging.5afe.dev/api/v1/oauth/token/\",name:\"gnosis-safe-staging\",displayName:\"Gnosis Safe Staging\",production:!1,apiBaseUrl:\"https://safe-mmi.staging.5afe.dev/api\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://raw.githubusercontent.com/safe-global/safe-react/dev/public/resources/logo.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://safe.global\",allowedOnboardingDomains:[\"apps-portal.safe.global\"]},{refreshTokenUrl:\"https://saturn-custody.metamask-institutional.io/oauth/token\",name:\"saturn-prod\",displayName:\"Saturn Custody\",production:!1,apiBaseUrl:\"https://saturn-custody.metamask-institutional.io/eth\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://saturn-custody-ui.metamask-institutional.io/saturn.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://saturn-custody-ui.metamask-institutional.io\",allowedOnboardingDomains:[\"saturn-custody-ui.metamask-institutional.io\"]},{refreshTokenUrl:\"https://api.mpcvault.com/mmi/token-refresh\",name:\"mpcvault-prod\",displayName:\"MPCVault\",production:!0,apiBaseUrl:\"https://api.mpcvault.com/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/mpcvault-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.mpcvault.com/\",allowedOnboardingDomains:[\"console.mpcvault.com\"]},{refreshTokenUrl:\"https://neptune-custody.metamask-institutional.io/oauth/token\",name:\"neptune-custody-prod\",displayName:\"Neptune Custody\",production:!1,apiBaseUrl:\"https://neptune-custody.metamask-institutional.io/eth\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://neptune-custody-ui.metamask-institutional.io\",allowedOnboardingDomains:[\"neptune-custody-ui.metamask-institutional.io\"]},{refreshTokenUrl:\"https://api-preprod.uat.zodia.io/oauth/token\",name:\"zodia-preprod\",displayName:\"Zodia Preprod\",production:!1,apiBaseUrl:\"https://api-preprod.uat.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"ui-preprod-v2.uat.zodia.io\"]},{refreshTokenUrl:\"https://mmi.fireblocks.io/v1/auth/access\",name:\"fireblocks-prod\",displayName:\"Fireblocks\",production:!0,apiBaseUrl:\"https://mmi.fireblocks.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/fireblocks-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.fireblocks.io/v2/\",allowedOnboardingDomains:[\"console.fireblocks.io\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-local\",displayName:\"Waterballoons\",production:!1,apiBaseUrl:\"https://local.waterballoons.xyz:4200\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://local.waterballoons.xyz:4200\",allowedOnboardingDomains:[\"local.waterballoons.xyz:4200\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-dev10\",displayName:\"Waterballoons 10\",production:!1,apiBaseUrl:\"https://dev4-console-api.waterballoons.xyz\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://dev10-console.waterballoons.xyz\",allowedOnboardingDomains:[\"dev10-console.waterballoons.xyz\"]},{refreshTokenUrl:\"https://local.waterballoons.xyz:4200/v1/auth/access\",name:\"waterballoons-dev4\",displayName:\"Waterballoons 4\",production:!1,apiBaseUrl:\"https://dev4-console-api.waterballoons.xyz\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://dev4-console.waterballoons.xyz\",allowedOnboardingDomains:[\"dev4-console.waterballoons.xyz\"]},{refreshTokenUrl:\"https://zapi.custody.zodia.io/oauth/token\",name:\"zodia-prod\",displayName:\"Zodia\",production:!0,apiBaseUrl:\"https://zapi.custody.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"zodia.io\",\"v2.custody.zodia.io\"]},{refreshTokenUrl:\"https://api.sit.zodia.io/oauth/token\",name:\"zodia-sit\",displayName:\"Zodia SIT\",production:!1,apiBaseUrl:\"https://api.sit.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"sit.zodia.io\",\"ui-v2.sit.zodia.io\"]},{refreshTokenUrl:\"https://api-qa.qa.zodia.io/oauth/token\",name:\"zodia-qa\",displayName:\"Zodia QA\",production:!1,apiBaseUrl:\"https://api-qa.qa.zodia.io\",apiVersion:So.ECA1,custodianPublishesTransaction:!0,iconUrl:\"https://zodia.io/wp-content/uploads/2023/01/cropped-ico.png\",isManualTokenInputSupported:!1,onboardingUrl:\"https://zodia.io\",allowedOnboardingDomains:[\"qa.zodia.io\",\"ui-v2.qa.zodia.io\"]},{refreshTokenUrl:\"http://localhost:8090/oauth/token\",name:\"gk8-eca3-dev\",displayName:\"GK8\",production:!1,apiBaseUrl:\"http://localhost:8090\",apiVersion:So.ECA3,custodianPublishesTransaction:!0,iconUrl:\"https://www.gk8.io/wp-content/uploads/2021/04/6-layers-4.svg\",isManualTokenInputSupported:!0,onboardingUrl:\"https://www.gk8.io\",allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://api.dev.mpcvault.com/mmi/token-refresh\",name:\"mpcvault-dev\",displayName:\"MPCVault\",production:!1,apiBaseUrl:\"https://api.dev.mpcvault.com/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://dev.metamask-institutional.io/custodian-icons/mpcvault-icon.svg\",isManualTokenInputSupported:!1,onboardingUrl:\"https://console.mpcvault.com/\",allowedOnboardingDomains:[\"console.dev.mpcvault.com\"]},{refreshTokenUrl:\"https://gamma.signer.cubist.dev/v0/oauth/token\",name:\"cubist-gamma\",displayName:\"Cubist Gamma\",production:!1,apiBaseUrl:\"https://gamma.signer.cubist.dev/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[]},{refreshTokenUrl:\"https://dg5z0qnzb9s65.cloudfront.net/v0/oauth/token\",name:\"cubist-test\",displayName:\"Cubist Test\",production:!1,apiBaseUrl:\"https://dg5z0qnzb9s65.cloudfront.net/v0/mmi\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,iconUrl:\"https://assets-global.website-files.com/638a2693daaf8527290065a3/651802cf8d04ec5f1a09ce86_Logo.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[]},{refreshTokenUrl:\"http://localhost:3330/oauth/token\",apiBaseUrl:\"http://localhost:3330\",apiVersion:So.ECA3,custodianPublishesTransaction:!1,name:\"local-dev\",displayName:\"Local Dev\",production:!1,iconUrl:\"https://dev.metamask-institutional.io/custodian-icons/neptune-icon.svg\",isManualTokenInputSupported:!0,allowedOnboardingDomains:[\"localhost:8000\",\"http://localhost:8000\"]}];class Lo{static async signTypedData(t,e,r,n={version:ro.SignTypedDataVersion.V4}){if(!e)throw new Error(\"Typed data is required\");return await r.signTypedData_v4(t,e,n.version,{chainId:\"0x420\"})}static async signPersonalMessage(t,e,r){return await r.signPersonalMessage(t,e,{chainId:\"0x420\"})}}var No=r(59353),Uo=r(31664);var jo=r(48834).Buffer;const Do=t=>{if(t&&\"0x\"!==t)return\"string\"==typeof t?t.startsWith(\"0x\")?t:`0x${t}`:`0x${jo.from(t).toString(\"hex\")}`},zo=\"0\",Ho=\"2\";var Fo=r(48834).Buffer;class $o{static createTransactionPayload(t){const e=void 0!==t.maxFeePerGas,r={...t,type:e?Ho:zo,data:Do(t.data)};return e?{...r,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas).toString():\"0\",maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas).toString():\"0\"}:{...r,gasPrice:t.gasPrice?BigInt(t.gasPrice).toString():\"0\"}}static async getTransactionSignature(t,e){if(t.signedRawTransaction){var r,n,i;bo.info(\"Transaction is signed\",t.signedRawTransaction);const o=this.getTypedTransaction(t,e);return{v:Io((null===(r=o.v)||void 0===r?void 0:r.toString())??\"0\"),r:Io((null===(n=o.r)||void 0===n?void 0:n.toString())??\"0\"),s:Io((null===(i=o.s)||void 0===i?void 0:i.toString())??\"0\")}}bo.debug(\"Fetching signature from the network\",t.transactionHash);const o=await ethereum.request({method:\"eth_getTransactionByHash\",params:[t.transactionHash]});return bo.debug(\"Got signature from the network\",o),{v:o.v,r:o.r,s:o.s}}static getTypedTransaction(t,e){if(!t.signedRawTransaction)throw new Error(\"Transaction is not signed\");const r=((t,e)=>{const r=parseInt(e);if(isNaN(r))throw new Error(`Invalid chainId ${e}`);return Uo.Common.custom({chainId:r},{hardfork:t.maxPriorityFeePerGas||t.maxFeePerGas?Uo.Hardfork.London:Uo.Hardfork.Istanbul})})(t,e),n=Fo.from(t.signedRawTransaction.substring(2),\"hex\");return No.TransactionFactory.fromSerializedData(n,{common:r})}static validateTransaction(t,e){const r=this.getTypedTransaction(e,t.chainId);return Number(t.nonce)!==Number(r.nonce)?{isValid:!1,error:`Custodian altered the nonce from the request: ${Number(t.nonce)} to ${Number(r.nonce)}`}:\"gasPrice\"in t&&\"gasPrice\"in r&&Number(t.gasPrice)!==Number(r.gasPrice)?{isValid:!1,error:`Custodian altered the gas price from the request: ${t.gasPrice} to ${r.gasPrice}`}:\"maxFeePerGas\"in t&&\"maxFeePerGas\"in r&&Number(t.maxFeePerGas)!==Number(r.maxFeePerGas)?{isValid:!1,error:`Custodian altered the maxFeePerGas from the request: ${t.maxFeePerGas} to ${r.maxFeePerGas}`}:\"maxPriorityFeePerGas\"in t&&\"maxPriorityFeePerGas\"in r&&Number(t.maxPriorityFeePerGas)!==Number(r.maxPriorityFeePerGas)?{isValid:!1,error:`Custodian altered the maxPriorityFeePerGas from the request: ${t.maxPriorityFeePerGas} to ${r.maxPriorityFeePerGas}`}:{isValid:!0}}}const Vo=S({finished:b(),success:b(),displayText:T(),reason:x(E(T())),submitted:b(),signed:b()}),qo=S({transactionStatus:Vo,transactionHash:x(E(T())),custodianTransactionId:T(),from:T(),gasPrice:x(E(T())),gasLimit:x(E(T())),maxFeePerGas:x(E(T())),maxPriorityFeePerGas:x(E(T())),nonce:x(E(T())),to:x(T()),value:x(T()),data:x(T()),transactionId:x(T()),chainId:x(T()),custodianPublishesTransaction:b(),signedRawTransaction:x(E(T())),rpcUrl:x(E(T())),note:x(T()),type:x(E(T()))}),Go=S({id:T(),signature:E(T()),status:S(),from:x(T())}),Ko=(S({finished:b(),signed:b(),success:b(),displayText:T(),reason:x(E(T()))}),S({custodianType:v([So.ECA3,So.ECA1,So.BitGo,So.Cactus]),custodianEnvironment:T(),custodianApiUrl:T(),custodianDisplayName:T(),token:T(),refreshTokenUrl:T()})),Jo=S({custodianType:v([So.ECA3,So.ECA1,So.BitGo,So.Cactus]),custodianEnvironment:T(),custodianApiUrl:T(),token:T()}),Wo=S({name:T(),address:T(),details:Ko,origin:T()}),Zo=(S({type:M(\"transaction\"),transaction:qo}),S({type:M(\"message\"),message:Go,subType:M(\"personalSign\"),signature:E(T())}),S({type:M(\"message\"),message:Go,subType:v([\"v3\",\"v4\"]),signature:E(T())}),S({from:T(),to:T(),value:T(),data:T(),chainId:T()}));class Xo{#c;#f;#l;constructor(t,e){this.#l=t,this.#c=new Map,this.#f=e}async listAccounts(){return this.#l.listAccounts()}async getAccount(t){return await this.#l.getAccount(t)??void 0}async createAccount(t){var e;c(t,Wo);const r=Oo.find((e=>e.apiBaseUrl===t.details.custodianApiUrl));let n,i;if(pr.dev)n=t.details.custodianEnvironment,i=t.details.custodianDisplayName;else{if(!r)throw new Error(`No custodian allowlisted for API URL: ${t.details.custodianApiUrl}`);n=r.name,i=t.details.custodianDisplayName}const{address:o,name:s}=t;if(!function(t,e){return!e.find((e=>Fi(e.account.address)===Fi(t)))}(o,await this.#l.listWallets()))throw new Error(`Account address already in use: ${o}`);let a=!1;(null===(e=r)||void 0===e?void 0:e.custodianPublishesTransaction)&&(a=!0);try{const e={id:ho(),options:{custodian:{environmentName:n,displayName:i,deferPublication:a,importOrigin:t.origin},accountName:s},address:o,methods:[yt.SignTransaction,yt.PersonalSign,yt.SignTypedDataV3,yt.SignTypedDataV4],type:et.Eoa};return await this.#d(Et.AccountCreated,{account:e,accountNameSuggestion:s??\"Custodial Account\",displayConfirmation:!1,displayAccountNameSuggestion:!1}),await this.#l.addWallet({account:e,details:t.details}),e}catch(t){throw new Error(t.message)}}async filterAccountChains(t,e){const r=await this.getAccount(t);if(!r)throw new Error(`Account '${t}' not found`);const n=await this.getCustodianApiForAddress(r.address),i=await n.getSupportedChains();return e.filter((t=>i.includes(function(t){const e=parseInt(t,16);if(isNaN(e))throw new Error(`Invalid chainId ${t}`);return`eip155:${e}`}(t))))}async updateAccount(t){throw new fr}async deleteAccount(t){try{await this.#l.withTransaction((async()=>{await this.#l.removeAccounts([t]),await this.#d(Et.AccountDeleted,{id:t})}))}catch(t){bo.error(t),function(t){throw new Error(t)}(t.message)}}async listRequests(){if(pr.dev){return(await this.#f.listRequests()).map((t=>t.keyringRequest))}return[]}async getRequest(t){if(c(t,T()),pr.dev){const e=(await this.#f.listRequests()).find((e=>e.keyringRequest.id===t));if(!e)throw new Error(`Request '${t}' not found`);return e.keyringRequest}throw new Error(\"Method not implemented.\")}async submitRequest(t){return pr.dev?this.#p(t):(c(t,at),function(t,e){try{return t()}catch(t){throw new Error(e??\"An unexpected error occurred\")}}((async()=>this.#p(t)),\"An unexpected error occurred\"))}async approveRequest(t){throw new Error(\"Method not implemented.\")}async rejectRequest(t){throw new Error(\"Method not implemented.\")}async getCustodianApiForAddress(t){const e=Fi(t);if(!this.#c.has(e)){const r=await this.#l.getWalletByAddress(e);if(!r)throw bo.debug(`Wallet does not exist error. Address: ${t}, Checksum address: ${e}`),bo.debug(`All wallets: ${JSON.stringify(await this.#l.listWallets())}`),new Error(`Wallet for account ${t} does not exist`);const n=this.#m(r.details);this.#c.set(e,n),n.on(fo,(t=>{this.#g(t).catch(bo.error)}))}return this.#c.get(e)}#m(t){return new(0,Ro[t.custodianType])({refreshToken:t.token,refreshTokenUrl:t.refreshTokenUrl},t.custodianApiUrl,1e3)}async getConnectedAccounts(t,e){return(await this.#l.listWallets()).filter((r=>r.details.token===t.token&&r.details.custodianApiUrl===t.custodianApiUrl&&r.details.custodianType===t.custodianType&&r.details.custodianEnvironment===t.custodianEnvironment&&r.account.options.custodian.importOrigin===e)).map((t=>t.account))}async#g(t){const e=(await this.#l.listWallets()).filter((e=>e.details.token===t.oldRefreshToken&&e.details.custodianApiUrl===t.apiUrl));for(const r of e){const e={...r.details,token:t.newRefreshToken};this.#c.delete(r.account.address),await this.#l.updateWalletDetails(r.account.id,e)}}async#p(t){const e=await this.#y(t.request.method,t.request.params??[],t),r=await this.getAccount(t.account);if(!r)throw new Error(`Account '${t.account}' not found`);const{address:n}=r;let i=null;try{if(t.request.method===yt.SignTransaction){const t=await this.getCustodianApiForAddress(n);i=await t.getTransactionLink(e)}else{const t=await this.getCustodianApiForAddress(n);i=await t.getSignedMessageLink(e)}}catch(t){i={text:\"Complete in Custodian App\",id:e,url:\"\",action:\"view\"},console.error(\"Error getting deep link\",t)}return await async function(t){await snap.request({method:\"snap_notify\",params:{type:\"inApp\",message:t}})}(`${i.text} Transaction ID: ${i.id}`),{pending:!0}}async#y(t,e,r){const n=await this.getAccount(r.account);if(!n)throw new Error(`Account '${r.account}' not found`);if(!n.methods.includes(t))throw new Error(`Method '${t}' not supported for account '${n.address}'`);switch(t){case yt.PersonalSign:{const[t,n]=e,i=await this.getCustodianApiForAddress(n),o=await Lo.signPersonalMessage(n,t,i);return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"personalSign\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}case yt.SignTransaction:{const[t]=e;return await this.#b(t,r)}case yt.SignTypedDataV3:{const[t,n]=e,i=await this.getCustodianApiForAddress(t),o=await Lo.signTypedData(t,n,i,{version:ro.SignTypedDataVersion.V3});return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"v3\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}case yt.SignTypedDataV4:{const[t,n]=e,i=await this.getCustodianApiForAddress(t),o=await Lo.signTypedData(t,n,i,{version:ro.SignTypedDataVersion.V3});return await this.#f.upsertRequest({keyringRequest:r,type:\"message\",subType:\"v4\",fulfilled:!1,rejected:!1,message:o,signature:null,lastUpdated:Date.now()}),o.id}default:throw new Error(`EVM method '${t}' not supported`)}}async#b(t,e){try{const r=await this.getCustodianApiForAddress(t.from),n=$o.createTransactionPayload(t),i=await this.#l.getWalletByAddress(t.from);if(!i)throw new Error(`Account '${t.from}' not found`);const o=i.account.options.custodian.deferPublication,s=await r.createTransaction(n,{chainId:t.chainId,custodianPublishesTransaction:o});return await this.#f.upsertRequest({keyringRequest:e,type:\"transaction\",fulfilled:!1,rejected:!1,lastUpdated:Date.now(),transaction:s}),s.custodianTransactionId}catch(t){throw console.error(\"Transaction signing failed:\",t),new Error(`Failed to sign transaction: ${t.message}`)}}async#d(t,e){await re(snap,t,e)}}async function Yo(t){await snap.request({method:\"snap_notify\",params:{type:\"inApp\",message:t}})}class Qo{#v;#l;constructor(t,e){this.#l=t,this.#v=e}async upsertRequest(t){return this.#l.upsertRequest(t)}async listRequests(){return this.#l.listRequests()}async clearAllRequests(){return this.#l.clearAllRequests()}async getChainIdFromPendingRequest(t){const e=await this.getRequestParams(t);if(!e.chainId)throw new Error(`Request ${t} has no chainId`);return e.chainId}async getMutableTransactionParameters(t){const e=(await this.listRequests()).filter((t=>Boolean(t.transaction))).filter((e=>{const r=e.keyringRequest.request.params;if(!Array.isArray(r)||0===r.length)return!1;const n=r[0];return n.from===t.from&&n.to===t.to&&n.value===t.value&&n.data===t.data&&n.chainId===t.chainId})).sort(((t,e)=>e.lastUpdated-t.lastUpdated))[0];if(!e)throw new Error(\"No matching transaction request found\");return e}async getRequestParams(t){const e=await this.#l.getRequest(t);if(!e)throw new Error(`Request ${t} not found`);const r=e.keyringRequest.request.params;if(!Array.isArray(r)||0===r.length)throw new Error(`Request ${t} has invalid params`);return r[0]}async poll(){const t=(await this.listRequests()).filter((t=>!t.fulfilled));for(const e of t)switch(e.type){case\"message\":try{await this.pollSignedMessage(e.keyringRequest.id,e)}catch(t){bo.info(`Error polling signed message request ${e.keyringRequest.id}`),pr.dev&&bo.error(t)}break;case\"transaction\":try{await this.pollTransaction(e.keyringRequest.id,e)}catch(t){bo.info(`Error polling transaction request ${e.keyringRequest.id}`),pr.dev&&bo.error(t)}break;default:bo.debug(`Unknown request type: ${String(e.type)}`),await this.#l.removeRequest(e.keyringRequest.id)}}async pollTransaction(t,e){var r,n,i;const{account:o}=e.keyringRequest,s=await this.#v.getAccount(o);if(!s)throw new Error(`Account ${o} not found`);const{address:a}=s,u=await this.#v.getCustodianApiForAddress(a),{custodianTransactionId:h}=e.transaction;if(e.lastUpdated\u003CDate.now()-lo)return bo.info(`Transaction ${h} last updated more than 3600000ms (last updated ${Date.now()-e.lastUpdated}ms ago), removing request`),await this.emitRejectedEvent(t),void await this.#l.removeRequest(t);const f=await u.getTransaction(a,h);if(c(f,qo),(null===(r=f)||void 0===r?void 0:r.transactionStatus.finished)&&!f.transactionStatus.success)return await this.emitRejectedEvent(t),bo.info(\"Removing failed transaction request\",t),void await this.#l.removeRequest(t);if((null===(n=f)||void 0===n?void 0:n.transactionStatus.finished)&&f.transactionStatus.success||(null===(i=f)||void 0===i?void 0:i.signedRawTransaction)){const r=await this.getChainIdFromPendingRequest(t),n=await $o.getTransactionSignature(f,r);if(f.signedRawTransaction){const e=$o.validateTransaction(await this.getRequestParams(t),f);if(!e.isValid){if(e.error){const t=`Transaction ${h} was signed by custodian but failed validation: ${e.error}`;await Yo(t)}return await this.emitRejectedEvent(t),void await this.#l.removeRequest(t)}}const i={...this.#w(e,f),fulfilled:!0,result:n,lastUpdated:Date.now()};await this.#l.upsertRequest(i),await this.emitApprovedEvent(t,n)}else if(f){const t=this.#w(e,f);await this.#l.upsertRequest(t)}}async pollSignedMessage(t,e){var r,n;const{account:i}=e.keyringRequest,o=await this.#v.getAccount(i);if(!o)throw new Error(`Account ${i} not found`);const{address:s}=o,a=await this.#v.getCustodianApiForAddress(s);if(e.lastUpdated\u003CDate.now()-po)return bo.info(`Sign��*i�ed Message ${e.message.id} last updated more than 3600000ms (last updated ${Date.now()-e.lastUpdated}ms ago), removing request`),await this.emitRejectedEvent(t),void await this.#l.removeRequest(t);const u=await a.getSignedMessage(s,e.message.id);if(null===(n=u)||void 0===n||null===(r=n.status)||void 0===r?void 0:r.finished){if(u.status.success){const r={...e,fulfilled:!0,signature:u.signature,lastUpdated:Date.now()};await this.#l.upsertRequest(r),await this.emitApprovedEvent(t,u.signature)}else await this.emitRejectedEvent(t);await this.#l.removeRequest(t)}}async emitApprovedEvent(t,e){try{await re(snap,Et.RequestApproved,{id:t,result:e})}catch(e){if(!e.message.includes(`Request '${t}' not found`))throw e;bo.info(`Request '${t}' not found, removing from state`),await this.#l.removeRequest(t)}}async emitRejectedEvent(t){try{await re(snap,Et.RequestRejected,{id:t})}catch(e){if(!e.message.includes(`Request '${t}' not found`))throw e;bo.info(`Request '${t}' not found, removing from state`),await this.#l.removeRequest(t)}}#w(t,e){return{...t,transaction:{...t.transaction,transactionStatus:{finished:e.transactionStatus.finished??!1,success:e.transactionStatus.success??!1,displayText:e.transactionStatus.displayText??\"\",submitted:e.transactionStatus.submitted??!1,reason:e.transactionStatus.reason??\"\",signed:e.transactionStatus.signed??!1},...e.transactionHash&&{transactionHash:e.transactionHash},...e.gasPrice&&{gasPrice:e.gasPrice},...e.maxFeePerGas&&{maxFeePerGas:e.maxFeePerGas},...e.maxPriorityFeePerGas&&{maxPriorityFeePerGas:e.maxPriorityFeePerGas},...e.gasLimit&&{gasLimit:e.gasLimit},...e.nonce&&{nonce:e.nonce},...e.to&&{to:e.to},...e.value&&{value:e.value},...e.data&&{data:e.data},...e.chainId&&{chainId:e.chainId},...e.from&&{from:e.from}}}}}var ts;!function(t){t.Onboard=\"authentication.onboard\",t.ClearAllRequests=\"snap.internal.clearAllRequests\",t.GetMutableTransactionParameters=\"transactions.getMutableTransactionParameters\",t.GetConnectedAccounts=\"authentication.getConnectedAccounts\",t.GetIsSupported=\"authentication.getIsSupported\"}(ts||(ts={}));const es=new Set([At.ListAccounts,At.GetAccount,At.FilterAccountChains,At.DeleteAccount,At.ListRequests,At.GetRequest,At.SubmitRequest,ts.GetMutableTransactionParameters]),rs=new Map;function ns(){rs.clear(),rs.set(\"metamask\",es),Oo.forEach((t=>{if(t.allowedOnboardingDomains){if(!pr.dev&&!t.production)return;t.allowedOnboardingDomains.forEach((t=>{rs.set(t,new Set([ts.Onboard])),rs.set(`https://${t}`,new Set([ts.Onboard,ts.GetConnectedAccounts,ts.GetIsSupported])),\"localhost:3000\"===t&&rs.set(\"http://localhost:3000\",new Set([ts.Onboard]))}))}}));const t=new Set([At.ListAccounts,At.GetAccount,At.CreateAccount,At.FilterAccountChains,At.UpdateAccount,At.DeleteAccount,At.ListRequests,At.GetRequest,ts.Onboard,ts.ClearAllRequests,ts.GetConnectedAccounts,ts.GetIsSupported]);pr.dev&&rs.set(\"http://localhost:8000\",t)}function is(t,e){var r;return(null===(r=rs.get(t))||void 0===r?void 0:r.has(e))??!1}ns();new Error(\"timeout while waiting for mutex to become available\"),new Error(\"mutex already locked\");const os=new Error(\"request for lock canceled\");var ss=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};class as{constructor(t,e=os){this._value=t,this._cancelError=e,this._queue=[],this._weightedWaiters=[]}acquire(t=1,e=0){if(t\u003C=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(((r,n)=>{const i={resolve:r,reject:n,weight:t,priority:e},o=us(this._queue,(t=>e\u003C=t.priority));-1===o&&t\u003C=this._value?this._dispatchItem(i):this._queue.splice(o+1,0,i)}))}runExclusive(t){return ss(this,arguments,void 0,(function*(t,e=1,r=0){const[n,i]=yield this.acquire(e,r);try{return yield t(n)}finally{i()}}))}waitForUnlock(t=1,e=0){if(t\u003C=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,e)?Promise.resolve():new Promise((r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),function(t,e){const r=us(t,(t=>e.priority\u003C=t.priority));t.splice(r+1,0,e)}(this._weightedWaiters[t-1],{resolve:r,priority:e})}))}isLocked(){return this._value\u003C=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t\u003C=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach((t=>t.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight\u003C=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const e=this._value;this._value-=t.weight,t.resolve([e,this._newReleaser(t.weight)])}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let t=this._value;t>0;t--){const e=this._weightedWaiters[t-1];e&&(e.forEach((t=>t.resolve())),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];if(!r)continue;const n=r.findIndex((e=>e.priority\u003C=t));(-1===n?r:r.splice(0,n)).forEach((t=>t.resolve()))}}}_couldLockImmediately(t,e){return(0===this._queue.length||this._queue[0].priority\u003Ce)&&t\u003C=this._value}}function us(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}var hs=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};class cs{constructor(t){this._semaphore=new as(1,t)}acquire(){return hs(this,arguments,void 0,(function*(t=0){const[,e]=yield this._semaphore.acquire(1,t);return e}))}runExclusive(t,e=0){return this._semaphore.runExclusive((()=>t()),1,e)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const fs=new cs;class ls{mtx;#M;#_;constructor({createLock:t=!1,encrypted:e=!0}={}){this.mtx=function(t=!1){return t?new cs:fs}(t),this.#M={id:void 0,orgState:void 0,current:void 0,isRollingBack:!1,hasCommitted:!1},this.#_=e}async get(){return async function(t){return await snap.request({method:\"snap_manageState\",params:{operation:\"get\",encrypted:t}})}(this.#_)}async set(t){return async function({data:t,encrypted:e}){await snap.request({method:\"snap_manageState\",params:{operation:\"update\",newState:t,encrypted:e}})}({data:t,encrypted:this.#_})}async update(t){if(this.mtx.isLocked()){if(this.#M.current)return bo.info(`SnapStateManager.update [${this.#E}]: transaction is processing, use existing state`),void await t(this.#M.current);bo.info(\"SnapStateManager.update: transaction is not exist, create lock after prev lock is released\")}await this.mtx.runExclusive((async()=>{const e=await this.get();await t(e),await this.set(e)}))}async withTransaction(t){await this.mtx.runExclusive((async()=>{if(await this.#A(),!this.#M.current||!this.#M.orgState||!this.#M.id)throw new Error(\"Failed to begin transaction\");bo.info(`SnapStateManager.withTransaction [${this.#E}]: begin transaction`);try{await t(this.#M.current),await this.set(this.#M.current)}catch(t){throw bo.info(`SnapStateManager.withTransaction [${this.#E}]: error : ${JSON.stringify(t instanceof Error?t.message:String(t))}`),await this.#S(),t}finally{this.#x()}}))}async commit(){if(!this.#M.current||!this.#M.orgState)throw new Error(\"Failed to commit transaction\");this.#M.hasCommitted=!0,await this.set(this.#M.current)}async#A(){this.#M={id:ho(),orgState:await this.get(),current:await this.get(),isRollingBack:!1,hasCommitted:!1}}async#S(){try{this.#M.hasCommitted&&!this.#M.isRollingBack&&this.#M.orgState&&(bo.info(`SnapStateManager.rollback [${this.#E}]: attempt to rollback state`),this.#M.isRollingBack=!0,await this.set(this.#M.orgState))}catch(t){throw bo.info(`SnapStateManager.rollback [${this.#E}]: error : ${JSON.stringify(t)}`),new Error(\"Failed to rollback state\")}}#x(){this.#M.orgState=void 0,this.#M.current=void 0,this.#M.id=void 0,this.#M.isRollingBack=!1,this.#M.hasCommitted=!1}get#E(){return this.#M.id??\"\"}}function ds(t,e){return t instanceof e?t:new e(t.message)}let ps,ms;const gs=new class extends ls{async get(){return super.get().then((t=>(t||(t={activated:!1,devMode:!1,wallets:{},walletIds:[],requests:{}}),t.wallets||(t.wallets={}),t.walletIds||(t.walletIds=[]),t.requests||(t.requests={}),t)))}async listAccounts(){const t=await this.get();return Object.values(t.wallets).map((t=>t.account))}async listWallets(){const t=await this.get();return Object.values(t.wallets)}async addWallet(t){try{await this.update((async e=>{const{id:r,address:n}=t.account;if(this.isAccountExist(e,r)||await this.getWalletByAddress(n))throw new Error(`Account address ${n} already exists`);e.wallets[r]=t,e.walletIds.push(r)}))}catch(t){throw ds(t,Error)}}async updateAccount(t){try{await this.update((async e=>{if(!this.isAccountExist(e,t.id))throw new Error(`Account id ${t.id} does not exist`);const r=e.wallets[t.id];if(!r)throw new Error(`Wallet for account ${t.id} does not exist`);const n=r.account;if(n.address.toLowerCase()!==t.address.toLowerCase()||n.type!==t.type)throw new Error(\"Account address or type is immutable\");r.account=t}))}catch(t){throw ds(t,Error)}}async updateWalletDetails(t,e){try{await this.update((async r=>{const n=r.wallets[t];if(!n)throw new Error(`Wallet for account ${t} does not exist`);n.details=e}))}catch(t){throw ds(t,Error)}}async removeAccounts(t){try{await this.update((async e=>{const r=new Set;for(const n of t){if(!this.isAccountExist(e,n))throw new Error(`Account id ${n} does not exist`);r.add(n)}r.forEach((t=>delete e.wallets[t])),e.walletIds=e.walletIds.filter((t=>!r.has(t)))}))}catch(t){throw ds(t,Error)}}async getAccount(t){try{var e;return(null===(e=(await this.get()).wallets[t])||void 0===e?void 0:e.account)??null}catch(t){throw ds(t,Error)}}async getWallet(t){try{return(await this.get()).wallets[t]??null}catch(t){throw ds(t,Error)}}async getWalletByAddress(t){const e=await this.get();return Object.values(e.wallets).find((e=>Fi(e.account.address.toString())===Fi(t)))??null}async listRequests(){const t=await this.get();return Object.values(t.requests)}async getRequest(t){try{return(await this.get()).requests[t]??null}catch(t){throw ds(t,Error)}}async upsertRequest(t){try{await this.update((async e=>{e.requests[t.keyringRequest.id]={...e.requests[t.keyringRequest.id],...t}}))}catch(t){throw ds(t,Error)}}async removeRequest(t){try{await this.update((async e=>{e.requests[t]?delete e.requests[t]:bo.debug(\"request not found\",t)}))}catch(t){throw ds(t,Error)}}async clearAllRequests(){await this.update((async t=>{t.requests={}}))}isAccountExist(t,e){return Object.prototype.hasOwnProperty.call(t.wallets,e)}isRequestExist(t,e){return Object.prototype.hasOwnProperty.call(t.requests,e)}async setActivated(t){await this.update((async e=>{e.activated=t}))}async getActivated(){return(await this.get()).activated}async setDevMode(t){await this.update((async e=>{e.devMode=t}))}async getDevMode(){return(await this.get()).devMode}async syncDevMode(){const t=await this.getDevMode();var e;e=t,dr.dev=e,ns(),bo.debug(\"Set dev mode to\",t)}},ys={upsertRequest:async t=>(ms=await Ms(),ms.upsertRequest(t)),listRequests:async()=>(ms=await Ms(),ms.listRequests())},bs={getCustodianApiForAddress:async t=>(ps=await ws(),await ps.getCustodianApiForAddress(t)),getAccount:async t=>(ps=await ws(),ps.getAccount(t))};async function vs(){return gs}async function ws(){return ps||(ps=new Xo(gs,ys)),ps}async function Ms(){return ms||(ms=new Qo(gs,bs)),ms}function _s(t,e,r){if(\"string\"==typeof t)throw new Error(`An HTML element (\"${String(t)}\") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!t)throw new Error(\"A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.\");return t({...e,key:r})}function Es(t,e,r){return _s(t,e,r)}function As(t){return Object.fromEntries(Object.entries(t).filter((([,t])=>void 0!==t)))}function Ss(t){return e=>{const{key:r=null,...n}=e;return{type:t,props:As(n),key:r}}}const xs=Ss(\"Container\"),Bs=Ss(\"Box\"),Ts=Ss(\"Heading\"),Is=Ss(\"Form\"),ks=Ss(\"Field\"),Ps=Ss(\"Input\"),Cs=Ss(\"Text\"),Rs=Ss(\"Footer\"),Os=Ss(\"Button\");var Ls,Ns;!function(t){t.RemoveCustodianToken=\"homepage-remove-custodian-token\",t.CancelRemoveToken=\"homepage-cancel-remove-token\",t.RemoveToken=\"homepage-remove-token\",t.CancelToken=\"homepage-cancel-token\",t.ToggleDevMode=\"homepage-toggle-dev-mode\"}(Ls||(Ls={})),function(t){t.SelectCustodian=\"homepage-select-\",t.ConnectToken=\"homepage-connect-token-\"}(Ns||(Ns={}));const Us=({custodianName:t,error:e})=>{var r,n;if(!t)throw new Error(\"Custodian name is required\");const i=Oo.find((e=>e.name===t));return Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Add Refresh Token\"}),Es(Is,{name:\"addTokenForm\",children:[_s(ks,{label:\"Paste your Refresh Token\",children:_s(Ps,{name:\"token\",placeholder:\"Enter your Refresh Token\"})}),_s(ks,{label:`${(null===(r=i)||void 0===r?void 0:r.displayName)??\"Custodian\"} API URL`,children:_s(Ps,{name:\"apiUrl\",value:null===(n=i)||void 0===n?void 0:n.apiBaseUrl})})]}),e?_s(Cs,{children:e}):null]}),Es(Rs,{children:[_s(Os,{name:Ls.CancelToken,children:\"Cancel\"}),_s(Os,{name:`${Ns.ConnectToken}${t}`,children:\"Connect\"})]})]})},js=Ss(\"Link\"),Ds=Ss(\"Section\"),zs=Ss(\"Image\"),Hs='\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 -34.5 129 129\">\\n    \u003Cg>\\n        \u003Cg>\\n            \u003Cg>\\n                \u003Cg>\\n                    \u003Cpath fill=\"#00e6e6\" d=\"M104.997 52.376a7.849 7.849 0 1 1 0-15.698 7.849 7.849 0 0 1 0 15.698zm9.814-19.595a12.908 12.908 0 0 0 3.149-8.463c0-7.159-5.804-12.962-12.963-12.962-7.159 0-12.962 5.803-12.962 12.962 0 3.235 1.188 6.191 3.148 8.463a15.275 15.275 0 0 0-5.494 11.747c0 8.454 6.853 15.308 15.308 15.308s15.309-6.854 15.309-15.308c0-4.72-2.137-8.939-5.495-11.747z\"/>\\n                \u003C/g>\\n                \u003Cg>\\n                    \u003Cpath fill=\"#00e6e6\" d=\"M23.375 59.153c-6.372 0-11.862-2.235-16.466-6.707C2.303 47.975 0 42.284 0 35.375c0-6.909 2.303-12.61 6.909-17.105 4.604-4.493 10.239-6.74 16.903-6.74 4.964 0 9.379 1.219 13.247 3.655a20.356 20.356 0 0 1 5.935 5.658c1.38 1.987-.02 4.706-2.44 4.706h-2.58a2.952 2.952 0 0 1-2.46-1.298c-2.552-3.83-6.453-5.745-11.702-5.745-4.696 0-8.531 1.542-11.504 4.628-2.975 3.085-4.46 7.166-4.46 12.241 0 5.076 1.485 9.156 4.46 12.241 2.973 3.086 6.674 4.629 11.101 4.629 4.428 0 7.949-1.174 10.564-3.522 1.663-1.492 2.906-3.323 3.729-5.493.744-1.962-.687-4.065-2.785-4.065H24.18a2.984 2.984 0 1 1 0-5.97H43.9a2.984 2.984 0 0 1 2.985 2.985v2.774c0 .14-.009.281-.028.421-.75 5.499-3.245 10.157-7.484 13.976-4.293 3.869-9.625 5.802-15.998 5.802z\"/>\\n                \u003C/g>\\n                \u003Cg>\\n                    \u003Cpath fill=\"#00e6e6\" d=\"M57.103 58.65h-.307a3.67 3.67 0 0 1-3.67-3.67V15.703a3.67 3.67 0 0 1 3.67-3.67h.307a3.67 3.67 0 0 1 3.67 3.67v17.594l17.65-20.02a3.669 3.669 0 0 1 2.753-1.243c3.192 0 4.862 3.794 2.706 6.148L70.316 32.99a3.67 3.67 0 0 0-.027 4.928l13.102 14.614c2.119 2.362.442 6.118-2.732 6.118h-.165a3.669 3.669 0 0 1-2.776-1.269L60.772 37.79v17.19a3.67 3.67 0 0 1-3.669 3.67z\"/>\\n                \u003C/g>\\n            \u003C/g>\\n            \u003Cg>\\n                \u003Cpath fill=\"#00e6e6\" d=\"M117.587 5.706a5.706 5.706 0 1 1 11.413 0 5.706 5.706 0 0 1-11.413 0z\"/>\\n            \u003C/g>\\n        \u003C/g>\\n    \u003C/g>\\n\u003C/svg>',Fs=Ss(\"Checkbox\"),$s=({devMode:t})=>_s(Bs,{children:_s(Fs,{checked:t,name:Ls.ToggleDevMode,variant:\"toggle\",label:\"Enable development custodians\"})}),Vs={\"bitgo-prod\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" fill=\"none\">\\n\u003Cg clip-path=\"url(#clip0_4284_19554)\">\\n\u003Crect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n\u003Cpath d=\"M15.9583 27.5C15.9583 27.5 25.7914 24.1545 25.7914 11.8674V7.44457C25.7914 6.9598 25.4144 6.57078 24.9415 6.54085C23.158 6.45108 18.9268 6.09199 15.9583 4.5C12.9956 6.09199 8.75836 6.45108 6.97486 6.53486C6.50205 6.57078 6.125 6.9598 6.125 7.44457V11.8674C6.125 24.1545 15.9583 27.5 15.9583 27.5Z\" fill=\"#00AEEF\"/>\\n\u003Cpath d=\"M19.9316 13.4826C19.812 12.1419 18.6628 11.6811 17.2025 11.5434L17.2085 9.67017L16.0773 9.67615L16.0833 11.4896C15.7841 11.4896 15.4668 11.4896 15.1617 11.4956V9.6582L14.0186 9.66419L14.0246 11.5255C13.7791 11.5315 11.7383 11.5315 11.7383 11.5315V12.7225H13.1866L13.1807 18.7073L11.9118 18.7133L11.8999 20.078C11.8999 20.078 13.6953 20.072 13.9587 20.072L13.9647 21.9572L15.0898 21.9632L15.1018 20.09C15.4131 20.0958 15.7122 20.1018 16.0056 20.1078L15.9996 21.9632H17.1427L17.1367 20.09C19.0398 19.9941 20.3805 19.5213 20.5601 17.7378C20.7037 16.2955 20.0333 15.6491 18.9501 15.3857C19.6085 15.0506 20.0215 14.4641 19.9316 13.4826ZM18.3217 17.4925C18.3097 18.899 15.9277 18.7253 15.1557 18.7193L15.1497 16.2237C15.9217 16.2296 18.3337 16.0262 18.3217 17.4925ZM17.819 13.9733C17.807 15.2541 15.82 15.0925 15.1856 15.0865L15.1796 12.8242C15.814 12.8242 17.825 12.6387 17.819 13.9733Z\" fill=\"white\"/>\\n\u003C/g>\\n\u003Cdefs>\\n\u003CclipPath id=\"clip0_4284_19554\">\\n\u003Crect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n\u003C/clipPath>\\n\u003C/defs>\\n\u003C/svg>',\"gk8-prod\":Hs,\"gk8-eca3-prod\":Hs,\"safe-prod\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 90 90\" fill=\"none\">\\n  \u003Cg transform=\"translate(0, 29)\">\\n\u003Cpath d=\"M44.5568 15.3278C43.7367 15.0109 42.735 14.7468 41.5518 14.5349H41.5267C40.3772 14.3399 39.5148 14.1609 38.9401 13.9979C38.3653 13.8358 37.9133 13.6162 37.5834 13.3395C37.2535 13.0633 37.0891 12.6811 37.0891 12.193C37.0891 11.4775 37.3682 10.9327 37.9258 10.5588C38.484 10.1848 39.2191 9.99761 40.1318 9.99761C41.1294 9.99761 41.936 10.2414 42.5535 10.7296C43.1076 11.1679 43.447 11.7247 43.5717 12.399C43.5964 12.5335 43.7145 12.6327 43.8563 12.6342L46.6622 12.6545C46.8342 12.6559 46.972 12.5137 46.9549 12.3487C46.8608 11.4465 46.5516 10.626 46.0276 9.88779C45.4443 9.06683 44.6413 8.42826 43.6185 7.97254C42.5957 7.51732 41.4337 7.28946 40.1318 7.28946C38.8978 7.28946 37.7866 7.50909 36.7975 7.94836C35.8089 8.38762 35.0395 8.99717 34.4899 9.77798C33.9403 10.5588 33.6658 11.4368 33.6658 12.4126C33.6658 13.4861 33.9107 14.3482 34.4009 14.9983C34.8912 15.649 35.5333 16.141 36.3278 16.4743C37.1223 16.8077 38.0772 17.0718 39.193 17.2672L39.3197 17.2914C40.5024 17.5028 41.3864 17.6901 41.9697 17.8526C42.553 18.0156 43.0131 18.243 43.3515 18.5357C43.6894 18.8284 43.8584 19.227 43.8584 19.7311C43.8584 20.4471 43.5541 21.0078 42.9457 21.4141C42.3373 21.821 41.5508 22.0242 40.5874 22.0242C39.4374 22.0242 38.5081 21.7436 37.7981 21.1824C37.152 20.672 36.7718 20.0165 36.6577 19.2163C36.6381 19.078 36.5184 18.973 36.3736 18.9711L33.5712 18.9304C33.4008 18.928 33.263 19.0664 33.2761 19.2299C33.3555 20.2139 33.6753 21.1006 34.2355 21.8902C34.8525 22.7605 35.7018 23.4435 36.7839 23.9394C37.8655 24.4358 39.108 24.6834 40.5114 24.6834C41.8128 24.6834 42.9794 24.4561 44.0107 24.0004C45.0415 23.5451 45.8491 22.9148 46.4324 22.1098C47.0157 21.3048 47.3073 20.3982 47.3073 19.3895C47.3073 18.3161 47.0534 17.4501 46.5465 16.7912C46.0397 16.1323 45.3759 15.6447 44.5563 15.3273L44.5568 15.3278Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M61.7876 21.9027H61.3497C61.0962 21.9027 60.8971 21.8379 60.7538 21.7073C60.61 21.5776 60.5381 21.3657 60.5381 21.0731V16.4134C60.5381 14.9335 60.0478 13.8073 59.0678 13.0347C58.0872 12.2626 56.9327 11.8688 55.124 11.8688C53.4163 11.8688 52.0823 12.2259 51.0344 12.9249C50.079 13.5625 49.5032 14.4357 49.3061 15.546C49.2754 15.7187 49.4112 15.8769 49.5927 15.8769H52.1698C52.299 15.8769 52.4147 15.7951 52.4489 15.6751C52.5665 15.2644 52.826 14.9292 53.2273 14.6694C53.6919 14.3685 54.244 14.218 54.9711 14.218C56.3424 14.218 57.3174 15.0312 57.3174 16.2426V16.6214C57.3174 16.7762 57.1871 16.9015 57.0262 16.9015H54.6921C52.7989 16.9015 51.3617 17.2595 50.3817 17.975C49.4012 18.691 48.9109 19.7074 48.9109 21.0242C48.9109 22.163 49.3589 23.0575 50.255 23.7077C50.9273 24.1953 51.7308 24.4769 52.558 24.6002C53.1901 24.6946 53.8392 24.7289 54.4728 24.6312C55.1366 24.5291 55.6756 24.266 56.2152 23.8905C56.6999 23.5538 57.1042 23.1223 57.4733 22.596C57.6533 22.2985 58.1255 22.4179 58.1255 22.7619V23.1755C58.125 23.9273 58.758 24.5369 59.5394 24.5369H61.7876C61.9486 24.5369 62.0788 24.4116 62.0788 24.2568V22.1823C62.0788 22.0275 61.9486 21.9022 61.7876 21.9022V21.9027ZM57.3179 19.39C57.3179 19.9918 57.1866 20.5162 56.9247 20.9632C56.3756 21.9008 55.393 22.3904 54.2873 22.3904C53.6446 22.3904 53.1292 22.2443 52.7405 21.9516C52.3513 21.6589 52.1572 21.2685 52.1572 20.7804C52.1572 20.2279 52.3729 19.8007 52.8039 19.4998C53.2348 19.1994 53.8473 19.0485 54.6423 19.0485H57.0267C57.1877 19.0485 57.3179 19.1738 57.3179 19.3286V19.39V19.39Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M71.1823 7.46796H67.8288C66.0598 7.46796 64.6257 8.84767 64.6257 10.5496V11.9037C64.6257 12.0585 64.4955 12.1838 64.3346 12.1838H62.4197C62.2588 12.1838 62.1286 12.3091 62.1286 12.4639V14.5625C62.1286 14.7173 62.2588 14.8426 62.4197 14.8426H64.3346C64.4955 14.8426 64.6257 14.9679 64.6257 15.1227V24.2572C64.6257 24.412 64.7559 24.5373 64.9169 24.5373H67.5296C67.6905 24.5373 67.8208 24.412 67.8208 24.2572V15.1227C67.8208 14.9679 67.951 14.8426 68.1119 14.8426H71.1566C71.3175 14.8426 71.4478 14.7173 71.4478 14.5625V12.4639C71.4478 12.3091 71.3175 12.1838 71.1566 12.1838H68.1119C67.951 12.1838 67.8208 12.0585 67.8208 11.9037V10.687C67.8208 10.3774 68.0817 10.1268 68.403 10.1268H71.1817C71.3427 10.1268 71.4729 10.0015 71.4729 9.84666V7.74806C71.4729 7.59325 71.3427 7.46796 71.1817 7.46796H71.1823Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M83.9825 14.7062C83.4163 13.7957 82.6425 13.0962 81.6624 12.608C80.6819 12.1204 79.549 11.8693 78.2647 11.8693C76.9805 11.8693 75.8722 12.1407 74.8922 12.669C73.9116 13.1978 73.1508 13.9457 72.6103 14.9132C72.0692 15.8812 71.7987 17.0152 71.7987 18.3165C71.7987 19.6179 72.0778 20.7035 72.6354 21.671C73.1936 22.6385 73.9921 23.3826 75.0315 23.9031C76.0708 24.4237 77.2922 24.6839 78.6957 24.6839C79.7773 24.6839 80.7453 24.4928 81.5991 24.1107C82.4524 23.729 83.1413 23.2041 83.6653 22.5374C84.1138 21.9666 84.42 21.3416 84.5839 20.6628C84.6267 20.4867 84.4884 20.3174 84.3003 20.3174H81.6755C81.5498 20.3174 81.4397 20.3958 81.3995 20.5104C81.2144 21.0363 80.8881 21.4519 80.4199 21.7566C79.8955 22.0982 79.2448 22.2689 78.4674 22.2689C77.8248 22.2689 77.2631 22.1388 76.7814 21.8785C76.2996 21.6188 75.9195 21.2525 75.6404 20.7809C75.5303 20.5946 75.4403 20.3977 75.3684 20.195C75.2914 19.9773 75.2361 19.7529 75.1979 19.5255C75.1848 19.4461 75.1728 19.3658 75.1627 19.2855C75.1431 19.1201 75.2794 18.9754 75.4524 18.9754H84.504C84.6508 18.9754 84.7765 18.8709 84.7931 18.7302C84.8057 18.6271 84.8142 18.5221 84.8188 18.4143C84.8273 18.2193 84.8313 18.0403 84.8313 17.8778C84.8313 16.6746 84.5482 15.6176 83.982 14.7066L83.9825 14.7062ZM81.2627 16.8526H75.5936C75.4076 16.8526 75.2673 16.6867 75.3085 16.5121C75.3991 16.1294 75.5559 15.784 75.7792 15.4744C76.0663 15.0762 76.4384 14.771 76.895 14.5596C77.3516 14.3482 77.8499 14.2422 78.391 14.2422C79.2699 14.2422 79.997 14.4701 80.5718 14.9253C81.0651 15.3162 81.3899 15.8445 81.5473 16.5106C81.5885 16.6857 81.4492 16.8526 81.2627 16.8526V16.8526Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M26.7572 15.9983H24.2722C23.53 15.9983 22.9286 16.5769 22.9286 17.291V20.761C22.9286 21.4751 22.3272 22.0537 21.585 22.0537H11.6986C10.9564 22.0537 10.355 22.6323 10.355 23.3463V25.7371C10.355 26.4512 10.9564 27.0298 11.6986 27.0298H22.1572C22.8994 27.0298 23.4923 26.4512 23.4923 25.7371V23.819C23.4923 23.1049 24.0937 22.5984 24.8359 22.5984H26.7567C27.4989 22.5984 28.1003 22.0198 28.1003 21.3058V17.276C28.1003 16.5619 27.4989 15.9983 26.7567 15.9983H26.7572Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M10.3545 11.2487C10.3545 10.5346 10.9559 9.95602 11.6981 9.95602H21.5785C22.3206 9.95602 22.922 9.37743 22.922 8.66338V6.27259C22.922 5.55854 22.3206 4.97995 21.5785 4.97995H11.1254C10.3832 4.97995 9.7818 5.55854 9.7818 6.27259V8.11479C9.7818 8.82883 9.1804 9.40742 8.43821 9.40742H6.5259C5.78371 9.40742 5.18231 9.98601 5.18231 10.7001V14.7342C5.18231 15.4483 5.78622 15.9978 6.52842 15.9978H9.01346C9.75565 15.9978 10.357 15.4192 10.357 14.7052L10.3545 11.2491V11.2487Z\" fill=\"#121312\"/>\\n\u003Cpath d=\"M15.4719 13.4851H17.8589C18.6368 13.4851 19.2679 14.0928 19.2679 14.8407V17.1371C19.2679 17.8855 18.6363 18.4927 17.8589 18.4927H15.4719C14.6941 18.4927 14.063 17.885 14.063 17.1371V14.8407C14.063 14.0923 14.6946 13.4851 15.4719 13.4851V13.4851Z\" fill=\"#121312\"/>\\n\u003C/g>\\n\u003C/svg>',\"mpcvault-prod\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 1024 1024\" fill=\"none\">\\n\u003Cpath d=\"M409.166 218.478C454.87 141.841 569.13 141.841 614.834 218.478L895.914 689.798C941.618 766.435 884.488 862.232 793.08 862.232H230.92C139.512 862.232 82.3816 766.435 128.086 689.798L409.166 218.478Z\" fill=\"black\"/>\\n\u003C/svg>',\"fireblocks-prod\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\\n\u003Cpath d=\"M23.0522 0C23.5757 0 24 0.429807 24 0.96V23.04C24 23.5702 23.5757 24 23.0522 24H0.947791C0.424341 24 0 23.5702 0 23.04V0.96C0 0.429807 0.424341 0 0.947791 0H23.0522ZM11.9999 6.66667L5.33328 17.3333H18.6666L11.9999 6.66667Z\" fill=\"#002E7F\"/>\\n\u003C/svg>',\"neptune-custody-dev\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 480 480\" fill=\"none\">\\n\u003Cg clip-path=\"url(#clip0_1_2)\">\\n\u003Cpath d=\"M480 240C480 372.547 372.547 480 240 480C107.453 480 -3.05176e-05 372.547 -3.05176e-05 240C-3.05176e-05 107.453 107.453 -3.05176e-05 240 -3.05176e-05C372.547 -3.05176e-05 480 107.453 480 240ZM398.187 79.4266C394.192 81.0898 393.034 87.432 395.6 93.5915C398.166 99.7511 403.482 103.399 407.477 101.736C411.472 100.072 412.63 93.7302 410.064 87.5706C407.498 81.4111 402.18 77.7635 398.187 79.4266ZM382.442 422.44C341.108 438.44 263.331 446.216 197.553 443.549C233.558 457.352 337.148 456.509 382.442 422.44ZM269.166 180.6C263.571 180.6 259.038 182.867 259.038 185.666C259.038 188.466 263.571 190.732 269.166 190.732C274.762 190.732 279.295 188.464 279.295 185.666C279.293 182.867 274.76 180.6 269.166 180.6ZM422.411 137.939C413.104 148.044 398.581 158.157 386.666 164.333C412.916 157.404 423.626 162.019 432.932 155.255C438.979 150.852 431.839 127.704 422.41 137.939H422.411ZM264.411 360.534C187.788 359.345 222.336 383.58 259.734 383.911C293.044 384.204 339.792 361.703 264.411 360.534ZM177.557 264.663C170 260.439 155.781 252.22 146 245.106C154 247.772 164.443 248.663 191.111 247.33C173.778 245.772 144.889 238.439 121.778 231.996C132.444 244.22 152.444 260.663 177.56 264.663L177.557 264.663ZM271.335 305.106C247.778 304.215 214.224 300.439 189.78 295.106C212.649 308.349 240.824 314.673 271.335 305.106ZM286.892 297.772C304.668 284.882 290.892 275.548 272.002 265.548C287.559 265.772 350.668 259.324 375.006 246.328C324.668 256.333 234.668 249.996 207.113 247.772C231.561 256.22 275.562 273.554 286.895 297.772H286.892Z\" fill=\"url(#paint0_linear_1_2)\"/>\\n\u003C/g>\\n\u003Cdefs>\\n\u003ClinearGradient id=\"paint0_linear_1_2\" x1=\"62.6666\" y1=\"43.1667\" x2=\"287\" y2=\"296.5\" gradientUnits=\"userSpaceOnUse\">\\n\u003Cstop stop-color=\"#444FAC\"/>\\n\u003Cstop offset=\"1\" stop-color=\"#8BBAF9\"/>\\n\u003C/linearGradient>\\n\u003CclipPath id=\"clip0_1_2\">\\n\u003Crect width=\"480\" height=\"480\" fill=\"white\"/>\\n\u003C/clipPath>\\n\u003C/defs>\\n\u003C/svg>',\"zodia-prod\":'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" width=\"24\" viewBox=\"-517.605 -517.605 1879.26 1879.26\">\u003Cg fill=\"#007978\">\u003Cpath d=\"m794.78 0c-22.41 0-41.59 13.76-49.61 33.29l-455.23 86.05c-9.55-14.79-26.14-24.6-45.05-24.6-29.62 0-53.62 24.01-53.62 53.62s22.02 51.51 49.88 53.43l54.66 142.72-208.27 133.49c-9.24-7.56-21.05-12.11-33.92-12.11-29.62 0-53.62 24.01-53.62 53.62s24.01 53.62 53.62 53.62c8.77 0 17.03-2.15 24.33-5.88l363.21 221.33c-.02.64-.1 1.27-.1 1.92 0 29.62 24.01 53.62 53.62 53.62s53.62-24.01 53.62-53.62c0-26.97-19.93-49.22-45.85-53l-142.43-371.89 411.53-263.72c7.04 3.39 14.9 5.35 23.24 5.35 29.62 0 53.62-24.01 53.62-53.62s-24.01-53.62-53.63-53.62zm-352.03 728.17-332.36-202.54 204.58-131.12 127.78 333.65zm-101.86-412.53-52.22-136.36c1.6-2.26 3.01-4.65 4.25-7.14l385.62-72.89-337.64 216.4z\"/>\u003Cpath d=\"m770.61 683.14c10.34-6.29 22.29-9.44 35.85-9.44 15.51 0 28.51 4.05 39 12.16 10.48 8.11 17.26 19.5 20.33 34.18h-11.32c-3.08-11.46-8.88-20.3-17.4-26.52-8.53-6.22-18.94-9.33-31.24-9.33-11.18 0-20.97 2.72-29.36 8.18-8.39 5.45-14.88 13.03-19.5 22.75-4.61 9.72-6.92 20.8-6.92 33.23s2.31 23.52 6.92 33.23c4.61 9.72 11.11 17.3 19.5 22.75s18.17 8.18 29.36 8.18c12.58 0 23.03-3.08 31.34-9.23 8.32-6.15 14.01-15.09 17.09-26.84h11.32c-3.22 14.82-9.96 26.28-20.23 34.38-10.27 8.11-23.24 12.16-38.89 12.16-13.56 0-25.51-3.11-35.85-9.33-10.35-6.22-18.31-14.99-23.9-26.31s-8.39-24.32-8.39-39 2.8-27.46 8.39-38.79c5.59-11.32 13.56-20.13 23.9-26.42z\"/>\u003Cpath d=\"m939.62 761.76c0 17.05 3.42 29.78 10.27 38.16 6.85 8.39 17.47 12.58 31.87 12.58s25.27-4.19 32.18-12.58c6.92-8.39 10.38-21.11 10.38-38.16v-86.8h11.32v86.17c0 41.23-17.96 61.85-53.88 61.85s-53.46-20.62-53.46-61.85v-86.17h11.32z\"/>\u003Cpath d=\"m1122.26 802.76c7.83 6.5 17.96 9.75 30.41 9.75s21.63-2.69 28.83-8.07 10.8-12.75 10.8-22.12c0-6.71-1.92-12.02-5.76-15.94-3.84-3.91-8.77-6.81-14.79-8.7-6.01-1.89-13.69-3.6-23.06-5.14-9.79-1.67-17.96-3.74-24.53-6.18s-12.02-6.22-16.35-11.32c-4.34-5.1-6.5-12.06-6.5-20.86 0-8.1 2.03-15.24 6.08-21.38s9.82-10.9 17.29-14.26c7.48-3.35 16.11-5.03 25.89-5.03 14.54 0 26.38 3.81 35.54 11.43 9.15 7.62 14.29 17.72 15.41 30.3l-11.11.21c-1.26-9.65-5.45-17.33-12.58-23.06s-16.21-8.6-27.26-8.6c-11.6 0-20.83 2.62-27.68 7.86s-10.27 12.54-10.27 21.91c0 6.57 1.81 11.74 5.45 15.52s8.21 6.5 13.74 8.18c5.52 1.68 13.1 3.35 22.75 5.03 9.78 1.54 18.14 3.6 25.06 6.18 6.92 2.59 12.65 6.53 17.19 11.85 4.55 5.31 6.81 12.37 6.81 21.17 0 8.11-2.13 15.31-6.39 21.59-4.26 6.29-10.24 11.18-17.92 14.68-7.69 3.49-16.63 5.24-26.84 5.24s-19.96-1.92-27.99-5.76-14.32-9.3-18.87-16.36-7.02-15.2-7.44-24.43h11.32c.7 11.04 4.96 19.81 12.79 26.31z\"/>\u003Cpath d=\"m1361.94 674.97v10.48h-50.32v136.28h-11.32v-136.28h-50.32v-10.48z\"/>\u003Cpath d=\"m1507.15 813.44c-10.41 6.36-22.26 9.54-35.54 9.54s-25.12-3.18-35.53-9.54-18.52-15.24-24.32-26.63-8.7-24.22-8.7-38.47 2.9-27.08 8.7-38.47c5.8-11.4 13.91-20.27 24.32-26.63s22.26-9.54 35.53-9.54 25.13 3.18 35.54 9.54 18.52 15.24 24.32 26.63 8.7 24.22 8.7 38.47-2.9 27.08-8.7 38.47-13.91 20.27-24.32 26.63zm-64.99-9.11c8.6 5.45 18.42 8.18 29.45 8.18s20.9-2.72 29.57-8.18c8.67-5.45 15.41-13.03 20.23-22.75 4.82-9.71 7.23-20.79 7.23-33.23s-2.41-23.51-7.23-33.23c-4.82-9.71-11.57-17.29-20.23-22.75-8.67-5.45-18.52-8.18-29.57-8.18s-20.86 2.72-29.45 8.18c-8.6 5.45-15.31 13.03-20.13 22.75s-7.23 20.8-7.23 33.23 2.41 23.52 7.23 33.23c4.82 9.72 11.53 17.3 20.13 22.75z\"/>\u003Cpath d=\"m1642.95 674.97c15.37 0 28.58 3.01 39.63 9.02 11.04 6.01 19.5 14.53 25.37 25.58 5.87 11.04 8.81 23.97 8.81 38.79s-2.93 27.75-8.81 38.79c-5.87 11.04-14.32 19.57-25.37 25.58-11.04 6.01-24.25 9.02-39.63 9.02h-39.42v-146.76h39.42zm45.91 119.4c10.9-11.25 16.35-26.6 16.35-46.02s-5.42-34.94-16.25-46.12-26.17-16.78-46.02-16.78h-28.1v125.8h28.1c19.71 0 35.01-5.63 45.92-16.87z\"/>\u003Cpath d=\"m1768.77 674.76 48.65 80.51 49.06-80.51h12.79l-56.19 92.88v54.09h-11.32v-54.09l-56.19-92.88h13.21z\"/>\u003Cpath d=\"m948.1 346.36v-30.87h-202.2v37.35h147.42l-153.89 185.77v30.88h215.15v-37.36h-160.87z\"/>\u003Cpath d=\"m1163 328.93c-19.09-10.96-40.92-16.43-65.49-16.43s-46.4 5.48-65.49 16.43c-19.09 10.96-33.95 26.23-44.57 45.82-10.63 19.59-15.94 42.17-15.94 67.73s5.31 48.14 15.94 67.74c10.62 19.59 25.48 34.86 44.57 45.82s40.93 16.44 65.49 16.44 46.4-5.48 65.49-16.44 33.95-26.23 44.58-45.82c10.62-19.59 15.94-42.17 15.94-67.74s-�s��5.31-48.14-15.94-67.73c-10.62-19.59-25.49-34.86-44.58-45.82zm8.22 161.87c-6.97 14.27-16.85 25.4-29.63 33.36-12.78 7.97-27.47 11.95-44.07 11.95s-31.3-3.98-44.08-11.95-22.66-19.09-29.63-33.36c-6.97-14.28-10.46-30.38-10.46-48.31s3.49-34.03 10.46-48.31 16.85-25.4 29.63-33.37 27.48-11.95 44.08-11.95 31.29 3.99 44.07 11.95c12.78 7.97 22.66 19.09 29.63 33.37s10.46 30.38 10.46 48.31-3.49 34.03-10.46 48.31z\"/>\u003Cpath d=\"m1470.54 354.33c-8.3-12.95-19.76-23.16-34.37-30.63s-32.2-11.21-52.79-11.21c-23.24 0-44.16 5.48-62.76 16.43-18.59 10.96-33.12 26.23-43.58 45.82s-15.69 42.17-15.69 67.73c0 26.89 5.23 50.14 15.69 69.73s24.9 34.53 43.33 44.82 39.43 15.44 63 15.44c36.85 0 65.9-14.61 87.16-43.83l5.48 40.84h35.36v-348.61h-40.84v133.47zm-9.96 137.21c-6.97 14.11-16.85 25.07-29.63 32.87s-27.31 11.7-43.58 11.7c-25.23 0-45.57-8.71-61.01-26.15-15.44-17.43-23.16-39.93-23.16-67.49s7.72-50.05 23.16-67.48 35.78-26.15 61.01-26.15c16.27 0 30.79 3.99 43.58 11.95 12.78 7.97 22.66 19.17 29.63 33.62 6.97 14.44 10.46 30.79 10.46 49.06s-3.49 33.95-10.46 48.06z\"/>\u003Cpath d=\"m1567.16 315.49h40.84v254h-40.84z\"/>\u003Cpath d=\"m1587.58 217.37c-7.63 0-13.95 2.49-18.92 7.47-4.98 4.98-7.47 11.29-7.47 18.93s2.49 13.95 7.47 18.93 11.29 7.47 18.92 7.47 13.95-2.49 18.93-7.47 7.47-11.29 7.47-18.93-2.49-13.95-7.47-18.93-11.29-7.47-18.93-7.47z\"/>\u003Cpath d=\"m1845.31 336.16c-17.76-15.77-42.92-23.66-75.45-23.66-30.55 0-55.37 6.97-74.46 20.92s-30.13 33.37-33.12 58.27h40.84c2.66-12.95 9.71-23.32 21.16-31.13 11.46-7.81 25.98-11.71 43.58-11.71 19.92 0 35.44 4.65 46.56 13.95s16.68 22.25 16.68 38.85v17.43h-74.7c-33.2 0-58.52 6.81-75.95 20.42s-26.15 33.2-26.15 58.77c0 22.91 8.55 41 25.65 54.28 17.1 13.29 39.76 19.93 67.98 19.93 37.19 0 65.58-14.11 85.16-42.33v39.13h38.73v-.05s.08 0 .12.01v-165.1c0-29.55-8.88-52.21-26.64-67.98zm-14.2 129.74c0 21.58-7.14 38.93-21.42 52.04-14.28 13.12-33.87 19.67-58.77 19.67-16.94 0-30.38-3.82-40.34-11.45-9.96-7.64-14.94-17.76-14.94-30.38 0-28.22 18.92-42.33 56.78-42.33h78.69v12.46z\"/>\u003C/g>\u003C/svg>',cactus:'\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" fill=\"none\">\\n\u003Crect width=\"32\" height=\"32\" rx=\"4\" fill=\"white\"/>\\n\u003Cg clip-path=\"url(#clip0_4284_19593)\">\\n\u003Cpath d=\"M16.0193 19.9909C13.8104 19.9909 12.0199 18.2019 12.0221 15.996C12.0164 13.7992 13.7952 12.0147 15.995 12.009H16.0377C17.7967 12.0168 19.2872 13.1588 19.8136 14.7403C19.8583 14.875 19.9444 14.9923 20.0596 15.0754C20.1748 15.1586 20.3133 15.2034 20.4554 15.2035H23.976C24.0197 15.2035 24.0617 15.1861 24.0926 15.1552C24.1236 15.1243 24.141 15.0824 24.141 15.0387V14.132C24.141 14.1126 24.1487 14.094 24.1625 14.0802C24.1762 14.0665 24.1949 14.0588 24.2143 14.0588H25.0721C25.0915 14.0588 25.1102 14.0665 25.1239 14.0802C25.1377 14.094 25.1454 14.1126 25.1454 14.132V15.0389C25.1454 15.0826 25.1628 15.1245 25.1938 15.1554C25.2247 15.1863 25.2667 15.2037 25.3105 15.2037H25.8121C25.8559 15.2037 25.8979 15.1863 25.9288 15.1554C25.9598 15.1245 25.9772 15.0826 25.9772 15.0389V14.132C25.9772 14.1126 25.9849 14.094 25.9986 14.0802C26.0124 14.0665 26.031 14.0588 26.0505 14.0588H26.9083C26.9277 14.0588 26.9464 14.0665 26.9601 14.0802C26.9739 14.094 26.9816 14.1126 26.9816 14.132V15.0389C26.9816 15.0826 26.999 15.1245 27.0299 15.1554C27.0609 15.1863 27.1029 15.2037 27.1466 15.2037H27.8342C27.878 15.2037 27.92 15.1863 27.9509 15.1554C27.9819 15.1245 27.9993 15.0826 27.9993 15.0389C27.9993 15.0343 27.9993 15.0296 27.9993 15.025C27.5029 8.85639 22.333 4.00385 16.0269 4C9.39083 3.99597 4 9.37502 4 16.0002C4 22.6254 9.38129 28 16.0193 28C22.3288 28 27.5027 23.1462 27.9994 16.9747C28.0012 16.9531 27.9987 16.9314 27.9921 16.9108C27.9855 16.8902 27.9749 16.8711 27.9609 16.8546C27.9469 16.8381 27.9297 16.8245 27.9105 16.8146C27.8912 16.8047 27.8701 16.7987 27.8485 16.7969C27.8438 16.7969 27.8392 16.7969 27.8344 16.7969H20.4558C20.3129 16.7974 20.1738 16.8428 20.0582 16.9267C19.9427 17.0106 19.8565 17.1287 19.812 17.2643C19.2824 18.8485 17.7846 19.9909 16.0193 19.9909Z\" fill=\"#1C46A0\"/>\\n\u003C/g>\\n\u003Cdefs>\\n\u003CclipPath id=\"clip0_4284_19593\">\\n\u003Crect width=\"24\" height=\"24\" fill=\"white\" transform=\"translate(4 4)\"/>\\n\u003C/clipPath>\\n\u003C/defs>\\n\u003C/svg>'},qs=({accounts:t,devMode:e})=>{var r;const n=t=>t.name.startsWith(\"gk8\")||t.name.startsWith(\"neptune\")?_s(Os,{name:`${Ns.SelectCustodian}${t.name}`,children:\"Select\"}):t.onboardingUrl?_s(js,{href:t.onboardingUrl,children:\"Select\"}):null;return Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Select custodian\"}),_s(Cs,{children:\"Connect your existing accounts or select a custody or self-custody solution\"}),Oo.filter((t=>!!pr.dev||t.production)).map((t=>Es(Ds,{direction:\"horizontal\",alignment:\"space-between\",children:[Es(Bs,{direction:\"horizontal\",children:[_s(zs,{src:Vs[t.name]??'\u003Csvg width=\"24\" height=\"25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\u003Cpath d=\"M17.037 0H6.975C2.605 0 0 2.617 0 6.987v10.05c0 4.37 2.605 6.975 6.975 6.975h10.05c4.37 0 6.975-2.605 6.975-6.976V6.988C24.012 2.617 21.407 0 17.037 0ZM11.49 17.757c0 .36-.18.684-.492.876a.975.975 0 0 1-.54.156 1.11 1.11 0 0 1-.469-.108l-4.202-2.1a1.811 1.811 0 0 1-.985-1.61v-3.973c0-.36.18-.685.493-.877a1.04 1.04 0 0 1 1.008-.048l4.202 2.101a1.8 1.8 0 0 1 .997 1.609v3.974h-.012Zm-.252-6.423L6.723 8.896a1.045 1.045 0 0 1-.528-.924c0-.384.204-.744.528-.924l4.515-2.438a1.631 1.631 0 0 1 1.524 0l4.515 2.438c.324.18.528.528.528.924s-.204.744-.528.924l-4.515 2.438c-.24.132-.504.192-.768.192a1.54 1.54 0 0 1-.756-.192Zm7.972 3.638c0 .684-.385 1.308-.997 1.608l-4.202 2.101c-.144.072-.3.108-.468.108a.975.975 0 0 1-.54-.156 1.017 1.017 0 0 1-.493-.876v-3.974c0-.684.384-1.309.997-1.609l4.202-2.101a1.04 1.04 0 0 1 1.008.048c.313.192.493.516.493.877v3.974Z\" fill=\"#24272A\"/>\u003C/svg>\\n'}),_s(Cs,{children:t.displayName})]}),n(t)]},t.name))),_s($s,{devMode:e??!1})]}),_s(Rs,{children:_s(Os,{name:Ls.RemoveCustodianToken,disabled:!(null===(r=t)||void 0===r?void 0:r.length),children:\"Remove custodian token\"})})]})},Gs=Ss(\"Avatar\"),Ks=({accounts:t})=>Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Remove Custodian Token\"}),_s(Cs,{children:\"Are you sure you want to remove this toke? All custodial accounts assigned to this token will be removed from the extension as well.\"}),t.map((t=>Es(Ds,{direction:\"horizontal\",alignment:\"space-between\",children:[Es(Bs,{direction:\"horizontal\",children:[_s(Gs,{address:`eip155:1:${t.address}`}),Es(Bs,{children:[t.options.accountName?_s(Cs,{children:t.options.accountName}):null,Es(Cs,{children:[t.address.slice(0,6),\"...\",t.address.slice(-4)]})]})]}),_s(Cs,{children:t.options.custodian.displayName})]})))]}),Es(Rs,{children:[_s(Os,{name:Ls.CancelRemoveToken,children:\"Cancel\"}),_s(Os,{name:Ls.RemoveToken,children:\"Remove\"})]})]});async function Js(t,e){return snap.request({method:\"snap_createInterface\",params:{ui:t,context:e}})}async function Ws(t,e,r){return snap.request({method:\"snap_updateInterface\",params:{id:t,ui:e,context:r}})}async function Zs(t){return snap.request({method:\"snap_getInterfaceState\",params:{id:t}})}async function Xs(t,e){return snap.request({method:\"snap_resolveInterface\",params:{id:t,value:e}})}async function Ys({id:t,context:e}){await Ws(t,_s(qs,{accounts:e.accounts}),e)}const Qs={[Ls.RemoveCustodianToken]:async function({id:t,context:e}){await Ws(t,_s(Ks,{accounts:e.accounts}),e)},[Ls.CancelRemoveToken]:Ys,[Ls.RemoveToken]:async function({id:t,context:e,snapContext:r}){var n;for(const t of(null===(n=e.accounts)||void 0===n?void 0:n.map((t=>t.id)))??[])try{var i;await(null===(i=r.keyring)||void 0===i?void 0:i.deleteAccount(t))}catch(t){bo.error(\"Error deleting account\",t)}await Ws(t,_s(qs,{accounts:e.accounts}),e)},[Ls.CancelToken]:Ys,[Ls.ToggleDevMode]:async function({id:t,context:e,event:r}){const n=Boolean(r.value);await hu(n),await Ws(t,_s(qs,{accounts:e.accounts,devMode:n}),e)}},ta={[Ns.SelectCustodian]:async function({id:t,event:e,context:r}){var n;await Ws(t,_s(Us,{custodianName:(null===(n=e.name)||void 0===n?void 0:n.replace(Ns.SelectCustodian,\"\"))??\"\"}),r)},[Ns.ConnectToken]:async function({id:t,event:e,context:r}){var n;const i=(null===(n=e.name)||void 0===n?void 0:n.replace(Ns.ConnectToken,\"\"))??\"\",o=Oo.find((t=>t.name===i));if(!o)throw new Error(\"Custodian not found\");const s=await Zs(t);try{var a;const{apiUrl:t,token:e}=s.addTokenForm;let r=t;var u;if(!r.length)r=(null===(u=o)||void 0===u?void 0:u.apiBaseUrl)??\"\";if(!(null===(a=e)||void 0===a?void 0:a.length))throw new Error(\"Token is required\");const n={custodianType:o.apiVersion,custodianEnvironment:o.name??\"\",custodianApiUrl:r,custodianDisplayName:o.displayName??\"\",token:e,refreshTokenUrl:o.refreshTokenUrl??\"\"};await ru(n,\"metamask\")}catch(e){bo.error(\"Error onboarding\",e),e instanceof Error?await Ws(t,_s(Us,{custodianName:i,error:e.message}),r):await Yo(\"An unknown error occurred\")}}};async function ea(t){return await Js(_s(qs,{accounts:t.accounts,devMode:t.devMode}),t)}const ra=({title:t,message:e})=>_s(xs,{children:Es(Bs,{children:[_s(Ts,{children:t}),_s(Cs,{children:e})]})});var na;!function(t){t.ConfirmButton=\"onboarding-confirm\",t.CancelButton=\"onboarding-cancel\"}(na||(na={}));const ia=\"onboarding-address-selector-\";const oa={[na.ConfirmButton]:async function({id:t,context:e}){const r=await Zs(t),n=Object.keys(r).filter((t=>!0===r[t])).map((t=>t.replace(ia,\"\"))).map((t=>e.accounts.filter((e=>e.address===t)))).flat().map((t=>({address:t.address,name:t.name})));0===n.length?await Ws(t,_s(ra,{title:\"No accounts imported\",message:\"No accounts were selected\"}),e):await Xs(t,n)},[na.CancelButton]:async function({id:t}){await Xs(t,[])}},sa=Ss(\"Divider\");function aa(t){if(!Number.isSafeInteger(t)||t\u003C0)throw new Error(`positive integer expected, not ${t}`)}function ua(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function ha(t,e=!0){if(t.destroyed)throw new Error(\"Hash instance has been destroyed\");if(e&&t.finished)throw new Error(\"Hash#digest() has already been called\")}function ca(t,e){ua(t);const r=e.outputLen;if(t.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const fa=BigInt(2**32-1),la=BigInt(32);function da(t,e=!1){return e?{h:Number(t&fa),l:Number(t>>la&fa)}:{h:0|Number(t>>la&fa),l:0|Number(t&fa)}}function pa(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i\u003Ct.length;i++){const{h:o,l:s}=da(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const ma=(t,e,r)=>t\u003C\u003Cr|e>>>32-r,ga=(t,e,r)=>e\u003C\u003Cr|t>>>32-r,ya=(t,e,r)=>e\u003C\u003Cr-32|t>>>64-r,ba=(t,e,r)=>t\u003C\u003Cr-32|e>>>64-r;const va=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],wa=t=>t\u003C\u003C24&4278190080|t\u003C\u003C8&16711680|t>>>8&65280|t>>>24&255;function Ma(t){for(let e=0;e\u003Ct.length;e++)t[e]=wa(t[e])}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,\"0\")));function _a(t){return\"string\"==typeof t&&(t=function(t){if(\"string\"!=typeof t)throw new Error(\"utf8ToBytes expected string, got \"+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),ua(t),t}class Ea{clone(){return this._cloneInto()}}const Aa=[],Sa=[],xa=[],Ba=BigInt(0),Ta=BigInt(1),Ia=BigInt(2),ka=BigInt(7),Pa=BigInt(256),Ca=BigInt(113);for(let t=0,e=Ta,r=1,n=0;t\u003C24;t++){[r,n]=[n,(2*r+3*n)%5],Aa.push(2*(5*n+r)),Sa.push((t+1)*(t+2)/2%64);let i=Ba;for(let t=0;t\u003C7;t++)e=(e\u003C\u003CTa^(e>>ka)*Ca)%Pa,e&Ia&&(i^=Ta\u003C\u003C(Ta\u003C\u003CBigInt(t))-Ta);xa.push(i)}const[Ra,Oa]=pa(xa,!0),La=(t,e,r)=>r>32?ya(t,e,r):ma(t,e,r),Na=(t,e,r)=>r>32?ba(t,e,r):ga(t,e,r);class Ua extends Ea{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,aa(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){va||Ma(this.state32),function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n\u003C24;n++){for(let e=0;e\u003C10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e\u003C10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=La(o,s,1)^r[n],u=Na(o,s,1)^r[n+1];for(let r=0;r\u003C50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r\u003C24;r++){const n=Sa[r],o=La(e,i,n),s=Na(e,i,n),a=Aa[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e\u003C50;e+=10){for(let n=0;n\u003C10;n++)r[n]=t[e+n];for(let n=0;n\u003C10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Ra[n],t[1]^=Oa[n]}r.fill(0)}(this.state32,this.rounds),va||Ma(this.state32),this.posOut=0,this.pos=0}update(t){ha(this);const{blockLen:e,state:r}=this,n=(t=_a(t)).length;for(let i=0;i\u003Cn;){const o=Math.min(e-this.pos,n-i);for(let e=0;e\u003Co;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,0!=(128&e)&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){ha(this,!1),ua(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n\u003Ci;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(t)}xof(t){return aa(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ca(t,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new Ua(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const ja=(t,e,r)=>function(t){const e=e=>t().update(_a(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}((()=>new Ua(e,t,r))),Da=ja(1,136,32);r(48834).Buffer;const za=function(){const t=[];return()=>{if(0===t.length)for(let e=0;e\u003C256;e++)t.push(e.toString(16).padStart(2,\"0\"));return t}}();function Ha(t){return t instanceof Uint8Array}function Fa(t){ce(Ha(t),\"Value must be a Uint8Array.\")}function $a(t){if(Fa(t),0===t.length)return\"0x\";const e=za(),r=new Array(t.length);for(let n=0;n\u003Ct.length;n++)r[n]=e[t[n]];return function(t){if(t.startsWith(\"0x\"))return t;if(t.startsWith(\"0X\"))return`0x${t.substring(2)}`;return`0x${t}`}(r.join(\"\"))}ut(T(),/^(?:0x)?[0-9a-f]+$/iu),ut(T(),/^0x[0-9a-f]+$/iu);const Va=ut(T(),/^0x[0-9a-f]{40}$/u),qa=ut(T(),/^0x[0-9a-fA-F]{40}$/u);function Ga(t){return l(t,Va)||function(t){if(!l(t,qa))return!1;return function(t){ce(l(t,qa),\"Invalid hex address.\");const e=Ka(t.toLowerCase()),r=Ka($a(Da(e)));return`0x${e.split(\"\").map(((t,e)=>{const n=r[e];return ce(l(n,T()),\"Hash shorter than address.\"),parseInt(n,16)>7?t.toUpperCase():t})).join(\"\")}`}(t)===t}(t)}function Ka(t){return t.startsWith(\"0x\")||t.startsWith(\"0X\")?t.substring(2):t}function Ja(t){if(!Ga(t))throw new Error(\"Invalid address\");return`https://etherscan.io/address/${t}`}function Wa(t){if(!Ga(t))throw new Error(\"Invalid address\");return`${t.slice(0,6)}...${t.slice(-4)}`}const Za=({accounts:t})=>0===t.length?Es(xs,{children:[_s(Bs,{children:_s(Ts,{children:\"No accounts found\"})}),_s(Rs,{children:_s(Os,{name:na.CancelButton,children:\"Cancel\"})})]}):Es(xs,{children:[Es(Bs,{children:[_s(Ts,{children:\"Accounts\"}),t.map((t=>Es(Bs,{children:[_s(Fs,{name:`${ia}${t.address}`,label:t.name}),_s(js,{href:Ja(t.address),children:Wa(t.address)}),_s(sa,{})]},t.address)))]}),Es(Rs,{children:[_s(Os,{name:na.CancelButton,children:\"Cancel\"}),_s(Os,{name:na.ConfirmButton,children:\"Confirm\"})]})]});async function Xa(t){const e=t.accounts.map((t=>({address:t.address,name:t.name}))),r=await Js(_s(Za,{accounts:e}),t),n=await async function(t){return snap.request({method:\"snap_dialog\",params:{id:t}})}(r);return n}const Ya=new cs;let Qa=!1;const tu=async t=>{await Ya.runExclusive((()=>{Qa=t}))},eu=async(t,e)=>{c(t,Jo);return(await ws()).getConnectedAccounts(t,e)},ru=async(t,e)=>{c(t,Ko);const r=await vs();await r.setActivated(!0),await tu(!1);const n=Ro[t.custodianType],i=await ws();if(!Object.values(So).includes(t.custodianType))throw new Error(`Custodian type ${t.custodianType} not supported`);const o=new n({refreshToken:t.token,refreshTokenUrl:t.refreshTokenUrl},t.custodianApiUrl,1e3);let s=await o.getEthereumAccounts();const a=await i.listAccounts();for(const t of a)s=s.filter((e=>e.address!==t.address));let u;try{u=await Xa({selectedAccounts:[],request:t,accounts:s,activity:\"onboarding\"})}catch(t){throw bo.error(\"Error choosing account\",t),t}if(null===u)return[];const h=u.map((r=>({address:r.address,name:r.name,details:{...t},origin:e}))),f=[],l=[];for(const t of h)try{await i.createAccount(t),f.push(t)}catch(e){bo.error(\"Error creating account\",e),l.push({account:t,error:e instanceof Error?e:new Error(String(e))})}if(l.length>0){const t=l.map((({account:t,error:e})=>`Failed to add account ${t.address}: ${e.message}`)).join(\"\\n\");await Yo(t)}return f},nu=async({origin:t,request:e})=>{if(bo.debug(`RPC request (origin=\"${t}\"): method=\"${e.method}\"`,JSON.stringify(e,void 0,2)),!is(t,e.method))throw new lr(`Origin '${t}' is not allowed to call '${e.method}'`);switch(e.method){case ts.Onboard:return c(e.params,Ko),await ru(e.params,t);case ts.GetConnectedAccounts:return c(e.params,Jo),await eu(e.params,t);case ts.ClearAllRequests:if(pr.dev){const t=await Ms();return await t.clearAllRequests()}throw new fr(e.method);case ts.GetIsSupported:return!0;case ts.GetMutableTransactionParameters:{c(e.params,Zo);const t=await Ms(),r=await t.getMutableTransactionParameters(e.params);if(!r)throw new Error(\"Request not found\");return r}default:throw new fr(e.method)}},iu=async({origin:t,request:e})=>{if(bo.debug(`Keyring request (origin=\"${t}\"):`,JSON.stringify(e,void 0,2)),!is(t,e.method))throw new Error(`Origin '${t}' is not allowed to call '${e.method}'`);return ee(await ws(),e)};async function ou(){if((await async function(){return await snap.request({method:\"snap_getClientStatus\"})}()).locked)return!0;const t=await vs();await t.syncDevMode();return!await t.getActivated()}const su=async({request:t})=>{if(\"execute\"===t.method){if(await(async()=>await Ya.runExclusive((()=>Qa)))())return;if(await ou())return void await tu(!0);await(async()=>{try{await(await Ms()).poll()}catch(t){throw bo.error(\"Error polling requests\",t),t}})()}else{if(\"manageSleepState\"!==t.method)throw new Error(\"Method not found.\");console.log(\"manageSleepState\");await ou()?await tu(!0):await tu(!1)}},au=async({id:t,event:e,context:r})=>{if(!e.name)return;const n={...oa,...Qs},i={...ta},o=n[e.name]??i[Object.keys(i).find((t=>{var r;return null===(r=e.name)||void 0===r?void 0:r.startsWith(t)}))??\"\"];if(!o)return;const s={keyring:await ws(),stateManager:await vs()};await o({id:t,event:e,context:r,snapContext:s})},uu=async()=>{const t=await ws(),e=await vs(),r=await async function(t){return{activity:\"homepage\",accounts:await t.keyring.listAccounts(),devMode:await t.stateManager.getDevMode()}}({keyring:t,stateManager:e});return{id:await ea(r)}},hu=async t=>{const e=await vs();await e.setDevMode(t),await e.syncDevMode()}})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,\"__esModule\",{value:!0})})();","status":"stopped","version":"1.3.1","versionHistory":[{"date":1.750696483444e+12,"origin":"metamask","version":"1.3.1"}]},"npm:@metamask/message-signing-snap":{"auxiliaryFiles":[],"blocked":false,"enabled":true,"id":"npm:@metamask/message-signing-snap","initialConnections":{"https://developer.metamask.io":{},"https://docs.metamask.io":{},"https://portfolio-builds.metafi-dev.codefi.network":{},"https://portfolio.metamask.io":{},"npm:@metamask/gator-permissions-snap":{}},"initialPermissions":{"endowment:rpc":{"dapps":true,"snaps":true},"snap_getEntropy":{}},"localizationFiles":[],"manifest":{"description":"Provides public key and message signing used for signing in with MetaMask","initialConnections":{"https://developer.metamask.io":{},"https://docs.metamask.io":{},"https://portfolio-builds.metafi-dev.codefi.network":{},"https://portfolio.metamask.io":{},"npm:@metamask/gator-permissions-snap":{}},"initialPermissions":{"endowment:rpc":{"dapps":true,"snaps":true},"snap_getEntropy":{}},"manifestVersion":"0.1","platformVersion":"6.19.0","proposedName":"Sign in with MetaMask","repository":{"type":"git","url":"https://github.com/MetaMask/message-signing-snap.git"},"source":{"location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/message-signing-snap","registry":"https://registry.npmjs.org/"}},"shasum":"HWZ8hcJfaFq0sleE9d/eGuHTQou3kaBneWbSa24ubls="},"version":"1.1.2"},"preinstalled":true,"removable":false,"sourceCode":"(()=>{var e={251:(e,t)=>{t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1\u003C\u003Ca)-1,c=u>>1,d=-7,f=r?i-1:0,l=r?-1:1,h=e[t+f];for(f+=l,s=h&(1\u003C\u003C-d)-1,h>>=-d,d+=a;d>0;s=256*s+e[t+f],f+=l,d-=8);for(o=s&(1\u003C\u003C-d)-1,s>>=-d,d+=n;d>0;o=256*o+e[t+f],f+=l,d-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),s-=c}return(h?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,d=(1\u003C\u003Cc)-1,f=d>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,p=n?1:-1,g=t\u003C0||0===t&&1/t\u003C0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))\u003C1&&(o--,u*=2),(t+=o+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=d?(a=0,o=d):o+f>=1?(a=(t*u-1)*Math.pow(2,i),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(o=o\u003C\u003Ci|a,c+=i;c>0;e[r+h]=255&o,h+=p,o/=256,c-=8);e[r+h-p]|=128*g}},287:(e,t,r)=>{\"use strict\";const n=r(526),i=r(251),s=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.hp=u,t.IS=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if(\"string\"==typeof e)return function(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!u.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return h(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return h(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||J(e.length)?a(0):l(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function d(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e\u003C0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function f(e){return d(e),a(e\u003C0?0:0|p(e))}function l(e){const t=e.length\u003C0?0:0|p(e.length),r=a(t);for(let n=0;n\u003Ct;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t\u003C0||e.byteLength\u003Ct)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength\u003Ct+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=o)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o.toString(16)+\" bytes\");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return K(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return H(e).length;default:if(i)return n?-1:K(e).length;t=(\"\"+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t\u003C0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r\u003C=0)return\"\";if((r>>>=0)\u003C=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return T(this,t,r);case\"utf8\":case\"utf-8\":return I(this,t,r);case\"ascii\":return S(this,t,r);case\"latin1\":case\"binary\":return O(this,t,r);case\"base64\":return k(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return N(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r\u003C-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r\u003C0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r\u003C0){if(!i)return-1;r=0}if(\"string\"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function v(e,t,r,n,i){let s,o=1,a=e.length,u=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length\u003C2||t.length\u003C2)return-1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s\u003Ca;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*o}else-1!==n&&(s-=s-n),n=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){let r=!0;for(let n=0;n\u003Cu;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return-1}function b(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let o;for(n>s/2&&(n=s/2),o=0;o\u003Cn;++o){const n=parseInt(t.substr(2*o,2),16);if(J(n))return o;e[r+o]=n}return o}function _(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r\u003Ce.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return W(H(t),e,r,n)}function A(e,t,r,n){return W(function(e,t){let r,n,i;const s=[];for(let o=0;o\u003Ce.length&&!((t-=2)\u003C0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i\u003Cr;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o\u003C=r){let r,n,a,u;switch(o){case 1:t\u003C128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)\u003C\u003C6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)\u003C\u003C12|(63&r)\u003C\u003C6|63&n,u>2047&&(u\u003C55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)\u003C\u003C18|(63&r)\u003C\u003C12|(63&n)\u003C\u003C6|63&a,u>65535&&u\u003C1114112&&(s=u))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(e){const t=e.length;if(t\u003C=B)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n\u003Ct;)r+=String.fromCharCode.apply(String,e.slice(n,n+=B));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.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(u.prototype,\"parent\",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,\"offset\",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return d(e),e\u003C=0?a(e):void 0!==t?\"string\"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(G(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i\u003Cs;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r\u003Cn?-1:n\u003Cr?1:0},u.isEncoding=function(e){switch(String(e).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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r\u003Ce.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r\u003Ce.length;++r){let t=e[r];if(G(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t\u003Ce;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t\u003Ce;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t\u003Ce;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?I(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===u.compare���9�(this,e)},u.prototype.inspect=function(){let e=\"\";const r=t.IS;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"\u003CBuffer \"+e+\">\"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(G(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t\u003C0||r>e.length||n\u003C0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(n,i),d=e.slice(t,r);for(let e=0;e\u003Ca;++e)if(c[e]!==d[e]){s=c[e],o=d[e];break}return s\u003Co?-1:o\u003Cs?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r\u003C0||t\u003C0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let s=!1;for(;;)switch(n){case\"hex\":return b(this,e,t,r);case\"utf8\":case\"utf-8\":return _(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return E(this,e,t,r);case\"base64\":return x(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return A(this,e,t,r);default:if(s)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function S(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i\u003Cr;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let i=t;i\u003Cr;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){const n=e.length;(!t||t\u003C0)&&(t=0),(!r||r\u003C0||r>n)&&(r=n);let i=\"\";for(let n=t;n\u003Cr;++n)i+=Y[e[n]];return i}function N(e,t,r){const n=e.slice(t,r);let i=\"\";for(let e=0;e\u003Cn.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function R(e,t,r){if(e%1!=0||e\u003C0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function C(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t\u003Cs)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function Z(e,t,r,n,i){z(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function U(e,t,r,n,i){z(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function j(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r\u003C0)throw new RangeError(\"Index out of range\")}function P(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)\u003C0?(e+=r)\u003C0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)\u003C0?(t+=r)\u003C0&&(t=0):t>r&&(t=r),t\u003Ce&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,s=0;for(;++s\u003Ct&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]\u003C\u003C8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]\u003C\u003C8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){D(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)\u003C\u003CBigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){D(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,s=0;for(;++s\u003Ct&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]\u003C\u003C8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]\u003C\u003C8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16|this[e+3]\u003C\u003C24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]\u003C\u003C24|this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){D(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r\u003C\u003C24);return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){D(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t\u003C\u003C24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)\u003C\u003CBigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){C(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,s=0;for(this[t]=255&e;++s\u003Cr&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){C(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return Z(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return U(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i\u003Cr&&(s*=256);)e\u003C0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e\u003C0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e\u003C0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e\u003C0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return Z(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return U(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),u.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n\u003Cr&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t\u003C0)throw new RangeError(\"targetStart out of bounds\");if(r\u003C0||r>=this.length)throw new RangeError(\"Index out of range\");if(n\u003C0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t\u003Cn-r&&(n=e.length-t+r);const i=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!u.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t\u003C128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t\u003C0||this.length\u003Ct||this.length\u003Cr)throw new RangeError(\"Out of range index\");if(r\u003C=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(i=t;i\u003Cr;++i)this[i]=e;else{const s=u.isBuffer(e)?e:u.from(e,n),o=s.length;if(0===o)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(i=0;i\u003Cr-t;++i)this[i+t]=s[i%o]}return this};const $={};function M(e,t,r){$[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,s){if(e>r||e\u003Ct){const n=\"bigint\"==typeof t?\"n\":\"\";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and \u003C 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and \u003C 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and \u003C= ${r}${n}`,new $.ERR_OUT_OF_RANGE(\"value\",i,e)}!function(e,t,r){D(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,i,s)}function D(e,t){if(\"number\"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function q(e,t,r){if(Math.floor(e)!==e)throw D(e,r),new $.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t\u003C0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and \u003C= ${t}`,e)}M(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),M(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),M(\"ERR_OUT_OF_RANGE\",(function(e,t,r){let n=`The value of \"${e}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):\"bigint\"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r\u003C-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+=\"n\"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let o=0;o\u003Cn;++o){if(r=e.charCodeAt(o),r>55295&&r\u003C57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r\u003C56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296\u003C\u003C10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r\u003C128){if((t-=1)\u003C0)break;s.push(r)}else if(r\u003C2048){if((t-=2)\u003C0)break;s.push(r>>6|192,63&r|128)}else if(r\u003C65536){if((t-=3)\u003C0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r\u003C1114112))throw new Error(\"Invalid code point\");if((t-=4)\u003C0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function H(e){return n.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(V,\"\")).length\u003C2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function W(e,t,r,n){let i;for(i=0;i\u003Cn&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r\u003C16;++r){const n=16*r;for(let i=0;i\u003C16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return\"undefined\"==typeof BigInt?Q:e}function Q(){throw new Error(\"BigInt not supported\")}},463:e=>{e.exports=o,o.default=o,o.stable=d,o.stableStringify=d;var t=\"[...]\",r=\"[Circular]\",n=[],i=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(e,t,r,o){var a;void 0===o&&(o=s()),u(e,\"\",0,[],void 0,0,o);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,l(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,r,s){var o=Object.getOwnPropertyDescriptor(s,r);void 0!==o.get?o.configurable?(Object.defineProperty(s,r,{value:e}),n.push([s,r,t,o])):i.push([t,r,e]):(s[r]=e,n.push([s,r,t]))}function u(e,n,i,s,o,c,d){var f;if(c+=1,\"object\"==typeof e&&null!==e){for(f=0;f\u003Cs.length;f++)if(s[f]===e)return void a(r,e,n,o);if(void 0!==d.depthLimit&&c>d.depthLimit)return void a(t,e,n,o);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void a(t,e,n,o);if(s.push(e),Array.isArray(e))for(f=0;f\u003Ce.length;f++)u(e[f],f,f,s,e,c,d);else{var l=Object.keys(e);for(f=0;f\u003Cl.length;f++){var h=l[f];u(e[h],h,f,s,e,c,d)}}s.pop()}}function c(e,t){return e\u003Ct?-1:e>t?1:0}function d(e,t,r,o){void 0===o&&(o=s());var a,u=f(e,\"\",0,[],void 0,0,o)||e;try{a=0===i.length?JSON.stringify(u,t,r):JSON.stringify(u,l(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function f(e,i,s,o,u,d,l){var h;if(d+=1,\"object\"==typeof e&&null!==e){for(h=0;h\u003Co.length;h++)if(o[h]===e)return void a(r,e,i,u);try{if(\"function\"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&d>l.depthLimit)return void a(t,e,i,u);if(void 0!==l.edgesLimit&&s+1>l.edgesLimit)return void a(t,e,i,u);if(o.push(e),Array.isArray(e))for(h=0;h\u003Ce.length;h++)f(e[h],h,h,o,e,d,l);else{var p={},g=Object.keys(e).sort(c);for(h=0;h\u003Cg.length;h++){var y=g[h];f(e[y],y,h,o,e,d,l),p[y]=e[y]}if(void 0===u)return p;n.push([u,i,e]),u[i]=p}o.pop()}}function l(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n\u003Ci.length;n++){var s=i[n];if(s[1]===t&&s[0]===r){r=s[2],i.splice(n,1);break}}return e.call(this,t,r)}}},526:(e,t)=>{\"use strict\";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=a(e),o=s[0],u=s[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,u)),d=0,f=u>0?o-4:o;for(r=0;r\u003Cf;r+=4)t=n[e.charCodeAt(r)]\u003C\u003C18|n[e.charCodeAt(r+1)]\u003C\u003C12|n[e.charCodeAt(r+2)]\u003C\u003C6|n[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;2===u&&(t=n[e.charCodeAt(r)]\u003C\u003C2|n[e.charCodeAt(r+1)]>>4,c[d++]=255&t);1===u&&(t=n[e.charCodeAt(r)]\u003C\u003C10|n[e.charCodeAt(r+1)]\u003C\u003C4|n[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,c=n-i;a\u003Cc;a+=o)s.push(u(e,a,a+o>c?c:a+o));1===i?(t=e[n-1],s.push(r[t>>2]+r[t\u003C\u003C4&63]+\"==\")):2===i&&(t=(e[n-2]\u003C\u003C8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t\u003C\u003C2&63]+\"=\"));return s.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",o=0;o\u003C64;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,s,o=[],a=t;a\u003Cn;a+=3)i=(e[a]\u003C\u003C16&16711680)+(e[a+1]\u003C\u003C8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var n={};(()=>{\"use strict\";r.r(n),r.d(n,{INTERNAL_ORIGINS:()=>Oo,getSaltByOrigin:()=>To,onRpcRequest:()=>No});var e={};function t(e){return Boolean(e)&&\"object\"==typeof e&&!Array.isArray(e)}r.r(e),r.d(e,{aK:()=>ri,e8:()=>Mn,DO:()=>$n,dJ:()=>ni,OG:()=>ii,My:()=>zn,Ph:()=>Wn,lX:()=>Gn,Id:()=>Qn,fg:()=>ai,qj:()=>Xn,aT:()=>Hn,r4:()=>ti,aY:()=>Ln,x:()=>di,lq:()=>Jn,z:()=>Yn,zW:()=>Dn,Q5:()=>ci});const i=(e,t)=>Object.hasOwnProperty.call(e,t);var s;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(s=s||(s={}));var o=r(463);class a extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...s}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(\".\")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function u(e){return\"object\"==typeof e&&null!==e}function c(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function d(e,t,r,n){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:i,branch:s}=t,{type:o}=r,{refinement:a,message:u=`Expected a value of type \\`${o}\\`${a?` with refinement \\`${a}\\``:\"\"}, but received: \\`${c(n)}\\``}=e;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...e,message:u}}function*f(e,t,r,n){(function(e){return u(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=d(i,t,r,n);e&&(yield e)}}function*l(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(e=t.coercer(e,a),o&&\"type\"!==t.type&&u(t.schema)&&u(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c=\"valid\";for(const n of t.validator(e,a))n.explanation=r.message,c=\"not_valid\",yield[n,void 0];for(let[d,f,h]of t.entries(e,a)){const t=l(f,h,{path:void 0===d?n:[...n,d],branch:void 0===d?i:[...i,f],coerce:s,mask:o,message:r.message});for(const r of t)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?\"not_valid\":\"not_refined\",yield[r[0],void 0]):s&&(f=r[1],void 0===d?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):u(e)&&(void 0!==f||d in e)&&(e[d]=f))}if(\"not_valid\"!==c)for(const n of t.refiner(e,a))n.explanation=r.message,c=\"not_refined\",yield[n,void 0];\"valid\"===c&&(yield[void 0,e])}class h{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:s=e=>e,entries:o=function*(){}}=e;this.type=t,this.schema=r,this.entries=o,this.coercer=s,this.validator=n?(e,t)=>f(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>f(i(e,t),t,this,e):()=>[]}assert(e,t){return p(e,this,t)}create(e,t){return g(e,this,t)}is(e){return y(e,this)}mask(e,t){return function(e,t,r){const n=m(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return m(e,this,t)}}function p(e,t,r){const n=m(e,t,{message:r});if(n[0])throw n[0]}function g(e,t,r){const n=m(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function y(e,t){return!m(e,t)[0]}function m(e,t,r={}){const n=l(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);if(i[0]){return[new a(i[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function w(e,t){return new h({type:e,schema:null,validator:t})}function v(e){let t;return new h({type:\"lazy\",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function b(e){return new h({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${c(e)}`})}function _(e){const t=c(e),r=typeof e;return new h({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?e:null,validator:r=>r===e||`Expected the literal \\`${t}\\`, but received: ${c(r)}`})}function E(){return w(\"never\",(()=>!1))}function x(){return w(\"number\",(e=>\"number\"==typeof e&&!isNaN(e)||`Expected a number, but received: ${c(e)}`))}function A(e){const t=e?Object.keys(e):[],r=E();return new h({type:\"object\",schema:e??null,*entries(n){if(e&&u(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>u(e)||`Expected an object, but received: ${c(e)}`,coercer:e=>u(e)?{...e}:e})}function k(e){return new h({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function I(e,t){return new h({type:\"record\",schema:null,*entries(r){if(u(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>u(e)||`Expected an object, but received: ${c(e)}`})}function B(){return w(\"string\",(e=>\"string\"==typeof e||`Expected a string, but received: ${c(e)}`))}function S(e){const t=e.map((e=>e.type)).join(\" | \");return new h({type:\"union\",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=l(r,t,n),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${c(r)}`,...i]}})}function O(e,t,r){return new h({...e,coercer:(n,i)=>y(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}Error;function T(e){return function(e){return function(e){return\"object\"==typeof e&&null!==e&&\"message\"in e}(e)&&\"string\"==typeof e.message?e.message:null==e?\"\":String(e)}(e).replace(/\\.$/u,\"\")}function N(e,t){return r=e,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class R extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}const C=e=>A(e);function Z({path:e,branch:t}){const r=e[e.length-1];return i(t[t.length-2],r)}function U(e){return new h({...e,type:`optional ${e.type}`,validator:(t,r)=>!Z(r)||e.validator(t,r),refiner:(t,r)=>!Z(r)||e.refiner(t,r)})}const j=S([_(null),w(\"boolean\",(e=>\"boolean\"==typeof e)),w(\"finite number\",(e=>y(e,x())&&Number.isFinite(e))),B(),b(v((()=>j))),I(B(),v((()=>j)))]),P=O(j,w(\"any\",(()=>!0)),(e=>(function(e,t,r=\"Assertion failed\",n=R){try{p(e,t)}catch(e){throw N(n,`${r}: ${T(e)}.`)}}(e,j),JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t}))))));function L(e){try{return function(e){g(e,P)}(e),!0}catch{return!1}}const $=_(\"2.0\"),M=(F=S([x(),B()]),new h({...F,validator:(e,t)=>null===e||F.validator(e,t),refiner:(e,t)=>null===e||F.refiner(e,t)}));var F;const z=C({code:w(\"integer\",(e=>\"number\"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${c(e)}`)),message:B(),data:U(P),stack:U(B())}),D=S([I(B(),P),b(P)]);C({id:M,jsonrpc:$,method:B(),params:U(D)}),C({jsonrpc:$,method:B(),params:U(D)});A({id:M,jsonrpc:$,result:k(w(\"unknown\",(()=>!0))),error:k(z)});const q=C({id:M,jsonrpc:$,result:P}),V=C({id:M,jsonrpc:$,error:z});S([q,V]);const K={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},H={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}},W=K.internal,G=(J(W),\"Unspecified server error.\");function J(e,t=\"Unspecified error message. This is a bug, please report it.\"){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(i(H,t))return H[t].message;if(function(e){return e>=-32099&&e\u003C=-32e3}(e))return G}return t}function Y(e){return Array.isArray(e)?e.map((e=>L(e)?e:t(e)?X(e):null)):t(e)?X(e):L(e)?e:null}function X(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return L(n)&&(t[r]=n),t}),{})}const Q=function(e){return e?.__esModule?e.default:e}(o);class ee extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('\"code\" must be an integer.');if(!r||\"string\"!=typeof r)throw new Error('\"message\" must be a non-empty string.');!function(e){return t(e)&&i(e,\"cause\")&&t(e.cause)}(n)?super(r):(super(r,{cause:n.cause}),i(this,\"cause\")||Object.assign(this,{cause:n.cause})),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=Y(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return Q(this.serialize(),te,2)}}function te(e,t){if(\"[Circular]\"!==t)return t}const re=e=>ie(K.invalidParams,e),ne=e=>ie(K.methodNotFound,e);function ie(e,t){const[r,n]=se(t);return new ee(e,r??J(e),n)}function se(e){if(e){if(\"string\"==typeof e)return[e];if(\"object\"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&\"string\"!=typeof t)throw new Error(\"Must specify string message.\");return[t??void 0,r]}}return[]}var oe,ae;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>\"number\"!=typeof t[t[e]])),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys=\"function\"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger=\"function\"==typeof Number.isInteger?e=>Number.isInteger(e):e=>\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=\" | \"){return e.map((e=>\"string\"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>\"bigint\"==typeof t?t.toString():t}(oe||(oe={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(ae||(ae={}));const ue=oe.arrayToEnum([\"string\",\"nan\",\"number\",\"integer\",\"float\",\"boolean\",\"date\",\"bigint\",\"symbol\",\"function\",\"undefined\",\"null\",\"array\",\"object\",\"unknown\",\"promise\",\"void\",\"never\",\"map\",\"set\"]),ce=e=>{switch(typeof e){case\"undefined\":return ue.undefined;case\"string\":return ue.string;case\"number\":return isNaN(e)?ue.nan:ue.number;case\"boolean\":return ue.boolean;case\"function\":return ue.function;case\"bigint\":return ue.bigint;case\"symbol\":return ue.symbol;case\"object\":return Array.isArray(e)?ue.array:null===e?ue.null:e.then&&\"function\"==typeof e.then&&e.catch&&\"function\"==typeof e.catch?ue.promise:\"undefined\"!=typeof Map&&e instanceof Map?ue.map:\"undefined\"!=typeof Set&&e instanceof Set?ue.set:\"undefined\"!=typeof Date&&e instanceof Date?ue.date:ue.object;default:return ue.unknown}},de=oe.arrayToEnum([\"invalid_type\",\"invalid_literal\",\"custom\",\"invalid_union\",\"invalid_union_discriminator\",\"invalid_enum_value\"����,\"unrecognized_keys\",\"invalid_arguments\",\"invalid_return_type\",\"invalid_date\",\"invalid_string\",\"too_small\",\"too_big\",\"invalid_intersection_types\",\"not_multiple_of\",\"not_finite\"]);class fe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=\"ZodError\",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const i of e.issues)if(\"invalid_union\"===i.code)i.unionErrors.map(n);else if(\"invalid_return_type\"===i.code)n(i.returnTypeError);else if(\"invalid_arguments\"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n\u003Ci.path.length;){const r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof fe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}fe.create=e=>new fe(e);const le=(e,t)=>{let r;switch(e.code){case de.invalid_type:r=e.received===ue.undefined?\"Required\":`Expected ${e.expected}, received ${e.received}`;break;case de.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case de.unrecognized_keys:r=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,\", \")}`;break;case de.invalid_union:r=\"Invalid input\";break;case de.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case de.invalid_enum_value:r=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case de.invalid_arguments:r=\"Invalid function arguments\";break;case de.invalid_return_type:r=\"Invalid function return type\";break;case de.invalid_date:r=\"Invalid date\";break;case de.invalid_string:\"object\"==typeof e.validation?\"includes\"in e.validation?(r=`Invalid input: must include \"${e.validation.includes}\"`,\"number\"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):\"startsWith\"in e.validation?r=`Invalid input: must start with \"${e.validation.startsWith}\"`:\"endsWith\"in e.validation?r=`Invalid input: must end with \"${e.validation.endsWith}\"`:oe.assertNever(e.validation):r=\"regex\"!==e.validation?`Invalid ${e.validation}`:\"Invalid\";break;case de.too_small:r=\"array\"===e.type?`Array must contain ${e.exact?\"exactly\":e.inclusive?\"at least\":\"more than\"} ${e.minimum} element(s)`:\"string\"===e.type?`String must contain ${e.exact?\"exactly\":e.inclusive?\"at least\":\"over\"} ${e.minimum} character(s)`:\"number\"===e.type?`Number must be ${e.exact?\"exactly equal to \":e.inclusive?\"greater than or equal to \":\"greater than \"}${e.minimum}`:\"date\"===e.type?`Date must be ${e.exact?\"exactly equal to \":e.inclusive?\"greater than or equal to \":\"greater than \"}${new Date(Number(e.minimum))}`:\"Invalid input\";break;case de.too_big:r=\"array\"===e.type?`Array must contain ${e.exact?\"exactly\":e.inclusive?\"at most\":\"less than\"} ${e.maximum} element(s)`:\"string\"===e.type?`String must contain ${e.exact?\"exactly\":e.inclusive?\"at most\":\"under\"} ${e.maximum} character(s)`:\"number\"===e.type?`Number must be ${e.exact?\"exactly\":e.inclusive?\"less than or equal to\":\"less than\"} ${e.maximum}`:\"bigint\"===e.type?`BigInt must be ${e.exact?\"exactly\":e.inclusive?\"less than or equal to\":\"less than\"} ${e.maximum}`:\"date\"===e.type?`Date must be ${e.exact?\"exactly\":e.inclusive?\"smaller than or equal to\":\"smaller than\"} ${new Date(Number(e.maximum))}`:\"Invalid input\";break;case de.custom:r=\"Invalid input\";break;case de.invalid_intersection_types:r=\"Intersection results could not be merged\";break;case de.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case de.not_finite:r=\"Number must be finite\";break;default:r=t.defaultError,oe.assertNever(e)}return{message:r}};let he=le;function pe(){return he}const ge=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],o={...i,path:s};if(void 0!==i.message)return{...i,path:s,message:i.message};let a=\"\";const u=n.filter((e=>!!e)).slice().reverse();for(const e of u)a=e(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}};function ye(e,t){const r=pe(),n=ge({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===le?void 0:le].filter((e=>!!e))});e.common.issues.push(n)}class me{constructor(){this.value=\"valid\"}dirty(){\"valid\"===this.value&&(this.value=\"dirty\")}abort(){\"aborted\"!==this.value&&(this.value=\"aborted\")}static mergeArray(e,t){const r=[];for(const n of t){if(\"aborted\"===n.status)return we;\"dirty\"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const e of t){const t=await e.key,n=await e.value;r.push({key:t,value:n})}return me.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:i}=n;if(\"aborted\"===t.status)return we;if(\"aborted\"===i.status)return we;\"dirty\"===t.status&&e.dirty(),\"dirty\"===i.status&&e.dirty(),\"__proto__\"===t.value||void 0===i.value&&!n.alwaysSet||(r[t.value]=i.value)}return{status:e.value,value:r}}}const we=Object.freeze({status:\"aborted\"}),ve=e=>({status:\"dirty\",value:e}),be=e=>({status:\"valid\",value:e}),_e=e=>\"aborted\"===e.status,Ee=e=>\"dirty\"===e.status,xe=e=>\"valid\"===e.status,Ae=e=>\"undefined\"!=typeof Promise&&e instanceof Promise;function ke(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)}function Ie(e,t,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}var Be,Se,Oe;\"function\"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>\"string\"==typeof e?{message:e}:e||{},e.toString=e=>\"string\"==typeof e?e:null==e?void 0:e.message}(Be||(Be={}));class Te{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ne=(e,t)=>{if(xe(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error(\"Validation failed but no issues detected.\");return{success:!1,get error(){if(this._error)return this._error;const t=new fe(e.common.issues);return this._error=t,this._error}}};function Re(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error('Can\\'t use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.');if(t)return{errorMap:t,description:i};return{errorMap:(t,i)=>{var s,o;const{message:a}=e;return\"invalid_enum_value\"===t.code?{message:null!=a?a:i.defaultError}:void 0===i.data?{message:null!==(s=null!=a?a:n)&&void 0!==s?s:i.defaultError}:\"invalid_type\"!==t.code?{message:i.defaultError}:{message:null!==(o=null!=a?a:r)&&void 0!==o?o:i.defaultError}},description:i}}class Ce{get description(){return this._def.description}_getType(e){return ce(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ce(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new me,ctx:{common:e.parent.common,data:e.data,parsedType:ce(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ae(t))throw new Error(\"Synchronous parse encountered promise.\");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)},i=this._parseSync({data:e,path:n.path,parent:n});return Ne(n,i)}\"~validate\"(e){var t,r;const n={common:{issues:[],async:!!this[\"~standard\"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)};if(!this[\"~standard\"].async)try{const t=this._parseSync({data:e,path:[],parent:n});return xe(t)?{value:t.value}:{issues:n.common.issues}}catch(e){(null===(r=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes(\"encountered\"))&&(this[\"~standard\"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then((e=>xe(e)?{value:e.value}:{issues:n.common.issues}))}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ce(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(Ae(n)?n:Promise.resolve(n));return Ne(r,i)}refine(e,t){const r=e=>\"string\"==typeof t||void 0===t?{message:t}:\"function\"==typeof t?t(e):t;return this._refinement(((t,n)=>{const i=e(t),s=()=>n.addIssue({code:de.custom,...r(t)});return\"undefined\"!=typeof Promise&&i instanceof Promise?i.then((e=>!!e||(s(),!1))):!!i||(s(),!1)}))}refinement(e,t){return this._refinement(((r,n)=>!!e(r)||(n.addIssue(\"function\"==typeof t?t(r,n):t),!1)))}_refinement(e){return new Ct({schema:this,typeName:Kt.ZodEffects,effect:{type:\"refinement\",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[\"~standard\"]={version:1,vendor:\"zod\",validate:e=>this[\"~validate\"](e)}}optional(){return Zt.create(this,this._def)}nullable(){return Ut.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pt.create(this)}promise(){return Rt.create(this,this._def)}or(e){return mt.create([this,e],this._def)}and(e){return _t.create(this,e,this._def)}transform(e){return new Ct({...Re(this._def),schema:this,typeName:Kt.ZodEffects,effect:{type:\"transform\",transform:e}})}default(e){const t=\"function\"==typeof e?e:()=>e;return new jt({...Re(this._def),innerType:this,defaultValue:t,typeName:Kt.ZodDefault})}brand(){return new Mt({typeName:Kt.ZodBranded,type:this,...Re(this._def)})}catch(e){const t=\"function\"==typeof e?e:()=>e;return new Pt({...Re(this._def),innerType:this,catchValue:t,typeName:Kt.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ft.create(this,e)}readonly(){return zt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ze=/^c[^\\s-]{8,}$/i,Ue=/^[0-9a-z]+$/,je=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pe=/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i,Le=/^[a-z0-9_-]{21}$/i,$e=/^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/,Me=/^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/,Fe=/^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;let ze;const De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/,Ve=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ke=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,He=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,We=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ge=\"((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))\",Je=new RegExp(`^${Ge}$`);function Ye(e){let t=\"([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d\";return e.precision?t=`${t}\\\\.\\\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\\\.\\\\d+)?`),t}function Xe(e){let t=`${Ge}T${Ye(e)}`;const r=[];return r.push(e.local?\"Z?\":\"Z\"),e.offset&&r.push(\"([+-]\\\\d{2}:?\\\\d{2})\"),t=`${t}(${r.join(\"|\")})`,new RegExp(`^${t}$`)}function Qe(e,t){if(!$e.test(e))return!1;try{const[r]=e.split(\".\"),n=r.replace(/-/g,\"+\").replace(/_/g,\"/\").padEnd(r.length+(4-r.length%4)%4,\"=\"),i=JSON.parse(atob(n));return\"object\"==typeof i&&null!==i&&(!(!i.typ||!i.alg)&&(!t||i.alg===t))}catch(e){return!1}}function et(e,t){return!(\"v4\"!==t&&t||!qe.test(e))||!(\"v6\"!==t&&t||!Ke.test(e))}class tt extends Ce{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==ue.string){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.string,received:t.parsedType}),we}const t=new me;let r;for(const s of this._def.checks)if(\"min\"===s.kind)e.data.length\u003Cs.value&&(r=this._getOrReturnCtx(e,r),ye(r,{code:de.too_small,minimum:s.value,type:\"string\",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if(\"max\"===s.kind)e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),ye(r,{code:de.too_big,maximum:s.value,type:\"string\",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if(\"length\"===s.kind){const n=e.data.length>s.value,i=e.data.length\u003Cs.value;(n||i)&&(r=this._getOrReturnCtx(e,r),n?ye(r,{code:de.too_big,maximum:s.value,type:\"string\",inclusive:!0,exact:!0,message:s.message}):i&&ye(r,{code:de.too_small,minimum:s.value,type:\"string\",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if(\"email\"===s.kind)Fe.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"email\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"emoji\"===s.kind)ze||(ze=new RegExp(\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\",\"u\")),ze.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"emoji\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"uuid\"===s.kind)Pe.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"uuid\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"nanoid\"===s.kind)Le.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"nanoid\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"cuid\"===s.kind)Ze.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"cuid\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"cuid2\"===s.kind)Ue.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"cuid2\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"ulid\"===s.kind)je.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"ulid\",code:de.invalid_string,message:s.message}),t.dirty());else if(\"url\"===s.kind)try{new URL(e.data)}catch(n){r=this._getOrReturnCtx(e,r),ye(r,{validation:\"url\",code:de.invalid_string,message:s.message}),t.dirty()}else if(\"regex\"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"regex\",code:de.invalid_string,message:s.message}),t.dirty())}else if(\"trim\"===s.kind)e.data=e.data.trim();else if(\"includes\"===s.kind)e.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty());else if(\"toLowerCase\"===s.kind)e.data=e.data.toLowerCase();else if(\"toUpperCase\"===s.kind)e.data=e.data.toUpperCase();else if(\"startsWith\"===s.kind)e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty());else if(\"endsWith\"===s.kind)e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty());else if(\"datetime\"===s.kind){Xe(s).test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:\"datetime\",message:s.message}),t.dirty())}else if(\"date\"===s.kind){Je.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:\"date\",message:s.message}),t.dirty())}else if(\"time\"===s.kind){new RegExp(`^${Ye(s)}$`).test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{code:de.invalid_string,validation:\"time\",message:s.message}),t.dirty())}else\"duration\"===s.kind?Me.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"duration\",code:de.invalid_string,message:s.message}),t.dirty()):\"ip\"===s.kind?(n=e.data,(\"v4\"!==(i=s.version)&&i||!De.test(n))&&(\"v6\"!==i&&i||!Ve.test(n))&&(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"ip\",code:de.invalid_string,message:s.message}),t.dirty())):\"jwt\"===s.kind?Qe(e.data,s.alg)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"jwt\",code:de.invalid_string,message:s.message}),t.dirty()):\"cidr\"===s.kind?et(e.data,s.version)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"cidr\",code:de.invalid_string,message:s.message}),t.dirty()):\"base64\"===s.kind?He.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"base64\",code:de.invalid_string,message:s.message}),t.dirty()):\"base64url\"===s.kind?We.test(e.data)||(r=this._getOrReturnCtx(e,r),ye(r,{validation:\"base64url\",code:de.invalid_string,message:s.message}),t.dirty()):oe.assertNever(s);var n,i;return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement((t=>e.test(t)),{validation:t,code:de.invalid_string,...Be.errToObj(r)})}_addCheck(e){return new tt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:\"email\",...Be.errToObj(e)})}url(e){return this._addCheck({kind:\"url\",...Be.errToObj(e)})}emoji(e){return this._addCheck({kind:\"emoji\",...Be.errToObj(e)})}uuid(e){return this._addCheck({kind:\"uuid\",...Be.errToObj(e)})}nanoid(e){return this._addCheck({kind:\"nanoid\",...Be.errToObj(e)})}cuid(e){return this._addCheck({kind:\"cuid\",...Be.errToObj(e)})}cuid2(e){return this._addCheck({kind:\"cuid2\",...Be.errToObj(e)})}ulid(e){return this._addCheck({kind:\"ulid\",...Be.errToObj(e)})}base64(e){return this._addCheck({kind:\"base64\",...Be.errToObj(e)})}base64url(e){return this._addCheck({kind:\"base64url\",...Be.errToObj(e)})}jwt(e){return this._addCheck({kind:\"jwt\",...Be.errToObj(e)})}ip(e){return this._addCheck({kind:\"ip\",...Be.errToObj(e)})}cidr(e){return this._addCheck({kind:\"cidr\",...Be.errToObj(e)})}datetime(e){var t,r;return\"string\"==typeof e?this._addCheck({kind:\"datetime\",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:\"datetime\",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...Be.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:\"date\",message:e})}time(e){return\"string\"==typeof e?this._addCheck({kind:\"time\",precision:null,message:e}):this._addCheck({kind:\"time\",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...Be.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:\"duration\",...Be.errToObj(e)})}regex(e,t){return this._addCheck({kind:\"regex\",regex:e,...Be.errToObj(t)})}includes(e,t){return this._addCheck({kind:\"includes\",value:e,position:null==t?void 0:t.position,...Be.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:\"startsWith\",value:e,...Be.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:\"endsWith\",value:e,...Be.errToObj(t)})}min(e,t){return this._addCheck({kind:\"min\",value:e,...Be.errToObj(t)})}max(e,t){return this._addCheck({kind:\"max\",value:e,...Be.errToObj(t)})}length(e,t){return this._addCheck({kind:\"length\",value:e,...Be.errToObj(t)})}nonempty(e){return this.min(1,Be.errToObj(e))}trim(){return new tt({...this._def,checks:[...this._def.checks,{kind:\"trim\"}]})}toLowerCase(){return new tt({...this._def,checks:[...this._def.checks,{kind:\"toLowerCase\"}]})}toUpperCase(){return new tt({...this._def,checks:[...this._def.checks,{kind:\"toUpperCase\"}]})}get isDatetime(){return!!this._def.checks.find((e=>\"datetime\"===e.kind))}get isDate(){return!!this._def.checks.find((e=>\"date\"===e.kind))}get isTime(){return!!this._def.checks.find((e=>\"time\"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>\"duration\"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>\"email\"===e.kind))}get isURL(){return!!this._def.checks.find((e=>\"url\"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>\"emoji\"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>\"uuid\"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>\"nanoid\"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>\"cuid\"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>\"cuid2\"===e.kind))}get isULID(){return!!this._def.checks.find((e=>\"ulid\"===e.kind))}get isIP(){return!!this._def.checks.find((e=>\"ip\"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>\"cidr\"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>\"base64\"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>\"base64url\"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)\"min\"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)\"max\"===t.kind&&(null===e||t.value\u003Ce)&&(e=t.value);return e}}function rt(e,t){const r=(e.toString().split(\".\")[1]||\"\").length,n=(t.toString().split(\".\")[1]||\"\").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(\".\",\"\"))%parseInt(t.toFixed(i).replace(\".\",\"\"))/Math.pow(10,i)}tt.create=e=>{var t;return new tt({checks:[],typeName:Kt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Re(e)})};class nt extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==ue.number){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.number,received:t.parsedType}),we}let t;const r=new me;for(const n of this._def.checks)if(\"int\"===n.kind)oe.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),ye(t,{code:de.invalid_type,expected:\"integer\",received:\"float\",message:n.message}),r.dirty());else if(\"min\"===n.kind){(n.inclusive?e.data\u003Cn.value:e.data\u003C=n.value)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.too_small,minimum:n.value,type:\"number\",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else if(\"max\"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.too_big,maximum:n.value,type:\"number\",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty())}else\"multipleOf\"===n.kind?0!==rt(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):\"finite\"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),ye(t,{code:de.not_finite,message:n.message}),r.dirty()):oe.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit(\"min\",e,!0,Be.toString(t))}gt(e,t){return this.setLimit(\"min\",e,!1,Be.toString(t))}lte(e,t){return this.setLimit(\"max\",e,!0,Be.toString(t))}lt(e,t){return this.setLimit(\"max\",e,!1,Be.toString(t))}setLimit(e,t,r,n){return new nt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Be.toString(n)}]})}_addCheck(e){return new nt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:\"int\",message:Be.toString(e)})}positive(e){return this._addCheck({kind:\"min\",value:0,inclusive:!1,message:Be.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:0,inclusive:!1,message:Be.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:0,inclusive:!0,message:Be.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:0,inclusive:!0,message:Be.toString(e)})}multipleOf(e,t){return this._addCheck({kind:\"multipleOf\",value:e,message:Be.toString(t)})}finite(e){return this._addCheck({kind:\"finite\",message:Be.toString(e)})}safe(e){return this._addCheck({kind:\"min\",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Be.toString(e)})._addCheck({kind:\"max\",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Be.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)\"min\"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)\"max\"===t.kind&&(null===e||t.value\u003Ce)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>\"int\"===e.kind||\"multipleOf\"===e.kind&&oe.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(\"finite\"===r.kind||\"int\"===r.kind||\"multipleOf\"===r.kind)return!0;\"min\"===r.kind?(null===t||r.value>t)&&(t=r.value):\"max\"===r.kind&&(null===e||r.value\u003Ce)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}nt.create=e=>new nt({checks:[],typeName:Kt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Re(e)});class it extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==ue.bigint)return this._getInvalidInput(e);let t;const r=new me;for(const n of this._def.checks)if(\"min\"===n.kind){(n.inclusive?e.data\u003Cn.value:e.data\u003C=n.value)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.too_small,type:\"bigint\",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else if(\"max\"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.too_big,type:\"bigint\",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty())}else\"multipleOf\"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),ye(t,{code:de.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):oe.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.bigint,received:t.parsedType}),we}gte(e,t){return this.setLimit(\"min\",e,!0,Be.toString(t))}gt(e,t){return this.setLimit(\"min\",e,!1,Be.toString(t))}lte(e,t){return this.setLimit(\"max\",e,!0,Be.toString(t))}lt(e,t){return this.setLimit(\"max\",e,!1,Be.toString(t))}setLimit(e,t,r,n){return new it({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Be.toString(n)}]})}_addCheck(e){return new it({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!1,message:Be.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!1,message:Be.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!0,message:Be.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!0,message:Be.toString(e)})}multipleOf(e,t){return this._addCheck({kind:\"multipleOf\",value:e,message:Be.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)\"min\"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)\"max\"===t.kind&&(null===e||t.value\u003Ce)&&(e=t.value);return e}}it.create=e=>{var t;return new it({checks:[],typeName:Kt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Re(e)})};class st extends Ce{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==ue.boolean){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.boolean,received:t.parsedType}),we}return be(e.data)}}st.create=e=>new st({typeName:Kt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Re(e)});class ot extends Ce{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==ue.date){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.date,received:t.parsedType}),we}if(isNaN(e.data.getTime())){return ye(this._getOrReturnCtx(e),{code:de.invalid_date}),we}const t=new me;let r;for(const n of this._def.checks)\"min\"===n.kind?e.data.getTime()\u003Cn.value&&(r=this._getOrReturnCtx(e,r),ye(r,{code:de.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:\"date\"}),t.dirty()):\"max\"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),ye(r,{code:de.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:\"date\"}),t.dirty()):oe.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ot({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:\"min\",value:e.getTime(),message:Be.toString(t)})}max(e,t){return this._addCheck({kind:\"max\",value:e.getTime(),message:Be.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)\"min\"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)\"max\"===t.kind&&(null===e||t.value\u003Ce)&&(e=t.value);return null!=e?new Date(e):nulz0T�l}}ot.create=e=>new ot({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Kt.ZodDate,...Re(e)});class at extends Ce{_parse(e){if(this._getType(e)!==ue.symbol){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.symbol,received:t.parsedType}),we}return be(e.data)}}at.create=e=>new at({typeName:Kt.ZodSymbol,...Re(e)});class ut extends Ce{_parse(e){if(this._getType(e)!==ue.undefined){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.undefined,received:t.parsedType}),we}return be(e.data)}}ut.create=e=>new ut({typeName:Kt.ZodUndefined,...Re(e)});class ct extends Ce{_parse(e){if(this._getType(e)!==ue.null){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.null,received:t.parsedType}),we}return be(e.data)}}ct.create=e=>new ct({typeName:Kt.ZodNull,...Re(e)});class dt extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return be(e.data)}}dt.create=e=>new dt({typeName:Kt.ZodAny,...Re(e)});class ft extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return be(e.data)}}ft.create=e=>new ft({typeName:Kt.ZodUnknown,...Re(e)});class lt extends Ce{_parse(e){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.never,received:t.parsedType}),we}}lt.create=e=>new lt({typeName:Kt.ZodNever,...Re(e)});class ht extends Ce{_parse(e){if(this._getType(e)!==ue.undefined){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.void,received:t.parsedType}),we}return be(e.data)}}ht.create=e=>new ht({typeName:Kt.ZodVoid,...Re(e)});class pt extends Ce{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==ue.array)return ye(t,{code:de.invalid_type,expected:ue.array,received:t.parsedType}),we;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,i=t.data.length\u003Cn.exactLength.value;(e||i)&&(ye(t,{code:e?de.too_big:de.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:\"array\",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length\u003Cn.minLength.value&&(ye(t,{code:de.too_small,minimum:n.minLength.value,type:\"array\",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(ye(t,{code:de.too_big,maximum:n.maxLength.value,type:\"array\",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>n.type._parseAsync(new Te(t,e,t.path,r))))).then((e=>me.mergeArray(r,e)));const i=[...t.data].map(((e,r)=>n.type._parseSync(new Te(t,e,t.path,r))));return me.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new pt({...this._def,minLength:{value:e,message:Be.toString(t)}})}max(e,t){return new pt({...this._def,maxLength:{value:e,message:Be.toString(t)}})}length(e,t){return new pt({...this._def,exactLength:{value:e,message:Be.toString(t)}})}nonempty(e){return this.min(1,e)}}function gt(e){if(e instanceof yt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Zt.create(gt(n))}return new yt({...e._def,shape:()=>t})}return e instanceof pt?new pt({...e._def,type:gt(e.element)}):e instanceof Zt?Zt.create(gt(e.unwrap())):e instanceof Ut?Ut.create(gt(e.unwrap())):e instanceof Et?Et.create(e.items.map((e=>gt(e)))):e}pt.create=(e,t)=>new pt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Kt.ZodArray,...Re(t)});class yt extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=oe.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ue.object){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.object,received:t.parsedType}),we}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof lt&&\"strip\"===this._def.unknownKeys))for(const e in r.data)i.includes(e)||s.push(e);const o=[];for(const e of i){const t=n[e],i=r.data[e];o.push({key:{status:\"valid\",value:e},value:t._parse(new Te(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof lt){const e=this._def.unknownKeys;if(\"passthrough\"===e)for(const e of s)o.push({key:{status:\"valid\",value:e},value:{status:\"valid\",value:r.data[e]}});else if(\"strict\"===e)s.length>0&&(ye(r,{code:de.unrecognized_keys,keys:s}),t.dirty());else if(\"strip\"!==e)throw new Error(\"Internal ZodObject error: invalid unknownKeys value.\")}else{const e=this._def.catchall;for(const t of s){const n=r.data[t];o.push({key:{status:\"valid\",value:t},value:e._parse(new Te(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>me.mergeObjectSync(t,e))):me.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return Be.errToObj,new yt({...this._def,unknownKeys:\"strict\",...void 0!==e?{errorMap:(t,r)=>{var n,i,s,o;const a=null!==(s=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==s?s:r.defaultError;return\"unrecognized_keys\"===t.code?{message:null!==(o=Be.errToObj(e).message)&&void 0!==o?o:a}:{message:a}}}:{}})}strip(){return new yt({...this._def,unknownKeys:\"strip\"})}passthrough(){return new yt({...this._def,unknownKeys:\"passthrough\"})}extend(e){return new yt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new yt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Kt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new yt({...this._def,catchall:e})}pick(e){const t={};return oe.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new yt({...this._def,shape:()=>t})}omit(e){const t={};return oe.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new yt({...this._def,shape:()=>t})}deepPartial(){return gt(this)}partial(e){const t={};return oe.objectKeys(this.shape).forEach((r=>{const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()})),new yt({...this._def,shape:()=>t})}required(e){const t={};return oe.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof Zt;)e=e._def.innerType;t[r]=e}})),new yt({...this._def,shape:()=>t})}keyof(){return Ot(oe.objectKeys(this.shape))}}yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:\"strip\",catchall:lt.create(),typeName:Kt.ZodObject,...Re(t)}),yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:\"strict\",catchall:lt.create(),typeName:Kt.ZodObject,...Re(t)}),yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:\"strip\",catchall:lt.create(),typeName:Kt.ZodObject,...Re(t)});class mt extends Ce{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if(\"valid\"===t.result.status)return t.result;for(const r of e)if(\"dirty\"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map((e=>new fe(e.ctx.common.issues)));return ye(t,{code:de.invalid_union,unionErrors:r}),we}));{let e;const n=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if(\"valid\"===s.status)return s;\"dirty\"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=n.map((e=>new fe(e)));return ye(t,{code:de.invalid_union,unionErrors:i}),we}}get options(){return this._def.options}}mt.create=(e,t)=>new mt({options:e,typeName:Kt.ZodUnion,...Re(t)});const wt=e=>e instanceof Bt?wt(e.schema):e instanceof Ct?wt(e.innerType()):e instanceof St?[e.value]:e instanceof Tt?e.options:e instanceof Nt?oe.objectValues(e.enum):e instanceof jt?wt(e._def.innerType):e instanceof ut?[void 0]:e instanceof ct?[null]:e instanceof Zt?[void 0,...wt(e.unwrap())]:e instanceof Ut?[null,...wt(e.unwrap())]:e instanceof Mt||e instanceof zt?wt(e.unwrap()):e instanceof Pt?wt(e._def.innerType):[];class vt extends Ce{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ue.object)return ye(t,{code:de.invalid_type,expected:ue.object,received:t.parsedType}),we;const r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(ye(t,{code:de.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const r of t){const t=wt(r.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \\`${e}\\` could not be extracted from all schema options`);for(const i of t){if(n.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new vt({typeName:Kt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...Re(r)})}}function bt(e,t){const r=ce(e),n=ce(t);if(e===t)return{valid:!0,data:e};if(r===ue.object&&n===ue.object){const r=oe.objectKeys(t),n=oe.objectKeys(e).filter((e=>-1!==r.indexOf(e))),i={...e,...t};for(const r of n){const n=bt(e[r],t[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(r===ue.array&&n===ue.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n\u003Ce.length;n++){const i=bt(e[n],t[n]);if(!i.valid)return{valid:!1};r.push(i.data)}return{valid:!0,data:r}}return r===ue.date&&n===ue.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _t extends Ce{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(_e(e)||_e(n))return we;const i=bt(e.value,n.value);return i.valid?((Ee(e)||Ee(n))&&t.dirty(),{status:t.value,value:i.data}):(ye(r,{code:de.invalid_intersection_types}),we)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}_t.create=(e,t,r)=>new _t({left:e,right:t,typeName:Kt.ZodIntersection,...Re(r)});class Et extends Ce{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.array)return ye(r,{code:de.invalid_type,expected:ue.array,received:r.parsedType}),we;if(r.data.length\u003Cthis._def.items.length)return ye(r,{code:de.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:de.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),t.dirty());const n=[...r.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new Te(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(n).then((e=>me.mergeArray(t,e))):me.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Et({...this._def,rest:e})}}Et.create=(e,t)=>{if(!Array.isArray(e))throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");return new Et({items:e,typeName:Kt.ZodTuple,rest:null,...Re(t)})};class xt extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.object)return ye(r,{code:de.invalid_type,expected:ue.object,received:r.parsedType}),we;const n=[],i=this._def.keyType,s=this._def.valueType;for(const e in r.data)n.push({key:i._parse(new Te(r,e,r.path,e)),value:s._parse(new Te(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?me.mergeObjectAsync(t,n):me.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new xt(t instanceof Ce?{keyType:e,valueType:t,typeName:Kt.ZodRecord,...Re(r)}:{keyType:tt.create(),valueType:e,typeName:Kt.ZodRecord,...Re(t)})}}class At extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.map)return ye(r,{code:de.invalid_type,expected:ue.map,received:r.parsedType}),we;const n=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map((([e,t],s)=>({key:n._parse(new Te(r,e,r.path,[s,\"key\"])),value:i._parse(new Te(r,t,r.path,[s,\"value\"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of s){const n=await r.key,i=await r.value;if(\"aborted\"===n.status||\"aborted\"===i.status)return we;\"dirty\"!==n.status&&\"dirty\"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of s){const n=r.key,i=r.value;if(\"aborted\"===n.status||\"aborted\"===i.status)return we;\"dirty\"!==n.status&&\"dirty\"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}At.create=(e,t,r)=>new At({valueType:t,keyType:e,typeName:Kt.ZodMap,...Re(r)});class kt extends Ce{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.set)return ye(r,{code:de.invalid_type,expected:ue.set,received:r.parsedType}),we;const n=this._def;null!==n.minSize&&r.data.size\u003Cn.minSize.value&&(ye(r,{code:de.too_small,minimum:n.minSize.value,type:\"set\",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(ye(r,{code:de.too_big,maximum:n.maxSize.value,type:\"set\",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(e){const r=new Set;for(const n of e){if(\"aborted\"===n.status)return we;\"dirty\"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const o=[...r.data.values()].map(((e,t)=>i._parse(new Te(r,e,r.path,t))));return r.common.async?Promise.all(o).then((e=>s(e))):s(o)}min(e,t){return new kt({...this._def,minSize:{value:e,message:Be.toString(t)}})}max(e,t){return new kt({...this._def,maxSize:{value:e,message:Be.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}kt.create=(e,t)=>new kt({valueType:e,minSize:null,maxSize:null,typeName:Kt.ZodSet,...Re(t)});class It extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ue.function)return ye(t,{code:de.invalid_type,expected:ue.function,received:t.parsedType}),we;function r(e,r){return ge({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pe(),le].filter((e=>!!e)),issueData:{code:de.invalid_arguments,argumentsError:r}})}function n(e,r){return ge({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pe(),le].filter((e=>!!e)),issueData:{code:de.invalid_return_type,returnTypeError:r}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Rt){const e=this;return be((async function(...t){const o=new fe([]),a=await e._def.args.parseAsync(t,i).catch((e=>{throw o.addIssue(r(t,e)),o})),u=await Reflect.apply(s,this,a);return await e._def.returns._def.type.parseAsync(u,i).catch((e=>{throw o.addIssue(n(u,e)),o}))}))}{const e=this;return be((function(...t){const o=e._def.args.safeParse(t,i);if(!o.success)throw new fe([r(t,o.error)]);const a=Reflect.apply(s,this,o.data),u=e._def.returns.safeParse(a,i);if(!u.success)throw new fe([n(a,u.error)]);return u.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new It({...this._def,args:Et.create(e).rest(ft.create())})}returns(e){return new It({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new It({args:e||Et.create([]).rest(ft.create()),returns:t||ft.create(),typeName:Kt.ZodFunction,...Re(r)})}}class Bt extends Ce{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Bt.create=(e,t)=>new Bt({getter:e,typeName:Kt.ZodLazy,...Re(t)});class St extends Ce{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return ye(t,{received:t.data,code:de.invalid_literal,expected:this._def.value}),we}return{status:\"valid\",value:e.data}}get value(){return this._def.value}}function Ot(e,t){return new Tt({values:e,typeName:Kt.ZodEnum,...Re(t)})}St.create=(e,t)=>new St({value:e,typeName:Kt.ZodLiteral,...Re(t)});class Tt extends Ce{constructor(){super(...arguments),Se.set(this,void 0)}_parse(e){if(\"string\"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return ye(t,{expected:oe.joinValues(r),received:t.parsedType,code:de.invalid_type}),we}if(ke(this,Se,\"f\")||Ie(this,Se,new Set(this._def.values),\"f\"),!ke(this,Se,\"f\").has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return ye(t,{received:t.data,code:de.invalid_enum_value,options:r}),we}return be(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Tt.create(e,{...this._def,...t})}exclude(e,t=this._def){return Tt.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Se=new WeakMap,Tt.create=Ot;class Nt extends Ce{constructor(){super(...arguments),Oe.set(this,void 0)}_parse(e){const t=oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ue.string&&r.parsedType!==ue.number){const e=oe.objectValues(t);return ye(r,{expected:oe.joinValues(e),received:r.parsedType,code:de.invalid_type}),we}if(ke(this,Oe,\"f\")||Ie(this,Oe,new Set(oe.getValidEnumValues(this._def.values)),\"f\"),!ke(this,Oe,\"f\").has(e.data)){const e=oe.objectValues(t);return ye(r,{received:r.data,code:de.invalid_enum_value,options:e}),we}return be(e.data)}get enum(){return this._def.values}}Oe=new WeakMap,Nt.create=(e,t)=>new Nt({values:e,typeName:Kt.ZodNativeEnum,...Re(t)});class Rt extends Ce{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ue.promise&&!1===t.common.async)return ye(t,{code:de.invalid_type,expected:ue.promise,received:t.parsedType}),we;const r=t.parsedType===ue.promise?t.data:Promise.resolve(t.data);return be(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Rt.create=(e,t)=>new Rt({type:e,typeName:Kt.ZodPromise,...Re(t)});class Ct extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Kt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{ye(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),\"preprocess\"===n.type){const e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then((async e=>{if(\"aborted\"===t.value)return we;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return\"aborted\"===n.status?we:\"dirty\"===n.status||\"dirty\"===t.value?ve(n.value):n}));{if(\"aborted\"===t.value)return we;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return\"aborted\"===n.status?we:\"dirty\"===n.status||\"dirty\"===t.value?ve(n.value):n}}if(\"refinement\"===n.type){const e=e=>{const t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return\"aborted\"===n.status?we:(\"dirty\"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>\"aborted\"===r.status?we:(\"dirty\"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if(\"transform\"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xe(e))return e;const s=n.transform(e.value,i);if(s instanceof Promise)throw new Error(\"Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.\");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>xe(e)?Promise.resolve(n.transform(e.value,i)).then((e=>({status:t.value,value:e}))):e))}oe.assertNever(n)}}Ct.create=(e,t,r)=>new Ct({schema:e,typeName:Kt.ZodEffects,effect:t,...Re(r)}),Ct.createWithPreprocess=(e,t,r)=>new Ct({schema:t,effect:{type:\"preprocess\",transform:e},typeName:Kt.ZodEffects,...Re(r)});class Zt extends Ce{_parse(e){return this._getType(e)===ue.undefined?be(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zt.create=(e,t)=>new Zt({innerType:e,typeName:Kt.ZodOptional,...Re(t)});class Ut extends Ce{_parse(e){return this._getType(e)===ue.null?be(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ut.create=(e,t)=>new Ut({innerType:e,typeName:Kt.ZodNullable,...Re(t)});class jt extends Ce{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ue.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}jt.create=(e,t)=>new jt({innerType:e,typeName:Kt.ZodDefault,defaultValue:\"function\"==typeof t.default?t.default:()=>t.default,...Re(t)});class Pt extends Ce{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ae(n)?n.then((e=>({status:\"valid\",value:\"valid\"===e.status?e.value:this._def.catchValue({get error(){return new fe(r.common.issues)},input:r.data})}))):{status:\"valid\",value:\"valid\"===n.status?n.value:this._def.catchValue({get error(){return new fe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Pt.create=(e,t)=>new Pt({innerType:e,typeName:Kt.ZodCatch,catchValue:\"function\"==typeof t.catch?t.catch:()=>t.catch,...Re(t)});class Lt extends Ce{_parse(e){if(this._getType(e)!==ue.nan){const t=this._getOrReturnCtx(e);return ye(t,{code:de.invalid_type,expected:ue.nan,received:t.parsedType}),we}return{status:\"valid\",value:e.data}}}Lt.create=e=>new Lt({typeName:Kt.ZodNaN,...Re(e)});const $t=Symbol(\"zod_brand\");class Mt extends Ce{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ft extends Ce{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return\"aborted\"===e.status?we:\"dirty\"===e.status?(t.dirty(),ve(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})()}{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return\"aborted\"===e.status?we:\"dirty\"===e.status?(t.dirty(),{status:\"dirty\",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new Ft({in:e,out:t,typeName:Kt.ZodPipeline})}}class zt extends Ce{_parse(e){const t=this._def.innerType._parse(e),r=e=>(xe(e)&&(e.value=Object.freeze(e.value)),e);return Ae(t)?t.then((e=>r(e))):r(t)}unwrap(){return this._def.innerType}}function Dt(e,t){const r=\"function\"==typeof e?e(t):\"string\"==typeof e?{message:e}:e;return\"string\"==typeof r?{message:r}:r}function qt(e,t={},r){return e?dt.create().superRefine(((n,i)=>{var s,o;const a=e(n);if(a instanceof Promise)return a.then((e=>{var s,o;if(!e){const e=Dt(t,n),a=null===(o=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===o||o;i.addIssue({code:\"custom\",...e,fatal:a})}}));if(!a){const e=Dt(t,n),a=null===(o=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===o||o;i.addIssue({code:\"custom\",...e,fatal:a})}})):dt.create()}zt.create=(e,t)=>new zt({innerType:e,typeName:Kt.ZodReadonly,...Re(t)});const Vt={object:yt.lazycreate};var Kt;!function(e){e.ZodString=\"ZodString\",e.ZodNumber=\"ZodNumber\",e.ZodNaN=\"ZodNaN\",e.ZodBigInt=\"ZodBigInt\",e.ZodBoolean=\"ZodBoolean\",e.ZodDate=\"ZodDate\",e.ZodSymbol=\"ZodSymbol\",e.ZodUndefined=\"ZodUndefined\",e.ZodNull=\"ZodNull\",e.ZodAny=\"ZodAny\",e.ZodUnknown=\"ZodUnknown\",e.ZodNever=\"ZodNever\",e.ZodVoid=\"ZodVoid\",e.ZodArray=\"ZodArray\",e.ZodObject=\"ZodObject\",e.ZodUnion=\"ZodUnion\",e.ZodDiscriminatedUnion=\"ZodDiscriminatedUnion\",e.ZodIntersection=\"ZodIntersection\",e.ZodTuple=\"ZodTuple\",e.ZodRecord=\"ZodRecord\",e.ZodMap=\"ZodMap\",e.ZodSet=\"ZodSet\",e.ZodFunction=\"ZodFunction\",e.ZodLazy=\"ZodLazy\",e.ZodLiteral=\"ZodLiteral\",e.ZodEnum=\"ZodEnum\",e.ZodEffects=\"ZodEffects\",e.ZodNativeEnum=\"ZodNativeEnum\",e.ZodOptional=\"ZodOptional\",e.ZodNullable=\"ZodNullable\",e.ZodDefault=\"ZodDefault\",e.ZodCatch=\"ZodCatch\",e.ZodPromise=\"ZodPromise\",e.ZodBranded=\"ZodBranded\",e.ZodPipeline=\"ZodPipeline\",e.ZodReadonly=\"ZodReadonly\"}(Kt||(Kt={}));const Ht=tt.create,Wt=nt.create,Gt=Lt.create,Jt=it.create,Yt=st.create,Xt=ot.create,Qt=at.create,er=ut.create,tr=ct.create,rr=dt.create,nr=ft.create,ir=lt.create,sr=ht.create,or=pt.create,ar=yt.create,ur=yt.strictCreate,cr=mt.create,dr=vt.create,fr=_t.create,lr=Et.create,hr=xt.create,pr=At.create,gr=kt.create,yr=It.create,mr=Bt.create,wr=St.create,vr=Tt.create,br=Nt.create,_r=Rt.create,Er=Ct.create,xr=Zt.create,Ar=Ut.create,kr=Ct.createWithPreprocess,Ir=Ft.create,Br={string:e=>tt.create({...e,coerce:!0}),number:e=>nt.create({...e,coerce:!0}),boolean:e=>st.create({...e,coerce:!0}),bigint:e=>it.create({...e,coerce:!0}),date:e=>ot.create({...e,coerce:!0})},Sr=we;var Or=Object.freeze({__proto__:null,defaultErrorMap:le,setErrorMap:function(e){he=e},getErrorMap:pe,makeIssue:ge,EMPTY_PATH:[],addIssueToContext:ye,ParseStatus:me,INVALID:we,DIRTY:ve,OK:be,isAborted:_e,isDirty:Ee,isValid:xe,isAsync:Ae,get util(){return oe},get objectUtil(){return ae},ZodParsedType:ue,getParsedType:ce,ZodType:Ce,datetimeRegex:Xe,ZodString:tt,ZodNumber:nt,ZodBigInt:it,ZodBoolean:st,ZodDate:ot,ZodSymbol:at,ZodUndefined:ut,ZodNull:ct,ZodAny:dt,ZodUnknown:ft,ZodNever:lt,ZodVoid:ht,ZodArray:pt,ZodObject:yt,ZodUnion:mt,ZodDiscriminatedUnion:vt,ZodIntersection:_t,ZodTuple:Et,ZodRecord:xt,ZodMap:At,ZodSet:kt,ZodFunction:It,ZodLazy:Bt,ZodLiteral:St,ZodEnum:Tt,ZodNativeEnum:Nt,ZodPromise:Rt,ZodEffects:Ct,ZodTransformer:Ct,ZodOptional:Zt,ZodNullable:Ut,ZodDefault:jt,ZodCatch:Pt,ZodNaN:Lt,BRAND:$t,ZodBranded:Mt,ZodPipeline:Ft,ZodReadonly:zt,custom:qt,Schema:Ce,ZodSchema:Ce,late:Vt,get ZodFirstPartyTypeKind(){return Kt},coerce:Br,any:rr,array:or,bigint:Jt,boolean:Yt,date:Xt,discriminatedUnion:dr,effect:Er,enum:vr,function:yr,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>qt((t=>t instanceof e),t),intersection:fr,lazy:mr,literal:wr,map:pr,nan:Gt,nativeEnum:br,never:ir,null:tr,nullable:Ar,number:Wt,object:ar,oboolean:()=>Yt().optional(),onumber:()=>Wt().optional(),optional:xr,ostring:()=>Ht().optional(),pipeline:Ir,preprocess:kr,promise:_r,record:hr,set:gr,strictObject:ur,string:Ht,symbol:Qt,transformer:Er,tuple:lr,undefined:er,union:cr,unknown:nr,void:sr,NEVER:Sr,ZodIssueCode:de,quotelessJson:e=>JSON.stringify(e,null,2).replace(/\"([^\"]+)\":/g,\"$1:\"),ZodError:fe});function Tr(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&\"Uint8Array\"===e.constructor.name}function Nr(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every((e=>\"string\"==typeof e)):t.every((e=>Number.isSafeInteger(e)))))}function Rr(e){if(\"function\"!=typeof e)throw new Error(\"function expected\");return!0}function Cr(e,t){if(\"string\"!=typeof t)throw new Error(`${e}: string expected`);return!0}function Zr(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function Ur(e){if(!Array.isArray(e))throw new Error(\"array expected\")}function jr(e,t){if(!Nr(!0,t))throw new Error(`${e}: array of strings expected`)}function Pr(e,t){if(!Nr(!1,t))throw new Error(`${e}: array of numbers expected`)}function Lr(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map((e=>e.encode)).reduceRight(r,t),decode:e.map((e=>e.decode)).reduce(r,t)}}function $r(e){const t=\"string\"==typeof e?e.split(\"\"):e,r=t.length;jr(\"alphabet\",t);const n=new Map(t.map(((e,t)=>[e,t])));return{encode:n=>(Ur(n),n.map((n=>{if(!Number.isSafeInteger(n)||n\u003C0||n>=r)throw new Error(`alphabet.encode: digit index outside alphabet \"${n}\". Allowed: ${e}`);return t[n]}))),decode:t=>(Ur(t),t.map((t=>{Cr(\"alphabet.decode\",t);const r=n.get(t);if(void 0===r)throw new Error(`Unknown letter: \"${t}\". Allowed: ${e}`);return r})))}}function Mr(e=\"\"){return Cr(\"join\",e),{encode:t=>(jr(\"join.decode\",t),t.join(e)),decode:t=>(Cr(\"join.decode\",t),t.split(e))}}function Fr(e,t=\"=\"){return Zr(e),Cr(\"padding\",t),{encode(r){for(jr(\"padding.encode\",r);r.length*e%8;)r.push(t);return r},decode(r){jr(\"padding.decode\",r);let n=r.length;if(n*e%8)throw new Error(\"padding: invalid, string should have whole number of bytes\");for(;n>0&&r[n-1]===t;n--){if((n-1)*e%8==0)throw new Error(\"padding: invalid, string has too much padding\")}return r.slice(0,n)}}}function zr(e){return Rr(e),{encode:e=>e,decode:t=>e(t)}}function Dr(e,t,r){if(t\u003C2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(r\u003C2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(Ur(e),!e.length)return[];let n=0;const i=[],s=Array.from(e,(e=>{if(Zr(e),e\u003C0||e>=t)throw new Error(`invalid integer: ${e}`);return e})),o=s.length;for(;;){let e=0,a=!0;for(let i=n;i\u003Co;i++){const o=s[i],u=t*e,c=u+o;if(!Number.isSafeInteger(c)||u/t!==e||c-o!==u)throw new Error(\"convertRadix: carry overflow\");const d=c/r;e=c%r;const f=Math.floor(d);if(s[i]=f,!Number.isSafeInteger(f)||f*r+e!==c)throw new Error(\"convertRadix: carry overflow\");a&&(f?a=!1:n=i)}if(i.push(e),a)break}for(let t=0;t\u003Ce.length-1&&0===e[t];t++)i.push(0);return i.reverse()}const qr=(e,t)=>0===t?e:qr(t,e%t),Vr=(e,t)=>e+(t-qr(e,t)),Kr=(()=>{let e=[];for(let t=0;t\u003C40;t++)e.push(2**t);return e})();function Hr(e,t,r,n){if(Ur(e),t\u003C=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r\u003C=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Vr(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Vr(t,r)}`);let i=0,s=0;const o=Kr[t],a=Kr[r]-1,u=[];for(const n of e){if(Zr(n),n>=o)throw new Error(`convertRadix2: invalid data word=${n} from=${t}`);if(i=i\u003C\u003Ct|n,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=r;s-=r)u.push((i>>s-r&a)>>>0);const e=Kr[s];if(void 0===e)throw new Error(\"invalid carry\");i&=e-1}if(i=i\u003C\u003Cr-s&a,!n&&s>=t)throw new Error(\"Excess padding\");if(!n&&i>0)throw new Error(`Non-zero padding: ${i}`);return n&&s>0&&u.push(i>>>0),u}function Wr(e){Zr(e);return{encode:t=>{if(!Tr(t))throw new Error(\"radix.encode input should be Uint8Array\");return Dr(Array.from(t),256,e)},decode:t=>(Pr(\"radix.decode\",t),Uint8Array.from(Dr(t,e,256)))}}function Gr(e,t=!1){if(Zr(e),e\u003C=0||e>32)throw new Error(\"radix2: bits should be in (0..32]\");if(Vr(8,e)>32||Vr(e,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:r=>{if(!Tr(r))throw new Error(\"radix2.encode input should be Uint8Array\");return Hr(Array.from(r),8,e,!t)},decode:r=>(Pr(\"radix2.decode\",r),Uint8Array.from(Hr(r,e,8,t)))}}function Jr(e){return Rr(e),function(...t){try{return e.apply(null,t)}catch(e){}}}const Yr=Lr(Gr(4),$r(\"0123456789ABCDEF\"),Mr(\"\")),Xr=Lr(Gr(5),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),Fr(5),Mr(\"\")),Qr=(Lr(Gr(5),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),Mr(\"\")),Lr(Gr(5),$r(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),Fr(5),Mr(\"\")),Lr(Gr(5),$r(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),Mr(\"\")),Lr(Gr(5),$r(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),Mr(\"\"),zr((e=>e.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\")=����))),Lr(Gr(6),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),Fr(6),Mr(\"\"))),en=(Lr(Gr(6),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),Mr(\"\")),Lr(Gr(6),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),Fr(6),Mr(\"\"))),tn=(Lr(Gr(6),$r(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),Mr(\"\")),e=>Lr(Wr(58),$r(e),Mr(\"\"))),rn=tn(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),nn=(tn(\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"),tn(\"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz\"),[0,2,3,5,6,7,9,10,11]),sn={encode(e){let t=\"\";for(let r=0;r\u003Ce.length;r+=8){const n=e.subarray(r,r+8);t+=rn.encode(n).padStart(nn[n.length],\"1\")}return t},decode(e){let t=[];for(let r=0;r\u003Ce.length;r+=11){const n=e.slice(r,r+11),i=nn.indexOf(n.length),s=rn.decode(n);for(let e=0;e\u003Cs.length-i;e++)if(0!==s[e])throw new Error(\"base58xmr: wrong padding\");t=t.concat(Array.from(s.slice(s.length-i)))}return Uint8Array.from(t)}},on=Lr($r(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),Mr(\"\")),an=[996825010,642813549,513874426,1027748829,705979059];function un(e){const t=e>>25;let r=(33554431&e)\u003C\u003C5;for(let e=0;e\u003Can.length;e++)1==(t>>e&1)&&(r^=an[e]);return r}function cn(e,t,r=1){const n=e.length;let i=1;for(let t=0;t\u003Cn;t++){const r=e.charCodeAt(t);if(r\u003C33||r>126)throw new Error(`Invalid prefix (${e})`);i=un(i)^r>>5}i=un(i);for(let t=0;t\u003Cn;t++)i=un(i)^31&e.charCodeAt(t);for(let e of t)i=un(i)^e;for(let e=0;e\u003C6;e++)i=un(i);return i^=r,on.encode(Hr([i%Kr[30]],30,5,!1))}function dn(e){const t=\"bech32\"===e?1:734539939,r=Gr(5),n=r.decode,i=r.encode,s=Jr(n);function o(e,r,n=90){Cr(\"bech32.encode prefix\",e),Tr(r)&&(r=Array.from(r)),Pr(\"bech32.encode\",r);const i=e.length;if(0===i)throw new TypeError(`Invalid prefix length ${i}`);const s=i+7+r.length;if(!1!==n&&s>n)throw new TypeError(`Length ${s} exceeds limit ${n}`);const o=e.toLowerCase(),a=cn(o,r,t);return`${o}1${on.encode(r)}${a}`}function a(e,r=90){Cr(\"bech32.decode input\",e);const n=e.length;if(n\u003C8||!1!==r&&n>r)throw new TypeError(`invalid string length: ${n} (${e}). Expected (8..${r})`);const i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw new Error(\"String must be lowercase or uppercase\");const s=i.lastIndexOf(\"1\");if(0===s||-1===s)throw new Error('Letter \"1\" must be present between prefix and data only');const o=i.slice(0,s),a=i.slice(s+1);if(a.length\u003C6)throw new Error(\"Data must be at least 6 characters long\");const u=on.decode(a).slice(0,-6),c=cn(o,u,t);if(!a.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected \"${c}\"`);return{prefix:o,words:u}}return{encode:o,decode:a,encodeFromBytes:function(e,t){return o(e,i(t))},decodeToBytes:function(e){const{prefix:t,words:r}=a(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:Jr(a),fromWords:n,fromWordsUnsafe:s,toWords:i}}dn(\"bech32\"),dn(\"bech32m\");const fn={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)};Lr(Gr(4),$r(\"0123456789abcdef\"),Mr(\"\"),zr((e=>{if(\"string\"!=typeof e||e.length%2!=0)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));function ln(e,t){return r=e,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class hn extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}function pn(e,t=\"Assertion failed.\",r=hn){if(!e){if(t instanceof Error)throw t;throw ln(r,t)}}function gn(e,t){return yn(e,\"pattern\",(r=>t.test(r)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${r}\"`))}function yn(e,t,r){return new h({...e,*refiner(n,i){yield*e.refiner(n,i);const s=f(r(n,i),i,e,n);for(const e of s)yield{...e,refinement:t}}})}const mn=gn(B(),/^(?:0x)?[0-9a-f]+$/iu);gn(B(),/^0x[0-9a-f]+$/iu),gn(B(),/^0x[0-9a-f]{40}$/u),gn(B(),/^0x[0-9a-fA-F]{40}$/u);function wn(e){pn(function(e){return y(e,mn)}(e),\"Value must be a hexadecimal string.\")}function vn(e){return e.startsWith(\"0x\")||e.startsWith(\"0X\")?e.substring(2):e}r(287).hp;const bn=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t\u003C256;t++)e.push(t.toString(16).padStart(2,\"0\"));return e}}();function _n(e){return e instanceof Uint8Array}function En(e){pn(_n(e),\"Value must be a Uint8Array.\")}function xn(e){if(En(e),0===e.length)return\"0x\";const t=bn(),r=new Array(e.length);for(let n=0;n\u003Ce.length;n++)r[n]=t[e[n]];return function(e){return e.startsWith(\"0x\")?e:e.startsWith(\"0X\")?`0x${e.substring(2)}`:`0x${e}`}(r.join(\"\"))}function An(e){if(\"0x\"===e?.toLowerCase?.())return new Uint8Array;wn(e);const t=vn(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e\u003Cn.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),s=t-(t\u003C58?48:87),o=i-(i\u003C58?48:87);n[e]=16*s+o}return n}function kn(e){return pn(\"string\"==typeof e,\"Value must be a string.\"),Qr.decode(e)}const In=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;function Bn(e){if(!Number.isSafeInteger(e)||e\u003C0)throw new Error(\"positive integer expected, got \"+e)}function Sn(e,...t){if(!((r=e)instanceof Uint8Array||ArrayBuffer.isView(r)&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(t.length>0&&!t.includes(e.length))throw new Error(\"Uint8Array expected of length \"+t+\", got length=\"+e.length)}function On(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function Tn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Nn(e,t){return e\u003C\u003C32-t|e>>>t}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,\"0\")));function Rn(e){return\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),Sn(e),e}class Cn{clone(){return this._cloneInto()}}function Zn(e=32){if(In&&\"function\"==typeof In.getRandomValues)return In.getRandomValues(new Uint8Array(e));if(In&&\"function\"==typeof In.randomBytes)return In.randomBytes(e);throw new Error(\"crypto.getRandomValues must be defined\")}const Un=BigInt(0),jn=BigInt(1),Pn=BigInt(2);function Ln(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&\"Uint8Array\"===e.constructor.name}function $n(e){if(!Ln(e))throw new Error(\"Uint8Array expected\")}function Mn(e,t){if(\"boolean\"!=typeof t)throw new Error(e+\" boolean expected, got \"+t)}const Fn=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,\"0\")));function zn(e){$n(e);let t=\"\";for(let r=0;r\u003Ce.length;r++)t+=Fn[e[r]];return t}function Dn(e){const t=e.toString(16);return 1&t.length?\"0\"+t:t}function qn(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return\"\"===e?Un:BigInt(\"0x\"+e)}const Vn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Kn(e){return e>=Vn._0&&e\u003C=Vn._9?e-Vn._0:e>=Vn.A&&e\u003C=Vn.F?e-(Vn.A-10):e>=Vn.a&&e\u003C=Vn.f?e-(Vn.a-10):void 0}function Hn(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error(\"hex string expected, got unpadded hex of length \"+t);const n=new Uint8Array(r);for(let t=0,i=0;t\u003Cr;t++,i+=2){const r=Kn(e.charCodeAt(i)),s=Kn(e.charCodeAt(i+1));if(void 0===r||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character \"'+t+'\" at index '+i)}n[t]=16*r+s}return n}function Wn(e){return qn(zn(e))}function Gn(e){return $n(e),qn(zn(Uint8Array.from(e).reverse()))}function Jn(e,t){return Hn(e.toString(16).padStart(2*t,\"0\"))}function Yn(e,t){return Jn(e,t).reverse()}function Xn(e,t,r){let n;if(\"string\"==typeof t)try{n=Hn(t)}catch(t){throw new Error(e+\" must be hex string or Uint8Array, cause: \"+t)}else{if(!Ln(t))throw new Error(e+\" must be hex string or Uint8Array\");n=Uint8Array.from(t)}const i=n.length;if(\"number\"==typeof r&&i!==r)throw new Error(e+\" of length \"+r+\" expected, got \"+i);return n}function Qn(...e){let t=0;for(let r=0;r\u003Ce.length;r++){const n=e[r];$n(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t\u003Ce.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const ei=e=>\"bigint\"==typeof e&&Un\u003C=e;function ti(e,t,r){return ei(e)&&ei(t)&&ei(r)&&t\u003C=e&&e\u003Cr}function ri(e,t,r,n){if(!ti(t,r,n))throw new Error(\"expected valid \"+e+\": \"+r+\" \u003C= n \u003C \"+n+\", got \"+t)}function ni(e){let t;for(t=0;e>Un;e>>=jn,t+=1);return t}const ii=e=>(Pn\u003C\u003CBigInt(e-1))-jn,si=e=>new Uint8Array(e),oi=e=>Uint8Array.from(e);function ai(e,t,r){if(\"number\"!=typeof e||e\u003C2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t\u003C2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=si(e),i=si(e),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...e)=>r(i,n,...e),u=(e=si())=>{i=a(oi([0]),e),n=a(),0!==e.length&&(i=a(oi([1]),e),n=a())},c=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e\u003Ct;){n=a();const t=n.slice();r.push(t),e+=n.length}return Qn(...r)};return(e,t)=>{let r;for(o(),u(e);!(r=t(c()));)u();return o(),r}}const ui={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||Ln(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function ci(e,t,r={}){const n=(t,r,n)=>{const i=ui[r];if(\"function\"!=typeof i)throw new Error(\"invalid validator function\");const s=e[t];if(!(n&&void 0===s||i(s,e)))throw new Error(\"param \"+String(t)+\" is invalid. Expected \"+r+\", got \"+s)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}function di(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(void 0!==i)return i;const s=e(r,...n);return t.set(r,s),s}}const fi=BigInt(0),li=BigInt(1),hi=BigInt(2),pi=BigInt(3),gi=BigInt(4),yi=BigInt(5),mi=BigInt(8);BigInt(9),BigInt(16);function wi(e,t){const r=e%t;return r>=fi?r:t+r}function vi(e,t,r){if(t\u003Cfi)throw new Error(\"invalid exponent, negatives unsupported\");if(r\u003C=fi)throw new Error(\"invalid modulus\");if(r===li)return fi;let n=li;for(;t>fi;)t&li&&(n=n*e%r),e=e*e%r,t>>=li;return n}function bi(e,t,r){let n=e;for(;t-- >fi;)n*=n,n%=r;return n}function _i(e,t){if(e===fi)throw new Error(\"invert: expected non-zero number\");if(t\u003C=fi)throw new Error(\"invert: expected positive modulus, got \"+t);let r=wi(e,t),n=t,i=fi,s=li,o=li,a=fi;for(;r!==fi;){const e=n/r,t=n%r,u=i-o*e,c=s-a*e;n=r,r=t,i=o,s=a,o=u,a=c}if(n!==li)throw new Error(\"invert: does not exist\");return wi(i,t)}function Ei(e){if(e%gi===pi){const t=(e+li)/gi;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%mi===yi){const t=(e-yi)/mi;return function(e,r){const n=e.mul(r,hi),i=e.pow(n,t),s=e.mul(r,i),o=e.mul(e.mul(s,hi),i),a=e.mul(s,e.sub(o,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(e){const t=(e-li)/hi;let r,n,i;for(r=e-li,n=0;r%hi===fi;r/=hi,n++);for(i=hi;i\u003Ce&&vi(i,t,e)!==e-li;i++)if(i>1e3)throw new Error(\"Cannot find square root: likely non-prime P\");if(1===n){const t=(e+li)/gi;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+li)/hi;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let a=n,u=e.pow(e.mul(e.ONE,i),r),c=e.pow(o,s),d=e.pow(o,r);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t\u003Ca&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,li\u003C\u003CBigInt(a-t-1));u=e.sqr(r),c=e.mul(c,r),d=e.mul(d,u),a=t}return c}}(e)}const xi=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function Ai(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function ki(e,t,r=!1,n={}){if(e\u003C=fi)throw new Error(\"invalid field: expected ORDER > 0, got \"+e);const{nBitLength:i,nByteLength:s}=Ai(e,t);if(s>2048)throw new Error(\"invalid field: expected ORDER of \u003C= 2048 bytes\");let o;const a=Object.freeze({ORDER:e,isLE:r,BITS:i,BYTES:s,MASK:ii(i),ZERO:fi,ONE:li,create:t=>wi(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"invalid field element: expected bigint, got \"+typeof t);return fi\u003C=t&&t\u003Ce},is0:e=>e===fi,isOdd:e=>(e&li)===li,neg:t=>wi(-t,e),eql:(e,t)=>e===t,sqr:t=>wi(t*t,e),add:(t,r)=>wi(t+r,e),sub:(t,r)=>wi(t-r,e),mul:(t,r)=>wi(t*r,e),pow:(e,t)=>function(e,t,r){if(r\u003Cfi)throw new Error(\"invalid exponent, negatives unsupported\");if(r===fi)return e.ONE;if(r===li)return t;let n=e.ONE,i=t;for(;r>fi;)r&li&&(n=e.mul(n,i)),i=e.sqr(i),r>>=li;return n}(a,e,t),div:(t,r)=>wi(t*_i(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>_i(t,e),sqrt:n.sqrt||(t=>(o||(o=Ei(e)),o(a,t))),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Yn(e,s):Jn(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(\"Field.fromBytes: expected \"+s+\" bytes, got \"+e.length);return r?Gn(e):Wn(e)}});return Object.freeze(a)}function Ii(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function Bi(e){const t=Ii(e);return t+Math.ceil(t/2)}const Si=BigInt(0),Oi=BigInt(1);function Ti(e){const t=(ci(r=e,{a:\"bigint\"},{montgomeryBits:\"isSafeInteger\",nByteLength:\"isSafeInteger\",adjustScalarBytes:\"function\",domain:\"function\",powPminus2:\"function\",Gu:\"bigint\"}),Object.freeze({...r}));var r;const{P:n}=t,i=e=>wi(e,n),s=t.montgomeryBits,o=Math.ceil(s/8),a=t.nByteLength,u=t.adjustScalarBytes||(e=>e),c=t.powPminus2||(e=>vi(e,n-BigInt(2),n));function d(e,t,r){const n=i(e*(t-r));return[t=i(t-n),r=i(r+n)]}const f=(t.a-BigInt(2))/BigInt(4);function l(e){return Yn(i(e),o)}function h(e,t){const r=function(e){const t=Xn(\"u coordinate\",e,o);return 32===a&&(t[31]&=127),Gn(t)}(t),h=function(e){const t=Xn(\"scalar\",e),r=t.length;if(r!==o&&r!==a)throw new Error(\"invalid scalar, expected \"+o+\" or \"+a+\" bytes, got \"+r);return Gn(u(t))}(e),p=function(e,t){ri(\"u\",e,Si,n),ri(\"scalar\",t,Si,n);const r=t,o=e;let a,u=Oi,l=Si,h=e,p=Oi,g=Si;for(let e=BigInt(s-1);e>=Si;e--){const t=r>>e&Oi;g^=t,a=d(g,u,h),u=a[0],h=a[1],a=d(g,l,p),l=a[0],p=a[1],g=t;const n=u+l,s=i(n*n),c=u-l,y=i(c*c),m=s-y,w=h+p,v=i((h-p)*n),b=i(w*c),_=v+b,E=v-b;h=i(_*_),p=i(o*i(E*E)),u=i(s*y),l=i(m*(s+i(f*m)))}a=d(g,u,h),u=a[0],h=a[1],a=d(g,l,p),l=a[0],p=a[1];const y=c(l);return i(u*y)}(r,h);if(p===Si)throw new Error(\"invalid private or public key received\");return l(p)}const p=l(t.Gu);function g(e){return h(e,p)}return{scalarMult:h,scalarMultBase:g,getSharedSecret:(e,t)=>h(e,t),getPublicKey:e=>g(e),utils:{randomPrivateKey:()=>t.randomBytes(t.nByteLength)},GuBytes:p}}const Ni=BigInt(\"57896044618658097711785492504343953926634992332820282019728792003956564819949\"),Ri=(BigInt(0),BigInt(1)),Ci=BigInt(2),Zi=BigInt(3),Ui=BigInt(5);BigInt(8);function ji(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=Ni,o=e*e%s*e%s,a=bi(o,Ci,s)*o%s,u=bi(a,Ri,s)*e%s,c=bi(u,Ui,s)*u%s,d=bi(c,t,s)*c%s,f=bi(d,r,s)*d%s,l=bi(f,n,s)*f%s,h=bi(l,i,s)*l%s,p=bi(h,i,s)*l%s,g=bi(p,t,s)*c%s;return{pow_p_5_8:bi(g,Ci,s)*e%s,b2:o}}function Pi(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Li=Ti({P:Ni,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:e=>{const t=Ni,{pow_p_5_8:r,b2:n}=ji(e);return wi(bi(r,Zi,t)*n,t)},adjustScalarBytes:Pi,randomBytes:Zn});function $i(e,t,r){return e&t^e&r^t&r}class Mi extends Cn{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Tn(this.buffer)}update(e){On(this);const{view:t,buffer:r,blockLen:n}=this,i=(e=Rn(e)).length;for(let s=0;s\u003Ci;){const o=Math.min(n-this.pos,i-s);if(o!==n)r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=Tn(e);for(;n\u003C=i-s;s+=n)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){On(this),function(e,t){Sn(e);const r=t.outputLen;if(e.length\u003Cr)throw new Error(\"digestInto() expects output buffer of length at least \"+r)}(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:i}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e\u003Cn;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),u=n?4:0,c=n?0:4;e.setUint32(t+u,o,n),e.setUint32(t+c,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const o=Tn(e),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const u=a/4,c=this.get();if(u>c.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e\u003Cu;e++)o.setUint32(4*e,c[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:o}=this;return e.length=n,e.pos=o,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}const Fi=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]),zi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Di=new Uint32Array(64);class qi extends Mi{constructor(){super(64,32,8,!1),this.A=0|zi[0],this.B=0|zi[1],this.C=0|zi[2],this.D=0|zi[3],this.E=0|zi[4],this.F=0|zi[5],this.G=0|zi[6],this.H=0|zi[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:s,G:o,H:a}=this;return[e,t,r,n,i,s,o,a]}set(e,t,r,n,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let r=0;r\u003C16;r++,t+=4)Di[r]=e.getUint32(t,!1);for(let e=16;e\u003C64;e++){const t=Di[e-15],r=Di[e-2],n=Nn(t,7)^Nn(t,18)^t>>>3,i=Nn(r,17)^Nn(r,19)^r>>>10;Di[e]=i+Di[e-7]+n+Di[e-16]|0}let{A:r,B:n,C:i,D:s,E:o,F:a,G:u,H:c}=this;for(let e=0;e\u003C64;e++){const t=c+(Nn(o,6)^Nn(o,11)^Nn(o,25))+((d=o)&a^~d&u)+Fi[e]+Di[e]|0,f=(Nn(r,2)^Nn(r,13)^Nn(r,22))+$i(r,n,i)|0;c=u,u=a,a=o,o=s+t|0,s=i,i=n,n=r,r=t+f|0}var d;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,a=a+this.F|0,u=u+this.G|0,c=c+this.H|0,this.set(r,n,i,s,o,a,u,c)}roundClean(){Di.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Vi=function(e){const t=t=>e().update(Rn(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new qi));class Ki extends Cn{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");Bn(e.outputLen),Bn(e.blockLen)}(e);const r=Rn(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e\u003Ci.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e\u003Ci.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return On(this),this.iHash.update(e),this}digestInto(e){On(this),Sn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=n,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Hi=(e,t,r)=>new Ki(e,t).update(r).digest();Hi.create=(e,t)=>new Ki(e,t);const Wi=BigInt(0),Gi=BigInt(1);function Ji(e,t){const r=t.negate();return e?r:t}function Yi(e,t){if(!Number.isSafeInteger(e)||e\u003C=0||e>t)throw new Error(\"invalid window size, expected [1..\"+t+\"], got W=\"+e)}function Xi(e,t){Yi(e,t);return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}function Qi(e,t){if(!Array.isArray(e))throw new Error(\"array expected\");e.forEach(((e,r)=>{if(!(e instanceof t))throw new Error(\"invalid point at index \"+r)}))}function es(e,t){if(!Array.isArray(e))throw new Error(\"array of scalars expected\");e.forEach(((e,r)=>{if(!t.isValid(e))throw new Error(\"invalid scalar at index \"+r)}))}const ts=new WeakMap,rs=new WeakMap;function ns(e){return rs.get(e)||1}function is(e){return function(e){const t=xi.reduce(((e,t)=>(e[t]=\"function\",e)),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});ci(e,t)}(e.Fp),ci(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...Ai(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function ss(e){void 0!==e.lowS&&Mn(\"lowS\",e.lowS),void 0!==e.prehash&&Mn(\"prehash\",e.prehash)}const{Ph:os,aT:as}=e;class us extends Error{constructor(e=\"\"){super(e)}}const cs={Err:us,_tlv:{encode:(e,t)=>{const{Err:r}=cs;if(e\u003C0||e>256)throw new r(\"tlv.encode: wrong tag\");if(1&t.length)throw new r(\"tlv.encode: unpadded data\");const n=t.length/2,i=Dn(n);if(i.length/2&128)throw new r(\"tlv.encode: long form length too big\");const s=n>127?Dn(i.length/2|128):\"\";return Dn(e)+s+i+t},decode(e,t){const{Err:r}=cs;let n=0;if(e\u003C0||e>256)throw new r(\"tlv.encode: wrong tag\");if(t.length\u003C2||t[n++]!==e)throw new r(\"tlv.decode: wrong tlv\");const i=t[n++];let s=0;if(!!(128&i)){const e=127&i;if(!e)throw new r(\"tlv.decode(long): indefinite length not supported\");if(e>4)throw new r(\"tlv.decode(long): byte length is too big\");const o=t.subarray(n,n+e);if(o.length!==e)throw new r(\"tlv.decode: length bytes not complete\");if(0===o[0])throw new r(\"tlv.decode(long): zero leftmost byte\");for(const e of o)s=s\u003C\u003C8|e;if(n+=e,s\u003C128)throw new r(\"tlv.decode(long): not minimal encoding\")}else s=i;const o=t.subarray(n,n+s);if(o.length!==s)throw new r(\"tlv.decode: wrong value length\");return{v:o,l:t.subarray(n+s)}}},_int:{encode(e){const{Err:t}=cs;if(e\u003Cds)throw new t(\"integer: negative integers are not allowed\");let r=Dn(e);if(8&Number.parseInt(r[0],16)&&(r=\"00\"+r),1&r.length)throw new t(\"unexpected DER parsing assertion: unpadded hex\");return r},decode(e){const{Err:t}=cs;if(128&e[0])throw new t(\"invalid signature integer: negative\");if(0===e[0]&&!(128&e[1]))throw new t(\"invalid signature integer: unnecessary leading zero\");return os(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=cs,i=\"string\"==typeof e?as(e):e;$n(i);const{v:s,l:o}=n.decode(48,i);if(o.length)throw new t(\"invalid signature: left bytes after parsing\");const{v:a,l:u}=n.decode(2,s),{v:c,l:d}=n.decode(2,u);if(d.length)throw new t(\"invalid signature: left bytes after parsing\");return{r:r.decode(a),s:r.decode(c)}},hexFromSig(e){const{_tlv:t,_int:r}=cs,n=t.encode(2,r.encode(e.r))+t.encode(2,r.encode(e.s));return t.encode(48,n)}},ds=BigInt(0),fs=BigInt(1),ls=(BigInt(2),BigInt(3));BigInt(4);function hs(e){const t=function(e){const t=is(e);ci(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error(\"invalid endomorphism, can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"invalid endomorphism, expected beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=ki(t.n,t.nBitLength),i=t.toBytes||((e,t,n)=>{const i=t.toAffine();return Qn(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),s=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function o(e){const{a:n,b:i}=t,s=r.sqr(e),o=r.mul(s,e);return r.add(r.add(o,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),o(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function a(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:s}=t;if(r&&\"bigint\"!=typeof e){if(Ln(e)&&(e=zn(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"invalid private key\");e=e.padStart(2*n,\"0\")}let o;try{o=\"bigint\"==typeof e?e:Wn(Xn(\"private key\",e,n))}catch(t){throw new Error(\"invalid private key, expected hex or \"+n+\" bytes, got \"+typeof e)}return i&&(o=wi(o,s)),ri(\"private key\",o,fs,s),o}function u(e){if(!(e instanceof f))throw new Error(\"ProjectivePoint expected\")}const c=di(((e,t)=>{const{px:n,py:i,pz:s}=e;if(r.eql(s,r.ONE))return{x:n,y:i};const o=e.is0();null==t&&(t=o?r.ONE:r.inv(s));const a=r.mul(n,t),u=r.mul(i,t),c=r.mul(s,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:a,y:u}})),d=di((e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw new Error(\"bad point: ZERO\")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error(\"bad point: x or y not FE\");const s=r.sqr(i),a=o(n);if(!r.eql(s,a))throw new Error(\"bad point: equation left != right\");if(!e.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\");return!0}));class f{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\");Object.freeze(this)}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof f)throw new Error(\"projective point not allowed\");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?f.ZERO:new f(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(f.fromAffine)}static fromHex(e){const t=f.fromAffine(s(Xn(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return f.BASE.multiply(a(e))}static msm(e,t){return function(e,t,r,n){if(Qi(r,e),es(n,t),r.length!==n.length)throw new Error(\"arrays of points and scalars must have equal length\");const i=e.ZERO,s=ni(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1\u003C\u003Co)-1,u=new Array(a+1).fill(i);let c=i;for(let e=Math.floor((t.BITS-1)/o)*o;e>=0;e-=o){u.fill(i);for(let t=0;t\u003Cn.length;t++){const i=n[t],s=Number(i>>BigInt(e)&BigInt(a));u[s]=u[s].add(r[t])}let t=i;for(let e=u.length-1,r=i;e>0;e--)r=r.add(u[e]),t=t.add(r);if(c=c.add(t),0!==e)for(let e=0;e\u003Co;e++)c=c.double()}return c}(f,n,e,t)}_setWindowSize(e){h.setWindowSize(this,e)}assertValidity(){d(this)}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){u(e);const{px:t,py:n,pz:i}=this,{px:s,py:o,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(s,i)),d=r.eql(r.mul(n,a),r.mul(o,i));return c&&d}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,ls),{px:s,py:o,pz:a}=this;let u=r.ZERO,c=r.ZERO,d=r.ZERO,l=r.mul(s,s),h=r.mul(o,o),p=r.mul(a,a),g=r.mul(s,o);return g=r.add(g,g),d=r.mul(s,a),d=r.add(d,d),u=r.mul(e,d),c=r.mul(i,p),c=r.add(u,c),u=r.sub(h,c),c=r.add(h,c),c=r.mul(u,c),u=r.mul(g,u),d=r.mul(i,d),p=r.mul(e,p),g=r.sub(l,p),g=r.mul(e,g),g=r.add(g,d),d=r.add(l,l),l=r.add(d,l),l=r.add(l,p),l=r.mul(l,g),c=r.add(c,l),p=r.mul(o,a),p=r.add(p,p),l=r.mul(p,g),u=r.sub(u,l),d=r.mul(p,h),d=r.add(d,d),d=r.add(d,d),new f(u,c,d)}add(e){u(e);const{px:n,py:i,pz:s}=this,{px:o,py:a,pz:c}=e;let d=r.ZERO,l=r.ZERO,h=r.ZERO;const p=t.a,g=r.mul(t.b,ls);let y=r.mul(n,o),m=r.mul(i,a),w=r.mul(s,c),v=r.add(n,i),b=r.add(o,a);v=r.mul(v,b),b=r.add(y,m),v=r.sub(v,b),b=r.add(n,s);let _=r.add(o,c);return b=r.mul(b,_),_=r.add(y,w),b=r.sub(b,_),_=r.add(i,s),d=r.add(a,c),_=r.mul(_,d),d=r.add(m,w),_=r.sub(_,d),h=r.mul(p,b),d=r.mul(g,w),h=r.add(d,h),d=r.sub(m,h),h=r.add(m,h),l=r.mul(d,h),m=r.add(y,y),m=r.add(m,y),w=r.mul(p,w),b=r.mul(g,b),m=r.add(m,w),w=r.sub(y,w),w=r.mul(p,w),b=r.add(b,w),y=r.mul(m,b),l=r.add(l,y),y=r.mul(_,b),d=r.mul(v,d),d=r.sub(d,y),y=r.mul(v,m),h=r.mul(_,h),h=r.add(h,y),new f(d,l,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(f.ZERO)}wNAF(e){return h.wNAFCached(this,e,f.normalizeZ)}multiplyUnsafe(e){const{endo:n,n:i}=t;ri(\"scalar\",e,ds,i);const s=f.ZERO;if(e===ds)return s;if(this.is0()||e===fs)return this;if(!n||h.hasPrecomputes(this))return h.wNAFCachedUnsafe(this,e,f.normalizeZ);let{k1neg:o,k1:a,k2neg:u,k2:c}=n.splitScalar(e),d=s,l=s,p=this;for(;a>ds||c>ds;)a&fs&&(d=d.add(p)),c&fs&&(l=l.add(p)),p=p.double(),a>>=fs,c>>=fs;return o&&(d=d.negate()),u&&(l=l.negate()),l=new f(r.mul(l.px,n.beta),l.py,l.pz),d.add(l)}multiply(e){const{endo:n,n:i}=t;let s,o;if(ri(\"scalar\",e,fs,i),n){const{k1neg:t,k1:i,k2neg:a,k2:u}=n.splitScalar(e);let{p:c,f:d}=this.wNAF(i),{p:l,f:p}=this.wNAF(u);c=h.constTimeNegate(t,c),l=h.constTimeNegate(a,l),l=new f(r.mul(l.px,n.beta),l.py,l.pz),s=c.add(l),o=d.add(p)}else{const{p:t,f:r}=this.wNAF(e);s=t,o=r}return f.normalizeZ([s,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=f.BASE,i=(e,t)=>t!==ds&&t!==fs&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=i(this,t).add(i(e,r));return s.is0()?void 0:s}toAffine(e){return c(this,e)}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===fs)return!0;if(r)return r(f,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===fs?this:r?r(f,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return Mn(\"isCompressed\",e),this.assertValidity(),i(f,this,e)}toHex(e=!0){return Mn(\"isCompressed\",e),zn(this.toRawBytes(e))}}f.BASE=new f(t.Gx,t.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const l=t.nBitLength,h=(p=f,g=t.endo?Math.ceil(l/2):l,{constTimeNegate:Ji,hasPrecomputes:e=>1!==ns(e),unsafeLadder(e,t,r=p.ZERO){let n=e;for(;t>Wi;)t&Gi&&(r=r.add(n)),n=n.double(),t>>=Gi;return r},precomputeWindow(e,t){const{windows:r,windowSize:n}=Xi(t,g),i=[];let s=e,o=s;for(let e=0;e\u003Cr;e++){o=s,i.push(o);for(let e=1;e\u003Cn;e++)o=o.add(s),i.push(o);s=o.double()}return i},wNAF(e,t,r){const{windows:n,windowSize:i}=Xi(e,g);let s=p.ZERO,o=p.BASE;const a=BigInt(2**e-1),u=2**e,c=BigInt(e);for(let e=0;e\u003Cn;e++){const n=e*i;let d=Number(r&a);r>>=c,d>i&&(d-=u,r+=Gi);const f=n,l=n+Math.abs(d)-1,h=e%2!=0,p=d\u003C0;0===d?o=o.add(Ji(h,t[f])):s=s.add(Ji(p,t[l]))}return{p:s,f:o}},wNAFUnsafe(e,t,r,n=p.ZERO){const{windows:i,windowSize:s}=Xi(e,g),o=BigInt(2**e-1),a=2**e,u=BigInt(e);for(let e=0;e\u003Ci;e++){const i=e*s;if(r===Wi)break;let c=Number(r&o);if(r>>=u,c>s&&(c-=a,r+=Gi),0===c)continue;let d=t[i+Math.abs(c)-1];c\u003C0&&(d=d.negate()),n=n.add(d)}return n},getPrecomputes(e,t,r){let n=ts.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&ts.set(t,r(n))),n},wNAFCached(e,t,r){const n=ns(e);return this.wNAF(n,this.getPKJi��recomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){const i=ns(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,t){Yi(t,g),rs.set(e,t),ts.delete(e)}});var p,g;return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:a,weierstrassEquation:o,isWithinCurveOrder:function(e){return ti(e,fs,t.n)}}}function ps(e){const t=function(e){const t=is(e);return ci(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,i=r.BYTES+1,s=2*r.BYTES+1;function o(e){return wi(e,n)}function a(e){return _i(e,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:c,weierstrassEquation:d,isWithinCurveOrder:f}=hs({...t,toBytes(e,t,n){const i=t.toAffine(),s=r.toBytes(i.x),o=Qn;return Mn(\"isCompressed\",n),n?o(Uint8Array.from([t.hasEvenY()?2:3]),s):o(Uint8Array.from([4]),s,r.toBytes(i.y))},fromBytes(e){const t=e.length,n=e[0],o=e.subarray(1);if(t!==i||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(o.subarray(0,r.BYTES)),y:r.fromBytes(o.subarray(r.BYTES,2*r.BYTES))}}throw new Error(\"invalid Point, expected length of \"+i+\", or uncompressed \"+s+\", got \"+t)}{const e=Wn(o);if(!ti(e,fs,r.ORDER))throw new Error(\"Point is not on curve\");const t=d(e);let i;try{i=r.sqrt(t)}catch(e){const t=e instanceof Error?\": \"+e.message:\"\";throw new Error(\"Point is not on curve\"+t)}return!(1&~n)!==((i&fs)===fs)&&(i=r.neg(i)),{x:e,y:i}}}}),l=e=>zn(Jn(e,t.nByteLength));function h(e){return e>n>>fs}const p=(e,t,r)=>Wn(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Xn(\"compactSignature\",e,2*r),new g(p(e,0,r),p(e,r,2*r))}static fromDER(e){const{r:t,s:r}=cs.toSig(Xn(\"DER\",e));return new g(t,r)}assertValidity(){ri(\"r\",this.r,fs,n),ri(\"s\",this.s,fs,n)}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:i,recovery:s}=this,c=v(Xn(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const d=2===s||3===s?n+t.n:n;if(d>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const f=1&s?\"03\":\"02\",h=u.fromHex(f+l(d)),p=a(d),g=o(-c*p),y=o(i*p),m=u.BASE.multiplyAndAddUnsafe(h,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return Hn(this.toDERHex())}toDERHex(){return cs.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Hn(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const y={isValidPrivateKey(e){try{return c(e),!0}catch(e){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const e=Bi(t.n);return function(e,t,r=!1){const n=e.length,i=Ii(t),s=Bi(t);if(n\u003C16||n\u003Cs||n>1024)throw new Error(\"expected \"+s+\"-1024 bytes of input, got \"+n);const o=wi(r?Gn(e):Wn(e),t-li)+li;return r?Yn(o,i):Jn(o,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=u.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=Ln(e),r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===i||n===s:r?n===2*i||n===2*s:e instanceof u}const w=t.bits2int||function(e){if(e.length>8192)throw new Error(\"input is too large\");const r=Wn(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},v=t.bits2int_modN||function(e){return o(w(e))},b=ii(t.nBitLength);function _(e){return ri(\"num \u003C 2^\"+t.nBitLength,e,ds,b),Jn(e,t.nByteLength)}function E(e,n,i=x){if([\"recovered\",\"canonical\"].some((e=>e in i)))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:d}=t;let{lowS:l,prehash:p,extraEntropy:y}=i;null==l&&(l=!0),e=Xn(\"msgHash\",e),ss(i),p&&(e=Xn(\"prehashed msgHash\",s(e)));const m=v(e),b=c(n),E=[_(b),_(m)];if(null!=y&&!1!==y){const e=!0===y?d(r.BYTES):y;E.push(Xn(\"extraEntropy\",e))}const A=Qn(...E),k=m;return{seed:A,k2sig:function(e){const t=w(e);if(!f(t))return;const r=a(t),n=u.BASE.multiply(t).toAffine(),i=o(n.x);if(i===ds)return;const s=o(r*o(k+i*b));if(s===ds)return;let c=(n.x===i?0:2)|Number(n.y&fs),d=s;return l&&h(s)&&(d=function(e){return h(e)?o(-e):e}(s),c^=1),new g(i,d,c)}}}const x={lowS:t.lowS,prehash:!1},A={lowS:t.lowS,prehash:!1};return u.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return u.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return u.fromHex(t).multiply(c(e)).toRawBytes(r)},sign:function(e,r,n=x){const{seed:i,k2sig:s}=E(e,r,n),o=t;return ai(o.hash.outputLen,o.nByteLength,o.hmac)(i,s)},verify:function(e,r,n,i=A){const s=e;r=Xn(\"msgHash\",r),n=Xn(\"publicKey\",n);const{lowS:c,prehash:d,format:f}=i;if(ss(i),\"strict\"in i)throw new Error(\"options.strict was renamed to lowS\");if(void 0!==f&&\"compact\"!==f&&\"der\"!==f)throw new Error(\"format must be compact or der\");const l=\"string\"==typeof s||Ln(s),h=!l&&!f&&\"object\"==typeof s&&null!==s&&\"bigint\"==typeof s.r&&\"bigint\"==typeof s.s;if(!l&&!h)throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");let p,y;try{if(h&&(p=new g(s.r,s.s)),l){try{\"compact\"!==f&&(p=g.fromDER(s))}catch(e){if(!(e instanceof cs.Err))throw e}p||\"der\"===f||(p=g.fromCompact(s))}y=u.fromHex(n)}catch(e){return!1}if(!p)return!1;if(c&&p.hasHighS())return!1;d&&(r=t.hash(r));const{r:m,s:w}=p,b=v(r),_=a(w),E=o(b*_),x=o(m*_),k=u.BASE.multiplyAndAddUnsafe(y,E,x)?.toAffine();return!!k&&o(k.x)===m},ProjectivePoint:u,Signature:g,utils:y}}function gs(e){return{hash:e,hmac:(t,...r)=>Hi(e,t,function(...e){let t=0;for(let r=0;r\u003Ce.length;r++){const n=e[r];Sn(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t\u003Ce.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Zn}}const ys=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),ms=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),ws=BigInt(1),vs=BigInt(2),bs=(e,t)=>(e+t/vs)/t;function _s(e){const t=ys,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),u=BigInt(88),c=e*e*e%t,d=c*c*e%t,f=bi(d,r,t)*d%t,l=bi(f,r,t)*d%t,h=bi(l,vs,t)*c%t,p=bi(h,i,t)*h%t,g=bi(p,s,t)*p%t,y=bi(g,a,t)*g%t,m=bi(y,u,t)*y%t,w=bi(m,a,t)*g%t,v=bi(w,r,t)*d%t,b=bi(v,o,t)*p%t,_=bi(b,n,t)*c%t,E=bi(_,vs,t);if(!Es.eql(Es.sqr(E),e))throw new Error(\"Cannot find square root\");return E}const Es=ki(ys,void 0,void 0,{sqrt:_s}),xs=function(e,t){const r=t=>ps({...e,...gs(t)});return{...r(t),create:r}}({a:BigInt(0),b:BigInt(7),Fp:Es,n:ms,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=ms,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-ws*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),i=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,o=BigInt(\"0x100000000000000000000000000000000\"),a=bs(s*e,t),u=bs(-n*e,t);let c=wi(e-a*r-u*i,t),d=wi(-a*n-u*s,t);const f=c>o,l=d>o;if(f&&(c=t-c),l&&(d=t-d),c>o||d>o)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:f,k1:c,k2neg:l,k2:d}}}},Vi);BigInt(0);xs.ProjectivePoint;function As(e){if(!Number.isSafeInteger(e)||e\u003C0)throw new Error(`positive integer expected, not ${e}`)}function ks(e){if(\"boolean\"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function Is(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}function Bs(e,...t){if(!Is(e))throw new Error(\"Uint8Array expected\");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Ss(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function Os(e,t){Bs(e);const r=t.outputLen;if(e.length\u003Cr)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Ts=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");const Ns=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,\"0\")));function Rs(e){Bs(e);let t=\"\";for(let r=0;r\u003Ce.length;r++)t+=Ns[e[r]];return t}const Cs=48,Zs=57,Us=65,js=70,Ps=97,Ls=102;function $s(e){return e>=Cs&&e\u003C=Zs?e-Cs:e>=Us&&e\u003C=js?e-(Us-10):e>=Ps&&e\u003C=Ls?e-(Ps-10):void 0}function Ms(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const n=new Uint8Array(r);for(let t=0,i=0;t\u003Cr;t++,i+=2){const r=$s(e.charCodeAt(i)),s=$s(e.charCodeAt(i+1));if(void 0===r||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character \"'+t+'\" at index '+i)}n[t]=16*r+s}return n}function Fs(e){if(\"string\"!=typeof e)throw new Error(\"string expected, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function zs(e){if(\"string\"==typeof e)e=Fs(e);else{if(!Is(e))throw new Error(\"Uint8Array expected, got \"+typeof e);e=e.slice()}return e}\"object\"==typeof globalThis&&\"crypto\"in globalThis&&globalThis.crypto;const Ds=e=>Uint8Array.from(e.split(\"\").map((e=>e.charCodeAt(0)))),qs=Ds(\"expand 16-byte k\"),Vs=Ds(\"expand 32-byte k\"),Ks=Ts(qs),Hs=Ts(Vs);Hs.slice();function Ws(e,t){return e\u003C\u003Ct|e>>>32-t}function Gs(e){return e.byteOffset%4==0}const Js=2**32-1,Ys=new Uint32Array;function Xs(e,t){const{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=function(e,t){if(null==t||\"object\"!=typeof t)throw new Error(\"options must be defined\");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(\"function\"!=typeof e)throw new Error(\"core must be a function\");return As(i),As(o),ks(s),ks(r),(t,a,u,c,d=0)=>{Bs(t),Bs(a),Bs(u);const f=u.length;if(c||(c=new Uint8Array(f)),Bs(c),As(d),d\u003C0||d>=Js)throw new Error(\"arx: counter overflow\");if(c.length\u003Cf)throw new Error(`arx: output (${c.length}) is shorter than data (${f})`);const l=[];let h,p,g=t.length;if(32===g)h=t.slice(),l.push(h),p=Hs;else{if(16!==g||!r)throw new Error(`arx: invalid 32-byte key, got length=${g}`);h=new Uint8Array(32),h.set(t),h.set(t,16),p=Ks,l.push(h)}Gs(a)||(a=a.slice(),l.push(a));const y=Ts(h);if(n){if(24!==a.length)throw new Error(\"arx: extended nonce must be 24 bytes\");n(p,y,Ts(a.subarray(0,16)),y),a=a.subarray(16)}const m=16-i;if(m!==a.length)throw new Error(`arx: nonce must be ${m} or 16 bytes`);if(12!==m){const e=new Uint8Array(12);e.set(a,s?0:12-a.length),a=e,l.push(a)}const w=Ts(a);for(!function(e,t,r,n,i,s,o,a){const u=i.length,c=new Uint8Array(64),d=Ts(c),f=Gs(i)&&Gs(s),l=f?Ts(i):Ys,h=f?Ts(s):Ys;for(let p=0;p\u003Cu;o++){if(e(t,r,n,d,o,a),o>=Js)throw new Error(\"arx: counter overflow\");const g=Math.min(64,u-p);if(f&&64===g){const e=p/4;if(p%4!=0)throw new Error(\"arx: invalid block position\");for(let t,r=0;r\u003C16;r++)t=e+r,h[t]=l[t]^d[r];p+=64}else{for(let e,t=0;t\u003Cg;t++)e=p+t,s[e]=i[e]^c[t];p+=g}}}(e,p,y,w,u,c,d,o);l.length>0;)l.pop().fill(0);return c}}const Qs=(e,t)=>255&e[t++]|(255&e[t++])\u003C\u003C8;class eo{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,Bs(e=zs(e),32);const t=Qs(e,0),r=Qs(e,2),n=Qs(e,4),i=Qs(e,6),s=Qs(e,8),o=Qs(e,10),a=Qs(e,12),u=Qs(e,14);this.r[0]=8191&t,this.r[1]=8191&(t>>>13|r\u003C\u003C3),this.r[2]=7939&(r>>>10|n\u003C\u003C6),this.r[3]=8191&(n>>>7|i\u003C\u003C9),this.r[4]=255&(i>>>4|s\u003C\u003C12),this.r[5]=s>>>1&8190,this.r[6]=8191&(s>>>14|o\u003C\u003C2),this.r[7]=8065&(o>>>11|a\u003C\u003C5),this.r[8]=8191&(a>>>8|u\u003C\u003C8),this.r[9]=u>>>5&127;for(let t=0;t\u003C8;t++)this.pad[t]=Qs(e,16+2*t)}process(e,t,r=!1){const n=r?0:2048,{h:i,r:s}=this,o=s[0],a=s[1],u=s[2],c=s[3],d=s[4],f=s[5],l=s[6],h=s[7],p=s[8],g=s[9],y=Qs(e,t+0),m=Qs(e,t+2),w=Qs(e,t+4),v=Qs(e,t+6),b=Qs(e,t+8),_=Qs(e,t+10),E=Qs(e,t+12),x=Qs(e,t+14);let A=i[0]+(8191&y),k=i[1]+(8191&(y>>>13|m\u003C\u003C3)),I=i[2]+(8191&(m>>>10|w\u003C\u003C6)),B=i[3]+(8191&(w>>>7|v\u003C\u003C9)),S=i[4]+(8191&(v>>>4|b\u003C\u003C12)),O=i[5]+(b>>>1&8191),T=i[6]+(8191&(b>>>14|_\u003C\u003C2)),N=i[7]+(8191&(_>>>11|E\u003C\u003C5)),R=i[8]+(8191&(E>>>8|x\u003C\u003C8)),C=i[9]+(x>>>5|n),Z=0,U=Z+A*o+k*(5*g)+I*(5*p)+B*(5*h)+S*(5*l);Z=U>>>13,U&=8191,U+=O*(5*f)+T*(5*d)+N*(5*c)+R*(5*u)+C*(5*a),Z+=U>>>13,U&=8191;let j=Z+A*a+k*o+I*(5*g)+B*(5*p)+S*(5*h);Z=j>>>13,j&=8191,j+=O*(5*l)+T*(5*f)+N*(5*d)+R*(5*c)+C*(5*u),Z+=j>>>13,j&=8191;let P=Z+A*u+k*a+I*o+B*(5*g)+S*(5*p);Z=P>>>13,P&=8191,P+=O*(5*h)+T*(5*l)+N*(5*f)+R*(5*d)+C*(5*c),Z+=P>>>13,P&=8191;let L=Z+A*c+k*u+I*a+B*o+S*(5*g);Z=L>>>13,L&=8191,L+=O*(5*p)+T*(5*h)+N*(5*l)+R*(5*f)+C*(5*d),Z+=L>>>13,L&=8191;let $=Z+A*d+k*c+I*u+B*a+S*o;Z=$>>>13,$&=8191,$+=O*(5*g)+T*(5*p)+N*(5*h)+R*(5*l)+C*(5*f),Z+=$>>>13,$&=8191;let M=Z+A*f+k*d+I*c+B*u+S*a;Z=M>>>13,M&=8191,M+=O*o+T*(5*g)+N*(5*p)+R*(5*h)+C*(5*l),Z+=M>>>13,M&=8191;let F=Z+A*l+k*f+I*d+B*c+S*u;Z=F>>>13,F&=8191,F+=O*a+T*o+N*(5*g)+R*(5*p)+C*(5*h),Z+=F>>>13,F&=8191;let z=Z+A*h+k*l+I*f+B*d+S*c;Z=z>>>13,z&=8191,z+=O*u+T*a+N*o+R*(5*g)+C*(5*p),Z+=z>>>13,z&=8191;let D=Z+A*p+k*h+I*l+B*f+S*d;Z=D>>>13,D&=8191,D+=O*c+T*u+N*a+R*o+C*(5*g),Z+=D>>>13,D&=8191;let q=Z+A*g+k*p+I*h+B*l+S*f;Z=q>>>13,q&=8191,q+=O*d+T*c+N*u+R*a+C*o,Z+=q>>>13,q&=8191,Z=(Z\u003C\u003C2)+Z|0,Z=Z+U|0,U=8191&Z,Z>>>=13,j+=Z,i[0]=U,i[1]=j,i[2]=P,i[3]=L,i[4]=$,i[5]=M,i[6]=F,i[7]=z,i[8]=D,i[9]=q}finalize(){const{h:e,pad:t}=this,r=new Uint16Array(10);let n=e[1]>>>13;e[1]&=8191;for(let t=2;t\u003C10;t++)e[t]+=n,n=e[t]>>>13,e[t]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let t=1;t\u003C10;t++)r[t]=e[t]+n,n=r[t]>>>13,r[t]&=8191;r[9]-=8192;let i=(1^n)-1;for(let e=0;e\u003C10;e++)r[e]&=i;i=~i;for(let t=0;t\u003C10;t++)e[t]=e[t]&i|r[t];e[0]=65535&(e[0]|e[1]\u003C\u003C13),e[1]=65535&(e[1]>>>3|e[2]\u003C\u003C10),e[2]=65535&(e[2]>>>6|e[3]\u003C\u003C7),e[3]=65535&(e[3]>>>9|e[4]\u003C\u003C4),e[4]=65535&(e[4]>>>12|e[5]\u003C\u003C1|e[6]\u003C\u003C14),e[5]=65535&(e[6]>>>2|e[7]\u003C\u003C11),e[6]=65535&(e[7]>>>5|e[8]\u003C\u003C8),e[7]=65535&(e[8]>>>8|e[9]\u003C\u003C5);let s=e[0]+t[0];e[0]=65535&s;for(let r=1;r\u003C8;r++)s=(e[r]+t[r]|0)+(s>>>16)|0,e[r]=65535&s}update(e){Ss(this);const{buffer:t,blockLen:r}=this,n=(e=zs(e)).length;for(let i=0;i\u003Cn;){const s=Math.min(r-this.pos,n-i);if(s!==r)t.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0,!1),this.pos=0);else for(;r\u003C=n-i;i+=r)this.process(e,i)}return this}destroy(){this.h.fill(0),this.r.fill(0),this.buffer.fill(0),this.pad.fill(0)}digestInto(e){Ss(this),Os(e,this),this.finished=!0;const{buffer:t,h:r}=this;let{pos:n}=this;if(n){for(t[n++]=1;n\u003C16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let i=0;for(let t=0;t\u003C8;t++)e[i++]=r[t]>>>0,e[i++]=r[t]>>>8;return e}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}}const to=function(e){const t=(t,r)=>e(r).update(zs(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}((e=>new eo(e)));function ro(e,t,r,n,i,s=20){let o=e[0],a=t[0],u=t[1],c=t[2],d=t[3],f=e[1],l=r[0],h=r[1],p=i,g=e[2],y=t[4],m=t[5],w=t[6],v=t[7],b=e[3],_=o,E=a,x=u,A=c,k=d,I=f,B=l,S=h,O=p,T=0,N=g,R=y,C=m,Z=w,U=v,j=b;for(let e=0;e\u003Cs;e+=2)k^=Ws(_+C|0,7),O^=Ws(k+_|0,9),C^=Ws(O+k|0,13),_^=Ws(C+O|0,18),T^=Ws(I+E|0,7),Z^=Ws(T+I|0,9),E^=Ws(Z+T|0,13),I^=Ws(E+Z|0,18),U^=Ws(N+B|0,7),x^=Ws(U+N|0,9),B^=Ws(x+U|0,13),N^=Ws(B+x|0,18),A^=Ws(j+R|0,7),S^=Ws(A+j|0,9),R^=Ws(S+A|0,13),j^=Ws(R+S|0,18),E^=Ws(_+A|0,7),x^=Ws(E+_|0,9),A^=Ws(x+E|0,13),_^=Ws(A+x|0,18),B^=Ws(I+k|0,7),S^=Ws(B+I|0,9),k^=Ws(S+B|0,13),I^=Ws(k+S|0,18),R^=Ws(N+T|0,7),O^=Ws(R+N|0,9),T^=Ws(O+R|0,13),N^=Ws(T+O|0,18),C^=Ws(j+U|0,7),Z^=Ws(C+j|0,9),U^=Ws(Z+C|0,13),j^=Ws(U+Z|0,18);let P=0;n[P++]=o+_|0,n[P++]=a+E|0,n[P++]=u+x|0,n[P++]=c+A|0,n[P++]=d+k|0,n[P++]=f+I|0,n[P++]=l+B|0,n[P++]=h+S|0,n[P++]=p+O|0,n[P++]=0+T|0,n[P++]=g+N|0,n[P++]=y+R|0,n[P++]=m+C|0,n[P++]=w+Z|0,n[P++]=v+U|0,n[P++]=b+j|0}function no(e,t,r,n){let i=e[0],s=t[0],o=t[1],a=t[2],u=t[3],c=e[1],d=r[0],f=r[1],l=r[2],h=r[3],p=e[2],g=t[4],y=t[5],m=t[6],w=t[7],v=e[3];for(let e=0;e\u003C20;e+=2)u^=Ws(i+y|0,7),l^=Ws(u+i|0,9),y^=Ws(l+u|0,13),i^=Ws(y+l|0,18),h^=Ws(c+s|0,7),m^=Ws(h+c|0,9),s^=Ws(m+h|0,13),c^=Ws(s+m|0,18),w^=Ws(p+d|0,7),o^=Ws(w+p|0,9),d^=Ws(o+w|0,13),p^=Ws(d+o|0,18),a^=Ws(v+g|0,7),f^=Ws(a+v|0,9),g^=Ws(f+a|0,13),v^=Ws(g+f|0,18),s^=Ws(i+a|0,7),o^=Ws(s+i|0,9),a^=Ws(o+s|0,13),i^=Ws(a+o|0,18),d^=Ws(c+u|0,7),f^=Ws(d+c|0,9),u^=Ws(f+d|0,13),c^=Ws(u+f|0,18),g^=Ws(p+h|0,7),l^=Ws(g+p|0,9),h^=Ws(l+g|0,13),p^=Ws(h+l|0,18),y^=Ws(v+w|0,7),m^=Ws(y+v|0,9),w^=Ws(m+y|0,13),v^=Ws(w+m|0,18);let b=0;n[b++]=i,n[b++]=c,n[b++]=p,n[b++]=v,n[b++]=d,n[b++]=f,n[b++]=l,n[b++]=h}Xs(ro,{allowShortKeys:!0,counterRight:!0});const io=Xs(ro,{counterRight:!0,extendNonceFn:no}),so=(oo={blockSize:64,nonceLength:24,tagLength:16},ao=(e,t)=>{const r=16;return Bs(e,32),Bs(t,24),{encrypt:(n,i)=>{Bs(n);const s=n.length+32;i?Bs(i,s):i=new Uint8Array(s),i.set(n,32),io(e,t,i,i);const o=i.subarray(0,32),a=to(i.subarray(32),o);return i.set(a,r),i.subarray(0,r).fill(0),i.subarray(r)},decrypt:n=>{Bs(n);const i=n.length;if(i\u003Cr)throw new Error(\"encrypted data should be at least 16 bytes\");const s=new Uint8Array(i+r);s.set(n,r);const o=io(e,t,new Uint8Array(32)),a=to(s.subarray(32),o);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n\u003Ce.length;n++)r|=e[n]^t[n];return 0===r}(s.subarray(16,32),a))throw new Error(\"invalid tag\");const u=io(e,t,s);return u.subarray(0,32).fill(0),o.fill(0),u.subarray(32)}}},Object.assign(ao,oo),ao);var oo,ao;function uo(e,t){const r=so(e,t);return{seal:r.encrypt,open:r.decrypt}}const co=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),fo=new Uint8Array(16),lo=(e,t)=>{const r=Li.getSharedSecret(t,e),n=new Uint32Array(8);return no(Ts(co),Ts(r),Ts(fo),n),i=n,new Uint8Array(i.buffer,i.byteOffset,i.byteLength);var i},ho=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError(\"publicKey must be a Uint8Array\");if(!(t instanceof Uint8Array))throw new TypeError(\"secretKey must be a Uint8Array\")},po=(e,t)=>{if(32!==e.length)throw new TypeError(\"publicKey must be 32 bytes long\");if(32!==t.length)throw new TypeError(\"secretKey must be 32 bytes long\")},go={seal:(e,t,r,n)=>{ho(r,n),po(r,n);return uo(lo(r,n),t).seal(e)},open:(e,t,r,n)=>{ho(r,n),po(r,n);return uo(lo(r,n),t).open(e)},nonceLength:24,keyPair:()=>{const e=Li.utils.randomPrivateKey();return{secretKey:e,publicKey:Li.getPublicKey(e)}}},yo=(e,t)=>{if(\"x25519-xsalsa20-poly1305\"===e.version){let r;if(t instanceof Uint8Array)r=t;else try{r=An(t)}catch(e){throw new Error(\"Bad private key\")}const n=kn(e.nonce),i=kn(e.ciphertext),s=kn(e.ephemPublicKey);return function(e){return(new TextDecoder).decode(e)}(go.open(i,n,s,r))}throw new Error(`Encryption type/version not supported (${e.version}).`)};async function mo(){return await snap.request({method:\"snap_listEntropySources\"})}async function wo(e,t){return await snap.request({method:\"snap_getEntropy\",params:{version:1,source:e,...t?{salt:t}:{}}})}async function vo(e,t){const r=await wo(e,t);return Ms(vn(r))}async function bo(e,t){const r=await vo(e,t);return function(e){return`0x${Rs(e)}`}(xs.getPublicKey(r))}const _o=\"metamask:snaps:encryption\";async function Eo(e,t){const r=t?`${_o}${t}`:_o;return await wo(e,r)}async function xo(e,t){const r=await Eo(e,t);return xn(Li.getPublicKey(r.slice(2)))}const Ao=\"invalid tag\";const ko=Or.object({entropySourceId:Or.string().optional()}),Io=Or.object({entropySourceId:Or.string().optional()}),Bo=Or.object({message:Or.string().startsWith(\"metamask:\"),entropySourceId:Or.string().optional()}),So=Or.object({data:Or.object({version:Or.literal(\"x25519-xsalsa20-poly1305\"),nonce:Or.string().length(32).base64(),ephemPublicKey:Or.string().length(44).base64(),ciphertext:Or.string().base64()}),entropySourceId:Or.string().optional()});const Oo=[\"https://portfolio.metamask.io\",\"https://portfolio-builds.metafi-dev.codefi.network\",\"https://docs.metamask.io\",\"https://developer.metamask.io\",\"metamask\"];function To(e){if(e&&!Oo.includes(e))return e}const No=async({request:e,origin:t})=>{const r=To(t);switch(e.method){case\"getPublicKey\":{const{params:t}=e;if(!t)return bo(void 0,r);!function(e){try{ko.parse(e)}catch{throw re({message:\"`getPublicKey`, must take an optional `entropySourceId` parameter\"})}}(t);const{entropySourceId:n}=t;return bo(n,r)}case\"getAllPublicKeys\":return async function(e){const t=await mo(),r=[];return await Promise.all(t.map((async t=>{const n=await bo(t.id,e);r.push([t.id,n])}))),r}(r);case\"signMessage\":{const{params:t}=e;!function(e){try{Bo.parse(e)}catch{throw re({message:\"`signMessage`, must take a `message` parameter that must begin with `metamask:`\"})}}(t);const{message:n,entropySourceId:i}=t;return await async function(e,t,r){const n=await vo(t,r),i=Vi(e);return`0x${xs.sign(i,n).toCompactHex()}`}(n,i,r)}case\"getEncryptionPublicKey\":{const{params:t}=e;if(!t)return xo(void 0,r);!function(e){try{Io.parse(e)}catch(e){throw re({message:\"`getEncryptionPublicKey`, expects an optional `entropySourceId` parameter\"})}}(t);const{entropySourceId:n}=t;return xo(n,r)}case\"decryptMessage\":{const{params:t}=e;!function(e){try{So.parse(e)}catch(e){throw re({message:\"`decryptMessage`, expects a `data` parameter that must match the Eip1024EncryptedData schema, and an optional entropySourceId string parameter\"})}}(t);const{data:n,entropySourceId:i}=t;return await async function(e,t,r){if(t){const n=await Eo(t,r);return yo(e,n)}const n=await mo();let i=null;for(const t of n){const n=await Eo(t.id,r);try{return yo(e,n)}catch(e){e.message!==Ao&&(i=i??e)}}throw i??new Error(Ao)}(n,i,r)}default:throw ne({data:{method:e.method}})}}})(),module.exports=n})();","status":"stopped","version":"1.1.2","versionHistory":[{"date":1.750696483411e+12,"origin":"metamask","version":"1.1.2"}]},"npm:@metamask/solana-wallet-snap":{"auxiliaryFiles":[],"blocked":false,"enabled":true,"hideSnapBranding":true,"id":"npm:@metamask/solana-wallet-snap","initialConnections":{"https://portfolio.metamask.io":{}},"initialPermissions":{"endowment:assets":{"scopes":["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"]},"endowment:cronjob":{"jobs":[{"expression":"* * * * *","request":{"method":"refreshSend","params":{}}},{"expression":"* * * * *","request":{"method":"refreshConfirmationEstimation","params":{}}},{"expression":"*/2 * * * *","request":{"method":"scheduleRefreshAccounts","params":{}}}]},"endowment:keyring":{"allowedOrigins":["https://portfolio.metamask.io"]},"endowment:network-access":{},"endowment:protocol":{"scopes":{"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]},"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]}}},"endowment:rpc":{"dapps":true,"snaps":false},"snap_dialog":{},"snap_getBip32Entropy":[{"curve":"ed25519","path":["m","44'","501'"]}],"snap_getPreferences":{},"snap_manageAccounts":{},"snap_manageState":{}},"localizationFiles":[{"locale":"en","messages":{"confirmation.account":{"message":"Account"},"confirmation.advanced.data":{"message":"Data"},"confirmation.advanced.hide":{"message":"Hide advanced"},"confirmation.advanced.programId":{"message":"Program ID"},"confirmation.advanced.show":{"message":"Show advanced"},"confirmation.advanced.unknownInstruction":{"message":"Unknown"},"confirmation.cancelButton":{"message":"Cancel"},"confirmation.confirmButton":{"message":"Confirm"},"confirmation.estimatedChanges":{"message":"Estimated changes"},"confirmation.estimatedChanges.noChanges":{"message":"No changes"},"confirmation.estimatedChanges.notAvailable":{"message":"Not available"},"confirmation.estimatedChanges.receive":{"message":"You receive"},"confirmation.estimatedChanges.send":{"message":"You send"},"confirmation.estimatedChanges.tooltip":{"message":"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee."},"confirmation.fee":{"message":"Network fee"},"confirmation.feeError":{"message":"Unable to estimate fee"},"confirmation.network":{"message":"Network"},"confirmation.origin":{"message":"Request from"},"confirmation.origin.tooltip":{"message":"This is the site asking for your confirmation."},"confirmation.signIn.badAccount":{"message":"This site is asking you to sign in using the wrong account."},"confirmation.signIn.chainId":{"message":"Chain ID"},"confirmation.signIn.description":{"message":"A site wants you to sign in to prove you own this account."},"confirmation.signIn.domain":{"message":"Domain"},"confirmation.signIn.expirationTime":{"message":"Expiration time"},"confirmation.signIn.issuedAt":{"message":"Issued at"},"confirmation.signIn.message":{"message":"Message"},"confirmation.signIn.nonce":{"message":"Nonce"},"confirmation.signIn.notBefore":{"message":"Not before"},"confirmation.signIn.requestId":{"message":"Request ID"},"confirmation.signIn.resources":{"message":"Resources"},"confirmation.signIn.signingInWith":{"message":"Signing in with"},"confirmation.signIn.statement":{"message":"Statement"},"confirmation.signIn.title":{"message":"Sign-in request"},"confirmation.signIn.unknownDomain":{"message":"Unknown domain"},"confirmation.signIn.version":{"message":"Version"},"confirmation.signMessage.message":{"message":"Message"},"confirmation.signMessage.title":{"message":"Sign message"},"confirmation.simulationErrorSubtitle":{"message":"{reason}"},"confirmation.simulationErrorTitle":{"message":"This transaction was reverted during simulation."},"confirmation.title":{"message":"Transaction request"},"confirmation.validationErrorLearnMore":{"message":"Learn more"},"confirmation.validationErrorSecurityAdviced":{"message":"Security advice by"},"confirmation.validationErrorSubtitle":{"message":"If you approve this request, a third party known for scams will take all your assets."},"confirmation.validationErrorTitle":{"message":"This is a deceptive request"},"send.amountField":{"message":"Amount"},"send.amountGreatherThanMinimumBalanceForRentExemptionError":{"message":"Amount must be greater than {minimumValue}"},"send.amountRequiredError":{"message":"Amount is required"},"send.assetField":{"message":"Token"},"send.balance":{"message":"Balance"},"send.cancelButton":{"message":"Cancel"},"send.confirmation.cancelButton":{"message":"Cancel"},"send.confirmation.fee":{"message":"Network fee"},"send.confirmation.from":{"message":"From"},"send.confirmation.network":{"message":"Network"},"send.confirmation.recipient":{"message":"Recipient"},"send.confirmation.sendButton":{"message":"Send"},"send.confirmation.title":{"message":"Review"},"send.confirmation.transactionSpeed":{"message":"Transaction speed"},"send.confirmation.viewTransaction":{"message":"View transaction"},"send.continueButton":{"message":"Continue"},"send.fromField":{"message":"From"},"send.fromRequiredError":{"message":"Account is required"},"send.insufficientBalance":{"message":"Insufficient balance"},"send.insuffientSolToCoverFee":{"message":"Insufficient SOL balance to cover the transaction fee"},"send.maxButton":{"message":"Max"},"send.selectedTokenPriceNotAvailable":{"message":"Prices for tokens in {currency} are currently not available. You are still able to send tokens."},"send.send-pending.subtitle":{"message":"Your transaction was submitted."},"send.send-pending.title":{"message":"Sending..."},"send.simulationMessageAPIError":{"message":"Only continue if you trust every address involved."},"send.simulationMessageError":{"message":"This transaction was reverted during simulation."},"send.simulationTitleAPIError":{"message":"Because of an error, we couldn't check for security alerts."},"send.simulationTitleError":{"message":"Transaction simulation failed"},"send.title":{"message":"Send"},"send.toField":{"message":"To"},"send.toInvalidError":{"message":"Invalid Solana address"},"send.toPlaceholder":{"message":"Enter public address"},"send.toRequiredError":{"message":"To address is required"},"send.transaction-failure.subtitle":{"message":"Unable to send {amount} {tokenSymbol}"},"send.transaction-failure.title":{"message":"Transaction failed"},"send.transaction-success.subtitle":{"message":"{amount} {tokenSymbol} was successfully sent"},"send.transaction-success.title":{"message":"Sent"},"transactionScan.errors.accountAlreadyInUse":{"message":"An account with the same address already exists."},"transactionScan.errors.insufficientSol":{"message":"Account does not have enough SOL to perform the operation."},"transactionScan.errors.slippageToleranceExceeded":{"message":"The transaction was reverted because the slippage tolerance was exceeded."},"transactionScan.errors.unknownError":{"message":"An unknown error occurred."}}}],"manifest":{"description":"Manage Solana using MetaMask","initialConnections":{"https://portfolio.metamask.io":{}},"initialPermissions":{"endowment:assets":{"scopes":["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"]},"endowment:cronjob":{"jobs":[{"expression":"* * * * *","request":{"method":"refreshSend","params":{}}},{"expression":"* * * * *","request":{"method":"refreshConfirmationEstimation","params":{}}},{"expression":"*/2 * * * *","request":{"method":"scheduleRefreshAccounts","params":{}}}]},"endowment:keyring":{"allowedOrigins":["https://portfolio.metamask.io"]},"endowment:network-access":{},"endowment:protocol":{"scopes":{"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]},"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":{"methods":["getGenesisHash","getLatestBlockhash","getMinimumBalanceForRentExemption"]}}},"endowment:rpc":{"dapps":true,"snaps":false},"snap_dialog":{},"snap_getBip32Entropy":[{"curve":"ed25519","path":["m","44'","501'"]}],"snap_getPreferences":{},"snap_manageAccounts":{},"snap_manageState":{}},"manifestVersion":"0.1","platformVersion":"7.1.0","proposedName":"Solana","repository":{"type":"git","url":"https://github.com/MetaMask/snap-solana-wallet.git"},"source":{"locales":["locales/en.json"],"location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/solana-wallet-snap","registry":"https://registry.npmjs.org/"}},"shasum":"CFaSxaVJ86Yu8T8+W+NyoB67a6ALkWTEVYrVLyMLEg8="},"version":"1.32.0"},"preinstalled":true,"removable":false,"sourceCode":"(()=>{var e={33:(e,t,n)=>{var r=n(9968),o=n(9756),i=[[\"ary\",128],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",32],[\"partialRight\",64],[\"rearg\",256]];e.exports=function(e,t){return r(i,(function(n){var r=\"_.\"+n[0];t&n[1]&&!o(e,r)&&e.push(r)})),e.sort()}},88:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).get(e)}},125:(e,t,n)=>{var r=n(9032),o=n(5288);e.exports=function(e,t){return e&&r(t,o(t),e)}},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},195:(e,t,n)=>{var r=n(4882),o=n(8121),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&\"constructor\"!=n&&t.push(n);return t}},282:e=>{e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t=\"[...]\",n=\"[Circular]\",r=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,n,a){var s;void 0===a&&(a=i()),c(e,\"\",0,[],void 0,0,a);try{s=0===o.length?JSON.stringify(e,t,n):JSON.stringify(e,d(t),n)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function s(e,t,n,i){var a=Object.getOwnPropertyDescriptor(i,n);void 0!==a.get?a.configurable?(Object.defineProperty(i,n,{value:e}),r.push([i,n,t,a])):o.push([t,n,e]):(i[�U)T�n]=e,r.push([i,n,t]))}function c(e,r,o,i,a,u,l){var f;if(u+=1,\"object\"==typeof e&&null!==e){for(f=0;f\u003Ci.length;f++)if(i[f]===e)return void s(n,e,r,a);if(void 0!==l.depthLimit&&u>l.depthLimit)return void s(t,e,r,a);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void s(t,e,r,a);if(i.push(e),Array.isArray(e))for(f=0;f\u003Ce.length;f++)c(e[f],f,f,i,e,u,l);else{var d=Object.keys(e);for(f=0;f\u003Cd.length;f++){var h=d[f];c(e[h],h,f,i,e,u,l)}}i.pop()}}function u(e,t){return e\u003Ct?-1:e>t?1:0}function l(e,t,n,a){void 0===a&&(a=i());var s,c=f(e,\"\",0,[],void 0,0,a)||e;try{s=0===o.length?JSON.stringify(c,t,n):JSON.stringify(c,d(t),n)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function f(e,o,i,a,c,l,d){var h;if(l+=1,\"object\"==typeof e&&null!==e){for(h=0;h\u003Ca.length;h++)if(a[h]===e)return void s(n,e,o,c);try{if(\"function\"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&l>d.depthLimit)return void s(t,e,o,c);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void s(t,e,o,c);if(a.push(e),Array.isArray(e))for(h=0;h\u003Ce.length;h++)f(e[h],h,h,a,e,l,d);else{var p={},g=Object.keys(e).sort(u);for(h=0;h\u003Cg.length;h++){var m=g[h];f(e[m],m,h,a,e,l,d),p[m]=e[m]}if(void 0===c)return p;r.push([c,o,e]),c[o]=p}a.pop()}}function d(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(o.length>0)for(var r=0;r\u003Co.length;r++){var i=o[r];if(i[1]===t&&i[0]===n){n=i[2],o.splice(r,1);break}}return e.call(this,t,n)}}},313:(e,t,n)=>{var r=n(1129),o=n(714);e.exports=function e(t,n,i,a,s){var c=-1,u=t.length;for(i||(i=o),s||(s=[]);++c\u003Cu;){var l=t[c];n>0&&i(l)?n>1?e(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},353:(e,t,n)=>{var r=n(1340),o=n(3934),i=n(8861),a=n(1182),s=n(8486),c=n(3142),u=n(5853),l=n(8666),f=\"[object Arguments]\",d=\"[object Array]\",h=\"[object Object]\",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=c(e),w=c(t),b=y?d:s(e),A=w?d:s(t),S=(b=b==f?h:b)==h,x=(A=A==f?h:A)==h,E=b==A;if(E&&u(e)){if(!u(t))return!1;y=!0,S=!1}if(E&&!S)return v||(v=new r),y||l(e)?o(e,t,n,g,m,v):i(e,t,b,n,g,m,v);if(!(1&n)){var _=S&&p.call(e,\"__wrapped__\"),k=x&&p.call(t,\"__wrapped__\");if(_||k){var I=_?e.value():e,T=k?t.value():t;return v||(v=new r),m(I,T,n,g,v)}}return!!E&&(v||(v=new r),a(e,t,n,g,m,v))}},358:(e,t,n)=>{var r=n(6137),o=n(3283),i=n(3142),a=n(5853),s=n(9632),c=n(8666),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&c(e),h=n||l||f||d,p=h?r(e.length,String):[],g=p.length;for(var m in e)!t&&!u.call(e,m)||h&&(\"length\"==m||f&&(\"offset\"==m||\"parent\"==m)||d&&(\"buffer\"==m||\"byteLength\"==m||\"byteOffset\"==m)||s(m,g))||p.push(m);return p}},393:(e,t,n)=>{var r=n(8244),o=n(7979),i=n(1211);e.exports=function(e){return r(e,i,o)}},424:(e,t,n)=>{var r=n(8898),o=n(2480),i=n(8340),a=n(8069),s=n(2264);e.exports=function(e,t,n){var c=e.constructor;switch(t){case\"[object ArrayBuffer]\":return r(e);case\"[object Boolean]\":case\"[object Date]\":return new c(+e);case\"[object DataView]\":return o(e,n);case\"[object Float32Array]\":case\"[object Float64Array]\":case\"[object Int8Array]\":case\"[object Int16Array]\":case\"[object Int32Array]\":case\"[object Uint8Array]\":case\"[object Uint8ClampedArray]\":case\"[object Uint16Array]\":case\"[object Uint32Array]\":return s(e,n);case\"[object Map]\":case\"[object Set]\":return new c;case\"[object Number]\":case\"[object String]\":return new c(e);case\"[object RegExp]\":return i(e);case\"[object Symbol]\":return a(e)}}},441:(e,t,n)=>{var r=n(7379),o=n(547),i=n(8360);e.exports=function(e){if(!o(e))return!1;var t=r(e);return\"[object Error]\"==t||\"[object DOMException]\"==t||\"string\"==typeof e.message&&\"string\"==typeof e.name&&!i(e)}},528:(e,t,n)=>{var r=n(9747),o=n(5962);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},547:e=>{e.exports=function(e){return null!=e&&\"object\"==typeof e}},674:(e,t,n)=>{var r=n(7379),o=n(5387),i=n(547),a={};a[\"[object Float32Array]\"]=a[\"[object Float64Array]\"]=a[\"[object Int8Array]\"]=a[\"[object Int16Array]\"]=a[\"[object Int32Array]\"]=a[\"[object Uint8Array]\"]=a[\"[object Uint8ClampedArray]\"]=a[\"[object Uint16Array]\"]=a[\"[object Uint32Array]\"]=!0,a[\"[object Arguments]\"]=a[\"[object Array]\"]=a[\"[object ArrayBuffer]\"]=a[\"[object Boolean]\"]=a[\"[object DataView]\"]=a[\"[object Date]\"]=a[\"[object Error]\"]=a[\"[object Function]\"]=a[\"[object Map]\"]=a[\"[object Number]\"]=a[\"[object Object]\"]=a[\"[object RegExp]\"]=a[\"[object Set]\"]=a[\"[object String]\"]=a[\"[object WeakMap]\"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},714:(e,t,n)=>{var r=n(5650),o=n(3283),i=n(3142),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},777:(e,t,n)=>{var r=n(8486),o=n(547);e.exports=function(e){return o(e)&&\"[object Map]\"==r(e)}},796:(e,t,n)=>{var r=n(7403),o=n(3316)(r);e.exports=o},864:(e,t,n)=>{var r=n(8638),o=n(1439),i=o((function(e,t){return r(e,256,void 0,void 0,void 0,t)}));e.exports=i},961:(e,t,n)=>{var r=n(3476),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+\"\",n=r[t],i=o.call(r,t)?n.length:0;i--;){var a=n[i],s=a.func;if(null==s||s==e)return a.name}return t}},1048:(e,t,n)=>{\"use strict\";const r=n(7991),o=n(9318),i=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.hp=c,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return f(e)}return u(e,t,n)}function u(e,t,n){if(\"string\"==typeof e)return function(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!c.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const n=0|g(e,t);let r=s(n);const o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,n);if(\"undefined\"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return\"number\"!=typeof e.length||Z(e.length)?s(0):d(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(o)return o;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive](\"string\"),t,n);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function l(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e\u003C0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function f(e){return l(e),s(e\u003C0?0:0|p(e))}function d(e){const t=e.length\u003C0?0:0|p(e.length),n=s(t);for(let r=0;r\u003Ct;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t\u003C0||e.byteLength\u003Ct)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength\u003Ct+(n||0))throw new RangeError('\"length\" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=a)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+a.toString(16)+\" bytes\");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":return G(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return V(e).length;default:if(o)return r?-1:G(e).length;t=(\"\"+t).toLowerCase(),o=!0}}function m(e,t,n){let r=!1;if((void 0===t||t\u003C0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n\u003C=0)return\"\";if((n>>>=0)\u003C=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return C(this,t,n);case\"utf8\":case\"utf-8\":return k(this,t,n);case\"ascii\":return T(this,t,n);case\"latin1\":case\"binary\":return O(this,t,n);case\"base64\":return _(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return B(this,t,n);default:if(r)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if(\"string\"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n\u003C-2147483648&&(n=-2147483648),Z(n=+n)&&(n=o?0:e.length-1),n\u003C0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n\u003C0){if(!o)return-1;n=0}if(\"string\"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,o);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,o);throw new TypeError(\"val must be string, number or Buffer\")}function w(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&(\"ucs2\"===(r=String(r).toLowerCase())||\"ucs-2\"===r||\"utf16le\"===r||\"utf-16le\"===r)){if(e.length\u003C2||t.length\u003C2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;i\u003Cs;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;r\u003Cc;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function b(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a\u003Cr;++a){const r=parseInt(t.substr(2*a,2),16);if(Z(r))return a;e[n+a]=r}return a}function A(e,t,n,r){return H(G(t,e.length-n),e,n,r)}function S(e,t,n,r){return H(function(e){const t=[];for(let n=0;n\u003Ce.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return H(V(t),e,n,r)}function E(e,t,n,r){return H(function(e,t){let n,r,o;const i=[];for(let a=0;a\u003Ce.length&&!((t-=2)\u003C0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o\u003Cn;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a\u003C=n){let n,r,s,c;switch(a){case 1:t\u003C128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)\u003C\u003C6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)\u003C\u003C12|(63&n)\u003C\u003C6|63&r,c>2047&&(c\u003C55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)\u003C\u003C18|(63&n)\u003C\u003C12|(63&r)\u003C\u003C6|63&s,c>65535&&c\u003C1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t\u003C=I)return String.fromCharCode.apply(String,e);let n=\"\",r=0;for(;r\u003Ct;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.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(c.prototype,\"parent\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,\"offset\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e\u003C=0?s(e):void 0!==t?\"string\"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o\u003Ci;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n\u003Cr?-1:r\u003Cn?1:0},c.isEncoding=function(e){switch(String(e).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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n\u003Ce.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let o=0;for(n=0;n\u003Ce.length;++n){let t=e[n];if(J(t,Uint8Array))o+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t\u003Ce;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t\u003Ce;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t\u003Ce;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?k(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e=\"\";const n=t.IS;return e=this.toString(\"hex\",0,n).replace(/(.{2})/g,\"$1 \").trim(),this.length>n&&(e+=\" ... \"),\"\u003CBuffer \"+e+\">\"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t\u003C0||n>e.length||r\u003C0||o>this.length)throw new RangeError(\"out of range index\");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n);for(let e=0;e\u003Cs;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i\u003Ca?-1:a\u003Ci?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r=\"utf8\",n=this.length,t=0;else if(void 0===n&&\"string\"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r=\"utf8\")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n\u003C0||t\u003C0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");r||(r=\"utf8\");let i=!1;for(;;)switch(r){case\"hex\":return b(this,e,t,n);case\"utf8\":case\"utf-8\":return A(this,e,t,n);case\"ascii\":case\"latin1\":case\"binary\":return S(this,e,t,n);case\"base64\":return x(this,e,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return E(this,e,t,n);default:if(i)throw new TypeError(\"Unknown encoding: \"+r);r=(\"\"+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function T(e,t,n){let r=\"\";n=Math.min(e.length,n);for(let o=t;o\u003Cn;++o)r+=String.fromCharCode(127&e[o]);return r}function O(e,t,n){let r=\"\";n=Math.min(e.length,n);for(let o=t;o\u003Cn;++o)r+=String.fromCharCode(e[o]);return r}function C(e,t,n){const r=e.length;(!t||t\u003C0)&&(t=0),(!n||n\u003C0||n>r)&&(n=r);let o=\"\";for(let r=t;r\u003Cn;++r)o+=Y[e[r]];return o}function B(e,t,n){const r=e.slice(t,n);let o=\"\";for(let e=0;e\u003Cr.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function R(e,t,n){if(e%1!=0||e\u003C0)throw new RangeError(\"offset is not uint\");if(e+t>n)throw new RangeError(\"Trying to access beyond buffer length\")}function j(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>o||t\u003Ci)throw new RangeError('\"value\" argument is out of bounds');if(n+r>e.length)throw new RangeError(\"Index out of range\")}function P(e,t,n,r,o){F(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function N(e,t,n,r,o){F(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function L(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError(\"Index out of range\");if(n\u003C0)throw new RangeError(\"Index out of range\")}function M(e,t,n,r,i){return t=+t,n>>>=0,i||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return t=+t,n>>>=0,i||L(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)\u003C0?(e+=n)\u003C0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)\u003C0?(t+=n)\u003C0&&(t=0):t>n&&(t=n),t\u003Ce&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i\u003Ct&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]\u003C\u003C8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]\u003C\u003C8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)\u003C\u003CBigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){q(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)\u003C\u003CBigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=this[e],o=1,i=0;for(;++i\u003Ct&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||R(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e]|this[e+1]\u003C\u003C8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const n=this[e+1]|this[e]\u003C\u003C8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]\u003C\u003C8|this[e+2]\u003C\u003C16|this[e+3]\u003C\u003C24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]\u003C\u003C24|this[e+1]\u003C\u003C16|this[e+2]\u003C\u003C8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n\u003C\u003C24);return(BigInt(r)\u003C\u003CBigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){q(e>>>=0,\"offset\");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t\u003C\u003C24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)\u003C\u003CBigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){j(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=1,i=0;for(this[t]=255&e;++i\u003Cn&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){j(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return P(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o\u003Cn&&(i*=256);)e\u003C0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);j(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e\u003C0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e\u003C0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,4,2147483647,-2147483648),e\u003C0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return P(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return N(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r\u003Cn&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t\u003C0)throw new RangeError(\"targetStart out of bounds\");if(n\u003C0||n>=this.length)throw new RangeError(\"Index out of range\");if(r\u003C0)throw new RangeError(\"sourceEnd out of bounds\");r>this.length&&(r=this.length),e.length-t\u003Cr-n&&(r=e.length-t+n);const o=r-n;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},c.prototype.fill=function(e,t,n,r){if(\"string\"==typeof e){if(\"string\"==typeof t?(r=t,t=0,n=this.length):\"string\"==typeof n&&(r=n,n=this.length),void 0!==r&&\"string\"!=typeof r)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof r&&!c.isEncoding(r))throw new TypeError(\"Unknown encoding: \"+r);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===r&&t\u003C128||\"latin1\"===r)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t\u003C0||this.length\u003Ct||this.length\u003Cn)throw new RangeError(\"Out of range index\");if(n\u003C=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o\u003Cn;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),a=i.length;if(0===a)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(o=0;o\u003Cn-t;++o)this[o+t]=i[o%a]}return this};const U={};function $(e,t,n){U[e]=class extends n{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t=\"\",n=e.length;const r=\"-\"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function F(e,t,n,r,o,i){if(e>n||e\u003Ct){const r=\"bigint\"==typeof t?\"n\":\"\";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${r} and \u003C 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and \u003C 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and \u003C= ${n}${r}`,new U.ERR_OUT_OF_RANGE(\"value\",o,e)}!function(e,t,n){q(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function q(e,t){if(\"number\"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function W(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new U.ERR_OUT_OF_RANGE(n||\"offset\",\"an integer\",e);if(t\u003C0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||\"offset\",`>= ${n?1:0} and \u003C= ${t}`,e)}$(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),$(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),$(\"ERR_OUT_OF_RANGE\",(function(e,t,n){let r=`The value of \"${e}\" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=D(String(n)):\"bigint\"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n\u003C-(BigInt(2)**BigInt(32)))&&(o=D(o)),o+=\"n\"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a\u003Cr;++a){if(n=e.charCodeAt(a),n>55295&&n\u003C57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n\u003C56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296\u003C\u003C10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n\u003C128){if((t-=1)\u003C0)break;i.push(n)}else if(n\u003C2048){if((t-=2)\u003C0)break;i.push(n>>6|192,63&n|128)}else if(n\u003C65536){if((t-=3)\u003C0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n\u003C1114112))throw new Error(\"Invalid code point\");if((t-=4)\u003C0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return r.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(K,\"\")).length\u003C2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function H(e,t,n,r){let o;for(o=0;o\u003Cr&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let n=0;n\u003C16;++n){const r=16*n;for(let o=0;o\u003C16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return\"undefined\"==typeof BigInt?X:e}function X(){throw new Error(\"BigInt not supported\")}},1112:(e,t,n)=>{var r=n(4497),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return\"__lodash_hash_undefined__\"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1129:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n\u003Cr;)e[o+n]=t[n];return e}},1182:(e,t,n)=>{var r=n(393),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var c=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!c)return!1;for(var f=l;f--;){var d=u[f];if(!(c?d in t:o.call(t,d)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=c;++f\u003Cl;){var v=e[d=u[f]],y=t[d];if(i)var w=c?i(y,v,d,t,e,s):i(v,y,d,e,t,s);if(!(void 0===w?v===y||a(v,y,n,i,s):w)){g=!1;break}m||(m=\"constructor\"==d)}if(g&&!m){var b=e.constructor,A=t.constructor;b==A||!(\"constructor\"in e)||!(\"constructor\"in t)||\"function\"==typeof b&&b instanceof b&&\"function\"==typeof A&&A instanceof A||(g=!1)}return s.delete(e),s.delete(t),g}},1187:(e,t,n)=>{var r=n(7379),o=n(547);e.exports=function(e){return\"symbo���l\"==typeof e||o(e)&&\"[object Symbol]\"==r(e)}},1211:(e,t,n)=>{var r=n(358),o=n(195),i=n(6529);e.exports=function(e){return i(e)?r(e):o(e)}},1340:(e,t,n)=>{var r=n(1386),o=n(4103),i=n(1779),a=n(4162),s=n(7462),c=n(6638);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},1386:(e,t,n)=>{var r=n(2393),o=n(2049),i=n(7144),a=n(7452),s=n(3964);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},1439:(e,t,n)=>{var r=n(5857),o=n(5234),i=n(796);e.exports=function(e){return i(o(e,void 0,r),e+\"\")}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}},1623:(e,t,n)=>{var r=n(8942).Uint8Array;e.exports=r},1779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},1877:e=>{e.exports=function(e){return this.__data__.set(e,\"__lodash_hash_undefined__\"),this}},1935:(e,t,n)=>{var r=n(8486),o=n(547);e.exports=function(e){return o(e)&&\"[object Set]\"==r(e)}},1942:(e,t,n)=>{var r=n(528),o=n(1439),i=n(5196),a=n(961),s=n(3142),c=n(6648);e.exports=function(e){return o((function(t){var n=t.length,o=n,u=r.prototype.thru;for(e&&t.reverse();o--;){var l=t[o];if(\"function\"!=typeof l)throw new TypeError(\"Expected a function\");if(u&&!f&&\"wrapper\"==a(l))var f=new r([],!0)}for(o=f?o:n;++o\u003Cn;){l=t[o];var d=a(l),h=\"wrapper\"==d?i(l):void 0;f=h&&c(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?f[a(h[0])].apply(f,h[3]):1==l.length&&c(l)?f[d]():f.thru(l)}return function(){var e=arguments,r=e[0];if(f&&1==e.length&&s(r))return f.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o\u003Cn;)i=t[o].call(this,i);return i}}))}},1950:(e,t,n)=>{var r=n(8942)[\"__core-js_shared__\"];e.exports=r},2049:(e,t,n)=>{var r=n(7034),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n\u003C0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},2053:e=>{e.exports=function(e){return e}},2264:(e,t,n)=>{var r=n(8898);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},2291:(e,t,n)=>{var r=n(5650),o=n(5111),i=n(3142),a=n(1187),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if(\"string\"==typeof t)return t;if(i(t))return o(t,e)+\"\";if(a(t))return c?c.call(t):\"\";var n=t+\"\";return\"0\"==n&&1/t==-Infinity?\"-0\":n}},2306:(e,t,n)=>{e=n.nmd(e);var r=n(4967),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require(\"util\").types;return e||a&&a.binding&&a.binding(\"util\")}catch(e){}}();e.exports=s},2343:(e,t,n)=>{var r=n(4687),o=n(6123),i=n(7276),a=n(5187),s=n(7267),c=n(3904),u=n(6040);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2443:(e,t,n)=>{var r=n(6912),o=n(4364),i=n(3504),a=n(4216),s=n(6850),c=n(8813),u=n(8942);e.exports=function(e,t,n){var l=o(e);return function o(){for(var f=arguments.length,d=Array(f),h=f,p=s(o);h--;)d[h]=arguments[h];var g=f\u003C3&&d[0]!==p&&d[f-1]!==p?[]:c(d,p);return(f-=g.length)\u003Cn?a(e,t,i,o.placeholder,void 0,d,g,void 0,void 0,n-f):r(this&&this!==u&&this instanceof o?l:e,this,d)}}},2478:(e,t,n)=>{var r=n(7250),o=n(9454),i=n(7706);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},2480:(e,t,n)=>{var r=n(8898);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},2532:(e,t,n)=>{var r=n(4715),o=function(){try{var e=r(Object,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}();e.exports=o},2590:(e,t,n)=>{var r=n(9334),o=n(3334);e.exports=function(e){return o(\"function\"==typeof e?e:r(e,1))}},2613:(e,t,n)=>{var r=n(5111),o=n(4354),i=n(3142),a=n(1187),s=n(6493),c=n(6040),u=n(5243);e.exports=function(e){return i(e)?r(e,c):a(e)?[e]:o(s(u(e)))}},2619:e=>{e.exports=function(e){return function(){return e}}},2673:(e,t,n)=>{var r=n(3579),o=n(8055);e.exports=function(e,t,n){return r(o,e,t,n)}},2762:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},2784:(e,t,n)=>{var r=n(1580),o=n(4495),i=n(6131),a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,u,l,f,d,h,p=0,g=!1,m=!1,v=!0;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");function y(t){var n=c,r=u;return c=u=void 0,p=t,f=e.apply(r,n)}function w(e){var n=e-h;return void 0===h||n>=t||n\u003C0||m&&e-p>=l}function b(){var e=o();if(w(e))return A(e);d=setTimeout(b,function(e){var n=t-(e-h);return m?s(n,l-(e-p)):n}(e))}function A(e){return d=void 0,v&&c?y(e):(c=u=void 0,f)}function S(){var e=o(),n=w(e);if(c=arguments,u=this,h=e,n){if(void 0===d)return function(e){return p=e,d=setTimeout(b,t),g?y(e):f}(h);if(m)return clearTimeout(d),d=setTimeout(b,t),y(h)}return void 0===d&&(d=setTimeout(b,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,l=(m=\"maxWait\"in n)?a(i(n.maxWait)||0,t):l,v=\"trailing\"in n?!!n.trailing:v),S.cancel=function(){void 0!==d&&clearTimeout(d),p=0,c=h=u=d=void 0},S.flush=function(){return void 0===d?f:A(o())},S}},2846:(e,t,n)=>{var r=n(9334);e.exports=function(e){return r(e,4)}},2879:(e,t,n)=>{var r=n(1942)();e.exports=r},2945:e=>{var t=/\\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},2991:e=>{e.exports={}},3092:(e,t,n)=>{var r=n(2673)(\"flow\",n(2879));r.placeholder=n(2991),e.exports=r},3103:(e,t,n)=>{var r=n(4715)(n(8942),\"DataView\");e.exports=r},3142:e=>{var t=Array.isArray;e.exports=t},3212:(e,t,n)=>{var r=n(8250),o=n(1877),i=n(8006);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t\u003Cn;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},3282:(e,t,n)=>{var r=n(2762),o=n(8880),i=n(5187),a=n(6040);e.exports=function(e){return i(e)?r(a(e)):o(e)}},3283:(e,t,n)=>{var r=n(6027),o=n(547),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,\"callee\")&&!s.call(e,\"callee\")};e.exports=c},3301:(e,t,n)=>{var r=n(6131),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e\u003C0?-1:1):e==e?e:0:0===e?e:0}},3305:(e,t,n)=>{var r=n(4497);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3316:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},3321:(e,t,n)=>{var r=n(7553),o=n(528),i=n(5962),a=n(3142),s=n(547),c=n(3410),u=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof r)){if(e instanceof o)return e;if(u.call(e,\"__wrapped__\"))return c(e)}return new o(e)}l.prototype=i.prototype,l.prototype.constructor=l,e.exports=l},3334:(e,t,n)=>{var r=n(6526),o=n(2343),i=n(2053),a=n(3142),s=n(3282);e.exports=function(e){return\"function\"==typeof e?e:null==e?i:\"object\"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},3410:(e,t,n)=>{var r=n(7553),o=n(528),i=n(4354);e.exports=function(e){if(e instanceof r)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},3422:(e,t,n)=>{var r=n(7073),o=n(6285),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},3476:e=>{e.exports={}},3504:(e,t,n)=>{var r=n(4977),o=n(5755),i=n(3816),a=n(4364),s=n(4216),c=n(6850),u=n(6591),l=n(8813),f=n(8942);e.exports=function e(t,n,d,h,p,g,m,v,y,w){var b=128&n,A=1&n,S=2&n,x=24&n,E=512&n,_=S?void 0:a(t);return function k(){for(var I=arguments.length,T=Array(I),O=I;O--;)T[O]=arguments[O];if(x)var C=c(k),B=i(T,C);if(h&&(T=r(T,h,p,x)),g&&(T=o(T,g,m,x)),I-=B,x&&I\u003Cw){var R=l(T,C);return s(t,n,e,k.placeholder,d,T,R,v,y,w-I)}var j=A?d:this,P=S?j[t]:t;return I=T.length,v?T=u(T,v):E&&I>1&&T.reverse(),b&&y\u003CI&&(T.length=y),this&&this!==f&&this instanceof k&&(P=_||a(P)),P.apply(j,T)}}},3526:(e,t,n)=>{var r=n(3142),o=n(5187),i=n(6493),a=n(5243);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},3546:(e,t,n)=>{var r=n(9032),o=n(7979);e.exports=function(e,t){return r(e,o(e),t)}},3565:(e,t)=>{t.aliasToReal={each:\"forEach\",eachRight:\"forEachRight\",entries:\"toPairs\",entriesIn:\"toPairsIn\",extend:\"assignIn\",extendAll:\"assignInAll\",extendAllWith:\"assignInAllWith\",extendWith:\"assignInWith\",first:\"head\",conforms:\"conformsTo\",matches:\"isMatch\",property:\"get\",__:\"placeholder\",F:\"stubFalse\",T:\"stubTrue\",all:\"every\",allPass:\"overEvery\",always:\"constant\",any:\"some\",anyPass:\"overSome\",apply:\"spread\",assoc:\"set\",assocPath:\"set\",complement:\"negate\",compose:\"flowRight\",contains:\"includes\",dissoc:\"unset\",dissocPath:\"unset\",dropLast:\"dropRight\",dropLastWhile:\"dropRightWhile\",equals:\"isEqual\",identical:\"eq\",indexBy:\"keyBy\",init:\"initial\",invertObj:\"invert\",juxt:\"over\",omitAll:\"omit\",nAry:\"ary\",path:\"get\",pathEq:\"matchesProperty\",pathOr:\"getOr\",paths:\"at\",pickAll:\"pick\",pipe:\"flow\",pluck:\"map\",prop:\"get\",propEq:\"matchesProperty\",propOr:\"getOr\",props:\"at\",symmetricDifference:\"xor\",symmetricDifferenceBy:\"xorBy\",symmetricDifferenceWith:\"xorWith\",takeLast:\"takeRight\",takeLastWhile:\"takeRightWhile\",unapply:\"rest\",unnest:\"flatten\",useWith:\"overArgs\",where:\"conformsTo\",whereEq:\"isMatch\",zipObj:\"zipObject\"},t.aryMethod={1:[\"assignAll\",\"assignInAll\",\"attempt\",\"castArray\",\"ceil\",\"create\",\"curry\",\"curryRight\",\"defaultsAll\",\"defaultsDeepAll\",\"floor\",\"flow\",\"flowRight\",\"fromPairs\",\"invert\",\"iteratee\",\"memoize\",\"method\",\"mergeAll\",\"methodOf\",\"mixin\",\"nthArg\",\"over\",\"overEvery\",\"overSome\",\"rest\",\"reverse\",\"round\",\"runInContext\",\"spread\",\"template\",\"trim\",\"trimEnd\",\"trimStart\",\"uniqueId\",\"words\",\"zipAll\"],2:[\"add\",\"after\",\"ary\",\"assign\",\"assignAllWith\",\"assignIn\",\"assignInAllWith\",\"at\",\"before\",\"bind\",\"bindAll\",\"bindKey\",\"chunk\",\"cloneDeepWith\",\"cloneWith\",\"concat\",\"conformsTo\",\"countBy\",\"curryN\",\"curryRightN\",\"debounce\",\"defaults\",\"defaultsDeep\",\"defaultTo\",\"delay\",\"difference\",\"divide\",\"drop\",\"dropRight\",\"dropRightWhile\",\"dropWhile\",\"endsWith\",\"eq\",\"every\",\"filter\",\"find\",\"findIndex\",\"findKey\",\"findLast\",\"findLastIndex\",\"findLastKey\",\"flatMap\",\"flatMapDeep\",\"flattenDepth\",\"forEach\",\"forEachRight\",\"forIn\",\"forInRight\",\"forOwn\",\"forOwnRight\",\"get\",\"groupBy\",\"gt\",\"gte\",\"has\",\"hasIn\",\"includes\",\"indexOf\",\"intersection\",\"invertBy\",\"invoke\",\"invokeMap\",\"isEqual\",\"isMatch\",\"join\",\"keyBy\",\"lastIndexOf\",\"lt\",\"lte\",\"map\",\"mapKeys\",\"mapValues\",\"matchesProperty\",\"maxBy\",\"meanBy\",\"merge\",\"mergeAllWith\",\"minBy\",\"multiply\",\"nth\",\"omit\",\"omitBy\",\"overArgs\",\"pad\",\"padEnd\",\"padStart\",\"parseInt\",\"partial\",\"partialRight\",\"partition\",\"pick\",\"pickBy\",\"propertyOf\",\"pull\",\"pullAll\",\"pullAt\",\"random\",\"range\",\"rangeRight\",\"rearg\",\"reject\",\"remove\",\"repeat\",\"restFrom\",\"result\",\"sampleSize\",\"some\",\"sortBy\",\"sortedIndex\",\"sortedIndexOf\",\"sortedLastIndex\",\"sortedLastIndexOf\",\"sortedUniqBy\",\"split\",\"spreadFrom\",\"startsWith\",\"subtract\",\"sumBy\",\"take\",\"takeRight\",\"takeRightWhile\",\"takeWhile\",\"tap\",\"throttle\",\"thru\",\"times\",\"trimChars\",\"trimCharsEnd\",\"trimCharsStart\",\"truncate\",\"union\",\"uniqBy\",\"uniqWith\",\"unset\",\"unzipWith\",\"without\",\"wrap\",\"xor\",\"zip\",\"zipObject\",\"zipObjectDeep\"],3:[\"assignInWith\",\"assignWith\",\"clamp\",\"differenceBy\",\"differenceWith\",\"findFrom\",\"findIndexFrom\",\"findLastFrom\",\"findLastIndexFrom\",\"getOr\",\"includesFrom\",\"indexOfFrom\",\"inRange\",\"intersectionBy\",\"intersectionWith\",\"invokeArgs\",\"invokeArgsMap\",\"isEqualWith\",\"isMatchWith\",\"flatMapDepth\",\"lastIndexOfFrom\",\"mergeWith\",\"orderBy\",\"padChars\",\"padCharsEnd\",\"padCharsStart\",\"pullAllBy\",\"pullAllWith\",\"rangeStep\",\"rangeStepRight\",\"reduce\",\"reduceRight\",\"replace\",\"set\",\"slice\",\"sortedIndexBy\",\"sortedLastIndexBy\",\"transform\",\"unionBy\",\"unionWith\",\"update\",\"xorBy\",\"xorWith\",\"zipWith\"],4:[\"fill\",\"setWith\",\"updateWith\"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var o in n){var i=n[o];e.call(r,i)?r[i].push(o):r[i]=[o]}return r}(),t.remap={assignAll:\"assign\",assignAllWith:\"assignWith\",assignInAll:\"assignIn\",assignInAllWith:\"assignInWith\",curryN:\"curry\",curryRightN:\"curryRight\",defaultsAll:\"defaults\",defaultsDeepAll:\"defaultsDeep\",findFrom:\"find\",findIndexFrom:\"findIndex\",findLastFrom:\"findLast\",findLastIndexFrom:\"findLastIndex\",getOr:\"get\",includesFrom:\"includes\",indexOfFrom:\"indexOf\",invokeArgs:\"invoke\",invokeArgsMap:\"invokeMap\",lastIndexOfFrom:\"lastIndexOf\",mergeAll:\"merge\",mergeAllWith:\"mergeWith\",padChars:\"pad\",padCharsEnd:\"padEnd\",padCharsStart:\"padStart\",propertyOf:\"get\",rangeStep:\"range\",rangeStepRight:\"rangeRight\",restFrom:\"rest\",spreadFrom:\"spread\",trimChars:\"trim\",trimCharsEnd:\"trimEnd\",trimCharsStart:\"trimStart\",zipAll:\"zip\"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},3579:(e,t,n)=>{var r=n(3565),o=n(2991),i=Array.prototype.push;function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function c(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var o=r[0]=t.apply(void 0,r);return e.apply(void 0,r),o}}}e.exports=function e(t,n,u,l){var f=\"function\"==typeof n,d=n===Object(n);if(d&&(l=u,u=n,n=void 0),null==u)throw new TypeError;l||(l={});var h={cap:!(\"cap\"in l)||l.cap,curry:!(\"curry\"in l)||l.curry,fixed:!(\"fixed\"in l)||l.fixed,immutable:!(\"immutable\"in l)||l.immutable,rearg:!(\"rearg\"in l)||l.rearg},p=f?u:o,g=\"curry\"in l&&l.curry,m=\"fixed\"in l&&l.fixed,v=\"rearg\"in l&&l.rearg,y=f?u.runInContext():void 0,w=f?u:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},b=w.ary,A=w.assign,S=w.clone,x=w.curry,E=w.forEach,_=w.isArray,k=w.isError,I=w.isFunction,T=w.isWeakMap,O=w.keys,C=w.rearg,B=w.toInteger,R=w.toPath,j=O(r.aryMethod),P={castArray:function(e){return function(){var t=arguments[0];return _(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[1],n=e(arguments[0],t),r=n.length;return h.cap&&\"number\"==typeof t?(t=t>2?t-2:1,r&&r\u003C=t?n:a(n,t)):n}},mixin:function(e){return function(t){var n=this;if(!I(n))return e(n,Object(t));var r=[];return E(O(t),(function(e){I(t[e])&&r.push([e,n.prototype[e]])})),e(n,Object(t)),E(r,(function(e){var t=e[1];I(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t\u003C0?1:B(t)+1;return x(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return x(e(t,n),r)}},runInContext:function(n){return function(r){return e(t,n(r),l)}}};function N(e,t){if(h.cap){var n=r.iterateeRearg[e];if(n)return function(e,t){return $(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(C(a(e,n),t),n)}))}(t,n);var o=!f&&r.iterateeAry[e];if(o)return function(e,t){return $(e,(function(e){return\"function\"==typeof e?a(e,t):e}))}(t,o)}return t}function L(e,t,n){if(h.fixed&&(m||!r.skipFixed[e])){var o=r.methodSpread[e],a=o&&o.start;return void 0===a?b(t,n):function(e,t){return function(){for(var n=arguments.length,r=n-1,o=Array(n);n--;)o[n]=arguments[n];var a=o[t],s=o.slice(0,t);return a&&i.apply(s,a),t!=r&&i.apply(s,o.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function M(e,t,n){return h.rearg&&n>1&&(v||!r.skipRearg[e])?C(t,r.methodRearg[e]||r.aryRearg[n]):t}function z(e,t){for(var n=-1,r=(t=R(t)).length,o=r-1,i=S(Object(e)),a=i;null!=a&&++n\u003Cr;){var s=t[n],c=a[s];null==c||I(c)||k(c)||T(c)||(a[s]=S(n==o?c:Object(c))),a=a[s]}return i}function U(t,n){var o=r.aliasToReal[t]||t,i=r.remap[o]||o,a=l;return function(t){var r=f?y:w,s=f?y[i]:n,c=A(A({},a),t);return e(r,o,s,c)}}function $(e,t){return function(){var n=arguments.length;if(!n)return e();for(var r=Array(n);n--;)r[n]=arguments[n];var o=h.rearg?0:n-1;return r[o]=t(r[o]),e.apply(void 0,r)}}function D(e,t,n){var o,i=r.aliasToReal[e]||e,a=t,u=P[i];return u?a=u(t):h.immutable&&(r.mutate.array[i]?a=c(t,s):r.mutate.object[i]?a=c(t,function(e){return function(t){return e({},t)}}(t)):r.mutate.set[i]&&(a=c(t,z))),E(j,(function(e){return E(r.aryMethod[e],(function(t){if(i==t){var n=r.methodSpread[i],s=n&&n.afterRearg;return o=s?L(i,M(i,a,e),e):M(i,L(i,a,e),e),o=function(e,t,n){return g||h.curry&&n>1?x(t,n):t}(0,o=N(i,o),e),!1}})),!o})),o||(o=a),o==t&&(o=g?x(o,1):function(){return t.apply(this,arguments)}),o.convert=U(i,t),o.placeholder=t.placeholder=n,o}if(!d)return D(n,u,p);var F=u,q=[];return E(j,(function(e){E(r.aryMethod[e],(function(e){var t=F[r.remap[e]||e];t&&q.push([e,D(e,t,F)])}))})),E(O(F),(function(e){var t=F[e];if(\"function\"==typeof t){for(var n=q.length;n--;)if(q[n][0]==e)return;t.convert=U(e,t),q.push([e,t])}})),E(q,(function(e){F[e[0]]=e[1]})),F.convert=function(e){return F.runInContext.convert(e)(void 0)},F.placeholder=F,E(O(F),(function(e){E(r.realToAlias[e]||[],(function(t){F[t]=F[e]}))})),F}},3636:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},3650:(e,t,n)=>{var r=n(8244),o=n(5832),i=n(5288);e.exports=function(e){return r(e,i,o)}},3655:(e,t,n)=>{var r=n(7379),o=n(1580);e.exports=function(e){if(!o(e))return!1;var t=r(e);return\"[object Function]\"==t||\"[object GeneratorFunction]\"==t||\"[object AsyncFunction]\"==t||\"[object Proxy]\"==t}},3766:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},3804:(e,t,n)=>{e.exports=n(3092)},3816:e=>{e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},3904:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},3934:(e,t,n)=>{var r=n(3212),o=n(6465),i=n(5568);e.exports=function(e,t,n,a,s,c){var u=1&n,l=e.length,f=t.length;if(l!=f&&!(u&&f>l))return!1;var d=c.get(e),h=c.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,m=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++p\u003Cl;){var v=e[p],y=t[p];if(a)var w=u?a(y,v,p,t,e,c):a(v,y,p,e,t,c);if(void 0!==w){if(w)continue;g=!1;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(v===e||s(v,e,n,a,c)))return m.push(t)}))){g=!1;break}}else if(v!==y&&!s(v,y,n,a,c)){g=!1;break}}return c.delete(e),c.delete(t),g}},3943:(e,t,n)=>{var r=n(1935),o=n(9460),i=n(2306),a=i&&i.isSet,s=a?o(a):r;e.exports=s},3964:(e,t,n)=>{var r=n(7034);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o\u003C0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}},4103:(e,t,n)=>{var r=n(1386);e.exports=function(){this.__data__=new r,this.size=0}},4162:e=>{e.exports=function(e){return this.__data__.get(e)}},4216:(e,t,n)=>{var r=n(6648),o=n(5512),i=n(5620);e.exports=function(e,t,n,a,s,c,u,l,f,d){var h=8&t;t|=h?32:64,4&(t&=~(h?64:32))||(t&=-4);var p=[e,t,s,h?c:void 0,h?u:void 0,h?void 0:c,h?void 0:u,l,f,d],g=n.apply(void 0,p);return r(e)&&o(g,p),g.placeholder=a,i(g,e,t)}},4255:(e,t,n)=>{var r=n(2673)(\"debounce\",n(2784));r.placeholder=n(2991),e.exports=r},4354:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n\u003Cr;)t[n]=e[n];return t}},4364:(e,t,n)=>{var r=n(9747),o=n(1580);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return o(i)?i:n}}},4367:(e,t,n)=>{var r=n(7267),o=n(1211);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},4495:(e,t,n)=>{var r=n(8942);e.exports=function(){return r.Date.now()}},4497:(e,t,n)=>{var r=n(4715)(Object,\"create\");e.exports=r},4512:(e,t,n)=>{var r=n(4715)(n(8942),\"Set\");e.exports=r},4687:(e,t,n)=>{var r=n(353),o=n(547);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},4700:(e,t,n)=>{var r=n(9067);e.exports=function(e,t){var n=e.__data__;return r(t)?n[\"string\"==typeof t?\"string\":\"hash\"]:n.map}},4715:(e,t,n)=>{var r=n(9624),o=n(155);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},4732:(e,t,n)=>{var r=n(4700);e.exports=function(e){return r(this,e).has(e)}},4733:(e,t,n)=>{var r=n(9032),o=n(5832);e.exports=function(e,t){return r(e,o(e),t)}},4759:(e,t,n)=>{var r,o=n(1950),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\";e.exports=function(e){return!!i&&i in e}},4772:e=>{e.exports=function(){return!1}},4784:(e,t,n)=>{var r=n(3766)(Object.getPrototypeOf,Object);e.exports=r},4882:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===(\"function\"==typeof n&&n.prototype||t)}},4943:(e,t,n)=>{var r=n(2053),o=n(6065),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},4967:(e,t,n)=>{var r=\"object\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4977:e=>{var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,a=e.length,s=r.length,c=-1,u=n.length,l=t(a-s,0),f=Array(u+l),d=!o;++c\u003Cu;)f[c]=n[c];for(;++i\u003Cs;)(d||i\u003Ca)&&(f[r[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}},5071:(e,t,n)=>{var r=n(4497);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?\"__lodash_hash_undefined__\":t,this}},5098:(e,t,n)=>{var r=n(3305),o=n(9361),i=n(1112),a=n(5276),s=n(5071);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},5111:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n\u003Cr;)o[n]=t(e[n],n,e);return o}},5187:(e,t,n)=>{var r=n(3142),o=n(1187),i=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!(\"number\"!=n&&\"symbol\"!=n&&\"boolean\"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},5196:(e,t,n)=>{var r=n(6065),o=n(9071),i=r?function(e){return r.get(e)}:o;e.exports=i},5234:(e,t,n)=>{var r=n(6912),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a\u003Cs;)c[a]=i[t+a];a=-1;for(var u=Array(t+1);++a\u003Ct;)u[a]=i[a];return u[t]=n(c),r(e,this,u)}}},5243:(e,t,n)=>{var r=n(2291);e.exports=function(e){return null==e?\"\":r(e)}},5250:function(e,t,n){var r;e=n.nmd(e),function(){var o,i=\"Expected a function\",a=\"__lodash_hash_undefined__\",s=\"__lodash_placeholder__\",c=16,u=32,l=64,f=128,d=256,h=1/0,p=9007199254740991,g=NaN,m=4294967295,v=[[\"ary\",f],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",c],[\"flip\",512],[\"partial\",u],[\"partialRight\",l],[\"rearg\",d]],y=\"[object Arguments]\",w=\"[object Array]\",b=\"[object Boolean]\",A=\"[object Date]\",S=\"[object Error]\",x=\"[object Function]\",E=\"[object GeneratorFunction]\",_=\"[object Map]\",k=\"[object Number]\",I=\"[object Object]\",T=\"[object Promise]\",O=\"[object RegExp]\",C=\"[object Set]\",B=\"[object String]\",R=\"[object Symbol]\",j=\"[object WeakMap]\",P=\"[object ArrayBuffer]\",N=\"[object DataView]\",L=\"[object Float32Array]\",M=\"[object Float64Array]\",z=\"[object Int8Array]\",U=\"[object Int16Array]\",$=\"[object Int32Array]\",D=\"[object Uint8Array]\",F=\"[object Uint8ClampedArray]\",q=\"[object Uint16Array]\",W=\"[object Uint32Array]\",K=/\\b__p \\+= '';/g,G=/\\b(__p \\+=) '' \\+/g,V=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,J=/[&\u003C>\"']/g,Z=RegExp(H.source),Y=RegExp(J.source),Q=/\u003C%-([\\s\\S]+?)%>/g,X=/\u003C%([\\s\\S]+?)%>/g,ee=/\u003C%=([\\s\\S]+?)%>/g,te=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,ne=/^\\w*$/,re=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,oe=/[\\\\^$.*+?()[\\]{}|]/g,ie=RegExp(oe.source),ae=/^\\s+/,se=/\\s/,ce=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,ue=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,le=/,? & /,fe=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,de=/[()=,{}\\[\\]\\/\\s]/,he=/\\\\(\\\\)?/g,pe=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,ge=/\\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\\[object .+?Constructor\\]$/,we=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\\d*)$/,Ae=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Se=/($^)/,xe=/['\\n\\r\\u2028\\u2029\\\\]/g,Ee=\"\\\\ud800-\\\\udfff\",_e=\"\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\",ke=\"\\\\u2700-\\\\u27bf\",Ie=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Te=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",Oe=\"\\\\ufe0e\\\\ufe0f\",Ce=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",Be=\"['’]\",Re=\"[\"+Ee+\"]\",je=\"[\"+Ce+\"]\",Pe=\"[\"+_e+\"]\",Ne=\"\\\\d+\",Le=\"[\"+ke+\"]\",Me=\"[\"+Ie+\"]\",ze=\"[^\"+Ee+Ce+Ne+ke+Ie+Te+\"]\",Ue=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",$e=\"[^\"+Ee+\"]\",De=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",Fe=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",qe=\"[\"+Te+\"]\",We=\"\\\\u200d\",Ke=\"(?:\"+Me+\"|\"+ze+\")\",Ge=\"(?:\"+qe+\"|\"+ze+\")\",Ve=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",He=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",Je=\"(?:\"+Pe+\"|\"+Ue+\")\"+\"?\",Ze=\"[\"+Oe+\"]?\",Ye=Ze+Je+(\"(?:\"+We+\"(?:\"+[$e,De,Fe].join(\"|\")+\")\"+Ze+Je+\")*\"),Qe=\"(?:\"+[Le,De,Fe].join(\"|\")+\")\"+Ye,Xe=\"(?:\"+[$e+Pe+\"?\",Pe,De,Fe,Re].join(\"|\")+\")\",et=RegExp(Be,\"g\"),tt=RegExp(Pe,\"g\"),nt=RegExp(Ue+\"(?=\"+Ue+\")|\"+Xe+Ye,\"g\"),rt=RegExp([qe+\"?\"+Me+\"+\"+Ve+\"(?=\"+[je,qe,\"$\"].join(\"|\")+\")\",Ge+\"+\"+He+\"(?=\"+[je,qe+Ke,\"$\"].join(\"|\")+\")\",qe+\"?\"+Ke+\"+\"+Ve,qe+\"+\"+He,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",Ne,Qe].join(\"|\"),\"g\"),ot=RegExp(\"[\"+We+Ee+_e+Oe+\"]\"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],st=-1,ct={};ct[L]=ct[M]=ct[z]=ct[U]=ct[$]=ct[D]=ct[F]=ct[q]=ct[W]=!0,ct[y]=ct[w]=ct[P]=ct[b]=ct[N]=ct[A]=ct[S]=ct[x]=ct[_]=ct[k]=ct[I]=ct[O]=ct[C]=ct[B]=ct[j]=!1;var ut={};ut[y]=ut[w]=ut[P]=ut[N]=ut[b]=ut[A]=ut[L]=ut[M]=ut[z]=ut[U]=ut[$]=ut[_]=ut[k]=ut[I]=ut[O]=ut[C]=ut[B]=ut[R]=ut[D]=ut[F]=ut[q]=ut[W]=!0,ut[S]=ut[x]=ut[j]=!1;var lt={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},ft=parseFloat,dt=parseInt,ht=\"object\"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt=\"object\"==typeof self&&self&&self.Object===Object&&self,gt=ht||pt||Function(\"return this\")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,yt=vt&&vt.exports===mt,wt=yt&&ht.process,bt=function(){try{var e=vt&&vt.require&&vt.require(\"util\").types;return e||wt&&wt.binding&&wt.binding(\"util\")}catch(e){}}(),At=bt&&bt.isArrayBuffer,St=bt&&bt.isDate,xt=bt&&bt.isMap,Et=bt&&bt.isRegExp,_t=bt&&bt.isSet,kt=bt&&bt.isTypedArray;function It(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o\u003Ci;){var a=e[o];t(r,a,n(a),e)}return r}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n\u003Cr&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n\u003Cr;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n\u003Cr;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function jt(e,t){return!!(null==e?0:e.length)&&qt(e,t,0)>-1}function Pt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r\u003Co;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n\u003Cr;)o[n]=t(e[n],n,e);return o}function Lt(e,t){for(var n=-1,r=t.length,o=e.length;++n\u003Cr;)e[o+n]=t[n];return e}function Mt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o\u003Ci;)n=t(n,e[o],o,e);return n}function zt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Ut(e,t){for(var n=-1,r=null==e?0:e.length;++n\u003Cr;)if(t(e[n],n,e))return!0;return!1}var $t=Vt(\"length\");function Dt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Ft(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i\u003Co;)if(t(e[i],i,e))return i;return-1}function qt(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r\u003Co;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,Kt,n)}function Wt(e,t,n,r){for(var o=n-1,i=e.length;++o\u003Ci;)if(r(e[o],t))return o;return-1}function Kt(e){return e!=e}function Gt(e,t){var n=null==e?0:e.length;return n?Zt(e,t)/n:g}function Vt(e){return function(t){return null==t?o:t[e]}}function Ht(e){return functio�y��n(t){return null==e?o:e[t]}}function Jt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Zt(e,t){for(var n,r=-1,i=e.length;++r\u003Ci;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n\u003Ce;)r[n]=t(n);return r}function Qt(e){return e?e.slice(0,mn(e)+1).replace(ae,\"\"):e}function Xt(e){return function(t){return e(t)}}function en(e,t){return Nt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n\u003Cr&&qt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&qt(t,e[n],0)>-1;);return n}var on=Ht({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"}),an=Ht({\"&\":\"&amp;\",\"\u003C\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"});function sn(e){return\"\\\\\"+lt[e]}function cn(e){return ot.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n\u003Cr;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return cn(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):$t(e)}function gn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split(\"\")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var vn=Ht({\"&amp;\":\"&\",\"&lt;\":\"\u003C\",\"&gt;\":\">\",\"&quot;\":'\"',\"&#39;\":\"'\"});var yn=function e(t){var n,r=(t=null==t?gt:yn.defaults(gt.Object(),t,yn.pick(gt,at))).Array,se=t.Date,Ee=t.Error,_e=t.Function,ke=t.Math,Ie=t.Object,Te=t.RegExp,Oe=t.String,Ce=t.TypeError,Be=r.prototype,Re=_e.prototype,je=Ie.prototype,Pe=t[\"__core-js_shared__\"],Ne=Re.toString,Le=je.hasOwnProperty,Me=0,ze=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+n:\"\",Ue=je.toString,$e=Ne.call(Ie),De=gt._,Fe=Te(\"^\"+Ne.call(Le).replace(oe,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),qe=yt?t.Buffer:o,We=t.Symbol,Ke=t.Uint8Array,Ge=qe?qe.allocUnsafe:o,Ve=ln(Ie.getPrototypeOf,Ie),He=Ie.create,Je=je.propertyIsEnumerable,Ze=Be.splice,Ye=We?We.isConcatSpreadable:o,Qe=We?We.iterator:o,Xe=We?We.toStringTag:o,nt=function(){try{var e=hi(Ie,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}(),ot=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,lt=se&&se.now!==gt.Date.now&&se.now,ht=t.setTimeout!==gt.setTimeout&&t.setTimeout,pt=ke.ceil,mt=ke.floor,vt=Ie.getOwnPropertySymbols,wt=qe?qe.isBuffer:o,bt=t.isFinite,$t=Be.join,Ht=ln(Ie.keys,Ie),wn=ke.max,bn=ke.min,An=se.now,Sn=t.parseInt,xn=ke.random,En=Be.reverse,_n=hi(t,\"DataView\"),kn=hi(t,\"Map\"),In=hi(t,\"Promise\"),Tn=hi(t,\"Set\"),On=hi(t,\"WeakMap\"),Cn=hi(Ie,\"create\"),Bn=On&&new On,Rn={},jn=Ui(_n),Pn=Ui(kn),Nn=Ui(In),Ln=Ui(Tn),Mn=Ui(On),zn=We?We.prototype:o,Un=zn?zn.valueOf:o,$n=zn?zn.toString:o;function Dn(e){if(ns(e)&&!Ka(e)&&!(e instanceof Kn)){if(e instanceof Wn)return e;if(Le.call(e,\"__wrapped__\"))return $i(e)}return new Wn(e)}var Fn=function(){function e(){}return function(t){if(!ts(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function qn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Kn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t\u003Cn;)this.add(e[t])}function Zn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Yn(e,t){var n=Ka(e),r=!n&&Wa(e),o=!n&&!r&&Ja(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Yt(e.length,Oe):[],c=s.length;for(var u in e)!t&&!Le.call(e,u)||a&&(\"length\"==u||o&&(\"offset\"==u||\"parent\"==u)||i&&(\"buffer\"==u||\"byteLength\"==u||\"byteOffset\"==u)||bi(u,c))||s.push(u);return s}function Qn(e){var t=e.length;return t?e[Jr(0,t-1)]:o}function Xn(e,t){return Li(Bo(e),cr(t,0,e.length))}function er(e){return Li(Bo(e))}function tr(e,t,n){(n!==o&&!Da(e[t],n)||n===o&&!(t in e))&&ar(e,t,n)}function nr(e,t,n){var r=e[t];Le.call(e,t)&&Da(r,n)&&(n!==o||t in e)||ar(e,t,n)}function rr(e,t){for(var n=e.length;n--;)if(Da(e[n][0],t))return n;return-1}function or(e,t,n,r){return hr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function ir(e,t){return e&&Ro(t,Rs(t),e)}function ar(e,t,n){\"__proto__\"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n\u003Ci;)a[n]=s?o:Is(e,t[n]);return a}function cr(e,t,n){return e==e&&(n!==o&&(e=e\u003C=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ur(e,t,n,r,i,a){var s,c=1&t,u=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ts(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&\"string\"==typeof e[0]&&Le.call(e,\"index\")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Bo(e,s)}else{var d=mi(e),h=d==x||d==E;if(Ja(e))return _o(e,c);if(d==I||d==y||h&&!i){if(s=u||h?{}:yi(e),!c)return u?function(e,t){return Ro(e,gi(e),t)}(e,function(e,t){return e&&Ro(t,js(t),e)}(s,e)):function(e,t){return Ro(e,pi(e),t)}(e,ir(s,e))}else{if(!ut[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case P:return ko(e);case b:case A:return new r(+e);case N:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case M:case z:case U:case $:case D:case F:case q:case W:return Io(e,n);case _:return new r;case k:case B:return new r(e);case O:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new r;case R:return o=e,Un?Ie(Un.call(o)):{}}var o}(e,d,c)}}a||(a=new Zn);var p=a.get(e);if(p)return p;a.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,ur(r,t,n,o,e,a))}));var g=f?o:(l?u?ai:ii:u?js:Rs)(e);return Ot(g||e,(function(r,o){g&&(r=e[o=r]),nr(s,o,ur(r,t,n,o,e,a))})),s}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ie(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function fr(e,t,n){if(\"function\"!=typeof e)throw new Ce(i);return Ri((function(){e.apply(o,n)}),t)}function dr(e,t,n,r){var o=-1,i=jt,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;n&&(t=Nt(t,Xt(n))),r?(i=Pt,a=!1):t.length>=200&&(i=tn,a=!1,t=new Jn(t));e:for(;++o\u003Cs;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var d=u;d--;)if(t[d]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Dn.templateSettings={escape:Q,evaluate:X,interpolate:ee,variable:\"\",imports:{_:Dn}},Dn.prototype=qn.prototype,Dn.prototype.constructor=Dn,Wn.prototype=Fn(qn.prototype),Wn.prototype.constructor=Wn,Kn.prototype=Fn(qn.prototype),Kn.prototype.constructor=Kn,Gn.prototype.clear=function(){this.__data__=Cn?Cn(null):{},this.size=0},Gn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gn.prototype.get=function(e){var t=this.__data__;if(Cn){var n=t[e];return n===a?o:n}return Le.call(t,e)?t[e]:o},Gn.prototype.has=function(e){var t=this.__data__;return Cn?t[e]!==o:Le.call(t,e)},Gn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Cn&&t===o?a:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n\u003C0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Vn.prototype.get=function(e){var t=this.__data__,n=rr(t,e);return n\u003C0?o:t[n][1]},Vn.prototype.has=function(e){return rr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r\u003C0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(kn||Vn),string:new Gn}},Hn.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return fi(this,e).get(e)},Hn.prototype.has=function(e){return fi(this,e).has(e)},Hn.prototype.set=function(e,t){var n=fi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,a),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!kn||r.length\u003C199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var hr=No(Ar),pr=No(Sr,!0);function gr(e,t){var n=!0;return hr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function mr(e,t,n){for(var r=-1,i=e.length;++r\u003Ci;){var a=e[r],s=t(a);if(null!=s&&(c===o?s==s&&!us(s):n(s,c)))var c=s,u=a}return u}function vr(e,t){var n=[];return hr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function yr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=wi),o||(o=[]);++i\u003Ca;){var s=e[i];t>0&&n(s)?t>1?yr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var wr=Lo(),br=Lo(!0);function Ar(e,t){return e&&wr(e,t,Rs)}function Sr(e,t){return e&&br(e,t,Rs)}function xr(e,t){return Rt(t,(function(t){return Qa(e[t])}))}function Er(e,t){for(var n=0,r=(t=Ao(t,e)).length;null!=e&&n\u003Cr;)e=e[zi(t[n++])];return n&&n==r?e:o}function _r(e,t,n){var r=t(e);return Ka(e)?r:Lt(r,n(e))}function kr(e){return null==e?e===o?\"[object Undefined]\":\"[object Null]\":Xe&&Xe in Ie(e)?function(e){var t=Le.call(e,Xe),n=e[Xe];try{e[Xe]=o;var r=!0}catch(e){}var i=Ue.call(e);r&&(t?e[Xe]=n:delete e[Xe]);return i}(e):function(e){return Ue.call(e)}(e)}function Ir(e,t){return e>t}function Tr(e,t){return null!=e&&Le.call(e,t)}function Or(e,t){return null!=e&&t in Ie(e)}function Cr(e,t,n){for(var i=n?Pt:jt,a=e[0].length,s=e.length,c=s,u=r(s),l=1/0,f=[];c--;){var d=e[c];c&&t&&(d=Nt(d,Xt(t))),l=bn(d.length,l),u[c]=!n&&(t||a>=120&&d.length>=120)?new Jn(c&&d):o}d=e[0];var h=-1,p=u[0];e:for(;++h\u003Ca&&f.length\u003Cl;){var g=d[h],m=t?t(g):g;if(g=n||0!==g?g:0,!(p?tn(p,m):i(f,m,n))){for(c=s;--c;){var v=u[c];if(!(v?tn(v,m):i(e[c],m,n)))continue e}p&&p.push(m),f.push(g)}}return f}function Br(e,t,n){var r=null==(e=Oi(e,t=Ao(t,e)))?e:e[zi(Yi(t))];return null==r?o:It(r,e,n)}function Rr(e){return ns(e)&&kr(e)==y}function jr(e,t,n,r,i){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Ka(e),c=Ka(t),u=s?w:mi(e),l=c?w:mi(t),f=(u=u==y?I:u)==I,d=(l=l==y?I:l)==I,h=u==l;if(h&&Ja(e)){if(!Ja(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Zn),s||ls(e)?ri(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new Ke(e),new Ke(t)));case b:case A:case k:return Da(+e,+t);case S:return e.name==t.name&&e.message==t.message;case O:case B:return e==t+\"\";case _:var s=un;case C:var c=1&r;if(s||(s=dn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=ri(s(e),s(t),r,o,i,a);return a.delete(e),l;case R:if(Un)return Un.call(e)==Un.call(t)}return!1}(e,t,u,n,r,i,a);if(!(1&n)){var p=f&&Le.call(e,\"__wrapped__\"),g=d&&Le.call(t,\"__wrapped__\");if(p||g){var m=p?e.value():e,v=g?t.value():t;return a||(a=new Zn),i(m,v,n,r,a)}}if(!h)return!1;return a||(a=new Zn),function(e,t,n,r,i,a){var s=1&n,c=ii(e),u=c.length,l=ii(t),f=l.length;if(u!=f&&!s)return!1;var d=u;for(;d--;){var h=c[d];if(!(s?h in t:Le.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);var v=s;for(;++d\u003Cu;){var y=e[h=c[d]],w=t[h];if(r)var b=s?r(w,y,h,t,e,a):r(y,w,h,e,t,a);if(!(b===o?y===w||i(y,w,n,r,a):b)){m=!1;break}v||(v=\"constructor\"==h)}if(m&&!v){var A=e.constructor,S=t.constructor;A==S||!(\"constructor\"in e)||!(\"constructor\"in t)||\"function\"==typeof A&&A instanceof A&&\"function\"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,i,a)}(e,t,n,r,jr,i))}function Pr(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Ie(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i\u003Ca;){var u=(c=n[i])[0],l=e[u],f=c[1];if(s&&c[2]){if(l===o&&!(u in e))return!1}else{var d=new Zn;if(r)var h=r(l,f,u,e,t,d);if(!(h===o?jr(f,l,3,r,d):h))return!1}}return!0}function Nr(e){return!(!ts(e)||(t=e,ze&&ze in t))&&(Qa(e)?Fe:ye).test(Ui(e));var t}function Lr(e){return\"function\"==typeof e?e:null==e?oc:\"object\"==typeof e?Ka(e)?Fr(e[0],e[1]):Dr(e):hc(e)}function Mr(e){if(!_i(e))return Ht(e);var t=[];for(var n in Ie(e))Le.call(e,n)&&\"constructor\"!=n&&t.push(n);return t}function zr(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Ie(e))t.push(n);return t}(e);var t=_i(e),n=[];for(var r in e)(\"constructor\"!=r||!t&&Le.call(e,r))&&n.push(r);return n}function Ur(e,t){return e\u003Ct}function $r(e,t){var n=-1,o=Va(e)?r(e.length):[];return hr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Dr(e){var t=di(e);return 1==t.length&&t[0][2]?Ii(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Fr(e,t){return Si(e)&&ki(t)?Ii(zi(e),t):function(n){var r=Is(n,e);return r===o&&r===t?Ts(n,e):jr(t,r,3)}}function qr(e,t,n,r,i){e!==t&&wr(t,(function(a,s){if(i||(i=new Zn),ts(a))!function(e,t,n,r,i,a,s){var c=Ci(e,n),u=Ci(t,n),l=s.get(u);if(l)return void tr(e,n,l);var f=a?a(c,u,n+\"\",e,t,s):o,d=f===o;if(d){var h=Ka(u),p=!h&&Ja(u),g=!h&&!p&&ls(u);f=u,h||p||g?Ka(c)?f=c:Ha(c)?f=Bo(c):p?(d=!1,f=_o(u,!0)):g?(d=!1,f=Io(u,!0)):f=[]:is(u)||Wa(u)?(f=c,Wa(c)?f=ys(c):ts(c)&&!Qa(c)||(f=yi(u))):d=!1}d&&(s.set(u,f),i(f,u,r,a,s),s.delete(u));tr(e,n,f)}(e,t,s,n,qr,r,i);else{var c=r?r(Ci(e,s),a,s+\"\",e,t,i):o;c===o&&(c=a),tr(e,s,c)}}),js)}function Wr(e,t){var n=e.length;if(n)return bi(t+=t\u003C0?n:0,n)?e[t]:o}function Kr(e,t,n){t=t.length?Nt(t,(function(e){return Ka(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[oc];var r=-1;t=Nt(t,Xt(li()));var o=$r(e,(function(e,n,o){var i=Nt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r\u003Ca;){var c=To(o[r],i[r]);if(c)return r>=s?c:c*(\"desc\"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Gr(e,t,n){for(var r=-1,o=t.length,i={};++r\u003Co;){var a=t[r],s=Er(e,a);n(s,a)&&eo(i,Ao(a,e),s)}return i}function Vr(e,t,n,r){var o=r?Wt:qt,i=-1,a=t.length,s=e;for(e===t&&(t=Bo(t)),n&&(s=Nt(e,Xt(n)));++i\u003Ca;)for(var c=0,u=t[i],l=n?n(u):u;(c=o(s,l,c,r))>-1;)s!==e&&Ze.call(s,c,1),Ze.call(e,c,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;bi(o)?Ze.call(e,o,1):ho(e,o)}}return e}function Jr(e,t){return e+mt(xn()*(t-e+1))}function Zr(e,t){var n=\"\";if(!e||t\u003C1||t>p)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return ji(Ti(e,t,oc),e+\"\")}function Qr(e){return Qn(Ds(e))}function Xr(e,t){var n=Ds(e);return Li(n,cr(t,0,n.length))}function eo(e,t,n,r){if(!ts(e))return e;for(var i=-1,a=(t=Ao(t,e)).length,s=a-1,c=e;null!=c&&++i\u003Ca;){var u=zi(t[i]),l=n;if(\"__proto__\"===u||\"constructor\"===u||\"prototype\"===u)return e;if(i!=s){var f=c[u];(l=r?r(f,u,c):o)===o&&(l=ts(f)?f:bi(t[i+1])?[]:{})}nr(c,u,l),c=c[u]}return e}var to=Bn?function(e,t){return Bn.set(e,t),e}:oc,no=nt?function(e,t){return nt(e,\"toString\",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:oc;function ro(e){return Li(Ds(e))}function oo(e,t,n){var o=-1,i=e.length;t\u003C0&&(t=-t>i?0:i+t),(n=n>i?i:n)\u003C0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o\u003Ci;)a[o]=e[o+t];return a}function io(e,t){var n;return hr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ao(e,t,n){var r=0,o=null==e?r:e.length;if(\"number\"==typeof t&&t==t&&o\u003C=2147483647){for(;r\u003Co;){var i=r+o>>>1,a=e[i];null!==a&&!us(a)&&(n?a\u003C=t:a\u003Ct)?r=i+1:o=i}return o}return so(e,t,oc,n)}function so(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,c=null===t,u=us(t),l=t===o;i\u003Ca;){var f=mt((i+a)/2),d=n(e[f]),h=d!==o,p=null===d,g=d==d,m=us(d);if(s)var v=r||g;else v=l?g&&(r||h):c?g&&h&&(r||!p):u?g&&h&&!p&&(r||!m):!p&&!m&&(r?d\u003C=t:d\u003Ct);v?i=f+1:a=f}return bn(a,4294967294)}function co(e,t){for(var n=-1,r=e.length,o=0,i=[];++n\u003Cr;){var a=e[n],s=t?t(a):a;if(!n||!Da(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function uo(e){return\"number\"==typeof e?e:us(e)?g:+e}function lo(e){if(\"string\"==typeof e)return e;if(Ka(e))return Nt(e,lo)+\"\";if(us(e))return $n?$n.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function fo(e,t,n){var r=-1,o=jt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=Pt;else if(i>=200){var u=t?null:Yo(e);if(u)return dn(u);a=!1,o=tn,c=new Jn}else c=t?[]:s;e:for(;++r\u003Ci;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(l)}else o(c,f,n)||(c!==s&&c.push(f),s.push(l))}return s}function ho(e,t){return null==(e=Oi(e,t=Ao(t,e)))||delete e[zi(Yi(t))]}function po(e,t,n,r){return eo(e,t,n(Er(e,t)),r)}function go(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i\u003Co)&&t(e[i],i,e););return n?oo(e,r?0:i,r?i+1:o):oo(e,r?i+1:0,r?o:i)}function mo(e,t){var n=e;return n instanceof Kn&&(n=n.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function vo(e,t,n){var o=e.length;if(o\u003C2)return o?fo(e[0]):[];for(var i=-1,a=r(o);++i\u003Co;)for(var s=e[i],c=-1;++c\u003Co;)c!=i&&(a[i]=dr(a[i]||s,e[c],t,n));return fo(yr(a,1),t,n)}function yo(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r\u003Ci;){var c=r\u003Ca?t[r]:o;n(s,e[r],c)}return s}function wo(e){return Ha(e)?e:[]}function bo(e){return\"function\"==typeof e?e:oc}function Ao(e,t){return Ka(e)?e:Si(e,t)?[e]:Mi(ws(e))}var So=Yr;function xo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:oo(e,t,n)}var Eo=ot||function(e){return gt.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new Ke(t).set(new Ke(e)),t}function Io(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function To(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=us(e),s=t!==o,c=null===t,u=t==t,l=us(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&e\u003Ct||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function Oo(e,t,n,o){for(var i=-1,a=e.length,s=n.length,c=-1,u=t.length,l=wn(a-s,0),f=r(u+l),d=!o;++c\u003Cu;)f[c]=t[c];for(;++i\u003Cs;)(d||i\u003Ca)&&(f[n[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}function Co(e,t,n,o){for(var i=-1,a=e.length,s=-1,c=n.length,u=-1,l=t.length,f=wn(a-c,0),d=r(f+l),h=!o;++i\u003Cf;)d[i]=e[i];for(var p=i;++u\u003Cl;)d[p+u]=t[u];for(;++s\u003Cc;)(h||i\u003Ca)&&(d[p+n[s]]=e[i++]);return d}function Bo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n\u003Co;)t[n]=e[n];return t}function Ro(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a\u003Cs;){var c=t[a],u=r?r(n[c],e[c],c,n,e):o;u===o&&(u=e[c]),i?ar(n,c,u):nr(n,c,u)}return n}function jo(e,t){return function(n,r){var o=Ka(n)?Tt:or,i=t?t():{};return o(n,e,li(r,2),i)}}function Po(e){return Yr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&\"function\"==typeof a?(i--,a):o,s&&Ai(n[0],n[1],s)&&(a=i\u003C3?o:a,i=1),t=Ie(t);++r\u003Ci;){var c=n[r];c&&e(t,c,r,a)}return t}))}function No(e,t){return function(n,r){if(null==n)return n;if(!Va(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ie(n);(t?i--:++i\u003Co)&&!1!==r(a[i],i,a););return n}}function Lo(e){return function(t,n,r){for(var o=-1,i=Ie(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function Mo(e){return function(t){var n=cn(t=ws(t))?gn(t):o,r=n?n[0]:t.charAt(0),i=n?xo(n,1).join(\"\"):t.slice(1);return r[e]()+i}}function zo(e){return function(t){return Mt(Qs(Ws(t).replace(et,\"\")),e,\"\")}}function Uo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function $o(e){return function(t,n,r){var i=Ie(t);if(!Va(t)){var a=li(n,3);t=Rs(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Do(e){return oi((function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if(\"function\"!=typeof s)throw new Ce(i);if(a&&!c&&\"wrapper\"==ci(s))var c=new Wn([],!0)}for(r=c?r:n;++r\u003Cn;){var u=ci(s=t[r]),l=\"wrapper\"==u?si(s):o;c=l&&xi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ci(l[0])].apply(c,l[3]):1==s.length&&xi(s)?c[u]():c.thru(s)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ka(r))return c.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o\u003Cn;)i=t[o].call(this,i);return i}}))}function Fo(e,t,n,i,a,s,c,u,l,d){var h=t&f,p=1&t,g=2&t,m=24&t,v=512&t,y=g?o:Uo(e);return function f(){for(var w=arguments.length,b=r(w),A=w;A--;)b[A]=arguments[A];if(m)var S=ui(f),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,S);if(i&&(b=Oo(b,i,a,m)),s&&(b=Co(b,s,c,m)),w-=x,m&&w\u003Cd){var E=fn(b,S);return Jo(e,t,Fo,f.placeholder,n,b,E,u,l,d-w)}var _=p?n:this,k=g?_[e]:e;return w=b.length,u?b=function(e,t){var n=e.length,r=bn(t.length,n),i=Bo(e);for(;r--;){var a=t[r];e[r]=bi(a,n)?i[a]:o}return e}(b,u):v&&w>1&&b.reverse(),h&&l\u003Cw&&(b.length=l),this&&this!==gt&&this instanceof f&&(k=y||Uo(k)),k.apply(_,b)}}function qo(e,t){return function(n,r){return function(e,t,n,r){return Ar(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Wo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;\"string\"==typeof n||\"string\"==typeof r?(n=lo(n),r=lo(r)):(n=uo(n),r=uo(r)),i=e(n,r)}return i}}function Ko(e){return oi((function(t){return t=Nt(t,Xt(li())),Yr((function(n){var r=this;return e(t,(function(e){return It(e,r,n)}))}))}))}function Go(e,t){var n=(t=t===o?\" \":lo(t)).length;if(n\u003C2)return n?Zr(t,e):t;var r=Zr(t,pt(e/pn(t)));return cn(t)?xo(gn(r),0,e).join(\"\"):r.slice(0,e)}function Vo(e){return function(t,n,i){return i&&\"number\"!=typeof i&&Ai(t,n,i)&&(n=i=o),t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n,o){for(var i=-1,a=wn(pt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t\u003Cn?1:-1:ps(i),e)}}function Ho(e){return function(t,n){return\"string\"==typeof t&&\"string\"==typeof n||(t=vs(t),n=vs(n)),e(t,n)}}function Jo(e,t,n,r,i,a,s,c,f,d){var h=8&t;t|=h?u:l,4&(t&=~(h?l:u))||(t&=-4);var p=[e,t,i,h?a:o,h?s:o,h?o:a,h?o:s,c,f,d],g=n.apply(o,p);return xi(e)&&Bi(g,p),g.placeholder=r,Pi(g,e,t)}function Zo(e){var t=ke[e];return function(e,n){if(e=vs(e),(n=null==n?0:bn(gs(n),292))&&bt(e)){var r=(ws(e)+\"e\").split(\"e\");return+((r=(ws(t(r[0]+\"e\"+(+r[1]+n)))+\"e\").split(\"e\"))[0]+\"e\"+(+r[1]-n))}return t(e)}}var Yo=Tn&&1/dn(new Tn([,-0]))[1]==h?function(e){return new Tn(e)}:uc;function Qo(e){return function(t){var n=mi(t);return n==_?un(t):n==C?hn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xo(e,t,n,a,h,p,g,m){var v=2&t;if(!v&&\"function\"!=typeof e)throw new Ce(i);var y=a?a.length:0;if(y||(t&=-97,a=h=o),g=g===o?g:wn(gs(g),0),m=m===o?m:gs(m),y-=h?h.length:0,t&l){var w=a,b=h;a=h=o}var A=v?o:si(e),S=[e,t,n,a,h,w,b,p,g,m];if(A&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o\u003C131,a=r==f&&8==n||r==f&&n==d&&e[7].length\u003C=t[8]||384==r&&t[7].length\u003C=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Oo(u,c,t[4]):c,e[4]=u?fn(e[3],s):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Co(u,c,t[6]):c,e[6]=u?fn(e[5],s):t[6]);(c=t[7])&&(e[7]=c);r&f&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(S,A),e=S[0],t=S[1],n=S[2],a=S[3],h=S[4],!(m=S[9]=S[9]===o?v?0:e.length:wn(S[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==c?function(e,t,n){var i=Uo(e);return function a(){for(var s=arguments.length,c=r(s),u=s,l=ui(a);u--;)c[u]=arguments[u];var f=s\u003C3&&c[0]!==l&&c[s-1]!==l?[]:fn(c,l);return(s-=f.length)\u003Cn?Jo(e,t,Fo,a.placeholder,o,c,f,o,o,n-s):It(this&&this!==gt&&this instanceof a?i:e,this,c)}}(e,t,m):t!=u&&33!=t||h.length?Fo.apply(o,S):function(e,t,n,o){var i=1&t,a=Uo(e);return function t(){for(var s=-1,c=arguments.length,u=-1,l=o.length,f=r(l+c),d=this&&this!==gt&&this instanceof t?a:e;++u\u003Cl;)f[u]=o[u];for(;c--;)f[u++]=arguments[++s];return It(d,i?n:this,f)}}(e,t,n,a);else var x=function(e,t,n){var r=1&t,o=Uo(e);return function t(){return(this&&this!==gt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Pi((A?to:Bi)(x,S),e,t)}function ei(e,t,n,r){return e===o||Da(e,je[n])&&!Le.call(r,n)?t:e}function ti(e,t,n,r,i,a){return ts(e)&&ts(t)&&(a.set(t,e),qr(e,t,o,ti,a),a.delete(t)),e}function ni(e){return is(e)?o:e}function ri(e,t,n,r,i,a){var s=1&n,c=e.length,u=t.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,p=2&n?new Jn:o;for(a.set(e,t),a.set(t,e);++d\u003Cc;){var g=e[d],m=t[d];if(r)var v=s?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(v!==o){if(v)continue;h=!1;break}if(p){if(!Ut(t,(function(e,t){if(!tn(p,t)&&(g===e||i(g,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(g!==m&&!i(g,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function oi(e){return ji(Ti(e,o,Gi),e+\"\")}function ii(e){return _r(e,Rs,pi)}function ai(e){return _r(e,js,gi)}var si=Bn?function(e){return Bn.get(e)}:uc;function ci(e){for(var t=e.name+\"\",n=Rn[t],r=Le.call(Rn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ui(e){return(Le.call(Dn,\"placeholder\")?Dn:e).placeholder}function li(){var e=Dn.iteratee||ic;return e=e===ic?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function fi(e,t){var n=e.__data__;return function(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}(t)?n[\"string\"==typeof t?\"string\":\"hash\"]:n.map}function di(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ki(o)]}return t}function hi(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Nr(n)?n:o}var pi=vt?function(e){return null==e?[]:(e=Ie(e),Rt(vt(e),(function(t){return Je.call(e,t)})))}:mc,gi=vt?function(e){for(var t=[];e;)Lt(t,pi(e)),e=Ve(e);return t}:mc,mi=kr;function vi(e,t,n){for(var r=-1,o=(t=Ao(t,e)).length,i=!1;++r\u003Co;){var a=zi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&bi(a,o)&&(Ka(e)||Wa(e))}function yi(e){return\"function\"!=typeof e.constructor||_i(e)?{}:Fn(Ve(e))}function wi(e){return Ka(e)||Wa(e)||!!(Ye&&e&&e[Ye])}function bi(e,t){var n=typeof e;return!!(t=null==t?p:t)&&(\"number\"==n||\"symbol\"!=n&&be.test(e))&&e>-1&&e%1==0&&e\u003Ct}function Ai(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!(\"number\"==r?Va(n)&&bi(t,n.length):\"string\"==r&&t in n)&&Da(n[t],e)}function Si(e,t){if(Ka(e))return!1;var n=typeof e;return!(\"number\"!=n&&\"symbol\"!=n&&\"boolean\"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ie(t))}function xi(e){var t=ci(e),n=Dn[t];if(\"function\"!=typeof n||!(t in Kn.prototype))return!1;if(e===n)return!0;var r=si(n);return!!r&&e===r[0]}(_n&&mi(new _n(new ArrayBuffer(1)))!=N||kn&&mi(new kn)!=_||In&&mi(In.resolve())!=T||Tn&&mi(new Tn)!=C||On&&mi(new On)!=j)&&(mi=function(e){var t=kr(e),n=t==I?e.constructor:o,r=n?Ui(n):\"\";if(r)switch(r){case jn:return N;case Pn:return _;case Nn:return T;case Ln:return C;case Mn:return j}return t});var Ei=Pe?Qa:vc;function _i(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||je)}function ki(e){return e==e&&!ts(e)}function Ii(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in Ie(n)))}}function Ti(e,t,n){return t=wn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=wn(o.length-t,0),s=r(a);++i\u003Ca;)s[i]=o[t+i];i=-1;for(var c=r(t+1);++i\u003Ct;)c[i]=o[i];return c[t]=n(s),It(e,this,c)}}function Oi(e,t){return t.length\u003C2?e:Er(e,oo(t,0,-1))}function Ci(e,t){if((\"constructor\"!==t||\"function\"!=typeof e[t])&&\"__proto__\"!=t)return e[t]}var Bi=Ni(to),Ri=ht||function(e,t){return gt.setTimeout(e,t)},ji=Ni(no);function Pi(e,t,n){var r=t+\"\";return ji(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?\"& \":\"\")+t[r],t=t.join(n>2?\", \":\" \"),e.replace(ce,\"{\\n/* [wrapped with \"+t+\"] */\\n\")}(r,function(e,t){return Ot(v,(function(n){var r=\"_.\"+n[0];t&n[1]&&!jt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(le):[]}(r),n)))}function Ni(e){var t=0,n=0;return function(){var r=An(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Li(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n\u003Ct;){var a=Jr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Mi=function(e){var t=Na(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(\"\"),e.replace(re,(function(e,n,r,o){t.push(r?o.replace(he,\"$1\"):n||e)})),t}));function zi(e){if(\"string\"==typeof e||us(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function Ui(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}function $i(e){if(e instanceof Kn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Bo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Di=Yr((function(e,t){return Ha(e)?dr(e,yr(t,1,Ha,!0)):[]})),Fi=Yr((function(e,t){var n=Yi(t);return Ha(n)&&(n=o),Ha(e)?dr(e,yr(t,1,Ha,!0),li(n,2)):[]})),qi=Yr((function(e,t){var n=Yi(t);return Ha(n)&&(n=o),Ha(e)?dr(e,yr(t,1,Ha,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:gs(n);return o\u003C0&&(o=wn(r+o,0)),Ft(e,li(t,3),o)}function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=gs(n),i=n\u003C0?wn(r+i,0):bn(i,r-1)),Ft(e,li(t,3),i,!0)}f;���unction Gi(e){return(null==e?0:e.length)?yr(e,1):[]}function Vi(e){return e&&e.length?e[0]:o}var Hi=Yr((function(e){var t=Nt(e,wo);return t.length&&t[0]===e[0]?Cr(t):[]})),Ji=Yr((function(e){var t=Yi(e),n=Nt(e,wo);return t===Yi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Cr(n,li(t,2)):[]})),Zi=Yr((function(e){var t=Yi(e),n=Nt(e,wo);return(t=\"function\"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Cr(n,o,t):[]}));function Yi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Qi=Yr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var ea=oi((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return Hr(e,Nt(t,(function(e){return bi(e,n)?+e:e})).sort(To)),r}));function ta(e){return null==e?e:En.call(e)}var na=Yr((function(e){return fo(yr(e,1,Ha,!0))})),ra=Yr((function(e){var t=Yi(e);return Ha(t)&&(t=o),fo(yr(e,1,Ha,!0),li(t,2))})),oa=Yr((function(e){var t=Yi(e);return t=\"function\"==typeof t?t:o,fo(yr(e,1,Ha,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ha(e))return t=wn(e.length,t),!0})),Yt(t,(function(t){return Nt(e,Vt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Nt(n,(function(e){return It(t,o,e)}))}var sa=Yr((function(e,t){return Ha(e)?dr(e,t):[]})),ca=Yr((function(e){return vo(Rt(e,Ha))})),ua=Yr((function(e){var t=Yi(e);return Ha(t)&&(t=o),vo(Rt(e,Ha),li(t,2))})),la=Yr((function(e){var t=Yi(e);return t=\"function\"==typeof t?t:o,vo(Rt(e,Ha),o,t)})),fa=Yr(ia);var da=Yr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n=\"function\"==typeof n?(e.pop(),n):o,aa(e,n)}));function ha(e){var t=Dn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var ga=oi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Kn&&bi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var ma=jo((function(e,t,n){Le.call(e,n)?++e[n]:ar(e,n,1)}));var va=$o(Wi),ya=$o(Ki);function wa(e,t){return(Ka(e)?Ot:hr)(e,li(t,3))}function ba(e,t){return(Ka(e)?Ct:pr)(e,li(t,3))}var Aa=jo((function(e,t,n){Le.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Sa=Yr((function(e,t,n){var o=-1,i=\"function\"==typeof t,a=Va(e)?r(e.length):[];return hr(e,(function(e){a[++o]=i?It(t,e,n):Br(e,t,n)})),a})),xa=jo((function(e,t,n){ar(e,n,t)}));function Ea(e,t){return(Ka(e)?Nt:$r)(e,li(t,3))}var _a=jo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ka=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Ai(e,t[0],t[1])?t=[]:n>2&&Ai(t[0],t[1],t[2])&&(t=[t[0]]),Kr(e,yr(t,1),[])})),Ia=lt||function(){return gt.Date.now()};function Ta(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xo(e,f,o,o,o,o,t)}function Oa(e,t){var n;if(\"function\"!=typeof t)throw new Ce(i);return e=gs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e\u003C=1&&(t=o),n}}var Ca=Yr((function(e,t,n){var r=1;if(n.length){var o=fn(n,ui(Ca));r|=u}return Xo(e,r,t,n,o)})),Ba=Yr((function(e,t,n){var r=3;if(n.length){var o=fn(n,ui(Ba));r|=u}return Xo(t,r,e,n,o)}));function Ra(e,t,n){var r,a,s,c,u,l,f=0,d=!1,h=!1,p=!0;if(\"function\"!=typeof e)throw new Ce(i);function g(t){var n=r,i=a;return r=a=o,f=t,c=e.apply(i,n)}function m(e){var n=e-l;return l===o||n>=t||n\u003C0||h&&e-f>=s}function v(){var e=Ia();if(m(e))return y(e);u=Ri(v,function(e){var n=t-(e-l);return h?bn(n,s-(e-f)):n}(e))}function y(e){return u=o,p&&r?g(e):(r=a=o,c)}function w(){var e=Ia(),n=m(e);if(r=arguments,a=this,l=e,n){if(u===o)return function(e){return f=e,u=Ri(v,t),d?g(e):c}(l);if(h)return Eo(u),u=Ri(v,t),g(l)}return u===o&&(u=Ri(v,t)),c}return t=vs(t)||0,ts(n)&&(d=!!n.leading,s=(h=\"maxWait\"in n)?wn(vs(n.maxWait)||0,t):s,p=\"trailing\"in n?!!n.trailing:p),w.cancel=function(){u!==o&&Eo(u),f=0,r=l=a=u=o},w.flush=function(){return u===o?c:y(Ia())},w}var ja=Yr((function(e,t){return fr(e,1,t)})),Pa=Yr((function(e,t,n){return fr(e,vs(t)||0,n)}));function Na(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new Ce(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Na.Cache||Hn),n}function La(e){if(\"function\"!=typeof e)throw new Ce(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Na.Cache=Hn;var Ma=So((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Nt(t[0],Xt(li())):Nt(yr(t,1),Xt(li()))).length;return Yr((function(r){for(var o=-1,i=bn(r.length,n);++o\u003Ci;)r[o]=t[o].call(this,r[o]);return It(e,this,r)}))})),za=Yr((function(e,t){var n=fn(t,ui(za));return Xo(e,u,o,t,n)})),Ua=Yr((function(e,t){var n=fn(t,ui(Ua));return Xo(e,l,o,t,n)})),$a=oi((function(e,t){return Xo(e,d,o,o,o,t)}));function Da(e,t){return e===t||e!=e&&t!=t}var Fa=Ho(Ir),qa=Ho((function(e,t){return e>=t})),Wa=Rr(function(){return arguments}())?Rr:function(e){return ns(e)&&Le.call(e,\"callee\")&&!Je.call(e,\"callee\")},Ka=r.isArray,Ga=At?Xt(At):function(e){return ns(e)&&kr(e)==P};function Va(e){return null!=e&&es(e.length)&&!Qa(e)}function Ha(e){return ns(e)&&Va(e)}var Ja=wt||vc,Za=St?Xt(St):function(e){return ns(e)&&kr(e)==A};function Ya(e){if(!ns(e))return!1;var t=kr(e);return t==S||\"[object DOMException]\"==t||\"string\"==typeof e.message&&\"string\"==typeof e.name&&!is(e)}function Qa(e){if(!ts(e))return!1;var t=kr(e);return t==x||t==E||\"[object AsyncFunction]\"==t||\"[object Proxy]\"==t}function Xa(e){return\"number\"==typeof e&&e==gs(e)}function es(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e\u003C=p}function ts(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}function ns(e){return null!=e&&\"object\"==typeof e}var rs=xt?Xt(xt):function(e){return ns(e)&&mi(e)==_};function os(e){return\"number\"==typeof e||ns(e)&&kr(e)==k}function is(e){if(!ns(e)||kr(e)!=I)return!1;var t=Ve(e);if(null===t)return!0;var n=Le.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof n&&n instanceof n&&Ne.call(n)==$e}var as=Et?Xt(Et):function(e){return ns(e)&&kr(e)==O};var ss=_t?Xt(_t):function(e){return ns(e)&&mi(e)==C};function cs(e){return\"string\"==typeof e||!Ka(e)&&ns(e)&&kr(e)==B}function us(e){return\"symbol\"==typeof e||ns(e)&&kr(e)==R}var ls=kt?Xt(kt):function(e){return ns(e)&&es(e.length)&&!!ct[kr(e)]};var fs=Ho(Ur),ds=Ho((function(e,t){return e\u003C=t}));function hs(e){if(!e)return[];if(Va(e))return cs(e)?gn(e):Bo(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=mi(e);return(t==_?un:t==C?dn:Ds)(e)}function ps(e){return e?(e=vs(e))===h||e===-1/0?17976931348623157e292*(e\u003C0?-1:1):e==e?e:0:0===e?e:0}function gs(e){var t=ps(e),n=t%1;return t==t?n?t-n:t:0}function ms(e){return e?cr(gs(e),0,m):0}function vs(e){if(\"number\"==typeof e)return e;if(us(e))return g;if(ts(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=ve.test(e);return n||we.test(e)?dt(e.slice(2),n?2:8):me.test(e)?g:+e}function ys(e){return Ro(e,js(e))}function ws(e){return null==e?\"\":lo(e)}var bs=Po((function(e,t){if(_i(t)||Va(t))Ro(t,Rs(t),e);else for(var n in t)Le.call(t,n)&&nr(e,n,t[n])})),As=Po((function(e,t){Ro(t,js(t),e)})),Ss=Po((function(e,t,n,r){Ro(t,js(t),e,r)})),xs=Po((function(e,t,n,r){Ro(t,Rs(t),e,r)})),Es=oi(sr);var _s=Yr((function(e,t){e=Ie(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&Ai(t[0],t[1],i)&&(r=1);++n\u003Cr;)for(var a=t[n],s=js(a),c=-1,u=s.length;++c\u003Cu;){var l=s[c],f=e[l];(f===o||Da(f,je[l])&&!Le.call(e,l))&&(e[l]=a[l])}return e})),ks=Yr((function(e){return e.push(o,ti),It(Ns,o,e)}));function Is(e,t,n){var r=null==e?o:Er(e,t);return r===o?n:r}function Ts(e,t){return null!=e&&vi(e,t,Or)}var Os=qo((function(e,t,n){null!=t&&\"function\"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),tc(oc)),Cs=qo((function(e,t,n){null!=t&&\"function\"!=typeof t.toString&&(t=Ue.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),li),Bs=Yr(Br);function Rs(e){return Va(e)?Yn(e):Mr(e)}function js(e){return Va(e)?Yn(e,!0):zr(e)}var Ps=Po((function(e,t,n){qr(e,t,n)})),Ns=Po((function(e,t,n,r){qr(e,t,n,r)})),Ls=oi((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=Ao(t,e),r||(r=t.length>1),t})),Ro(e,ai(e),n),r&&(n=ur(n,7,ni));for(var o=t.length;o--;)ho(n,t[o]);return n}));var Ms=oi((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return Ts(e,n)}))}(e,t)}));function zs(e,t){if(null==e)return{};var n=Nt(ai(e),(function(e){return[e]}));return t=li(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var Us=Qo(Rs),$s=Qo(js);function Ds(e){return null==e?[]:en(e,Rs(e))}var Fs=zo((function(e,t,n){return t=t.toLowerCase(),e+(n?qs(t):t)}));function qs(e){return Ys(ws(e).toLowerCase())}function Ws(e){return(e=ws(e))&&e.replace(Ae,on).replace(tt,\"\")}var Ks=zo((function(e,t,n){return e+(n?\"-\":\"\")+t.toLowerCase()})),Gs=zo((function(e,t,n){return e+(n?\" \":\"\")+t.toLowerCase()})),Vs=Mo(\"toLowerCase\");var Hs=zo((function(e,t,n){return e+(n?\"_\":\"\")+t.toLowerCase()}));var Js=zo((function(e,t,n){return e+(n?\" \":\"\")+Ys(t)}));var Zs=zo((function(e,t,n){return e+(n?\" \":\"\")+t.toUpperCase()})),Ys=Mo(\"toUpperCase\");function Qs(e,t,n){return e=ws(e),(t=n?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Xs=Yr((function(e,t){try{return It(e,o,t)}catch(e){return Ya(e)?e:new Ee(e)}})),ec=oi((function(e,t){return Ot(t,(function(t){t=zi(t),ar(e,t,Ca(e[t],e))})),e}));function tc(e){return function(){return e}}var nc=Do(),rc=Do(!0);function oc(e){return e}function ic(e){return Lr(\"function\"==typeof e?e:ur(e,1))}var ac=Yr((function(e,t){return function(n){return Br(n,e,t)}})),sc=Yr((function(e,t){return function(n){return Br(e,n,t)}}));function cc(e,t,n){var r=Rs(t),o=xr(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=xr(t,Rs(t)));var i=!(ts(n)&&\"chain\"in n&&!n.chain),a=Qa(e);return Ot(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Bo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function uc(){}var lc=Ko(Nt),fc=Ko(Bt),dc=Ko(Ut);function hc(e){return Si(e)?Vt(zi(e)):function(e){return function(t){return Er(t,e)}}(e)}var pc=Vo(),gc=Vo(!0);function mc(){return[]}function vc(){return!1}var yc=Wo((function(e,t){return e+t}),0),wc=Zo(\"ceil\"),bc=Wo((function(e,t){return e/t}),1),Ac=Zo(\"floor\");var Sc,xc=Wo((function(e,t){return e*t}),1),Ec=Zo(\"round\"),_c=Wo((function(e,t){return e-t}),0);return Dn.after=function(e,t){if(\"function\"!=typeof t)throw new Ce(i);return e=gs(e),function(){if(--e\u003C1)return t.apply(this,arguments)}},Dn.ary=Ta,Dn.assign=bs,Dn.assignIn=As,Dn.assignInWith=Ss,Dn.assignWith=xs,Dn.at=Es,Dn.before=Oa,Dn.bind=Ca,Dn.bindAll=ec,Dn.bindKey=Ba,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Dn.chain=ha,Dn.chunk=function(e,t,n){t=(n?Ai(e,t,n):t===o)?1:wn(gs(t),0);var i=null==e?0:e.length;if(!i||t\u003C1)return[];for(var a=0,s=0,c=r(pt(i/t));a\u003Ci;)c[s++]=oo(e,a,a+=t);return c},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t\u003Cn;){var i=e[t];i&&(o[r++]=i)}return o},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Lt(Ka(n)?Bo(n):[n],yr(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,n=li();return e=t?Nt(e,(function(e){if(\"function\"!=typeof e[1])throw new Ce(i);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r\u003Ct;){var o=e[r];if(It(o[0],this,n))return It(o[1],this,n)}}))},Dn.conforms=function(e){return function(e){var t=Rs(e);return function(n){return lr(n,e,t)}}(ur(e,1))},Dn.constant=tc,Dn.countBy=ma,Dn.create=function(e,t){var n=Fn(e);return null==t?n:ir(n,t)},Dn.curry=function e(t,n,r){var i=Xo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,n,r){var i=Xo(t,c,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Dn.debounce=Ra,Dn.defaults=_s,Dn.defaultsDeep=ks,Dn.defer=ja,Dn.delay=Pa,Dn.difference=Di,Dn.differenceBy=Fi,Dn.differenceWith=qi,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?oo(e,(t=n||t===o?1:gs(t))\u003C0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?oo(e,0,(t=r-(t=n||t===o?1:gs(t)))\u003C0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?go(e,li(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?go(e,li(t,3),!0):[]},Dn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&\"number\"!=typeof n&&Ai(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=gs(n))\u003C0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:gs(r))\u003C0&&(r+=i),r=n>r?0:ms(r);n\u003Cr;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Ka(e)?Rt:vr)(e,li(t,3))},Dn.flatMap=function(e,t){return yr(Ea(e,t),1)},Dn.flatMapDeep=function(e,t){return yr(Ea(e,t),h)},Dn.flatMapDepth=function(e,t,n){return n=n===o?1:gs(n),yr(Ea(e,t),n)},Dn.flatten=Gi,Dn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,h):[]},Dn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===o?1:gs(t)):[]},Dn.flip=function(e){return Xo(e,512)},Dn.flow=nc,Dn.flowRight=rc,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t\u003Cn;){var o=e[t];r[o[0]]=o[1]}return r},Dn.functions=function(e){return null==e?[]:xr(e,Rs(e))},Dn.functionsIn=function(e){return null==e?[]:xr(e,js(e))},Dn.groupBy=Aa,Dn.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Dn.intersection=Hi,Dn.intersectionBy=Ji,Dn.intersectionWith=Zi,Dn.invert=Os,Dn.invertBy=Cs,Dn.invokeMap=Sa,Dn.iteratee=ic,Dn.keyBy=xa,Dn.keys=Rs,Dn.keysIn=js,Dn.map=Ea,Dn.mapKeys=function(e,t){var n={};return t=li(t,3),Ar(e,(function(e,r,o){ar(n,t(e,r,o),e)})),n},Dn.mapValues=function(e,t){var n={};return t=li(t,3),Ar(e,(function(e,r,o){ar(n,r,t(e,r,o))})),n},Dn.matches=function(e){return Dr(ur(e,1))},Dn.matchesProperty=function(e,t){return Fr(e,ur(t,1))},Dn.memoize=Na,Dn.merge=Ps,Dn.mergeWith=Ns,Dn.method=ac,Dn.methodOf=sc,Dn.mixin=cc,Dn.negate=La,Dn.nthArg=function(e){return e=gs(e),Yr((function(t){return Wr(t,e)}))},Dn.omit=Ls,Dn.omitBy=function(e,t){return zs(e,La(li(t)))},Dn.once=function(e){return Oa(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?o:n)||(n=null==n?[]:[n]),Kr(e,t,n))},Dn.over=lc,Dn.overArgs=Ma,Dn.overEvery=fc,Dn.overSome=dc,Dn.partial=za,Dn.partialRight=Ua,Dn.partition=_a,Dn.pick=Ms,Dn.pickBy=zs,Dn.property=hc,Dn.propertyOf=function(e){return function(t){return null==e?o:Er(e,t)}},Dn.pull=Qi,Dn.pullAll=Xi,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,li(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,o,n):e},Dn.pullAt=ea,Dn.range=pc,Dn.rangeRight=gc,Dn.rearg=$a,Dn.reject=function(e,t){return(Ka(e)?Rt:vr)(e,La(li(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=li(t,3);++r\u003Ci;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Hr(e,o),n},Dn.rest=function(e,t){if(\"function\"!=typeof e)throw new Ce(i);return Yr(e,t=t===o?t:gs(t))},Dn.reverse=ta,Dn.sampleSize=function(e,t,n){return t=(n?Ai(e,t,n):t===o)?1:gs(t),(Ka(e)?Xn:Xr)(e,t)},Dn.set=function(e,t,n){return null==e?e:eo(e,t,n)},Dn.setWith=function(e,t,n,r){return r=\"function\"==typeof r?r:o,null==e?e:eo(e,t,n,r)},Dn.shuffle=function(e){return(Ka(e)?er:ro)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&\"number\"!=typeof n&&Ai(e,t,n)?(t=0,n=r):(t=null==t?0:gs(t),n=n===o?r:gs(n)),oo(e,t,n)):[]},Dn.sortBy=ka,Dn.sortedUniq=function(e){return e&&e.length?co(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?co(e,li(t,2)):[]},Dn.split=function(e,t,n){return n&&\"number\"!=typeof n&&Ai(e,t,n)&&(t=n=o),(n=n===o?m:n>>>0)?(e=ws(e))&&(\"string\"==typeof t||null!=t&&!as(t))&&!(t=lo(t))&&cn(e)?xo(gn(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if(\"function\"!=typeof e)throw new Ce(i);return t=null==t?0:wn(gs(t),0),Yr((function(n){var r=n[t],o=xo(n,0,t);return r&&Lt(o,r),It(e,this,o)}))},Dn.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?oo(e,0,(t=n||t===o?1:gs(t))\u003C0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?oo(e,(t=r-(t=n||t===o?1:gs(t)))\u003C0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?go(e,li(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?go(e,li(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,n){var r=!0,o=!0;if(\"function\"!=typeof e)throw new Ce(i);return ts(n)&&(r=\"leading\"in n?!!n.leading:r,o=\"trailing\"in n?!!n.trailing:o),Ra(e,t,{leading:r,maxWait:t,trailing:o})},Dn.thru=pa,Dn.toArray=hs,Dn.toPairs=Us,Dn.toPairsIn=$s,Dn.toPath=function(e){return Ka(e)?Nt(e,zi):us(e)?[e]:Bo(Mi(ws(e)))},Dn.toPlainObject=ys,Dn.transform=function(e,t,n){var r=Ka(e),o=r||Ja(e)||ls(e);if(t=li(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Qa(i)?Fn(Ve(e)):{}}return(o?Ot:Ar)(e,(function(e,r,o){return t(n,e,r,o)})),n},Dn.unary=function(e){return Ta(e,1)},Dn.union=na,Dn.unionBy=ra,Dn.unionWith=oa,Dn.uniq=function(e){return e&&e.length?fo(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?fo(e,li(t,2)):[]},Dn.uniqWith=function(e,t){return t=\"function\"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Dn.unset=function(e,t){return null==e||ho(e,t)},Dn.unzip=ia,Dn.unzipWith=aa,Dn.update=function(e,t,n){return null==e?e:po(e,t,bo(n))},Dn.updateWith=function(e,t,n,r){return r=\"function\"==typeof r?r:o,null==e?e:po(e,t,bo(n),r)},Dn.values=Ds,Dn.valuesIn=function(e){return null==e?[]:en(e,js(e))},Dn.without=sa,Dn.words=Qs,Dn.wrap=function(e,t){return za(bo(t),e)},Dn.xor=ca,Dn.xorBy=ua,Dn.xorWith=la,Dn.zip=fa,Dn.zipObject=function(e,t){return yo(e||[],t||[],nr)},Dn.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Dn.zipWith=da,Dn.entries=Us,Dn.entriesIn=$s,Dn.extend=As,Dn.extendWith=Ss,cc(Dn,Dn),Dn.add=yc,Dn.attempt=Xs,Dn.camelCase=Fs,Dn.capitalize=qs,Dn.ceil=wc,Dn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=vs(n))==n?n:0),t!==o&&(t=(t=vs(t))==t?t:0),cr(vs(e),t,n)},Dn.clone=function(e){return ur(e,4)},Dn.cloneDeep=function(e){return ur(e,5)},Dn.cloneDeepWith=function(e,t){return ur(e,5,t=\"function\"==typeof t?t:o)},Dn.cloneWith=function(e,t){return ur(e,4,t=\"function\"==typeof t?t:o)},Dn.conformsTo=function(e,t){return null==t||lr(e,t,Rs(t))},Dn.deburr=Ws,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=bc,Dn.endsWith=function(e,t,n){e=ws(e),t=lo(t);var r=e.length,i=n=n===o?r:cr(gs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=Da,Dn.escape=function(e){return(e=ws(e))&&Y.test(e)?e.replace(J,an):e},Dn.escapeRegExp=function(e){return(e=ws(e))&&ie.test(e)?e.replace(oe,\"\\\\$&\"):e},Dn.every=function(e,t,n){var r=Ka(e)?Bt:gr;return n&&Ai(e,t,n)&&(t=o),r(e,li(t,3))},Dn.find=va,Dn.findIndex=Wi,Dn.findKey=function(e,t){return Dt(e,li(t,3),Ar)},Dn.findLast=ya,Dn.findLastIndex=Ki,Dn.findLastKey=function(e,t){return Dt(e,li(t,3),Sr)},Dn.floor=Ac,Dn.forEach=wa,Dn.forEachRight=ba,Dn.forIn=function(e,t){return null==e?e:wr(e,li(t,3),js)},Dn.forInRight=function(e,t){return null==e?e:br(e,li(t,3),js)},Dn.forOwn=function(e,t){return e&&Ar(e,li(t,3))},Dn.forOwnRight=function(e,t){return e&&Sr(e,li(t,3))},Dn.get=Is,Dn.gt=Fa,Dn.gte=qa,Dn.has=function(e,t){return null!=e&&vi(e,t,Tr)},Dn.hasIn=Ts,Dn.head=Vi,Dn.identity=oc,Dn.includes=function(e,t,n,r){e=Va(e)?e:Ds(e),n=n&&!r?gs(n):0;var o=e.length;return n\u003C0&&(n=wn(o+n,0)),cs(e)?n\u003C=o&&e.indexOf(t,n)>-1:!!o&&qt(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:gs(n);return o\u003C0&&(o=wn(r+o,0)),qt(e,t,o)},Dn.inRange=function(e,t,n){return t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n){return e>=bn(t,n)&&e\u003Cwn(t,n)}(e=vs(e),t,n)},Dn.invoke=Bs,Dn.isArguments=Wa,Dn.isArray=Ka,Dn.isArrayBuffer=Ga,Dn.isArrayLike=Va,Dn.isArrayLikeObject=Ha,Dn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&kr(e)==b},Dn.isBuffer=Ja,Dn.isDate=Za,Dn.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(Va(e)&&(Ka(e)||\"string\"==typeof e||\"function\"==typeof e.splice||Ja(e)||ls(e)||Wa(e)))return!e.length;var t=mi(e);if(t==_||t==C)return!e.size;if(_i(e))return!Mr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return jr(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n=\"function\"==typeof n?n:o)?n(e,t):o;return r===o?jr(e,t,o,n):!!r},Dn.isError=Ya,Dn.isFinite=function(e){return\"number\"==typeof e&&bt(e)},Dn.isFunction=Qa,Dn.isInteger=Xa,Dn.isLength=es,Dn.isMap=rs,Dn.isMatch=function(e,t){return e===t||Pr(e,t,di(t))},Dn.isMatchWith=function(e,t,n){return n=\"function\"==typeof n?n:o,Pr(e,t,di(t),n)},Dn.isNaN=function(e){return os(e)&&e!=+e},Dn.isNative=function(e){if(Ei(e))throw new Ee(\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\");return Nr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=os,Dn.isObject=ts,Dn.isObjectLike=ns,Dn.isPlainObject=is,Dn.isRegExp=as,Dn.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e\u003C=p},Dn.isSet=ss,Dn.isString=cs,Dn.isSymbol=us,Dn.isTypedArray=ls,Dn.isUndefined=function(e){return e===o},Dn.isWeakMap=function(e){return ns(e)&&mi(e)==j},Dn.isWeakSet=function(e){return ns(e)&&\"[object WeakSet]\"==kr(e)},Dn.join=function(e,t){return null==e?\"\":$t.call(e,t)},Dn.kebabCase=Ks,Dn.last=Yi,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=gs(n))\u003C0?wn(r+i,0):bn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ft(e,Kt,i,!0)},Dn.lowerCase=Gs,Dn.lowerFirst=Vs,Dn.lt=fs,Dn.lte=ds,Dn.max=function(e){return e&&e.length?mr(e,oc,Ir):o},Dn.maxBy=function(e,t){return e&&e.length?mr(e,li(t,2),Ir):o},Dn.mean=function(e){return Gt(e,oc)},Dn.meanBy=function(e,t){return Gt(e,li(t,2))},Dn.min=function(e){return e&&e.length?mr(e,oc,Ur):o},Dn.minBy=function(e,t){return e&&e.length?mr(e,li(t,2),Ur):o},Dn.stubArray=mc,Dn.stubFalse=vc,Dn.stubObject=function(){return{}},Dn.stubString=function(){return\"\"},Dn.stubTrue=function(){return!0},Dn.multiply=xc,Dn.nth=function(e,t){return e&&e.length?Wr(e,gs(t)):o},Dn.noConflict=function(){return gt._===this&&(gt._=De),this},Dn.noop=uc,Dn.now=Ia,Dn.pad=function(e,t,n){e=ws(e);var r=(t=gs(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Go(mt(o),n)+e+Go(pt(o),n)},Dn.padEnd=function(e,t,n){e=ws(e);var r=(t=gs(t))?pn(e):0;return t&&r\u003Ct?e+Go(t-r,n):e},Dn.padStart=function(e,t,n){e=ws(e);var r=(t=gs(t))?pn(e):0;return t&&r\u003Ct?Go(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Sn(ws(e).replace(ae,\"\"),t||0)},Dn.random=function(e,t,n){if(n&&\"boolean\"!=typeof n&&Ai(e,t,n)&&(t=n=o),n===o&&(\"boolean\"==typeof t?(n=t,t=o):\"boolean\"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=ps(e),t===o?(t=e,e=0):t=ps(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=xn();return bn(e+i*(t-e+ft(\"1e-\"+((i+\"\").length-1))),t)}return Jr(e,t)},Dn.reduce=function(e,t,n){var r=Ka(e)?Mt:Jt,o=arguments.length\u003C3;return r(e,li(t,4),n,o,hr)},Dn.reduceRight=function(e,t,n){var r=Ka(e)?zt:Jt,o=arguments.length\u003C3;return r(e,li(t,4),n,o,pr)},Dn.repeat=function(e,t,n){return t=(n?Ai(e,t,n):t===o)?1:gs(t),Zr(ws(e),t)},Dn.replace=function(){var e=arguments,t=ws(e[0]);return e.length\u003C3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=Ao(t,e)).length;for(i||(i=1,e=o);++r\u003Ci;){var a=null==e?o:e[zi(t[r])];a===o&&(r=i,a=n),e=Qa(a)?a.call(e):a}return e},Dn.round=Ec,Dn.runInContext=e,Dn.sample=function(e){return(Ka(e)?Qn:Qr)(e)},Dn.size=function(e){if(null==e)return 0;if(Va(e))return cs(e)?pn(e):e.length;var t=mi(e);return t==_||t==C?e.size:Mr(e).length},Dn.snakeCase=Hs,Dn.some=function(e,t,n){var r=Ka(e)?Ut:io;return n&&Ai(e,t,n)&&(t=o),r(e,li(t,3))},Dn.sortedIndex=function(e,t){return ao(e,t)},Dn.sortedIndexBy=function(e,t,n){return so(e,t,li(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ao(e,t);if(r\u003Cn&&Da(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return ao(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return so(e,t,li(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=ao(e,t,!0)-1;if(Da(e[n],t))return n}return-1},Dn.startCase=Js,Dn.startsWith=function(e,t,n){return e=ws(e),n=null==n?0:cr(gs(n),0,e.length),t=lo(t),e.slice(n,n+t.length)==t},Dn.subtract=_c,Dn.sum=function(e){return e&&e.length?Zt(e,oc):0},Dn.sumBy=function(e,t){return e&&e.length?Zt(e,li(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&Ai(e,t,n)&&(t=o),e=ws(e),t=Ss({},t,r,ei);var i,a,s=Ss({},t.imports,r.imports,ei),c=Rs(s),u=en(s,c),l=0,f=t.interpolate||Se,d=\"__p += '\",h=Te((t.escape||Se).source+\"|\"+f.source+\"|\"+(f===ee?pe:Se).source+\"|\"+(t.evaluate||Se).source+\"|$\",\"g\"),p=\"//# sourceURL=\"+(Le.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++st+\"]\")+\"\\n\";e.replace(h,(function(t,n,r,o,s,c){return r||(r=o),d+=e.slice(l,c).replace(xe,sn),n&&(i=!0,d+=\"' +\\n__e(\"+n+\") +\\n'\"),s&&(a=!0,d+=\"';\\n\"+s+\";\\n__p += '\"),r&&(d+=\"' +\\n((__t = (\"+r+\")) == null ? '' : __t) +\\n'\"),l=c+t.length,t})),d+=\"';\\n\";var g=Le.call(t,\"variable\")&&t.variable;if(g){if(de.test(g))throw new Ee(\"Invalid `variable` option passed into `_.template`\")}else d=\"with (obj) {\\n\"+d+\"\\n}\\n\";d=(a?d.replace(K,\"\"):d).replace(G,\"$1\").replace(V,\"$1;\"),d=\"function(\"+(g||\"obj\")+\") {\\n\"+(g?\"\":\"obj || (obj = {});\\n\")+\"var __t, __p = ''\"+(i?\", __e = _.escape\":\"\")+(a?\", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, '') }\\n\":\";\\n\")+d+\"return __p\\n}\";var m=Xs((function(){return _e(c,p+\"return \"+d).apply(o,u)}));if(m.source=d,Ya(m))throw m;return m},Dn.times=function(e,t){if((e=gs(e))\u003C1||e>p)return[];var n=m,r=bn(e,m);t=li(t),e-=m;for(var o=Yt(r,t);++n\u003Ce;)t(n);return o},Dn.toFinite=ps,Dn.toInteger=gs,Dn.toLength=ms,Dn.toLower=function(e){return ws(e).toLowerCase()},Dn.toNumber=vs,Dn.toSafeInteger=function(e){return e?cr(gs(e),-9007199254740991,p):0===e?e:0},Dn.toString=ws,Dn.toUpper=function(e){return ws(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ws(e))&&(n||t===o))return Qt(e);if(!e||!(t=lo(t)))return e;var r=gn(e),i=gn(t);return xo(r,nn(r,i),rn(r,i)+1).join(\"\")},Dn.trimEnd=function(e,t,n){if((e=ws(e))&&(n||t===o))return e.slice(0,mn(e)+1);if(!e||!(t=lo(t)))return e;var r=gn(e);return xo(r,0,rn(r,gn(t))+1).join(\"\")},Dn.trimStart=function(e,t,n){if((e=ws(e))&&(n||t===o))return e.replace(ae,\"\");if(!e||!(t=lo(t)))return e;var r=gn(e);return xo(r,nn(r,gn(t))).join(\"\")},Dn.truncate=function(e,t){var n=30,r=\"...\";if(ts(t)){var i=\"separator\"in t?t.separator:i;n=\"length\"in t?gs(t.length):n,r=\"omission\"in t?lo(t.omission):r}var a=(e=ws(e)).length;if(cn(e)){var s=gn(e);a=s.length}if(n>=a)return e;var c=n-pn(r);if(c\u003C1)return r;var u=s?xo(s,0,c).join(\"\"):e.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),as(i)){if(e.slice(c).search(i)){var l,f=u;for(i.global||(i=Te(i.source,ws(ge.exec(i))+\"g\")),i.lastIndex=0;l=i.exec(f);)var d=l.index;u=u.slice(0,d===o?c:d)}}else if(e.indexOf(lo(i),c)!=c){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+r},Dn.unescape=function(e){return(e=ws(e))&&Z.test(e)?e.replace(H,vn):e},Dn.uniqueId=function(e){var t=++Me;return ws(e)+t},Dn.upperCase=Zs,Dn.upperFirst=Ys,Dn.each=wa,Dn.eachRight=ba,Dn.first=Vi,cc(Dn,(Sc={},Ar(Dn,(function(e,t){Le.call(Dn.prototype,t)||(Sc[t]=e)})),Sc),{chain:!1}),Dn.VERSION=\"4.17.21\",Ot([\"bind\",\"bindKey\",\"curry\",\"curryRight\",\"partial\",\"partialRight\"],(function(e){Dn[e].placeholder=Dn})),Ot([\"drop\",\"take\"],(function(e,t){Kn.prototype[e]=function(n){n=n===o?1:wn(gs(n),0);var r=this.__filtered__&&!t?new Kn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__\u003C0?\"Right\":\"\")}),r},Kn.prototype[e+\"Right\"]=function(t){return this.reverse()[e](t).reverse()}})),Ot([\"filter\",\"map\",\"takeWhile\"],(function(e,t){var n=t+1,r=1==n||3==n;Kn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot([\"head\",\"last\"],(function(e,t){var n=\"take\"+(t?\"Right\":\"\");Kn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot([\"initial\",\"tail\"],(function(e,t){var n=\"drop\"+(t?\"\":\"Right\");Kn.prototype[e]=function(){return this.__filtered__?new Kn(this):this[n](1)}})),Kn.prototype.compact=function(){return this.filter(oc)},Kn.prototype.find=function(e){return this.filter(e).head()},Kn.prototype.findLast=function(e){return this.reverse().find(e)},Kn.prototype.invokeMap=Yr((function(e,t){return\"function\"==typeof e?new Kn(this):this.map((function(n){return Br(n,e,t)}))})),Kn.prototype.reject=function(e){return this.filter(La(li(e)))},Kn.prototype.slice=function(e,t){e=gs(e);var n=this;return n.__filtered__&&(e>0||t\u003C0)?new Kn(n):(e\u003C0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=gs(t))\u003C0?n.dropRight(-t):n.take(t-e)),n)},Kn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Kn.prototype.toArray=function(){return this.take(m)},Ar(Kn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Dn[r?\"take\"+(\"last\"==t?\"Right\":\"\"):t],a=r||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,c=t instanceof Kn,u=s[0],l=c||Ka(t),f=function(e){var t=i.apply(Dn,Lt([e],s));return r&&d?t[0]:t};l&&n&&\"function\"==typeof u&&1!=u.length&&(c=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,g=c&&!h;if(!a&&l){t=g?t:new Kn(this);var m=e.apply(t,s);return m.__actions__.push({func:pa,args:[f],thisArg:o}),new Wn(m,d)}return p&&g?e.apply(this,s):(m=this.thru(f),p?r?m.value()[0]:m.value():m)})})),Ot([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],(function(e){var t=Be[e],n=/^(?:push|sort|unshift)$/.test(e)?\"tap\":\"thru\",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ka(o)?o:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),Ar(Kn.prototype,(function(e,t){var n=Dn[t];if(n){var r=n.name+\"\";Le.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[Fo(o,2).name]=[{name:\"wrapper\",func:o}],Kn.prototype.clone=function(){var e=new Kn(this.__wrapped__);return e.__actions__=Bo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Bo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Bo(this.__views__),e},Kn.prototype.reverse=function(){if(this.__filtered__){var e=new Kn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Kn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t\u003C0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r\u003Co;){var i=n[r],a=i.size;switch(i.type){case\"drop\":e+=a;break;case\"dropRight\":t-=a;break;case\"take\":t=bn(t,e+a);break;case\"takeRight\":e=wn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,f=l.length,d=0,h=bn(c,this.__takeCount__);if(!n||!r&&o==c&&h==c)return mo(e,this.__actions__);var p=[];e:for(;c--&&d\u003Ch;){for(var g=-1,m=e[u+=t];++g\u003Cf;){var v=l[g],y=v.iteratee,w=v.type,b=y(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}p[d++]=m}return p},Dn.prototype.at=ga,Dn.prototype.chain=function(){return ha(this)},Dn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Dn.prototype.next=function(){this.__values__===o&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof qn;){var r=$i(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Kn){var t=e;return this.__actions__.length&&(t=new Kn(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ta],t/\�A�hisArg:o}),new Wn(t,this.__chain__)}return this.thru(ta)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return mo(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Qe&&(Dn.prototype[Qe]=function(){return this}),Dn}();gt._=yn,(r=function(){return yn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},5276:(e,t,n)=>{var r=n(4497),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},5288:(e,t,n)=>{var r=n(358),o=n(7200),i=n(6529);e.exports=function(e){return i(e)?r(e,!0):o(e)}},5353:(e,t,n)=>{var r=n(8638);e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,r(e,128,void 0,void 0,void 0,void 0,t)}},5387:e=>{e.exports=function(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e\u003C=9007199254740991}},5512:(e,t,n)=>{var r=n(4943),o=n(3316)(r);e.exports=o},5568:e=>{e.exports=function(e,t){return e.has(t)}},5620:(e,t,n)=>{var r=n(8788),o=n(9141),i=n(796),a=n(33);e.exports=function(e,t,n){var s=t+\"\";return i(e,o(s,a(r(s),n)))}},5650:(e,t,n)=>{var r=n(8942).Symbol;e.exports=r},5681:(e,t,n)=>{var r=n(4700);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},5755:e=>{var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,a=e.length,s=-1,c=r.length,u=-1,l=n.length,f=t(a-c,0),d=Array(f+l),h=!o;++i\u003Cf;)d[i]=e[i];for(var p=i;++u\u003Cl;)d[p+u]=n[u];for(;++s\u003Cc;)(h||i\u003Ca)&&(d[p+r[s]]=e[i++]);return d}},5832:(e,t,n)=>{var r=n(1129),o=n(4784),i=n(7979),a=n(9306),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},5853:(e,t,n)=>{e=n.nmd(e);var r=n(8942),o=n(4772),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},5857:(e,t,n)=>{var r=n(313);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},5894:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},5899:(e,t,n)=>{var r=n(3526),o=n(3283),i=n(3142),a=n(9632),s=n(5387),c=n(6040);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,f=!1;++u\u003Cl;){var d=c(t[u]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++u!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(d,l)&&(i(e)||o(e))}},5962:e=>{e.exports=function(){}},5964:(e,t,n)=>{var r=n(9747),o=n(4784),i=n(4882);e.exports=function(e){return\"function\"!=typeof e.constructor||i(e)?{}:r(o(e))}},6027:(e,t,n)=>{var r=n(7379),o=n(547);e.exports=function(e){return o(e)&&\"[object Arguments]\"==r(e)}},6040:(e,t,n)=>{var r=n(1187);e.exports=function(e){if(\"string\"==typeof e||r(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-Infinity?\"-0\":t}},6065:(e,t,n)=>{var r=n(9270),o=r&&new r;e.exports=o},6123:(e,t,n)=>{var r=n(7923);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},6131:(e,t,n)=>{var r=n(6403),o=n(1580),i=n(1187),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if(\"number\"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},6137:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n\u003Ce;)r[n]=t(n);return r}},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6341:(e,t,n)=>{var r=n(6912),o=n(4364),i=n(8942);e.exports=function(e,t,n,a){var s=1&t,c=o(e);return function t(){for(var o=-1,u=arguments.length,l=-1,f=a.length,d=Array(f+u),h=this&&this!==i&&this instanceof t?c:e;++l\u003Cf;)d[l]=a[l];for(;u--;)d[l++]=arguments[++o];return r(h,s?n:this,d)}}},6403:(e,t,n)=>{var r=n(2945),o=/^\\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,\"\"):e}},6465:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n\u003Cr;)if(t(e[n],n,e))return!0;return!1}},6493:(e,t,n)=>{var r=n(6853),o=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,i=/\\\\(\\\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(\"\"),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,\"$1\"):n||e)})),t}));e.exports=a},6526:(e,t,n)=>{var r=n(8330),o=n(4367),i=n(3904);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6529:(e,t,n)=>{var r=n(3655),o=n(5387);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},6591:(e,t,n)=>{var r=n(4354),o=n(9632),i=Math.min;e.exports=function(e,t){for(var n=e.length,a=i(t.length,n),s=r(e);a--;){var c=t[a];e[a]=o(c,n)?s[c]:void 0}return e}},6638:(e,t,n)=>{var r=n(1386),o=n(9770),i=n(8250);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length\u003C199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},6648:(e,t,n)=>{var r=n(7553),o=n(5196),i=n(961),a=n(3321);e.exports=function(e){var t=i(e),n=a[t];if(\"function\"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var s=o(n);return!!s&&e===s[0]}},6713:(e,t,n)=>{var r=n(4364),o=n(8942);e.exports=function(e,t,n){var i=1&t,a=r(e);return function t(){return(this&&this!==o&&this instanceof t?a:e).apply(i?n:this,arguments)}}},6850:e=>{e.exports=function(e){return e.placeholder}},6853:(e,t,n)=>{var r=n(9011);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},6912:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},7028:(e,t,n)=>{var r=n(4977),o=n(5755),i=n(8813),a=\"__lodash_placeholder__\",s=128,c=Math.min;e.exports=function(e,t){var n=e[1],u=t[1],l=n|u,f=l\u003C131,d=u==s&&8==n||u==s&&256==n&&e[7].length\u003C=t[8]||384==u&&t[7].length\u003C=t[8]&&8==n;if(!f&&!d)return e;1&u&&(e[2]=t[2],l|=1&n?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?r(p,h,t[4]):h,e[4]=p?i(e[3],a):t[4]}return(h=t[5])&&(p=e[5],e[5]=p?o(p,h,t[6]):h,e[6]=p?i(e[5],a):t[6]),(h=t[7])&&(e[7]=h),u&s&&(e[8]=null==e[8]?t[8]:c(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}},7034:(e,t,n)=>{var r=n(6285);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},7073:(e,t,n)=>{var r=n(2532);e.exports=function(e,t,n){\"__proto__\"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},7099:(e,t,n)=>{e=n.nmd(e);var r=n(8942),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7144:(e,t,n)=>{var r=n(7034);e.exports=function(e){var t=this.__data__,n=r(t,e);return n\u003C0?void 0:t[n][1]}},7200:(e,t,n)=>{var r=n(1580),o=n(4882),i=n(8546),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)(\"constructor\"!=s||!t&&a.call(e,s))&&n.push(s);return n}},7250:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i\u003Co;)if(t(e[i],i,e))return i;return-1}},7267:(e,t,n)=>{var r=n(1580);e.exports=function(e){return e==e&&!r(e)}},7276:(e,t,n)=>{var r=n(3636),o=n(5899);e.exports=function(e,t){return null!=e&&o(e,t,r)}},7336:(e,t,n)=>{var r=n(8638);function o(e,t,n){var i=r(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return i.placeholder=o.placeholder,i}o.placeholder={},e.exports=o},7350:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&\"string\"==typeof e[0]&&t.call(e,\"index\")&&(r.index=e.index,r.input=e.input),r}},7379:(e,t,n)=>{var r=n(5650),o=n(8870),i=n(9005),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?\"[object Undefined]\":\"[object Null]\":a&&a in Object(e)?o(e):i(e)}},7403:(e,t,n)=>{var r=n(2619),o=n(2532),i=n(2053),a=o?function(e,t){return o(e,\"toString\",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},7452:(e,t,n)=>{var r=n(7034);e.exports=function(e){return r(this.__data__,e)>-1}},7462:e=>{e.exports=function(e){return this.__data__.has(e)}},7553:(e,t,n)=>{var r=n(9747),o=n(5962);function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},7642:(e,t,n)=>{var r=n(3301);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},7681:(e,t,n)=>{var r=n(777),o=n(9460),i=n(2306),a=i&&i.isMap,s=a?o(a):r;e.exports=s},7706:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r\u003Co;)if(e[r]===t)return r;return-1}},7769:(e,t,n)=>{var r=n(8486),o=n(547);e.exports=function(e){return o(e)&&\"[object WeakMap]\"==r(e)}},7923:(e,t,n)=>{var r=n(3526),o=n(6040);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n\u003Ci;)e=e[o(t[n++])];return n&&n==i?e:void 0}},7930:(e,t,n)=>{var r=n(9032),o=n(1211);e.exports=function(e,t){return e&&r(t,o(t),e)}},7979:(e,t,n)=>{var r=n(9847),o=n(9306),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},7991:(e,t)=>{\"use strict\";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),l=0,f=c>0?a-4:a;for(n=0;n\u003Cf;n+=4)t=r[e.charCodeAt(n)]\u003C\u003C18|r[e.charCodeAt(n+1)]\u003C\u003C12|r[e.charCodeAt(n+2)]\u003C\u003C6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=r[e.charCodeAt(n)]\u003C\u003C2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===c&&(t=r[e.charCodeAt(n)]\u003C\u003C10|r[e.charCodeAt(n+1)]\u003C\u003C4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;s\u003Cu;s+=a)i.push(c(e,s,s+a>u?u:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t\u003C\u003C4&63]+\"==\")):2===o&&(t=(e[r-2]\u003C\u003C8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t\u003C\u003C2&63]+\"=\"));return i.join(\"\")};for(var n=[],r=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0;a\u003C64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var n=e.indexOf(\"=\");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var o,i,a=[],s=t;s\u003Cr;s+=3)o=(e[s]\u003C\u003C16&16711680)+(e[s+1]\u003C\u003C8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join(\"\")}r[\"-\".charCodeAt(0)]=62,r[\"_\".charCodeAt(0)]=63},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},8055:(e,t,n)=>{e.exports={ary:n(5353),assign:n(7930),clone:n(2846),curry:n(7336),forEach:n(9968),isArray:n(3142),isError:n(441),isFunction:n(3655),isWeakMap:n(7769),iteratee:n(2590),keys:n(195),rearg:n(864),toInteger:n(7642),toPath:n(2613)}},8069:(e,t,n)=>{var r=n(5650),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},8121:(e,t,n)=>{var r=n(3766)(Object.keys,Object);e.exports=r},8244:(e,t,n)=>{var r=n(1129),o=n(3142);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},8250:(e,t,n)=>{var r=n(9753),o=n(5681),i=n(88),a=n(4732),s=n(9068);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t\u003Cn;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},8330:(e,t,n)=>{var r=n(1340),o=n(4687);e.exports=function(e,t,n,i){var a=n.length,s=a,c=!i;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a\u003Cs;){var l=(u=n[a])[0],f=e[l],d=u[1];if(c&&u[2]){if(void 0===f&&!(l in e))return!1}else{var h=new r;if(i)var p=i(f,d,l,e,t,h);if(!(void 0===p?o(d,f,3,i,h):p))return!1}}return!0}},8340:e=>{var t=/\\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},8360:(e,t,n)=>{var r=n(7379),o=n(4784),i=n(547),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!i(e)||\"[object Object]\"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof n&&n instanceof n&&c.call(n)==l}},8486:(e,t,n)=>{var r=n(3103),o=n(9770),i=n(9413),a=n(4512),s=n(9270),c=n(7379),u=n(4066),l=\"[object Map]\",f=\"[object Promise]\",d=\"[object Set]\",h=\"[object WeakMap]\",p=\"[object DataView]\",g=u(r),m=u(o),v=u(i),y=u(a),w=u(s),b=c;(r&&b(new r(new ArrayBuffer(1)))!=p||o&&b(new o)!=l||i&&b(i.resolve())!=f||a&&b(new a)!=d||s&&b(new s)!=h)&&(b=function(e){var t=c(e),n=\"[object Object]\"==t?e.constructor:void 0,r=n?u(n):\"\";if(r)switch(r){case g:return p;case m:return l;case v:return f;case y:return d;case w:return h}return t}),e.exports=b},8546:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},8638:(e,t,n)=>{var r=n(4943),o=n(6713),i=n(2443),a=n(3504),s=n(6341),c=n(5196),u=n(7028),l=n(5512),f=n(5620),d=n(7642),h=Math.max;e.exports=function(e,t,n,p,g,m,v,y){var w=2&t;if(!w&&\"function\"!=typeof e)throw new TypeError(\"Expected a function\");var b=p?p.length:0;if(b||(t&=-97,p=g=void 0),v=void 0===v?v:h(d(v),0),y=void 0===y?y:d(y),b-=g?g.length:0,64&t){var A=p,S=g;p=g=void 0}var x=w?void 0:c(e),E=[e,t,n,p,g,A,S,m,v,y];if(x&&u(E,x),e=E[0],t=E[1],n=E[2],p=E[3],g=E[4],!(y=E[9]=void 0===E[9]?w?0:e.length:h(E[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?i(e,t,y):32!=t&&33!=t||g.length?a.apply(void 0,E):s(e,t,n,p);else var _=o(e,t,n);return f((x?r:l)(_,E),e,t)}},8666:(e,t,n)=>{var r=n(674),o=n(9460),i=n(2306),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},8788:e=>{var t=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,n=/,? & /;e.exports=function(e){var r=e.match(t);return r?r[1].split(n):[]}},8813:e=>{var t=\"__lodash_placeholder__\";e.exports=function(e,n){for(var r=-1,o=e.length,i=0,a=[];++r\u003Co;){var s=e[r];s!==n&&s!==t||(e[r]=t,a[i++]=r)}return a}},8861:(e,t,n)=>{var r=n(5650),o=n(1623),i=n(6285),a=n(3934),s=n(5894),c=n(9828),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,d){switch(n){case\"[object DataView]\":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case\"[object ArrayBuffer]\":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return i(+e,+t);case\"[object Error]\":return e.name==t.name&&e.message==t.message;case\"[object RegExp]\":case\"[object String]\":return e==t+\"\";case\"[object Map]\":var h=s;case\"[object Set]\":var p=1&r;if(h||(h=c),e.size!=t.size&&!p)return!1;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var m=a(h(e),h(t),r,u,f,d);return d.delete(e),m;case\"[object Symbol]\":if(l)return l.call(e)==l.call(t)}return!1}},8870:(e,t,n)=>{var r=n(5650),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},8880:(e,t,n)=>{var r=n(7923);e.exports=function(e){return function(t){return r(t,e)}}},8898:(e,t,n)=>{var r=n(1623);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},8942:(e,t,n)=>{var r=n(4967),o=\"object\"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function(\"return this\")();e.exports=i},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9011:(e,t,n)=>{var r=n(8250);function o(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new TypeError(\"Expected a function\");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},9032:(e,t,n)=>{var r=n(3422),o=n(7073);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,c=t.length;++s\u003Cc;){var u=t[s],l=i?i(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),a?o(n,u,l):r(n,u,l)}return n}},9067:e=>{e.exports=function(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}},9068:(e,t,n)=>{var r=n(4700);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},9071:e=>{e.exports=function(){}},9141:e=>{var t=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;e.exports=function(e,n){var r=n.length;if(!r)return e;var o=r-1;return n[o]=(r>1?\"& \":\"\")+n[o],n=n.join(r>2?\", \":\" \"),e.replace(t,\"{\\n/* [wrapped with \"+n+\"] */\\n\")}},9270:(e,t,n)=>{var r=n(4715)(n(8942),\"WeakMap\");e.exports=r},9306:e=>{e.exports=function(){return[]}},9318:(e,t)=>{t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1\u003C\u003Cs)-1,u=c>>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1\u003C\u003C-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1\u003C\u003C-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1\u003C\u003Cu)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t\u003C0||0===t&&1/t\u003C0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))\u003C1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a\u003C\u003Co|s,u+=o;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*g}},9334:(e,t,n)=>{var r=n(1340),o=n(9968),i=n(3422),a=n(7930),s=n(125),c=n(7099),u=n(4354),l=n(3546),f=n(4733),d=n(393),h=n(3650),p=n(8486),g=n(7350),m=n(424),v=n(5964),y=n(3142),w=n(5853),b=n(7681),A=n(1580),S=n(3943),x=n(1211),E=n(5288),_=\"[object Arguments]\",k=\"[object Function]\",I=\"[object Object]\",T={};T[_]=T[\"[object Array]\"]=T[\"[object ArrayBuffer]\"]=T[\"[object DataView]\"]=T[\"[object Boolean]\"]=T[\"[object Date]\"]=T[\"[object Float32Array]\"]=T[\"[object Float64Array]\"]=T[\"[object Int8Array]\"]=T[\"[object Int16Array]\"]=T[\"[object Int32Array]\"]=T[\"[object Map]\"]=T[\"[object Number]\"]=T[I]=T[\"[object RegExp]\"]=T[\"[object Set]\"]=T[\"[object String]\"]=T[\"[object Symbol]\"]=T[\"[object Uint8Array]\"]=T[\"[object Uint8ClampedArray]\"]=T[\"[object Uint16Array]\"]=T[\"[object Uint32Array]\"]=!0,T[\"[object Error]\"]=T[k]=T[\"[object WeakMap]\"]=!1,e.exports=function e(t,n,O,C,B,R){var j,P=1&n,N=2&n,L=4&n;if(O&&(j=B?O(t,C,B,R):O(t)),void 0!==j)return j;if(!A(t))return t;var M=y(t);if(M){if(j=g(t),!P)return u(t,j)}else{var z=p(t),U=z==k||\"[object GeneratorFunction]\"==z;if(w(t))return c(t,P);if(z==I||z==_||U&&!B){if(j=N||U?{}:v(t),!P)return N?f(t,s(j,t)):l(t,a(j,t))}else{if(!T[z])return B?t:{};j=m(t,z,P)}}R||(R=new r);var $=R.get(t);if($)return $;R.set(t,j),S(t)?t.forEach((function(r){j.add(e(r,n,O,r,t,R))})):b(t)&&t.forEach((function(r,o){j.set(o,e(r,n,O,o,t,R))}));var D=M?void 0:(L?N?h:d:N?E:x)(t);return o(D||t,(function(r,o){D&&(r=t[o=r]),i(j,o,e(r,n,O,o,t,R))})),j}},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},9413:(e,t,n)=>{var r=n(4715)(n(8942),\"Promise\");e.exports=r},9454:e=>{e.exports=function(e){return e!=e}},9460:e=>{e.exports=function(e){return function(t){return e(t)}}},9624:(e,t,n)=>{var r=n(3655),o=n(4759),i=n(1580),a=n(4066),s=/^\\[object .+?Constructor\\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,d=RegExp(\"^\"+l.call(f).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:s).test(a(e))}},9632:e=>{var t=/^(?:0|[1-9]\\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&(\"number\"==r||\"symbol\"!=r&&t.test(e))&&e>-1&&e%1==0&&e\u003Cn}},9747:(e,t,n)=>{var r=n(1580),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9753:(e,t,n)=>{var r=n(5098),o=n(1386),i=n(9770);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},9756:(e,t,n)=>{var r=n(2478);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},9770:(e,t,n)=>{var r=n(4715)(n(8942),\"Map\");e.exports=r},9828:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},9847:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n\u003Cr;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},9968:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n\u003Cr&&!1!==t(e[n],n,e););return e}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{\"use strict\";n.r(r),n.d(r,{onAssetHistoricalPrice:()=>nw,onAssetsConversion:()=>ew,onAssetsLookup:()=>Xy,onCronjob:()=>Qy,onKeyringRequest:()=>Zy,onProtocolRequest:()=>tw,onRpcRequest:()=>Jy,onUserInput:()=>Yy});var e=function(){return e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n\u003Cr;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)},t=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";(()=>{const e=Array(256).fill(-1);for(let n=0;n\u003C58;++n)e[t.charCodeAt(n)]=n})();var o,i,a,s=e=>{if(!e||\"string\"!=typeof e)throw new Error(`Expected base58 string but got “${e}”`);if(e.match(/[IOl0]/gmu))throw new Error(`Invalid base58 character “${e.match(/[IOl0]/gmu)}”`);const n=e.match(/^1+/gmu),r=n?n[0].length:0,o=(e.length-r)*(Math.log(58)/Math.log(256))+1>>>0;return new Uint8Array([...new Uint8Array(r),...e.match(/.{1}/gmu).map((e=>t.indexOf(e))).reduce(((e,t)=>e.map((e=>{const n=58*e+t;return t=n>>8,n}))),new Uint8Array(o)).reverse().filter((i=!1,e=>i=i||e))]);var i},c=(o=function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.bech32m=t.bech32=void 0;const n=\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\",r={};for(let e=0;e\u003C32;e++){const t=n.charAt(e);r[t]=e}function o(e){const t=e>>25;return(33554431&e)\u003C\u003C5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function i(e){let t=1;for(let n=0;n\u003Ce.length;++n){const r=e.charCodeAt(n);if(r\u003C33||r>126)return\"Invalid prefix (\"+e+\")\";t=o(t)^r>>5}t=o(t);for(let n=0;n\u003Ce.length;++n){const r=e.charCodeAt(n);t=o(t)^31&r}return t}function a(e,t,n,r){let o=0,i=0;const a=(1\u003C\u003Cn)-1,s=[];for(let r=0;r\u003Ce.length;++r)for(o=o\u003C\u003Ct|e[r],i+=t;i>=n;)i-=n,s.push(o>>i&a);if(r)i>0&&s.push(o\u003C\u003Cn-i&a);else{if(i>=t)return\"Excess padding\";if(o\u003C\u003Cn-i&a)return\"Non-zero padding\"}return s}function s(e){return a(e,8,5,!0)}function c(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function a(e,n){if(n=n||90,e.length\u003C8)return e+\" too short\";if(e.length>n)return\"Exceeds length limit\";const a=e.toLowerCase(),s=e.toUpperCase();if(e!==a&&e!==s)return\"Mixed-case string \"+e;const c=(e=a).lastIndexOf(\"1\");if(-1===c)return\"No separator character for \"+e;if(0===c)return\"Missing prefix for \"+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length\u003C6)return\"Data too short\";let f=i(u);if(\"string\"==typeof f)return f;const d=[];for(let e=0;e\u003Cl.length;++e){const t=l.charAt(e),n=r[t];if(void 0===n)return\"Unknown character \"+t;f=o(f)^n,e+6>=l.length||d.push(n)}return f!==t?\"Invalid checksum for \"+e:{prefix:u,words:d}}return t=\"bech32\"===e?1:734539939,{decodeUnsafe:function(e,t){const n=a(e,t);if(\"object\"==typeof n)return n},decode:function(e,t){const n=a(e,t);if(\"object\"==typeof n)return n;throw new Error(n)},encode:function(e,r,a){if(a=a||90,e.length+7+r.length>a)throw new TypeError(\"Exceeds length limit\");let s=i(e=e.toLowerCase());if(\"string\"==typeof s)throw new Error(s);let c=e+\"1\";for(let e=0;e\u003Cr.length;++e){const t=r[e];if(t>>5!=0)throw new Error(\"Non 5-bit word\");s=o(s)^t,c+=n.charAt(t)}for(let e=0;e\u003C6;++e)s=o(s);s^=t;for(let e=0;e\u003C6;++e)c+=n.charAt(s>>5*(5-e)&31);return c},toWords:s,fromWordsUnsafe:c,fromWords:u}}t.bech32=l(\"bech32\"),t.bech32m=l(\"bech32m\")},o(i={exports:{}},i.exports),i.exports);(a=c)&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,\"default\")&&a.default;var u=c.bech32m,l=c.bech32;const f=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];class d{constructor(){this.A=1779033703,this.B=-1150833019,this.C=1013904242,this.D=-1521486534,this.E=1359893119,this.F=-1694144372,this.G=528734635,this.H=1541459225,this._size=0,this._sp=0,(!p||g>=8e3)&&(p=new ArrayBuffer(8e3),g=0),this._byte=new Uint8Array(p,g,80),this._word=new Int32Array(p,g,20),g+=80}update(e){if(\"string\"==typeof e)return this._utf8(e);if(null==e)throw new TypeError(\"Invalid type: \"+typeof e);const t=e.byteOffset,n=e.byteLength;let r=n/64|0,o=0;if(r&&!(3&t)&&!(this._size%64)){const n=new Int32Array(e.buffer,t,16*r);for(;r--;)this._int32(n,o>>2),o+=64;this._size+=o}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){const r=new Uint8Array(e.buffer,t+o,n-o);return this._uint8(r)}return o===n?this:this._uint8(e,o)}_uint8(e,t){const{_byte:n,_word:r}=this,o=e.length;for(t|=0;t\u003Co;){const i=this._size%64;let a=i;for(;t\u003Co&&a\u003C64;)n[a++]=e[t++];a>=64&&this._int32(r),this._size+=a-i}return this}_utf8(e){const{_byte:t,_word:n}=this,r=e.length;let o=this._sp;for(let i=0;i\u003Cr;){const a=this._size%64;let s=a;for(;i\u003Cr&&s\u003C64;){let n=0|e.charCodeAt(i++);n\u003C128?t[s++]=n:n\u003C2048?(t[s++]=192|n>>>6,t[s++]=128|63&n):n\u003C55296||n>57343?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|63&n):o?(n=((1023&o)\u003C\u003C10)+(1023&n)+65536,t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|63&n,o=0):o=n}s>=64&&(this._int32(n),n[0]=n[16]),this._size+=s-a}return this._sp=o,this}_int32(e,t){let{A:n,B:r,C:o,D:i,E:a,F:s,G:c,H:u}=this,l=0;for(t|=0;l\u003C16;)h[l++]=v(e[t++]);for(l=16;l\u003C64;l++)h[l]=x(h[l-2])+h[l-7]+S(h[l-15])+h[l-16]|0;for(l=0;l\u003C64;l++){const e=u+A(a)+y(a,s,c)+f[l]+h[l]|0,t=b(n)+w(n,r,o)|0;u=c,c=s,s=a,a=i+e|0,i=o,o=r,r=n,n=e+t|0}this.A=n+this.A|0,this.B=r+this.B|0,this.C=o+this.C|0,this.D=i+this.D|0,this.E=a+this.E|0,this.F=s+this.F|0,this.G=c+this.G|0,this.H=u+this.H|0}digest(e){const{_byte:t,_word:n}=this;let r=this._size%64|0;for(t[r++]=128;3&r;)t[r++]=0;if(r>>=2,r>14){for(;r\u003C16;)n[r++]=0;r=0,this._int32(n)}for(;r\u003C16;)n[r++]=0;const o=8*this._size,i=(4294967295&o)>>>0,a=(o-i)/4294967296;return a&&(n[14]=v(a)),i&&(n[15]=v(i)),this._int32(n),\"hex\"===e?this._hex():this._bin()}_hex(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s}=this;return m(e)+m(t)+m(n)+m(r)+m(o)+m(i)+m(a)+m(s)}_bin(){const{A:e,B:t,C:n,D:r,E:o,F:i,G:a,H:s,_byte:c,_word:u}=this;return u[0]=v(e),u[1]=v(t),u[2]=v(n),u[3]=v(r),u[4]=v(o),u[5]=v(i),u[6]=v(a),u[7]=v(s),c.slice(0,32)}}const h=new Int32Array(64);let p,g=0;const m=e=>(e+4294967296).toString(16).substr(-8),v=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e\u003C\u003C24&4278190080|e\u003C\u003C8&16711680|e>>8&65280|e>>24&255,y=(e,t,n)=>n^e&(t^n),w=(e,t,n)=>e&t|n&(e|t),b=e=>(e>>>2|e\u003C\u003C30)^(e>>>13|e\u003C\u003C19)^(e>>>22|e\u003C\u003C10),A=e=>(e>>>6|e\u003C\u003C26)^(e>>>11|e\u003C\u003C21)^(e>>>25|e\u003C\u003C7),S=e=>(e>>>7|e\u003C\u003C25)^(e>>>18|e\u003C\u003C14)^e>>>3,x=e=>(e>>>17|e\u003C\u003C15)^(e>>>19|e\u003C\u003C13)^e>>>10;var E,_,k=function(e){return(new d).update(e).digest()};!function(e){e.mainnet=\"mainnet\",e.testnet=\"testnet\",e.regtest=\"regtest\"}(E||(E={})),function(e){e.p2pkh=\"p2pkh\",e.p2sh=\"p2sh\",e.p2wpkh=\"p2wpkh\",e.p2wsh=\"p2wsh\",e.p2tr=\"p2tr\"}(_||(_={}));var I={0:{type:_.p2pkh,network:E.mainnet},111:{type:_.p2pkh,network:E.testnet},5:{type:_.p2sh,network:E.mainnet},196:{type:_.p2sh,network:E.testnet}},T=function(t){var n,r=t.substr(0,2).toLowerCase();if(\"bc\"===r||\"tb\"===r)return function(e){var t;try{t=e.startsWith(\"bc1p\")||e.startsWith(\"tb1p\")||e.startsWith(\"bcrt1p\")?u.decode(e):l.decode(e)}catch(e){throw new Error(\"Invalid address\")}var n={bc:E.mainnet,tb:E.testnet,bcrt:E.regtest}[t.prefix];if(void 0===n)throw new Error(\"Invalid address\");var r=t.words[0];if(r\u003C0||r>16)throw new Error(\"Invalid address\");return{bech32:!0,network:n,address:e,type:20===l.fromWords(t.words.slice(1)).length?_.p2wpkh:1===r?_.p2tr:_.p2wsh}}(t);try{n=s(t)}catch(e){throw new Error(\"Invalid address\")}var o=n.length;if(25!==o)throw new Error(\"Invalid address\");var i=n[0],a=n.slice(o-4,o),c=n.slice(0,o-4),f=k(k(c)).slice(0,4);if(a.some((function(e,t){return e!==f[t]})))throw new Error(\"Invalid address\");if(!Object.keys(I).map(Number).includes(i))throw new Error(\"Invalid address\");return e(e({},I[i]),{address:t,bech32:!1})};class O extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(\".\")} -- ${r}`;super(o??s),null!=o&&(this.cause=s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function C(e){return\"object\"==typeof e&&null!==e}function B(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function R(e,t,n,r){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \\`${a}\\`${s?` with refinement \\`${s}\\``:\"\"}, but received: \\`${B(r)}\\``}=e;return{value:r,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*j(e,t,n,r){(function(e){return C(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=R(o,t,n,r);e&&(yield e)}}function*P(e,t,n={}){const{path:r=[],branch:o=[e],coerce:i=!1,mask:a=!1}=n,s={path:r,branch:o};if(i&&(e=t.coercer(e,s),a&&\"type\"!==t.type&&C(t.schema)&&C(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let c=\"valid\";for(const r of t.validator(e,s))r.explanation=n.message,c=\"not_valid\",yield[r,void 0];for(let[u,l,f]of t.entries(e,s)){const t=P(l,f,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:a,message:n.message});for(const n of t)n[0]?(c=null===n[0].refinement||void 0===n[0].refinement?\"not_valid\":\"not_refined\",yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):C(e)&&(void 0!==l||u in e)&&(e[u]=l))}if(\"not_valid\"!==c)for(const r of t.refiner(e,s))r.explanation=n.message,c=\"not_refined\",yield[r,void 0];\"valid\"===c&&(yield[void 0,e])}class N{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>j(r(e,t),t,this,e):()=>[],this.refiner=o|O�M�?(e,t)=>j(o(e,t),t,this,e):()=>[]}assert(e,t){return L(e,this,t)}create(e,t){return M(e,this,t)}is(e){return z(e,this)}mask(e,t){return function(e,t,n){const r=U(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return U(e,this,t)}}function L(e,t,n){const r=U(e,t,{message:n});if(r[0])throw r[0]}function M(e,t,n){const r=U(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function z(e,t){return!U(e,t)[0]}function U(e,t,n={}){const r=P(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(o[0]){return[new O(o[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}function $(e,t){return new N({type:e,schema:null,validator:t})}function D(e,t){return $(e,(e=>\"string\"==typeof e&&t.test(e)))}const F=D(\"UuidV4\",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),q=F,W=$(\"Url\",(e=>{try{const t=new URL(e);return\"http:\"===t.protocol||\"https:\"===t.protocol}catch{return!1}})),K=D(\"StringNumber\",/^\\d+(\\.\\d+)?$/u);function G(){return $(\"any\",(()=>!0))}function V(e){return new N({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${B(e)}`})}function H(){return $(\"boolean\",(e=>\"boolean\"==typeof e))}function J(e){const t={},n=e.map((e=>B(e))).join();for(const n of e)t[n]=n;return new N({type:\"enums\",schema:t,validator:t=>e.includes(t)||`Expected one of \\`${n}\\`, but received: ${B(t)}`})}function Z(){return $(\"integer\",(e=>\"number\"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${B(e)}`))}function Y(e){const t=B(e),n=typeof e;return new N({type:\"literal\",schema:\"string\"===n||\"number\"===n||\"boolean\"===n?e:null,validator:n=>n===e||`Expected the literal \\`${t}\\`, but received: ${B(n)}`})}function Q(){return $(\"never\",(()=>!1))}function X(e){return new N({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function ee(){return $(\"number\",(e=>\"number\"==typeof e&&!isNaN(e)||`Expected a number, but received: ${B(e)}`))}function te(e){const t=e?Object.keys(e):[],n=Q();return new N({type:\"object\",schema:e??null,*entries(r){if(e&&C(r)){const o=new Set(Object.keys(r));for(const n of t)o.delete(n),yield[n,r[n],e[n]];for(const e of o)yield[e,r[e],n]}},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`,coercer:e=>C(e)?{...e}:e})}function ne(e){return new N({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function re(e,t){return new N({type:\"record\",schema:null,*entries(n){if(C(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`})}function oe(){return $(\"string\",(e=>\"string\"==typeof e||`Expected a string, but received: ${B(e)}`))}function ie(e){const t=Q();return new N({type:\"tuple\",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;o\u003Cr;o++)yield[o,n[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${B(e)}`})}function ae(e){const t=Object.keys(e);return new N({type:\"type\",schema:e,*entries(n){if(C(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>C(e)||`Expected an object, but received: ${B(e)}`,coercer:e=>C(e)?{...e}:e})}function se(e){const t=e.map((e=>e.type)).join(\" | \");return new N({type:\"union\",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const o=[];for(const t of e){const[...e]=P(n,t,r),[i]=e;if(!i?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${B(n)}`,...o]}})}function ce(){return $(\"unknown\",(()=>!0))}function ue(e){return te(e)}function le(e){return e.path[e.path.length-1]in e.branch[e.branch.length-2]}function fe(e){return new N({...e,validator:(t,n)=>!le(n)||e.validator(t,n),refiner:(t,n)=>!le(n)||e.refiner(t,n)})}function de(e,t,n){return new N({...e,coercer:(r,o)=>z(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}function he(e){return e instanceof Map||e instanceof Set?e.size:e.length}function pe(e,t,n={}){const{exclusive:r}=n;return ve(e,\"min\",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?\"\":\"or equal to \"}${t} but received \\`${n}\\``))}function ge(e){return ve(e,\"nonempty\",(t=>he(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function me(e,t){return ve(e,\"pattern\",(n=>t.test(n)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${n}\"`))}function ve(e,t,n){return new N({...e,*refiner(r,o){yield*e.refiner(r,o);const i=j(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}const ye=(e,t)=>Object.hasOwnProperty.call(e,t);var we;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(we=we||(we={}));const be=e=>te(e);function Ae({path:e,branch:t}){const n=e[e.length-1];return ye(t[t.length-2],n)}function Se(e){return new N({...e,type:`optional ${e.type}`,validator:(t,n)=>!Ae(n)||e.validator(t,n),refiner:(t,n)=>!Ae(n)||e.refiner(t,n)})}function xe(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n\u003Ce.length;n++)if(!xe(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e\u003Cn.length;e++)if(\"string\"!=typeof n[e][0]||!xe(n[e][1])){t=!1;break}return t}return!1}const Ee=$(\"JSON\",(e=>xe(e))),_e=de(Ee,ve(G(),\"JSON\",(e=>z(e,Ee))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})))));const ke=Y(\"2.0\"),Ie=X(se([ee(),oe()])),Te=be({code:Z(),message:oe(),data:Se(_e),stack:Se(oe())}),Oe=se([re(oe(),_e),V(_e)]);be({id:Ie,jsonrpc:ke,method:oe(),params:Se(Oe)}),be({jsonrpc:ke,method:oe(),params:Se(Oe)});te({id:Ie,jsonrpc:ke,result:ne(ce()),error:ne(Te)});const Ce=be({id:Ie,jsonrpc:ke,result:_e}),Be=be({id:Ie,jsonrpc:ke,error:Te});se([Ce,Be]);const Re=ue({jsonrpc:Y(\"2.0\"),id:se([oe(),ee(),Y(null)]),method:oe(),params:fe(se([V(_e),re(oe(),_e)]))});const je=(e,t)=>Object.hasOwnProperty.call(e,t);var Pe;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(Pe=Pe||(Pe={}));const Ne=e=>te(e);function Le({path:e,branch:t}){const n=e[e.length-1];return je(t[t.length-2],n)}function Me(e){return new N({...e,type:`optional ${e.type}`,validator:(t,n)=>!Le(n)||e.validator(t,n),refiner:(t,n)=>!Le(n)||e.refiner(t,n)})}function ze(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n\u003Ce.length;n++)if(!ze(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e\u003Cn.length;e++)if(\"string\"!=typeof n[e][0]||!ze(n[e][1])){t=!1;break}return t}return!1}const Ue=$(\"JSON\",(e=>ze(e))),$e=de(Ue,ve(G(),\"JSON\",(e=>z(e,Ue))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})))));const De=Y(\"2.0\"),Fe=X(se([ee(),oe()])),qe=Ne({code:Z(),message:oe(),data:Me($e),stack:Me(oe())}),We=se([re(oe(),$e),V($e)]);Ne({id:Fe,jsonrpc:De,method:oe(),params:Me(We)}),Ne({jsonrpc:De,method:oe(),params:Me(We)});te({id:Fe,jsonrpc:De,result:ne(ce()),error:ne(qe)});const Ke=Ne({id:Fe,jsonrpc:De,result:$e}),Ge=Ne({id:Fe,jsonrpc:De,error:qe});se([Ke,Ge]);function Ve(e,t){return $(e,(e=>\"string\"==typeof e&&t.test(e)))}const He=/^(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})$/u,Je=/^[-a-z0-9]{3,8}$/u,Ze=/^[-_a-zA-Z0-9]{1,32}$/u,Ye=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})):(?\u003CaccountAddress>[-.%a-zA-Z0-9]{1,128})$/u,Qe=/^[-.%a-zA-Z0-9]{1,128}$/u,Xe=/^[-a-z0-9]{3,8}$/u,et=/^[-.%a-zA-Z0-9]{1,128}$/u,tt=/^[-.%a-zA-Z0-9]{1,78}$/u,nt=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})$/u,rt=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})\\/(?\u003CtokenId>[-.%a-zA-Z0-9]{1,78})$/u,ot=Ve(\"CaipChainId\",He),it=(Ve(\"CaipNamespace\",Je),Ve(\"CaipReference\",Ze),Ve(\"CaipAccountId\",Ye)),at=(Ve(\"CaipAccountAddress\",Qe),Ve(\"CaipAssetNamespace\",Xe),Ve(\"CaipAssetReference\",et),Ve(\"CaipTokenId\",tt),Ve(\"CaipAssetType\",nt)),st=Ve(\"CaipAssetId\",rt),ct=Ve(\"CaipAssetTypeOrId\",/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})(\\/(?\u003CtokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var ut,lt,ft,dt;!function(e){e.Bip122=\"bip122\",e.Solana=\"solana\",e.Eip155=\"eip155\",e.Wallet=\"wallet\"}(ut=ut||(ut={})),function(e){e.Eoa=\"eip155:eoa\",e.Erc4337=\"eip155:erc4337\"}(lt||(lt={})),function(e){e.P2pkh=\"bip122:p2pkh\",e.P2sh=\"bip122:p2sh\",e.P2wpkh=\"bip122:p2wpkh\",e.P2tr=\"bip122:p2tr\"}(ft||(ft={})),function(e){e.DataAccount=\"solana:data-account\"}(dt||(dt={}));const ht=ue({id:q,type:J([`${lt.Eoa}`,`${lt.Erc4337}`,`${ft.P2pkh}`,`${ft.P2sh}`,`${ft.P2wpkh}`,`${ft.P2tr}`,`${dt.DataAccount}`]),address:oe(),scopes:ge(V(ot)),options:re(oe(),$e),methods:V(oe())}),pt=(te({address:it}),ue({unit:oe(),amount:K})),gt=ue({fungible:Y(!0),type:at,...pt.schema}),mt=ue({fungible:Y(!1),id:st}),vt=(yt=e=>function(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(e)&&!e.fungible?mt:gt,new N({type:\"union\",schema:null,*entries(e,t){yield*yt(e).entries(e,t)},*refiner(e,t){yield*yt(e).refiner(e,t)},coercer:(e,t)=>yt(e).coercer(e,t),validator:(e,t)=>yt(e).validator(e,t)}));var yt;const wt=ue({amount:K,unit:oe()}),bt=Ve(\"DerivationPath\",/^m(?:\\/\\d+'?)+$/u);var At;!function(e){e.Bip44=\"bip44\"}(At||(At={}));const St=te({type:Y(`${At.Bip44}`),scopes:V(ot),derivationPath:bt}),xt=(re(oe(),$e),ue({id:F,scope:oe(),account:F,origin:oe(),request:ue({method:oe(),params:fe(se([V($e),re(oe(),$e)]))})})),Et=(se([ue({pending:Y(!0),redirect:fe(ue({message:fe(oe()),url:fe(oe())}))}),ue({pending:Y(!1),result:$e})]),ue({address:oe(),asset:X(vt)}));var _t;!function(e){e.Base=\"base\",e.Priority=\"priority\"}(_t||(_t={}));const kt=ue({type:J([`${_t.Base}`,`${_t.Priority}`]),asset:vt});var It,Tt;!function(e){e.Submitted=\"submitted\",e.Unconfirmed=\"unconfirmed\",e.Confirmed=\"confirmed\",e.Failed=\"failed\"}(It||(It={})),function(e){e.Send=\"send\",e.Receive=\"receive\",e.Swap=\"swap\",e.BridgeSend=\"bridge:send\",e.BridgeReceive=\"bridge:receive\",e.Unknown=\"unknown\"}(Tt||(Tt={}));const Ot=ue({status:J([`${It.Submitted}`,`${It.Unconfirmed}`,`${It.Confirmed}`,`${It.Failed}`]),timestamp:X(ee())}),Ct=ue({id:oe(),chain:ot,account:F,status:J([`${It.Submitted}`,`${It.Unconfirmed}`,`${It.Confirmed}`,`${It.Failed}`]),timestamp:X(ee()),type:J([`${Tt.Send}`,`${Tt.Receive}`,`${Tt.Swap}`,`${Tt.BridgeSend}`,`${Tt.BridgeReceive}`,`${Tt.Unknown}`]),from:V(Et),to:V(Et),fees:V(kt),events:V(Ot)}),Bt=(ue({data:V(Ct),next:X(oe())}),ue({limit:ee(),next:fe(X(oe()))})),Rt=ue({metamask:fe(ue({correlationId:F}))});var jt;!function(e){e.Mainnet=\"bip122:000000000019d6689c085ae165831e93\",e.Testnet=\"bip122:000000000933ea01ad0ee984209779ba\",e.Testnet4=\"bip122:00000000da84f2bafbbc53dee25a72ae\",e.Signet=\"bip122:00000008819873e925422c1ff0f99f7c\",e.Regtest=\"bip122:regtest\"}(jt||(jt={}));const Pt=(e,t)=>{try{return T(e).type===t||new Error(`Invalid ${t} address`)}catch(e){return new Error(`Failed to decode ${t} address: ${e.message}`)}},Nt=ve(oe(),\"BtcP2pkhAddressStruct\",(e=>Pt(e,_.p2pkh))),Lt=ve(oe(),\"BtcP2shAddressStruct\",(e=>Pt(e,_.p2sh))),Mt=ve(oe(),\"BtcP2wpkhAddressStruct\",(e=>Pt(e,_.p2wpkh))),zt=ve(oe(),\"BtcP2trAddressStruct\",(e=>Pt(e,_.p2tr)));var Ut;!function(e){e.SendBitcoin=\"sendBitcoin\"}(Ut||(Ut={}));const $t=ue({...ht.schema,scopes:ge(V(ot)),methods:V(J([`${Ut.SendBitcoin}`]))});ue({...$t.schema,address:Nt,type:Y(`${ft.P2pkh}`)}),ue({...$t.schema,address:Lt,type:Y(`${ft.P2sh}`)}),ue({...$t.schema,address:Mt,type:Y(`${ft.P2wpkh}`)}),ue({...$t.schema,address:zt,type:Y(`${ft.P2tr}`)});var Dt;!function(e){e.Devnet=\"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\",e.Mainnet=\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",e.Testnet=\"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\"}(Dt||(Dt={}));const Ft=Ve(\"SolAddress\",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var qt;!function(e){e.SendAndConfirmTransaction=\"sendAndConfirmTransaction\",e.SignAndSendTransaction=\"signAndSendTransaction\",e.SignTransaction=\"signTransaction\",e.SignMessage=\"signMessage\",e.SignIn=\"signIn\"}(qt||(qt={}));ue({...ht.schema,address:Ft,type:Y(`${dt.DataAccount}`),scopes:ge(V(ot)),methods:V(J(Object.values(qt)))});var Wt;!function(e){e.Eoa=\"eip155:0\",e.Mainnet=\"eip155:1\",e.Testnet=\"eip155:11155111\"}(Wt||(Wt={}));const Kt=Ve(\"EthBytes\",/^0x[0-9a-f]*$/iu),Gt=Ve(\"EthAddress\",/^0x[0-9a-f]{40}$/iu),Vt=Ve(\"EthUint256\",/^0x([1-9a-f][0-9a-f]*|0)$/iu);var Ht;!function(e){e.PersonalSign=\"personal_sign\",e.Sign=\"eth_sign\",e.SignTransaction=\"eth_signTransaction\",e.SignTypedDataV1=\"eth_signTypedData_v1\",e.SignTypedDataV3=\"eth_signTypedData_v3\",e.SignTypedDataV4=\"eth_signTypedData_v4\",e.PrepareUserOperation=\"eth_prepareUserOperation\",e.PatchUserOperation=\"eth_patchUserOperation\",e.SignUserOperation=\"eth_signUserOperation\"}(Ht||(Ht={}));ue({...ht.schema,address:Gt,type:Y(`${lt.Eoa}`),scopes:ge(V(Y(Wt.Eoa))),methods:V(J([`${Ht.PersonalSign}`,`${Ht.Sign}`,`${Ht.SignTransaction}`,`${Ht.SignTypedDataV1}`,`${Ht.SignTypedDataV3}`,`${Ht.SignTypedDataV4}`]))}),ue({...ht.schema,address:Gt,type:Y(`${lt.Erc4337}`),scopes:ge(V(ot)),methods:V(J([`${Ht.PersonalSign}`,`${Ht.Sign}`,`${Ht.SignTypedDataV1}`,`${Ht.SignTypedDataV3}`,`${Ht.SignTypedDataV4}`,`${Ht.PrepareUserOperation}`,`${Ht.PatchUserOperation}`,`${Ht.SignUserOperation}`]))}),ue({sender:Gt,nonce:Vt,initCode:Kt,callData:Kt,callGasLimit:Vt,verificationGasLimit:Vt,preVerificationGas:Vt,maxFeePerGas:Vt,maxPriorityFeePerGas:Vt,paymasterAndData:Kt,signature:Kt}),ue({to:Gt,value:Vt,data:Kt}),ue({nonce:Vt,initCode:Kt,callData:Kt,gasLimits:fe(ue({callGasLimit:Vt,verificationGasLimit:Vt,preVerificationGas:Vt})),dummyPaymasterAndData:Kt,dummySignature:Kt,bundlerUrl:W}),ue({paymasterAndData:Kt,callGasLimit:fe(Vt),verificationGasLimit:fe(Vt),preVerificationGas:fe(Vt)});var Jt;!function(e){e.ListAccounts=\"keyring_listAccounts\",e.GetAccount=\"keyring_getAccount\",e.CreateAccount=\"keyring_createAccount\",e.DiscoverAccounts=\"keyring_discoverAccounts\",e.ListAccountAssets=\"keyring_listAccountAssets\",e.ListAccountTransactions=\"keyring_listAccountTransactions\",e.GetAccountBalances=\"keyring_getAccountBalances\",e.ResolveAccountAddress=\"keyring_resolveAccountAddress\",e.FilterAccountChains=\"keyring_filterAccountChains\",e.UpdateAccount=\"keyring_updateAccount\",e.DeleteAccount=\"keyring_deleteAccount\",e.ExportAccount=\"keyring_exportAccount\",e.ListRequests=\"keyring_listRequests\",e.GetRequest=\"keyring_getRequest\",e.SubmitRequest=\"keyring_submitRequest\",e.ApproveRequest=\"keyring_approveRequest\",e.RejectRequest=\"keyring_rejectRequest\"}(Jt||(Jt={}));const Zt={jsonrpc:Y(\"2.0\"),id:se([oe(),ee(),Y(null)])},Yt=ue({...Zt,method:Y(\"keyring_listAccounts\")}),Qt=(V(ht),ue({...Zt,method:Y(\"keyring_getAccount\"),params:ue({id:F})})),Xt=ue({...Zt,method:Y(\"keyring_createAccount\"),params:ue({options:re(oe(),$e)})}),en=ue({...Zt,method:Y(\"keyring_discoverAccounts\"),params:ue({scopes:V(ot),entropySource:oe(),groupIndex:ee()})}),tn=(V(St),ue({...Zt,method:Y(\"keyring_listAccountTransactions\"),params:ue({id:F,pagination:Bt})})),nn=ue({...Zt,method:Y(\"keyring_listAccountAssets\"),params:ue({id:F})}),rn=V(ct),on=ue({...Zt,method:Y(`${Jt.GetAccountBalances}`),params:ue({id:F,assets:V(at)})}),an=(re(at,wt),ue({...Zt,method:Y(\"keyring_resolveAccountAddress\"),params:ue({scope:ot,request:Re})})),sn=(X(ue({address:it})),ue({...Zt,method:Y(\"keyring_filterAccountChains\"),params:ue({id:F,chains:V(oe())})})),cn=(V(oe()),ue({...Zt,method:Y(\"keyring_updateAccount\"),params:ue({account:ht})})),un=(Y(null),ue({...Zt,method:Y(\"keyring_deleteAccount\"),params:ue({id:F})})),ln=(Y(null),ue({...Zt,method:Y(\"keyring_exportAccount\"),params:ue({id:F})})),fn=ue({...Zt,method:Y(\"keyring_listRequests\")}),dn=(V(xt),ue({...Zt,method:Y(\"keyring_getRequest\"),params:ue({id:F})})),hn=ue({...Zt,method:Y(\"keyring_submitRequest\"),params:xt}),pn=ue({...Zt,method:Y(\"keyring_approveRequest\"),params:ue({id:F,data:re(oe(),$e)})}),gn=(Y(null),ue({...Zt,method:Y(\"keyring_rejectRequest\"),params:ue({id:F})}));Y(null);var mn;!function(e){e.AccountCreated=\"notify:accountCreated\",e.AccountUpdated=\"notify:accountUpdated\",e.AccountDeleted=\"notify:accountDeleted\",e.RequestApproved=\"notify:requestApproved\",e.RequestRejected=\"notify:requestRejected\",e.AccountBalancesUpdated=\"notify:accountBalancesUpdated\",e.AccountAssetListUpdated=\"notify:accountAssetListUpdated\",e.AccountTransactionsUpdated=\"notify:accountTransactionsUpdated\"}(mn||(mn={}));ue({method:Y(`${mn.AccountCreated}`),params:ue({account:ht,accountNameSuggestion:fe(oe()),displayConfirmation:fe(H()),displayAccountNameSuggestion:fe(H()),...Rt.schema})}),ue({method:Y(`${mn.AccountUpdated}`),params:ue({account:ht})}),ue({method:Y(`${mn.AccountDeleted}`),params:ue({id:F})}),ue({method:Y(`${mn.RequestApproved}`),params:ue({id:F,result:$e})}),ue({method:Y(`${mn.RequestRejected}`),params:ue({id:F})}),ue({method:Y(`${mn.AccountBalancesUpdated}`),params:ue({balances:re(q,re(at,pt))})}),ue({method:Y(`${mn.AccountTransactionsUpdated}`),params:ue({transactions:re(q,V(Ct))})}),ue({method:Y(`${mn.AccountAssetListUpdated}`),params:ue({assets:re(q,ue({added:V(ct),removed:V(ct)}))})});class vn extends Error{constructor(e){super(`Method not supported: ${e}`)}}async function yn(e,t){try{return await async function(e,t){switch(L(t,Re),t.method){case`${Jt.ListAccounts}`:return L(t,Yt),e.listAccounts();case`${Jt.GetAccount}`:return L(t,Qt),e.getAccount(t.params.id);case`${Jt.CreateAccount}`:return L(t,Xt),e.createAccount(t.params.options);case`${Jt.DiscoverAccounts}`:if(void 0===e.discoverAccounts)throw new vn(t.method);return L(t,en),e.discoverAccounts(t.params.scopes,t.params.entropySource,t.params.groupIndex);case`${Jt.ListAccountTransactions}`:if(void 0===e.listAccountTransactions)throw new vn(t.method);return L(t,tn),e.listAccountTransactions(t.params.id,t.params.pagination);case`${Jt.ListAccountAssets}`:if(void 0===e.listAccountAssets)throw new vn(t.method);return L(t,nn),e.listAccountAssets(t.params.id);case`${Jt.GetAccountBalances}`:if(void 0===e.getAccountBalances)throw new vn(t.method);return L(t,on),e.getAccountBalances(t.params.id,t.params.assets);case`${Jt.ResolveAccountAddress}`:if(void 0===e.resolveAccountAddress)throw new vn(t.method);return L(t,an),e.resolveAccountAddress(t.params.scope,t.params.request);case`${Jt.FilterAccountChains}`:return L(t,sn),e.filterAccountChains(t.params.id,t.params.chains);case`${Jt.UpdateAccount}`:return L(t,cn),e.updateAccount(t.params.account);case`${Jt.DeleteAccount}`:return L(t,un),e.deleteAccount(t.params.id);case`${Jt.ExportAccount}`:if(void 0===e.exportAccount)throw new vn(t.method);return L(t,ln),e.exportAccount(t.params.id);case`${Jt.ListRequests}`:if(void 0===e.listRequests)throw new vn(t.method);return L(t,fn),e.listRequests();case`${Jt.GetRequest}`:if(void 0===e.getRequest)throw new vn(t.method);return L(t,dn),e.getRequest(t.params.id);case`${Jt.SubmitRequest}`:return L(t,hn),e.submitRequest(t.params);case`${Jt.ApproveRequest}`:if(void 0===e.approveRequest)throw new vn(t.method);return L(t,pn),e.approveRequest(t.params.id,t.params.data);case`${Jt.RejectRequest}`:if(void 0===e.rejectRequest)throw new vn(t.method);return L(t,gn),e.rejectRequest(t.params.id);default:throw new vn(t.method)}}(e,t)}catch(e){const t=e instanceof Error&&\"string\"==typeof e.message?e.message:\"An unknown error occurred while handling the keyring request\";throw new Error(t)}}async function wn(e,t,n){await e.request({method:\"snap_manageAccounts\",params:{method:t,params:{...n}}})}function bn(e){return Boolean(e)&&\"object\"==typeof e&&!Array.isArray(e)}const An=(e,t)=>Object.hasOwnProperty.call(e,t);var Sn;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(Sn=Sn||(Sn={}));var xn=n(282);const En=e=>te(e);function _n({path:e,branch:t}){const n=e[e.length-1];return An(t[t.length-2],n)}function kn(e){return new N({...e,type:`optional ${e.type}`,validator:(t,n)=>!_n(n)||e.validator(t,n),refiner:(t,n)=>!_n(n)||e.refiner(t,n)})}function In(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n\u003Ce.length;n++)if(!In(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e\u003Cn.length;e++)if(\"string\"!=typeof n[e][0]||!In(n[e][1])){t=!1;break}return t}return!1}const Tn=$(\"JSON\",(e=>In(e))),On=de(Tn,ve(G(),\"JSON\",(e=>z(e,Tn))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})))));function Cn(e){try{return function(e){M(e,On)}(e),!0}catch{return!1}}const Bn=Y(\"2.0\"),Rn=X(se([ee(),oe()])),jn=En({code:Z(),message:oe(),data:kn(On),stack:kn(oe())}),Pn=se([re(oe(),On),V(On)]);En({id:Rn,jsonrpc:Bn,method:oe(),params:kn(Pn)}),En({jsonrpc:Bn,method:oe(),params:kn(Pn)});te({id:Rn,jsonrpc:Bn,result:ne(ce()),error:ne(jn)});const Nn=En({id:Rn,jsonrpc:Bn,result:On}),Ln=En({id:Rn,jsonrpc:Bn,error:jn});se([Nn,Ln]);const Mn={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},zn={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},Un={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}},$n=Mn.internal,Dn=\"Unspecified error message. This is a bug, please report it.\",Fn=(qn($n),\"Unspecified server error.\");function qn(e,t=Dn){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(An(Un,t))return Un[t].message;if(function(e){return e>=-32099&&e\u003C=-32e3}(e))return Fn}return t}function Wn(e){return Array.isArray(e)?e.map((e=>Cn(e)?e:bn(e)?Kn(e):null)):bn(e)?Kn(e):Cn(e)?e:null}function Kn(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return Cn(r)&&(t[n]=r),t}),{})}const Gn=function(e){return e?.__esModule?e.default:e}(xn);class Vn extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('\"code\" must be an integer.');if(!t||\"string\"!=typeof t)throw new Error('\"message\" must be a non-empty string.');!function(e){return bn(e)&&An(e,\"cause\")&&bn(e.cause)}(n)?super(t):(super(t,{cause:n.cause}),An(this,\"cause\")||Object.assign(this,{cause:n.cause})),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=Wn(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return Gn(this.serialize(),Jn,2)}}class Hn extends Vn{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e\u003C=4999}(e))throw new Error('\"code\" must be an integer such that: 1000 \u003C= code \u003C= 4999');super(e,t,n)}}function Jn(e,t){if(\"[Circular]\"!==t)return t}const Zn=e=>dr(Mn.parse,e),Yn=e=>dr(Mn.invalidRequest,e),Qn=e=>dr(Mn.invalidParams,e),Xn=e=>dr(Mn.methodNotFound,e),er=e=>dr(Mn.internal,e),tr=e=>dr(Mn.invalidInput,e),nr=e=>dr(Mn.resourceNotFound,e),rr=e=>dr(Mn.resourceUnavailable,e),or=e=>dr(Mn.transactionRejected,e),ir=e=>dr(Mn.methodNotSupported,e),ar=e=>dr(Mn.limitExceeded,e),sr=e=>hr(zn.userRejectedRequest,e),cr=e=>hr(zn.unauthorized,e),ur=e=>hr(zn.unsupportedMethod,e),lr=e=>hr(zn.disconnected,e),fr=e=>hr(zn.chainDisconnected,e);function dr(e,t){const[n,r]=pr(t);return new Vn(e,n??qn(e),r)}function hr(e,t){const[n,r]=pr(t);return new Hn(e,n??qn(e),r)}function pr(e){if(e){if(\"string\"==typeof e)return[e];if(\"object\"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&\"string\"!=typeof t)throw new Error(\"Must specify string message.\");return[t??void 0,n]}}return[]}function gr(e){return Boolean(e)&&\"object\"==typeof e&&!Array.isArray(e)}const mr=(e,t)=>Object.hasOwnProperty.call(e,t);var vr;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(vr=vr||(vr={}));class yr extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(\".\")} -- ${r}`;super(o??s),null!=o&&(this.cause=s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function wr(e){return\"object\"==typeof e&&null!==e}function br(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function Ar(e,t,n,r){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \\`${a}\\`${s?` with refinement \\`${s}\\``:\"\"}, but received: \\`${br(r)}\\``}=e;return{value:r,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*Sr(e,t,n,r){(function(e){return wr(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=Ar(o,t,n,r);e&&(yield e)}}function*xr(e,t,n={}){const{path:r=[],branch:o=[e],coerce:i=!1,mask:a=!1}=n,s={path:r,branch:o};if(i&&(e=t.coercer(e,s),a&&\"type\"!==t.type&&wr(t.schema)&&wr(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let c=\"valid\";for(const r of t.validator(e,s))r.explanation=n.message,c=\"not_valid\",yield[r,void 0];for(let[u,l,f]of t.entries(e,s)){const t=xr(l,f,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:a,message:n.message});for(const n of t)n[0]?(c=null===n[0].refinement||void 0===n[0].refinement?\"not_valid\":\"not_refined\",yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):wr(e)&&(void 0!==l||u in e)&&(e[u]=l))}if(\"not_valid\"!==c)for(const r of t.refiner(e,s))r.explanation=n.message,c=\"not_refined\",yield[r,void 0];\"valid\"===c&&(yield[void 0,e])}class Er{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>Sr(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>Sr(o(e,t),t,this,e):()=>[]}assert(e,t){return _r(e,this,t)}create(e,t){return kr(e,this,t)}is(e){return Ir(e,this)}mask(e,t){return function(e,t,n){const r=Tr(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return Tr(e,this,t)}}function _r(e,t,n){const r=Tr(e,t,{message:n});if(r[0])throw r[0]}function kr(e,t,n){const r=Tr(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function Ir(e,t){return!Tr(e,t)[0]}function Tr(e,t,n={}){const r=xr(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(o[0]){return[new yr(o[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}function Or(e,t){return new Er({type:e,schema:null,validator:t})}function Cr(){return Or(\"never\",(()=>!1))}function Br(e){const t=e?Object.keys(e):[],n=Cr();return new Er({type:\"object\",schema:e??null,*entries(r){if(e&&wr(r)){const o=new Set(Object.keys(r));for(const n of t)o.delete(n),yield[n,r[n],e[n]];for(const e of o)yield[e,r[e],n]}},validator:e=>wr(e)||`Expected an object, but received: ${br(e)}`,coercer:e=>wr(e)?{...e}:e})}function Rr(e){return new Er({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function jr(){return Or(\"string\",(e=>\"string\"==typeof e||`Expected a string, but received: ${br(e)}`))}function Pr(e){const t=e.map((e=>e.type)).join(\" | \");return new Er({type:\"union\",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const o=[];for(const t of e){const[...e]=xr(n,t,r),[i]=e;if(!i?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${br(n)}`,...o]}})}function Nr(e,t,n){return new Er({...e,coercer:(r,o)=>Ir(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}function Lr(e,t,n){return new Er({...e,*refiner(r,o){yield*e.refiner(r,o);const i=Sr(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}const Mr=e=>Br(e);function zr({path:e,branch:t}){const n=e[e.length-1];return mr(t[t.length-2],n)}function Ur(e){return new Er({...e,type:`optional ${e.type}`,validator:(t,n)=>!zr(n)||e.validator(t,n),refiner:(t,n)=>!zr(n)||e.refiner(t,n)})}function $r(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n\u003Ce.length;n++)if(!$r(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e\u003Cn.length;e++)if(\"string\"!=typeof n[e][0]||!$r(n[e][1])){t=!1;break}return t}return!1}const Dr=Or(\"JSON\",(e=>$r(e))),Fr=Nr(Dr,Lr(Or(\"any\",(()=>!0)),\"JSON\",(e=>Ir(e,Dr))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})))));function qr(e){try{return function(e){kr(e,Fr)}(e),!0}catch{return!1}}const Wr=function(e){const t=br(e),n=typeof e;return new Er({type:\"literal\",schema:\"string\"===n||\"number\"===n||\"boolean\"===n?e:null,validator:n=>n===e||`Expected the literal \\`${t}\\`, but received: ${br(n)}`})}(\"2.0\"),Kr=(Gr=Pr([Or(\"number\",(e=>\"number\"==typeof e&&!isNaN(e)||`Expected a number, but received: ${br(e)}`)),jr()]),new Er({...Gr,validator:(e,t)=>null===e||Gr.validator(e,t),refiner:(e,t)=>null===e||Gr.refiner(e,t)}));var Gr;const Vr=Mr({code:Or(\"integer\",(e=>\"number\"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${br(e)}`)),message:jr(),data:Ur(Fr),stack:Ur(jr())}),Hr=Pr([function(e,t){return new Er({type:\"record\",schema:null,*entries(n){if(wr(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>wr(e)||`Expected an object, but received: ${br(e)}`})}(jr(),Fr),(Jr=Fr,new Er({type:\"array\",$�,]�schema:Jr,*entries(e){if(Jr&&Array.isArray(e))for(const[t,n]of e.entries())yield[t,n,Jr]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${br(e)}`}))]);var Jr;Mr({id:Kr,jsonrpc:Wr,method:jr(),params:Ur(Hr)}),Mr({jsonrpc:Wr,method:jr(),params:Ur(Hr)});Br({id:Kr,jsonrpc:Wr,result:Rr(Or(\"unknown\",(()=>!0))),error:Rr(Vr)});const Zr=Mr({id:Kr,jsonrpc:Wr,result:Fr}),Yr=Mr({id:Kr,jsonrpc:Wr,error:Vr});Pr([Zr,Yr]);function Qr(e){return gr(e)&&mr(e,\"data\")&&\"object\"==typeof e.data&&null!==e.data&&qr(e.data)&&!Array.isArray(e.data)?e.data:{}}var Xr,eo,to,no,ro=function(e,t,n,r,o){if(\"m\"===r)throw new TypeError(\"Private method is not writable\");if(\"a\"===r&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},oo=function(e,t,n,r){if(\"a\"===n&&!r)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!r:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===n?r:\"a\"===n?r.call(e):r?r.value:t.get(e)};class io extends Error{constructor(e,t={}){const n=function(e){return gr(e)&&mr(e,\"message\")&&\"string\"==typeof e.message?e.message:String(e)}(e);super(n),Xr.set(this,void 0),eo.set(this,void 0),to.set(this,void 0),no.set(this,void 0),ro(this,eo,n,\"f\"),ro(this,Xr,function(e){return gr(e)&&mr(e,\"code\")&&\"number\"==typeof e.code&&Number.isInteger(e.code)?e.code:-32603}(e),\"f\");const r={...Qr(e),...t};Object.keys(r).length>0&&ro(this,to,r,\"f\"),ro(this,no,super.stack,\"f\")}get name(){return\"SnapError\"}get code(){return oo(this,Xr,\"f\")}get message(){return oo(this,eo,\"f\")}get data(){return oo(this,to,\"f\")}get stack(){return oo(this,no,\"f\")}toJSON(){return{code:-31002,message:\"Snap Error\",data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function ao(e){return class extends io{constructor(t,n){if(\"object\"==typeof t){const n=e();return void super({code:n.code,message:n.message,data:t})}const r=e(t);super({code:r.code,message:r.message,data:n})}}}Xr=new WeakMap,eo=new WeakMap,to=new WeakMap,no=new WeakMap;const so=ao(er),co=ao(tr),uo=ao(Qn),lo=ao(Yn),fo=ao(ar),ho=ao(Xn),po=ao(ir),go=ao(Zn),mo=ao(nr),vo=ao(rr),yo=ao(or),wo=ao(fr),bo=ao(lr),Ao=ao(cr),So=ao(ur),xo=ao(sr);var Eo=/^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,_o=Math.ceil,ko=Math.floor,Io=\"[BigNumber Error] \",To=Io+\"Number primitive has more than 15 significant digits: \",Oo=1e14,Co=14,Bo=9007199254740991,Ro=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],jo=1e7,Po=1e9;function No(e){var t=0|e;return e>0||e===t?t:t-1}function Lo(e){for(var t,n,r=1,o=e.length,i=e[0]+\"\";r\u003Co;){for(t=e[r++]+\"\",n=Co-t.length;n--;t=\"0\"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function Mo(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a\u003C0,r=c==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=o.length)\u003C(u=i.length)?c:u,a=0;a\u003Cs;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function zo(e,t,n,r){if(e\u003Ct||e>n||e!==ko(e))throw Error(Io+(r||\"Argument\")+(\"number\"==typeof e?e\u003Ct||e>n?\" out of range: \":\" not an integer: \":\" not a primitive number: \")+String(e))}function Uo(e){var t=e.c.length-1;return No(e.e/Co)==t&&e.c[t]%2!=0}function $o(e,t){return(e.length>1?e.charAt(0)+\".\"+e.slice(1):e)+(t\u003C0?\"e\":\"e+\")+t}function Do(e,t,n){var r,o;if(t\u003C0){for(o=n+\".\";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t\u003Cr&&(e=e.slice(0,t)+\".\"+e.slice(t));return e}var Fo=function e(t){var n,r,o,i,a,s,c,u,l,f,d=k.prototype={constructor:k,toString:null,valueOf:null},h=new k(1),p=20,g=4,m=-7,v=21,y=-1e7,w=1e7,b=!1,A=1,S=0,x={prefix:\"\",groupSize:3,secondaryGroupSize:0,groupSeparator:\",\",decimalSeparator:\".\",fractionGroupSize:0,fractionGroupSeparator:\" \",suffix:\"\"},E=\"0123456789abcdefghijklmnopqrstuvwxyz\",_=!0;function k(e,t){var n,i,a,s,c,u,l,f,d=this;if(!(d instanceof k))return new k(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>w?d.c=d.e=null:e.e\u003Cy?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((u=\"number\"==typeof e)&&0*e==0){if(d.s=1/e\u003C0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>w?d.c=d.e=null:(d.e=s,d.c=[e]))}f=String(e)}else{if(!Eo.test(f=String(e)))return o(d,f,u);d.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf(\".\"))>-1&&(f=f.replace(\".\",\"\")),(c=f.search(/e/i))>0?(s\u003C0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s\u003C0&&(s=f.length)}else{if(zo(t,2,E.length,\"Base\"),10==t&&_)return C(d=new k(e),p+d.e+1,g);if(f=String(e),u=\"number\"==typeof e){if(0*e!=0)return o(d,f,u,t);if(d.s=1/e\u003C0?(f=f.slice(1),-1):1,k.DEBUG&&f.replace(/^0\\.0*|\\./,\"\").length>15)throw Error(To+e)}else d.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=E.slice(0,t),s=c=0,l=f.length;c\u003Cl;c++)if(n.indexOf(i=f.charAt(c))\u003C0){if(\".\"==i){if(c>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return o(d,String(e),u,t)}u=!1,(s=(f=r(f,t,10,d.s)).indexOf(\".\"))>-1?f=f.replace(\".\",\"\"):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(c,++l)){if(l-=c,u&&k.DEBUG&&l>15&&(e>Bo||e!==ko(e)))throw Error(To+d.s*e);if((s=s-c-1)>w)d.c=d.e=null;else if(s\u003Cy)d.c=[d.e=0];else{if(d.e=s,d.c=[],c=(s+1)%Co,s\u003C0&&(c+=Co),c\u003Cl){for(c&&d.c.push(+f.slice(0,c)),l-=Co;c\u003Cl;)d.c.push(+f.slice(c,c+=Co));c=Co-(f=f.slice(c)).length}else c-=l;for(;c--;f+=\"0\");d.c.push(+f)}}else d.c=[d.e=0]}function I(e,t,n,r){var o,i,a,s,c;if(null==n?n=g:zo(n,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Lo(e.c),c=1==r||2==r&&(a\u003C=m||a>=v)?$o(c,a):Do(c,a,\"0\");else if(i=(e=C(new k(e),t,n)).e,s=(c=Lo(e.c)).length,1==r||2==r&&(t\u003C=i||i\u003C=m)){for(;s\u003Ct;c+=\"0\",s++);c=$o(c,i)}else if(t-=a,c=Do(c,i,\"0\"),i+1>s){if(--t>0)for(c+=\".\";t--;c+=\"0\");}else if((t+=i-s)>0)for(i+1==s&&(c+=\".\");t--;c+=\"0\");return e.s\u003C0&&o?\"-\"+c:c}function T(e,t){for(var n,r,o=1,i=new k(e[0]);o\u003Ce.length;o++)(!(r=new k(e[o])).s||(n=Mo(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function O(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*Co-1)>w?e.c=e.e=null:n\u003Cy?e.c=[e.e=0]:(e.e=n,e.c=t),e}function C(e,t,n,r){var o,i,a,s,c,u,l,f=e.c,d=Ro;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)\u003C0)i+=Co,a=t,c=f[u=0],l=ko(c/d[o-a-1]%10);else if((u=_o((i+1)/Co))>=f.length){if(!r)break e;for(;f.length\u003C=u;f.push(0));c=l=0,o=1,a=(i%=Co)-Co+1}else{for(c=s=f[u],o=1;s>=10;s/=10,o++);l=(a=(i%=Co)-Co+o)\u003C0?0:ko(c/d[o-a-1]%10)}if(r=r||t\u003C0||null!=f[u+1]||(a\u003C0?c:c%d[o-a-1]),r=n\u003C4?(l||r)&&(0==n||n==(e.s\u003C0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?a>0?c/d[o-a]:0:f[u-1])%10&1||n==(e.s\u003C0?8:7)),t\u003C1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=d[(Co-t%Co)%Co],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=u,s=1,u--):(f.length=u+1,s=d[Co-i],f[u]=a>0?ko(c/d[o-a]%d[a])*s:0),r)for(;;){if(0==u){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==Oo&&(f[0]=1));break}if(f[u]+=s,f[u]!=Oo)break;f[u--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>w?e.c=e.e=null:e.e\u003Cy&&(e.c=[e.e=0])}return e}function B(e){var t,n=e.e;return null===n?e.toString():(t=Lo(e.c),t=n\u003C=m||n>=v?$o(t,n):Do(t,n,\"0\"),e.s\u003C0?\"-\"+t:t)}return k.clone=e,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(e){var t,n;if(null!=e){if(\"object\"!=typeof e)throw Error(Io+\"Object expected: \"+e);if(e.hasOwnProperty(t=\"DECIMAL_PLACES\")&&(zo(n=e[t],0,Po,t),p=n),e.hasOwnProperty(t=\"ROUNDING_MODE\")&&(zo(n=e[t],0,8,t),g=n),e.hasOwnProperty(t=\"EXPONENTIAL_AT\")&&((n=e[t])&&n.pop?(zo(n[0],-Po,0,t),zo(n[1],0,Po,t),m=n[0],v=n[1]):(zo(n,-Po,Po,t),m=-(v=n\u003C0?-n:n))),e.hasOwnProperty(t=\"RANGE\"))if((n=e[t])&&n.pop)zo(n[0],-Po,-1,t),zo(n[1],1,Po,t),y=n[0],w=n[1];else{if(zo(n,-Po,Po,t),!n)throw Error(Io+t+\" cannot be zero: \"+n);y=-(w=n\u003C0?-n:n)}if(e.hasOwnProperty(t=\"CRYPTO\")){if((n=e[t])!==!!n)throw Error(Io+t+\" not true or false: \"+n);if(n){if(\"undefined\"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw b=!n,Error(Io+\"crypto unavailable\");b=n}else b=n}if(e.hasOwnProperty(t=\"MODULO_MODE\")&&(zo(n=e[t],0,9,t),A=n),e.hasOwnProperty(t=\"POW_PRECISION\")&&(zo(n=e[t],0,Po,t),S=n),e.hasOwnProperty(t=\"FORMAT\")){if(\"object\"!=typeof(n=e[t]))throw Error(Io+t+\" not an object: \"+n);x=n}if(e.hasOwnProperty(t=\"ALPHABET\")){if(\"string\"!=typeof(n=e[t])||/^.?$|[+\\-.\\s]|(.).*\\1/.test(n))throw Error(Io+t+\" invalid: \"+n);_=\"0123456789\"==n.slice(0,10),E=n}}return{DECIMAL_PLACES:p,ROUNDING_MODE:g,EXPONENTIAL_AT:[m,v],RANGE:[y,w],CRYPTO:b,MODULO_MODE:A,POW_PRECISION:S,FORMAT:x,ALPHABET:E}},k.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!k.DEBUG)return!0;var t,n,r=e.c,o=e.e,i=e.s;e:if(\"[object Array]\"=={}.toString.call(r)){if((1===i||-1===i)&&o>=-Po&&o\u003C=Po&&o===ko(o)){if(0===r[0]){if(0===o&&1===r.length)return!0;break e}if((t=(o+1)%Co)\u003C1&&(t+=Co),String(r[0]).length==t){for(t=0;t\u003Cr.length;t++)if((n=r[t])\u003C0||n>=Oo||n!==ko(n))break e;if(0!==n)return!0}}}else if(null===r&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(Io+\"Invalid BigNumber: \"+e)},k.maximum=k.max=function(){return T(arguments,-1)},k.minimum=k.min=function(){return T(arguments,1)},k.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return ko(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,o,i,s=0,c=[],u=new k(h);if(null==e?e=p:zo(e,0,Po),o=_o(e/Co),b)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s\u003Co;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(c.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw b=!1,Error(Io+\"crypto unavailable\");for(t=crypto.randomBytes(o*=7);s\u003Co;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]\u003C\u003C16)+(t[s+5]\u003C\u003C8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(i%1e14),s+=7);s=o/7}if(!b)for(;s\u003Co;)(i=a())\u003C9e15&&(c[s++]=i%1e14);for(o=c[--s],e%=Co,o&&e&&(i=Ro[Co-e],c[s]=ko(o/i)*i);0===c[s];c.pop(),s--);if(s\u003C0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=Co);for(s=1,i=c[0];i>=10;i/=10,s++);s\u003CCo&&(r-=Co-s)}return u.e=r,u.c=c,u}),k.sum=function(){for(var e=1,t=arguments,n=new k(t[0]);e\u003Ct.length;)n=n.plus(t[e++]);return n},r=function(){var e=\"0123456789\";function t(e,t,n,r){for(var o,i,a=[0],s=0,c=e.length;s\u003Cc;){for(i=a.length;i--;a[i]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),o=0;o\u003Ca.length;o++)a[o]>n-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(r,o,i,a,s){var c,u,l,f,d,h,m,v,y=r.indexOf(\".\"),w=p,b=g;for(y>=0&&(f=S,S=0,r=r.replace(\".\",\"\"),h=(v=new k(o)).pow(r.length-y),S=f,v.c=t(Do(Lo(h.c),h.e,\"0\"),10,i,e),v.e=v.c.length),l=f=(m=t(r,o,i,s?(c=E,e):(c=e,E))).length;0==m[--f];m.pop());if(!m[0])return c.charAt(0);if(y\u003C0?--l:(h.c=m,h.e=l,h.s=a,m=(h=n(h,v,w,b,i)).c,d=h.r,l=h.e),y=m[u=l+w+1],f=i/2,d=d||u\u003C0||null!=m[u+1],d=b\u003C4?(null!=y||d)&&(0==b||b==(h.s\u003C0?3:2)):y>f||y==f&&(4==b||d||6==b&&1&m[u-1]||b==(h.s\u003C0?8:7)),u\u003C1||!m[0])r=d?Do(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(m.length=u,d)for(--i;++m[--u]>i;)m[u]=0,u||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(y=0,r=\"\";y\u003C=f;r+=c.charAt(m[y++]));r=Do(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,o,i,a,s=0,c=e.length,u=t%jo,l=t/jo|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%jo)+(r=l*i+(a=e[c]/jo|0)*u)%jo*jo+s)/n|0)+(r/jo|0)+l*a,e[c]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o\u003Cn;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]\u003Ct[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,i,a,s){var c,u,l,f,d,h,p,g,m,v,y,w,b,A,S,x,E,_=r.s==o.s?1:-1,I=r.c,T=o.c;if(!(I&&I[0]&&T&&T[0]))return new k(r.s&&o.s&&(I?!T||I[0]!=T[0]:T)?I&&0==I[0]||!T?0*_:_/0:NaN);for(m=(g=new k(_)).c=[],_=i+(u=r.e-o.e)+1,s||(s=Oo,u=No(r.e/Co)-No(o.e/Co),_=_/Co|0),l=0;T[l]==(I[l]||0);l++);if(T[l]>(I[l]||0)&&u--,_\u003C0)m.push(1),f=!0;else{for(A=I.length,x=T.length,l=0,_+=2,(d=ko(s/(T[0]+1)))>1&&(T=e(T,d,s),I=e(I,d,s),x=T.length,A=I.length),b=x,y=(v=I.slice(0,x)).length;y\u003Cx;v[y++]=0);E=T.slice(),E=[0].concat(E),S=T[0],T[1]>=s/2&&S++;do{if(d=0,(c=t(T,v,x,y))\u003C0){if(w=v[0],x!=y&&(w=w*s+(v[1]||0)),(d=ko(w/S))>1)for(d>=s&&(d=s-1),p=(h=e(T,d,s)).length,y=v.length;1==t(h,v,p,y);)d--,n(h,x\u003Cp?E:T,p,s),p=h.length,c=1;else 0==d&&(c=d=1),p=(h=T.slice()).length;if(p\u003Cy&&(h=[0].concat(h)),n(v,h,y,s),y=v.length,-1==c)for(;t(T,v,x,y)\u003C1;)d++,n(v,x\u003Cy?E:T,y,s),y=v.length}else 0===c&&(d++,v=[0]);m[l++]=d,v[0]?v[y++]=I[b]||0:(v=[I[b]],y=1)}while((b++\u003CA||null!=v[0])&&_--);f=null!=v[0],m[0]||m.splice(0,1)}if(s==Oo){for(l=1,_=m[0];_>=10;_/=10,l++);C(g,i+(g.e=l+u*Co-1)+1,a,f)}else g.e=u,g.r=+f;return g}}(),s=/^(-?)0([xbo])(?=\\w[\\w.]*$)/i,c=/^([^.]+)\\.$/,u=/^\\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g,o=function(e,t,n,r){var o,i=n?t:t.replace(f,\"\");if(l.test(i))e.s=isNaN(i)?null:i\u003C0?-1:1;else{if(!n&&(i=i.replace(s,(function(e,t,n){return o=\"x\"==(n=n.toLowerCase())?16:\"b\"==n?2:8,r&&r!=o?e:t})),r&&(o=r,i=i.replace(c,\"$1\").replace(u,\"0.$1\")),t!=i))return new k(i,o);if(k.DEBUG)throw Error(Io+\"Not a\"+(r?\" base \"+r:\"\")+\" number: \"+t);e.s=null}e.c=e.e=null},d.absoluteValue=d.abs=function(){var e=new k(this);return e.s\u003C0&&(e.s=1),e},d.comparedTo=function(e,t){return Mo(this,new k(e,t))},d.decimalPlaces=d.dp=function(e,t){var n,r,o,i=this;if(null!=e)return zo(e,0,Po),null==t?t=g:zo(t,0,8),C(new k(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-No(this.e/Co))*Co,o=n[o])for(;o%10==0;o/=10,r--);return r\u003C0&&(r=0),r},d.dividedBy=d.div=function(e,t){return n(this,new k(e,t),p,g)},d.dividedToIntegerBy=d.idiv=function(e,t){return n(this,new k(e,t),0,1)},d.exponentiatedBy=d.pow=function(e,t){var n,r,o,i,a,s,c,u,l=this;if((e=new k(e)).c&&!e.isInteger())throw Error(Io+\"Exponent not an integer: \"+B(e));if(null!=t&&(t=new k(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new k(Math.pow(+B(l),a?e.s*(2-Uo(e)):+B(e))),t?u.mod(t):u;if(s=e.s\u003C0,t){if(t.c?!t.c[0]:!t.s)return new k(NaN);(r=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e\u003C-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]\u003C8e13||a&&l.c[0]\u003C=9999975e7)))return i=l.s\u003C0&&Uo(e)?-0:0,l.e>-1&&(i=1/i),new k(s?1/i:i);S&&(i=_o(S/Co+2))}for(a?(n=new k(.5),s&&(e.s=1),c=Uo(e)):c=(o=Math.abs(+B(e)))%2,u=new k(h);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(o){if(0===(o=ko(o/2)))break;c=o%2}else if(C(e=e.times(n),e.e+1,1),e.e>14)c=Uo(e);else{if(0===(o=+B(e)))break;c=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(s&&(u=h.div(u)),t?u.mod(t):i?C(u,S,g,undefined):u)},d.integerValue=function(e){var t=new k(this);return null==e?e=g:zo(e,0,8),C(t,t.e+1,e)},d.isEqualTo=d.eq=function(e,t){return 0===Mo(this,new k(e,t))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(e,t){return Mo(this,new k(e,t))>0},d.isGreaterThanOrEqualTo=d.gte=function(e,t){return 1===(t=Mo(this,new k(e,t)))||0===t},d.isInteger=function(){return!!this.c&&No(this.e/Co)>this.c.length-2},d.isLessThan=d.lt=function(e,t){return Mo(this,new k(e,t))\u003C0},d.isLessThanOrEqualTo=d.lte=function(e,t){return-1===(t=Mo(this,new k(e,t)))||0===t},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s\u003C0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(e,t){var n,r,o,i,a=this,s=a.s;if(t=(e=new k(e,t)).s,!s||!t)return new k(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/Co,u=e.e/Co,l=a.c,f=e.c;if(!c||!u){if(!l||!f)return l?(e.s=-t,e):new k(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new k(l[0]?a:3==g?-0:0)}if(c=No(c),u=No(u),l=l.slice(),s=c-u){for((i=s\u003C0)?(s=-s,o=l):(u=c,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(r=(i=(s=l.length)\u003C(t=f.length))?s:t,s=t=0;t\u003Cr;t++)if(l[t]!=f[t]){i=l[t]\u003Cf[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(r=f.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=Oo-1;r>s;){if(l[--r]\u003Cf[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=Oo}l[r]-=f[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?O(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},d.modulo=d.mod=function(e,t){var r,o,i=this;return e=new k(e,t),!i.c||!e.s||e.c&&!e.c[0]?new k(NaN):!e.c||i.c&&!i.c[0]?new k(i):(9==A?(o=e.s,e.s=1,r=n(i,e,0,3),e.s=o,r.s*=o):r=n(i,e,0,A),(e=i.minus(r.times(e))).c[0]||1!=A||(e.s=i.s),e)},d.multipliedBy=d.times=function(e,t){var n,r,o,i,a,s,c,u,l,f,d,h,p,g,m,v=this,y=v.c,w=(e=new k(e,t)).c;if(!(y&&w&&y[0]&&w[0]))return!v.s||!e.s||y&&!y[0]&&!w||w&&!w[0]&&!y?e.c=e.e=e.s=null:(e.s*=v.s,y&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=No(v.e/Co)+No(e.e/Co),e.s*=v.s,(c=y.length)\u003C(f=w.length)&&(p=y,y=w,w=p,o=c,c=f,f=o),o=c+f,p=[];o--;p.push(0));for(g=Oo,m=jo,o=f;--o>=0;){for(n=0,d=w[o]%m,h=w[o]/m|0,i=o+(a=c);i>o;)n=((u=d*(u=y[--a]%m)+(s=h*u+(l=y[a]/m|0)*d)%m*m+p[i]+n)/g|0)+(s/m|0)+h*l,p[i--]=u%g;p[i]=n}return n?++r:p.splice(0,1),O(e,p,r)},d.negated=function(){var e=new k(this);return e.s=-e.s||null,e},d.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new k(e,t)).s,!o||!t)return new k(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/Co,a=e.e/Co,s=r.c,c=e.c;if(!i||!a){if(!s||!c)return new k(o/0);if(!s[0]||!c[0])return c[0]?e:new k(s[0]?r:0*o)}if(i=No(i),a=No(a),s=s.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=s),n.reverse();o--;n.push(0));n.reverse()}for((o=s.length)-(t=c.length)\u003C0&&(n=c,c=s,s=n,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/Oo|0,s[t]=Oo===s[t]?0:s[t]%Oo;return o&&(s=[o].concat(s),++a),O(e,s,a)},d.precision=d.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return zo(e,1,Po),null==t?t=g:zo(t,0,8),C(new k(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*Co+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},d.shiftedBy=function(e){return zo(e,-9007199254740991,Bo),this.times(\"1e\"+e)},d.squareRoot=d.sqrt=function(){var e,t,r,o,i,a=this,s=a.c,c=a.s,u=a.e,l=p+4,f=new k(\"0.5\");if(1!==c||!s||!s[0])return new k(!c||c\u003C0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+B(a)))||c==1/0?(((t=Lo(s)).length+u)%2==0&&(t+=\"0\"),c=Math.sqrt(+t),u=No((u+1)/2)-(u\u003C0||u%2),r=new k(t=c==1/0?\"5e\"+u:(t=c.toExponential()).slice(0,t.indexOf(\"e\")+1)+u)):r=new k(c+\"\"),r.c[0])for((c=(u=r.e)+l)\u003C3&&(c=0);;)if(i=r,r=f.times(i.plus(n(a,i,l,1))),Lo(i.c).slice(0,c)===(t=Lo(r.c)).slice(0,c)){if(r.e\u003Cu&&--c,\"9999\"!=(t=t.slice(c-3,c+1))&&(o||\"4999\"!=t)){+t&&(+t.slice(1)||\"5\"!=t.charAt(0))||(C(r,r.e+p+2,1),e=!r.times(r).eq(a));break}if(!o&&(C(i,i.e+p+2,0),i.times(i).eq(a))){r=i;break}l+=4,c+=4,o=1}return C(r,r.e+p+1,g,e)},d.toExponential=function(e,t){return null!=e&&(zo(e,0,Po),e++),I(this,e,t,1)},d.toFixed=function(e,t){return null!=e&&(zo(e,0,Po),e=e+this.e+1),I(this,e,t)},d.toFormat=function(e,t,n){var r,o=this;if(null==n)null!=e&&t&&\"object\"==typeof t?(n=t,t=null):e&&\"object\"==typeof e?(n=e,e=t=null):n=x;else if(\"object\"!=typeof n)throw Error(Io+\"Argument not an object: \"+n);if(r=o.toFixed(e,t),o.c){var i,a=r.split(\".\"),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||\"\",l=a[0],f=a[1],d=o.s\u003C0,h=d?l.slice(1):l,p=h.length;if(c&&(i=s,s=c,c=i,p-=i),s>0&&p>0){for(i=p%s||s,l=h.substr(0,i);i\u003Cp;i+=s)l+=u+h.substr(i,s);c>0&&(l+=u+h.slice(i)),d&&(l=\"-\"+l)}r=f?l+(n.decimalSeparator||\"\")+((c=+n.fractionGroupSize)?f.replace(new RegExp(\"\\\\d{\"+c+\"}\\\\B\",\"g\"),\"$&\"+(n.fractionGroupSeparator||\"\")):f):l}return(n.prefix||\"\")+r+(n.suffix||\"\")},d.toFraction=function(e){var t,r,o,i,a,s,c,u,l,f,d,p,m=this,v=m.c;if(null!=e&&(!(c=new k(e)).isInteger()&&(c.c||1!==c.s)||c.lt(h)))throw Error(Io+\"Argument \"+(c.isInteger()?\"out of range: \":\"not an integer: \")+B(c));if(!v)return new k(m);for(t=new k(h),l=r=new k(h),o=u=new k(h),p=Lo(v),a=t.e=p.length-m.e-1,t.c[0]=Ro[(s=a%Co)\u003C0?Co+s:s],e=!e||c.comparedTo(t)>0?a>0?t:l:c,s=w,w=1/0,c=new k(p),u.c[0]=0;f=n(c,t,0,1),1!=(i=r.plus(f.times(o))).comparedTo(e);)r=o,o=i,l=u.plus(f.times(i=l)),u=i,t=c.minus(f.times(i=t)),c=i;return i=n(e.minus(r),o,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(o)),u.s=l.s=m.s,d=n(l,o,a*=2,g).minus(m).abs().comparedTo(n(u,r,a,g).minus(m).abs())\u003C1?[l,o]:[u,r],w=s,d},d.toNumber=function(){return+B(this)},d.toPrecision=function(e,t){return null!=e&&zo(e,1,Po),I(this,e,t,2)},d.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t=\"Infinity\",o\u003C0&&(t=\"-\"+t)):t=\"NaN\":(null==e?t=i\u003C=m||i>=v?$o(Lo(n.c),i):Do(Lo(n.c),i,\"0\"):10===e&&_?t=Do(Lo((n=C(new k(n),p+i+1,g)).c),n.e,\"0\"):(zo(e,2,E.length,\"Base\"),t=r(Do(Lo(n.c),i,\"0\"),10,e,o,!0)),o\u003C0&&n.c[0]&&(t=\"-\"+t)),t},d.valueOf=d.toJSON=function(){return B(this)},d._isBigNumber=!0,d[Symbol.toStringTag]=\"BigNumber\",d[Symbol.for(\"nodejs.util.inspect.custom\")]=d.valueOf,null!=t&&k.set(t),k}();const qo=Fo;function Wo(e,t){return $(e,(e=>\"string\"==typeof e&&t.test(e)))}const Ko=/^(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})$/u,Go=/^[-a-z0-9]{3,8}$/u,Vo=/^[-_a-zA-Z0-9]{1,32}$/u,Ho=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32})):(?\u003CaccountAddress>[-.%a-zA-Z0-9]{1,128})$/u,Jo=/^[-.%a-zA-Z0-9]{1,128}$/u,Zo=/^[-a-z0-9]{3,8}$/u,Yo=/^[-.%a-zA-Z0-9]{1,128}$/u,Qo=/^[-.%a-zA-Z0-9]{1,78}$/u,Xo=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})$/u,ei=/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})\\/(?\u003CtokenId>[-.%a-zA-Z0-9]{1,78})$/u,ti=(Wo(\"CaipChainId\",Ko),Wo(\"CaipNamespace\",Go),Wo(\"CaipReference\",Vo),Wo(\"CaipAccountId\",Ho),Wo(\"CaipAccountAddress\",Jo),Wo(\"CaipAssetNamespace\",Zo),Wo(\"CaipAssetReference\",Yo),Wo(\"CaipTokenId\",Qo),Wo(\"CaipAssetType\",Xo));Wo(\"CaipAssetId\",ei),Wo(\"CaipAssetTypeOrId\",/^(?\u003CchainId>(?\u003Cnamespace>[-a-z0-9]{3,8}):(?\u003Creference>[-_a-zA-Z0-9]{1,32}))\\/(?\u003CassetNamespace>[-a-z0-9]{3,8}):(?\u003CassetReference>[-.%a-zA-Z0-9]{1,128})(\\/(?\u003CtokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var ni,ri;function oi(e){const t=Xo.exec(e);if(!t?.groups)throw new Error(\"Invalid CAIP asset type.\");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}function ii(e,t){return n=e,Boolean(\"string\"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}!function(e){e.Bip122=\"bip122\",e.Solana=\"solana\",e.Eip155=\"eip155\",e.Wallet=\"wallet\"}(ni=ni||(ni={}));class ai extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}function si(e,t=\"Assertion failed.\",n=ai){if(!e){if(t instanceof Error)throw t;throw ii(n,t)}}!function(e){e[e.Millisecond=1]=\"Millisecond\",e[e.Second=1e3]=\"Second\",e[e.Minute=6e4]=\"Minute\",e[e.Hour=36e5]=\"Hour\",e[e.Day=864e5]=\"Day\",e[e.Week=6048e5]=\"Week\",e[e.Year=31536e6]=\"Year\"}(ri=ri||(ri={}));var ci=n(5250);const ui=(e,t)=>`${e}:${t.map((e=>JSON.stringify(e))).join(\":\")}`,li=(e,t,{ttlMilliseconds:n,functionName:r,generateCacheKey:o})=>{const i=o??ui,a=r??e.name??\"anonymousFunction\";return async(...r)=>{const o=i(a,r);try{const e=await t.get(o);if(void 0!==e)return e}catch(e){console.error(`Cache get error for key \"${o}\":`,e)}const s=await e(...r);return t.set(o,s,n).catch((e=>{console.error(`Cache set error for key \"${o}\":`,e)})),s}};var fi=4,di=5,hi=6,pi=10,gi=-32700,mi=-32603,vi=-32602,yi=-32601,wi=-32600,bi=-32015,Ai=-32014,Si=-32012,xi=-32010,Ei=-32009,_i=-32007,ki=-32006,Ii=-32004,Ti=-32002,Oi=-32001,Ci=28e5,Bi=2800001,Ri=2800003,ji=2800006,Pi=2800007,Ni=2800008,Li=2800009,Mi=32300001,zi=3230004,Ui=361e4,$i=3610001,Di=3610003,Fi=3610005,qi=3610006,Wi=3610007,Ki=3704001,Gi=3704002,Vi=3704003,Hi=4615e3,Ji=4615026,Zi=4615045,Yi=5508e3,Qi=5663e3,Xi=5663001,ea=5663004,ta=5663005,na=5663006,ra=5663007,oa=5663008,ia=5663009,aa=5663012,sa=5663015,ca=5663016,ua=5663017,la=5663018,fa=5663019,da=705e4,ha=7050030,pa=7050031,ga=7050035,ma=8078e3,va=8078001,ya=8078004,wa=8078005,ba=8078006,Aa=8078007,Sa=8078011,xa=8078012,Ea=8078013,_a=8078014,ka=81e5,Ia=8100002,Ta=8100003,Oa=9900003;function Ca(e){if(Array.isArray(e)){return\"%5B\"+e.map(Ca).join(\"%2C%20\")+\"%5D\"}return\"bigint\"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function Ba([e,t]){return`${e}=${Ca(t)}`}function Ra(e,t={}){{let n=`Solana error #${e}; Decode this error by running \\`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(Ba).join(\"&\");return btoa(t)}(t)}'`),`${n}\\``}}function ja(e,t){return!!(e instanceof Error&&\"SolanaError\"===e.name)&&(void 0===t||e.context.__code===t)}var Pa=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;if(t){const{cause:e,...o}=t;e&&(r={cause:e}),Object.keys(o).length>0&&(n=o)}super(Ra(e,n),r),this.context={__code:e,...n},this.name=\"SolanaError\"}};function Na(...e){\"captureStackTrace\"in Error&&\"function\"==typeof Error.captureStackTrace&&Error.captureStackTrace(...e)}function La({errorCodeBaseOffset:e,getErrorContext:t,orderedErrorNames:n,rpcEnumError:r},o){let i,a;\"string\"==typeof r?i=r:(i=Object.keys(r)[0],a=r[i]);const s=e+n.indexOf(i),c=t(s,i,a),u=new Pa(s,c);return Na(u,o),u}var Ma=[\"GenericError\",\"InvalidArgument\",\"InvalidInstructionData\",\"InvalidAccountData\",\"AccountDataTooSmall\",\"InsufficientFunds\",\"IncorrectProgramId\",\"MissingRequiredSignature\",\"AccountAlreadyInitialized\",\"UninitializedAccount\",\"UnbalancedInstruction\",\"ModifiedProgramId\",\"ExternalAccountLamportSpend\",\"ExternalAccountDataModified\",\"ReadonlyLamportChange\",\"ReadonlyDataModified\",\"DuplicateAccountIndex\",\"ExecutableModified\",\"RentEpochModified\",\"NotEnoughAccountKeys\",\"AccountDataSizeChanged\",\"AccountNotExecutable\",\"AccountBorrowFailed\",\"AccountBorrowOutstanding\",\"DuplicateAccountOutOfSync\",\"Custom\",\"InvalidError\",\"ExecutableDataModified\",\"ExecutableLamportChange\",\"ExecutableAccountNotRentExempt\",\"UnsupportedProgramId\",\"CallDepth\",\"MissingAccount\",\"ReentrancyNotAllowed\",\"MaxSeedLengthExceeded\",\"InvalidSeeds\",\"InvalidRealloc\",\"ComputationalBudgetExceeded\",\"PrivilegeEscalation\",\"ProgramEnvironmentSetupFailure\",\"ProgramFailedToComplete\",\"ProgramFailedToCompile\",\"Immutable\",\"IncorrectAuthority\",\"BorshIoError\",\"AccountNotRentExempt\",\"InvalidAccountOwner\",\"ArithmeticOverflow\",\"UnsupportedSysvar\",\"IllegalOwner\",\"MaxAccountsDataAllocationsExceeded\",\"MaxAccountsExceeded\",\"MaxInstructionTraceLengthExceeded\",\"BuiltinProgramsMustConsumeComputeUnits\"];function za(e,t){const n=Number(e);return La({errorCodeBaseOffset:4615001,getErrorContext:(e,t,r)=>e===Hi?{errorName:t,index:n,...void 0!==r?{instructionErrorContext:r}:null}:e===Ji?{code:Number(r),index:n}:e===Zi?{encodedData:r,index:n}:{index:n},orderedErrorNames:Ma,rpcEnumError:t},za)}var Ua=[\"AccountInUse\",\"AccountLoadedTwice\",\"AccountNotFound\",\"ProgramAccountNotFound\",\"InsufficientFundsForFee\",\"InvalidAccountForFee\",\"AlreadyProcessed\",\"BlockhashNotFound\",\"CallChainTooDeep\",\"MissingSignatureForFee\",\"InvalidAccountIndex\",\"SignatureFailure\",\"InvalidProgramForExecution\",\"SanitizeFailure\",\"ClusterMaintenance\",\"AccountBorrowOutstanding\",\"WouldExceedMaxBlockCostLimit\",\"UnsupportedVersion\",\"InvalidWritableAccount\",\"WouldExceedMaxAccountCostLimit\",\"WouldExceedAccountDataBlockLimit\",\"TooManyAccountLocks\",\"AddressLookupTableNotFound\",\"InvalidAddressLookupTableOwner\",\"InvalidAddressLookupTableData\",\"InvalidAddressLookupTableIndex\",\"InvalidRentPayingAccount\",\"WouldExceedMaxVoteCostLimit\",\"WouldExceedAccountDataTotalLimit\",\"DuplicateInstruction\",\"InsufficientFundsForRent\",\"MaxLoadedAccountsDataSizeExceeded\",\"InvalidLoadedAccountsDataSizeLimit\",\"ResanitizationNeeded\",\"ProgramExecutionTemporarilyRestricted\",\"UnbalancedTransaction\"];function $a(e){return\"object\"==typeof e&&\"InstructionError\"in e?za(...e.InstructionError):La({errorCodeBaseOffset:7050001,getErrorContext:(e,t,n)=>e===da?{errorName:t,...void 0!==n?{transactionErrorContext:n}:null}:e===ha?{index:Number(n)}:e===pa||e===ga?{accountIndex:Number(n.account_index)}:void 0,orderedErrorNames:Ua,rpcEnumError:e},$a)}function Da(e){let t;if(\"object\"==typeof(n=e)&&null!==n&&\"code\"in n&&\"message\"in n&&(\"number\"==typeof n.code||\"bigint\"==typeof n.code)&&\"string\"==typeof n.message){const{code:n,data:r,message:o}=e,i=Number(n);if(i===Ti){const{err:e,...n}=r,o=e?{cause:$a(e)}:null;t=new Pa(Ti,{...n,...o})}else{let e;switch(i){case mi:case vi:case wi:case yi:case gi:case Si:case Oi:case Ii:case Ai:case xi:case Ei:case _i:case ki:case bi:e={__serverMessage:o};break;default:\"object\"!=typeof r||Array.isArray(r)||(e=r)}t=new Pa(i,e)}}else{const n=\"object\"==typeof e&&null!==e&&\"message\"in e&&\"string\"==typeof e.message?e.message:\"Malformed JSON-RPC error with no message attribute\";t=new Pa(pi,{error:e,message:n})}var n;return Na(t,Da),t}var Fa=(e,t)=>((e,t)=>{if(e.length>=t)return e;const n=new Uint8Array(t).fill(0);return n.set(e),n})(e.length\u003C=t?e:e.slice(0,t),t);function qa(e,t,n){const r=0===n&&e.length===t.length?e:e.slice(n,n+t.length);return r.length===t.length&&t.every(((e,t)=>e===r[t]))}function Wa(e,t){return\"fixedSize\"in t?t.fixedSize:t.getSizeFromValue(e)}function Ka(e){return Object.freeze({...e,encode:t=>{const n=new Uint8Array(Wa(t,e));return e.write(t,n,0),n}})}function Ga(e){return Object.freeze({...e,decode:(t,n=0)=>e.read(t,n)[0]})}function Va(e){return\"fixedSize\"in e&&\"number\"==typeof e.fixedSize}function Ha(e){return!Va(e)}function Ja(e,t){if(Va(e)!==Va(t))throw new Pa(ya);if(Va(e)&&Va(t)&&e.fixedSize!==t.fixedSize)throw new Pa(wa,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Va(e)&&!Va(t)&&e.maxSize!==t.maxSize)throw new Pa(ba,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function Za(e,t,n,r=0){const o=n.length-r;if(o\u003Ct)throw new Pa(va,{bytesLength:o,codecDescription:e,expected:t})}function Ya(e,t,n){if(t\u003C0||t>n)throw new Pa(_a,{bytesLength:n,codecDescription:e,offset:t})}function Qa(e,t){const n=(n,r,o)=>{const i=e.encode(n);return o=t.write(i.length,r,o),r.set(i,o),o+i.length};if(Va(t)&&Va(e))return Ka({...e,fixedSize:t.fixedSize+e.fixedSize,write:n});const r=Va(t)?t.fixedSize:t.maxSize??null,o=Va(e)?e.fixedSize:e.maxSize??null,i=null!==r&&null!==o?r+o:null;return Ka({...e,...null!==i?{maxSize:i}:{},getSizeFromValue:n=>{const r=Wa(n,e);return Wa(r,t)+r},write:n})}function Xa(e,t){const n=(n,r)=>{const[o,i]=t.read(n,r),a=Number(o);return((r=i)>0||n.length>a)&&(n=n.slice(r,r+a)),Za(\"addDecoderSizePrefix\",a,n),[e.decode(n),r+a]};if(Va(t)&&Va(e))return Ga({...e,fixedSize:t.fixedSize+e.fixedSize,read:n});const r=Va(t)?t.fixedSize:t.maxSize??null,o=Va(e)?e.fixedSize:e.maxSize??null,i=null!==r&&null!==o?r+o:null;return Ga({...e,...null!==i?{maxSize:i}:{},read:n})}function es(e,t){return Ka({fixedSize:t,write:(n,r,o)=>{const i=e.encode(n),a=i.length>t?i.slice(0,t):i;return r.set(a,o),o+t}})}function ts(e,t){return Ga({fixedSize:t,read:(n,r)=>{Za(\"fixCodecSize\",t,n,r),(r>0||n.length>t)&&(n=n.slice(r,r+t)),Va(e)��v�&&(n=Fa(n,e.fixedSize));const[o]=e.read(n,0);return[o,r+t]}})}function ns(e,t){return Ga({...e,read:(n,r)=>{const o=e=>rs(e,n.length),i=t.preOffset?t.preOffset({bytes:n,preOffset:r,wrapBytes:o}):r;Ya(\"offsetDecoder\",i,n.length);const[a,s]=e.read(n,i),c=t.postOffset?t.postOffset({bytes:n,newPreOffset:i,postOffset:s,preOffset:r,wrapBytes:o}):s;return Ya(\"offsetDecoder\",c,n.length),[a,c]}})}function rs(e,t){return 0===t?0:(e%t+t)%t}function os(e,t){if(Va(e)){const n=t(e.fixedSize);if(n\u003C0)throw new Pa(Ea,{bytesLength:n,codecDescription:\"resizeDecoder\"});return Ga({...e,fixedSize:n})}return e}function is(e,t){return ns(os(e,(e=>e+t)),{postOffset:({postOffset:e})=>e+t})}function as(e,t){return Ka({...Ha(e)?{...e,getSizeFromValue:n=>e.getSizeFromValue(t(n))}:e,write:(n,r,o)=>e.write(t(n),r,o)})}function ss(e,t){return Ga({...e,read:(n,r)=>{const[o,i]=e.read(n,r);return[t(o,n,r),i]}})}function cs(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new Pa(xa,{alphabet:e,base:e.length,value:n})}var us=e=>Ka({getSizeFromValue:t=>{const[n,r]=ds(t,e[0]);if(!r)return t.length;const o=hs(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(cs(e,t),\"\"===t)return r;const[o,i]=ds(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=hs(i,e);const s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;const c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),ls=e=>Ga({read(t,n){const r=0===n?t:t.slice(n);if(0===r.length)return[\"\",0];let o=r.findIndex((e=>0!==e));o=-1===o?r.length:o;const i=e[0].repeat(o);if(o===r.length)return[i,t.length];const a=function(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join(\"\")}(r.slice(o).reduce(((e,t)=>256n*e+BigInt(t)),0n),e);return[i+a,t.length]}}),fs=e=>Ja(us(e),ls(e));function ds(e,t){const[n,r]=e.split(new RegExp(`((?!${t}).*)`));return[n,r]}function hs(e,t){const n=BigInt(t.length);let r=0n;for(const o of e)r*=n,r+=BigInt(t.indexOf(o));return r}var ps=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\",gs=()=>us(ps),ms=()=>ls(ps);var vs,ys,ws=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",bs=()=>Ka({getSizeFromValue:e=>{try{return atob(e).length}catch{throw new Pa(xa,{alphabet:ws,base:64,value:e})}},write(e,t,n){try{const r=atob(e).split(\"\").map((e=>e.charCodeAt(0)));return t.set(r,n),r.length+n}catch{throw new Pa(xa,{alphabet:ws,base:64,value:e})}}}),As=()=>Ga({read(e,t=0){const n=e.slice(t);return[btoa(String.fromCharCode(...n)),e.length]}}),Ss=()=>Ja(bs(),As()),xs=e=>e.replace(/\\u0000/g,\"\"),Es=globalThis.TextDecoder,_s=globalThis.TextEncoder,ks=()=>Ja((()=>{let e;return Ka({getSizeFromValue:t=>(e||=new _s).encode(t).length,write:(t,n,r)=>{const o=(e||=new _s).encode(t);return n.set(o,r),r+o.length}})})(),(()=>{let e;return Ga({read(t,n){const r=(e||=new Es).decode(t.slice(n));return[xs(r),t.length]}})})());function Is(){if(!globalThis.isSecureContext)throw new Pa(Ui)}function Ts(){if(Is(),void 0===globalThis.crypto||\"function\"!=typeof globalThis.crypto.subtle?.exportKey)throw new Pa(Di)}function Os(){return vs||(vs=gs()),vs}function Cs(e){if(e.length\u003C32||e.length>44)throw new Pa(Bi,{actualLength:e.length});const t=Os().encode(e).byteLength;if(32!==t)throw new Pa(Ci,{actualLength:t})}function Bs(e){return Cs(e),e}function Rs(){return as(es(Os(),32),(e=>Bs(e)))}function js(){return ts((ys||(ys=ms()),ys),32)}function Ps(){return Ja(Rs(),js())}function Ns(){return new Intl.Collator(\"en\",{caseFirst:\"lower\",ignorePunctuation:!1,localeMatcher:\"best fit\",numeric:!1,sensitivity:\"variant\",usage:\"sort\"}).compare}var Ls=37095705934669439343138083508754565189542113879843219016388785533085940283555n,Ms=57896044618658097711785492504343953926634992332820282019728792003956564819949n,zs=19681161376707505956807079304988542015446066515923890162744021073123829784752n;function Us(e){const t=e%Ms;return t>=0n?t:Ms+t}function $s(e,t){let n=e;for(;t-- >0n;)n*=n,n%=Ms;return n}function Ds(e,t){const n=Us(t*t*t),r=function(e){const t=e*e%Ms*e%Ms,n=$s(t,2n)*t%Ms,r=$s(n,1n)*e%Ms,o=$s(r,5n)*r%Ms,i=$s(o,10n)*o%Ms,a=$s(i,20n)*i%Ms,s=$s(a,40n)*a%Ms,c=$s(s,80n)*s%Ms,u=$s(c,80n)*s%Ms,l=$s(u,10n)*o%Ms;return $s(l,2n)*e%Ms}(e*Us(n*n*t));let o=Us(e*n*r);const i=Us(t*o*o),a=o,s=Us(o*zs),c=i===e,u=i===Us(-e),l=i===Us(-e*zs);return c&&(o=a),(u||l)&&(o=s),1n===(1n&Us(o))&&(o=Us(-o)),c||u?o:null}function Fs(e){if(32!==e.byteLength)return!1;const t=function(e){const t=e.reduce(((e,t,n)=>`${function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(31===n?-129&t:t)}${e}`),\"\");return BigInt(`0x${t}`)}(e);return function(e,t){const n=Us(e*e),r=Ds(Us(n-1n),Us(Ls*n+1n));return null!==r&&(0n!==r||!(0!=(128&t)))}(t,e[31])}var qs=32,Ws=16,Ks=[80,114,111,103,114,97,109,68,101,114,105,118,101,100,65,100,100,114,101,115,115];async function Gs({programAddress:e,seeds:t}){if(function(){if(Is(),void 0===globalThis.crypto||\"function\"!=typeof globalThis.crypto.subtle?.digest)throw new Pa($i)}(),t.length>Ws)throw new Pa(ji,{actual:t.length,maxSeeds:Ws});let n;const r=t.reduce(((e,t,r)=>{const o=\"string\"==typeof t?(n||=new TextEncoder).encode(t):t;if(o.byteLength>qs)throw new Pa(Pi,{actual:o.byteLength,index:r,maxSeedLength:qs});return e.push(...o),e}),[]),o=Ps(),i=o.encode(e),a=await crypto.subtle.digest(\"SHA-256\",new Uint8Array([...r,...i,...Ks])),s=new Uint8Array(a);if(Fs(s))throw new Pa(Ni);return o.decode(s)}async function Vs(e){if(Ts(),\"public\"!==e.type||\"Ed25519\"!==e.algorithm.name)throw new Pa(Ri);const t=await crypto.subtle.exportKey(\"raw\",e);return js().decode(new Uint8Array(t))}const Hs=1000000n,Js=1e9;var Zs,Ys;!function(e){e.Mainnet=\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\",e.Devnet=\"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\",e.Testnet=\"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\",e.Localnet=\"solana:123456789abcdef\"}(Zs||(Zs={})),function(e){e[e.SolMainnet=`${Zs.Mainnet}/slip44:501`]=\"SolMainnet\",e[e.SolDevnet=`${Zs.Devnet}/slip44:501`]=\"SolDevnet\",e[e.SolTestnet=`${Zs.Testnet}/slip44:501`]=\"SolTestnet\",e[e.SolLocalnet=`${Zs.Localnet}/slip44:501`]=\"SolLocalnet\",e[e.UsdcMainnet=`${Zs.Mainnet}/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`]=\"UsdcMainnet\",e[e.UsdcDevnet=`${Zs.Devnet}/token:4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU`]=\"UsdcDevnet\",e[e.UsdcLocalnet=`${Zs.Localnet}/token:4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU`]=\"UsdcLocalnet\",e[e.EurcMainnet=`${Zs.Mainnet}/token:HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr`]=\"EurcMainnet\",e[e.EurcDevnet=`${Zs.Devnet}/token:HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr`]=\"EurcDevnet\",e[e.EurcLocalnet=`${Zs.Localnet}/token:HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr`]=\"EurcLocalnet\",e[e.Ai16zLocalnet=`${Zs.Localnet}/token:HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC`]=\"Ai16zLocalnet\"}(Ys||(Ys={}));Zs.Mainnet,Zs.Devnet,Zs.Testnet,Zs.Localnet;var Qs;!function(e){e.SOL=\"slip44:501\"}(Qs||(Qs={}));const Xs={[Ys.SolMainnet]:{symbol:\"SOL\",caip19Id:Ys.SolMainnet,address:\"So11111111111111111111111111111111111111112\",decimals:9},[Ys.SolDevnet]:{symbol:\"SOL\",caip19Id:Ys.SolDevnet,address:\"So11111111111111111111111111111111111111112\",decimals:9},[Ys.SolTestnet]:{symbol:\"SOL\",caip19Id:Ys.SolTestnet,address:\"So11111111111111111111111111111111111111112\",decimals:9},[Ys.SolLocalnet]:{symbol:\"SOL\",caip19Id:Ys.SolLocalnet,address:\"So11111111111111111111111111111111111111112\",decimals:9},[Ys.UsdcMainnet]:{symbol:\"USDC\",caip19Id:Ys.UsdcMainnet,address:\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",decimals:6},[Ys.UsdcDevnet]:{symbol:\"USDC\",caip19Id:Ys.UsdcDevnet,address:\"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",decimals:6},[Ys.UsdcLocalnet]:{symbol:\"USDC\",caip19Id:Ys.UsdcLocalnet,address:\"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",decimals:6}},ec=Bs(\"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb\"),tc={[Zs.Mainnet]:{caip2Id:Zs.Mainnet,cluster:\"mainnet\",name:\"Solana Mainnet\",nativeToken:Xs[Ys.SolMainnet]},[Zs.Devnet]:{caip2Id:Zs.Devnet,cluster:\"devnet\",name:\"Solana Devnet\",nativeToken:Xs[Ys.SolDevnet]},[Zs.Testnet]:{caip2Id:Zs.Testnet,cluster:\"testnet\",name:\"Solana Testnet\",nativeToken:Xs[Ys.SolTestnet]},[Zs.Localnet]:{caip2Id:Zs.Localnet,cluster:\"local\",name:\"Solana Localnet\",nativeToken:Xs[Ys.SolLocalnet]}},nc=me(oe(),/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u),rc=me(oe(),/^(?!0\\d)(\\d+(\\.\\d+)?)$/u),oc=ve(oe(),\"safe-url\",(e=>{try{const t=new URL(e);if(![\"http:\",\"https:\"].includes(t.protocol))return\"URL must use http or https protocol\";if(!e.match(/^https?:\\/\\/[^/]+\\/?/u))return\"Malformed URL - incorrect protocol format\";const n=t.hostname.toLowerCase();if(!(\"localhost\"===n||n.includes(\".\")&&/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/u.test(n)))return\"Invalid hostname format\";const r=decodeURIComponent(e.toLowerCase());if(e.includes(\"\\\\\")||e.includes(\"@\")||r.includes(\"\\\\\")||r.includes(\"@\")||e.toLowerCase().includes(\"%2f@\")||e.toLowerCase().includes(\"%5c@\"))return\"URL contains protocol pollution attempts\";const o=decodeURIComponent(n);if(n.includes(\"\\\\\")||n.includes(\"@\")||o.includes(\"/\")||n.toLowerCase().includes(\"%2f\"))return\"Invalid hostname characters detected\";if(e.includes(\"../\")||e.includes(\"..%2f\")||e.includes(\"..%2F\"))return\"Directory traversal attempts are not allowed\";const i=[/\u003C[^>]*>/u,/javascript:/u,/data:/u,/\\\\[@\\\\]/u,/%2f@/u,/[^\\x20-\\x7E]/u,/\\$\\{.*?\\}/u,/#\\{.*?\\}/u,/[|;]/u,/%0[acd]|%0[acd]/u,/\\/\\/\\w+@/u,/(?:[^a-z]|^)(?:union\\s+(?:all\\s+)?select|select\\s+(?:.*\\s+)?from|insert\\s+into|update\\s+.*\\s+set|delete\\s+from|drop\\s+table|alter\\s+table|create\\s+table|exec(?:ute)?|union|where\\s+[\\d\\w]\\s*=\\s*[\\d\\w]|\\bor\\b\\s*[\\d\\w]\\s*=\\s*[\\d\\w])/iu,/'.*?(?:OR|UNION|SELECT|FROM|WHERE).*?'/iu,/%27.*?(?:OR|UNION|SELECT|FROM|WHERE).*?(?:%27|')/iu,/%20(?:OR|UNION|SELECT|FROM|WHERE)%20/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=(?:[^&]*\\/\\/|https?:)/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=%(?:[^&]*\\/\\/|https?:)/iu];for(const e of i)if(e.test(r))return\"URL contains potentially malicious patterns\";return!(t.port&&!/^\\d+$/u.test(t.port))||\"Invalid port number\"}catch(e){return\"Invalid URL format\"}})),ic=te({accountId:nc}),ac=te({accountId:nc}),sc=te({accountId:nc}),cc=te({accountId:nc,assets:V(at)}),uc=te({accountId:nc,pagination:te({limit:Z(),next:ne(X(oe()))})}),lc=re(at,te({amount:rc,unit:oe()})),fc=(V(at),J(Object.values(qt)),te({base64EncodedTransactionMessage:oe()}),J(Object.values(Zs))),dc=(J([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"usd\",\"aed\",\"ars\",\"aud\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"czk\",\"dkk\",\"eur\",\"gbp\",\"gel\",\"hkd\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"krw\",\"kwd\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"php\",\"pkr\",\"pln\",\"rub\",\"sar\",\"sek\",\"sgd\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"zar\",\"xdr\",\"xag\",\"xau\",\"bits\",\"sats\"]),te({transaction:oe(),scope:J(Object.values(Zs))})),hc=te({value:X(rc)}),pc=$(\"Base58\",(e=>\"string\"!=typeof e?\"Expected a string, but received: \"+typeof e:!!/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(e)||\"Expected a Base58 encoded string, but received a string with invalid characters\")),gc=me(oe(),/^(?:[A-Za-z0-9+/]{4})+(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u),mc=me(oe(),/^m\\/44'\\/501'/u);function vc(e){const{baseUrl:t,path:n,pathParams:r,queryParams:o}=e;L(t,oc);const i=n.replace(/\\{(\\w+)\\}/gu,((e,t)=>{var n;const o=null===(n=r)||void 0===n?void 0:n[t];if(void 0===o)throw new Error(`Path parameter ${t} is undefined`);return o})).replace(/^\\/+/u,\"\").replace(/\\/+/gu,\"/\").replace(/\\/+$/u,\"\"),a=new URL(i,t);Object.entries(o??{}).filter((([e,t])=>void 0!==t)).filter((([e,t])=>null!==t)).forEach((([e,t])=>{t&&a.searchParams.append(e,t)}));const s=a.toString();return L(s,oc),s}var yc,wc=((yc=wc||{})[yc.WRITABLE_SIGNER=3]=\"WRITABLE_SIGNER\",yc[yc.READONLY_SIGNER=2]=\"READONLY_SIGNER\",yc[yc.WRITABLE=1]=\"WRITABLE\",yc[yc.READONLY=0]=\"READONLY\",yc),bc=2,Ac=1;function Sc(e){return e>=2}function xc(e){return 0!=(e&Ac)}function Ec(e,t){return e|t}function _c(e){return e|bc}var kc,Ic=Object.freeze({name:\"Ed25519\"});async function Tc(e,t){const n=e.byteLength;if(32!==n)throw new Pa(Ki,{actualLength:n});const r=function(e){return new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32,...e])}(e);return await crypto.subtle.importKey(\"pkcs8\",r,Ic,t??!1,[\"sign\"])}async function Oc(e,t){!function(){if(Is(),void 0===globalThis.crypto||\"function\"!=typeof globalThis.crypto.subtle?.sign)throw new Pa(Fi)}();const n=await crypto.subtle.sign(Ic,e,t);return new Uint8Array(n)}function Cc(e){return function(e){if(kc||(kc=gs()),e.length\u003C64||e.length>88)throw new Pa(Vi,{actualLength:e.length});const t=kc.encode(e).byteLength;if(64!==t)throw new Pa(Gi,{actualLength:t})}(e),e}async function Bc(e,t,n){return function(){if(Is(),void 0===globalThis.crypto||\"function\"!=typeof globalThis.crypto.subtle?.verify)throw new Pa(qi)}(),await crypto.subtle.verify(Ic,e,t,n)}async function Rc(e,t=!1){const n=Tc(e,t),[r,o]=await Promise.all([(t?n:Tc(e,!0)).then((async e=>await async function(e,t=!1){if(Ts(),!1===e.extractable)throw new Pa(Wi,{key:e});const n=await crypto.subtle.exportKey(\"jwk\",e);return await crypto.subtle.importKey(\"jwk\",{crv:\"Ed25519\",ext:t,key_ops:[\"verify\"],kty:\"OKP\",x:n.x},\"Ed25519\",t,[\"verify\"])}(e,!0))),n]);return{privateKey:o,publicKey:r}}function jc(e,t,n,r){if(r\u003Ct||r>n)throw new Pa(Sa,{codecDescription:e,max:n,min:t,value:r})}var Pc,Nc=((Pc=Nc||{})[Pc.Little=0]=\"Little\",Pc[Pc.Big=1]=\"Big\",Pc);function Lc(e){return 1!==e?.endian}function Mc(e){return Ka({fixedSize:e.size,write(t,n,r){e.range&&jc(e.name,e.range[0],e.range[1],t);const o=new ArrayBuffer(e.size);return e.set(new DataView(o),t,Lc(e.config)),n.set(new Uint8Array(o),r),r+e.size}})}function zc(e){return Ga({fixedSize:e.size,read(t,n=0){!function(e,t,n=0){if(t.length-n\u003C=0)throw new Pa(ma,{codecDescription:e})}(e.name,t,n),Za(e.name,e.size,t,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(t??0),o=n??e.byteLength;return e.buffer.slice(r,r+o)}(t,n,e.size));return[e.get(r,Lc(e.config)),n+e.size]}})}var Uc=()=>Ka({getSizeFromValue:e=>e\u003C=127?1:e\u003C=16383?2:3,maxSize:3,write:(e,t,n)=>{jc(\"shortU16\",0,65535,e);const r=[0];for(let t=0;;t+=1){const n=Number(e)>>7*t;if(0===n)break;const o=127&n;r[t]=o,t>0&&(r[t-1]|=128)}return t.set(r,n),n+r.length}}),$c=()=>Ga({maxSize:3,read:(e,t)=>{let n=0,r=0;for(;++r;){const o=r-1,i=e[t+o];if(n|=(127&i)\u003C\u003C7*o,0==(128&i))break}return[n,t+r]}}),Dc=(e={})=>Mc({config:e,name:\"u32\",range:[0,Number(\"0xffffffff\")],set:(e,t,n)=>e.setUint32(0,Number(t),n),size:4}),Fc=(e={})=>zc({config:e,get:(e,t)=>e.getUint32(0,t),name:\"u32\",size:4}),qc=(e={})=>Mc({config:e,name:\"u64\",range:[0n,BigInt(\"0xffffffffffffffff\")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8}),Wc=()=>Mc({name:\"u8\",range:[0,Number(\"0xff\")],set:(e,t)=>e.setUint8(0,Number(t)),size:1}),Kc=()=>zc({get:e=>e.getUint8(0),name:\"u8\",size:1});function Gc(e,t,n){if(t!==n)throw new Pa(Aa,{actual:n,codecDescription:e,expected:t})}function Vc(e){return e.reduce(((e,t)=>null===e||null===t?null:e+t),0)}function Hc(e){return Va(e)?e.fixedSize:null}function Jc(e){return Va(e)?e.fixedSize:e.maxSize??null}function Zc(e,t={}){const n=t.size??Dc(),r=Qc(n,Hc(e)),o=Qc(n,Jc(e))??void 0;return Ka({...null!==r?{fixedSize:r}:{getSizeFromValue:t=>(\"object\"==typeof n?Wa(t.length,n):0)+[...t].reduce(((t,n)=>t+Wa(n,e)),0),maxSize:o},write:(t,r,o)=>(\"number\"==typeof n&&Gc(\"array\",n,t.length),\"object\"==typeof n&&(o=n.write(t.length,r,o)),t.forEach((t=>{o=e.write(t,r,o)})),o)})}function Yc(e,t={}){const n=t.size??Fc(),r=Hc(e),o=Qc(n,r),i=Qc(n,Jc(e))??void 0;return Ga({...null!==o?{fixedSize:o}:{maxSize:i},read:(t,r)=>{const o=[];if(\"object\"==typeof n&&0===t.slice(r).length)return[o,r];if(\"remainder\"===n){for(;r\u003Ct.length;){const[n,i]=e.read(t,r);r=i,o.push(n)}return[o,r]}const[i,a]=\"number\"==typeof n?[n,r]:n.read(t,r);r=a;for(let n=0;n\u003Ci;n+=1){const[n,i]=e.read(t,r);r=i,o.push(n)}return[o,r]}})}function Qc(e,t){return\"number\"!=typeof e?null:0===e?0:null===t?null:t*e}function Xc(){return Ka({getSizeFromValue:e=>e.length,write:(e,t,n)=>(t.set(e,n),n+e.length)})}function eu(){return Ga({read:(e,t)=>{const n=e.slice(t);return[n,t+n.length]}})}function tu(e){const t=Vc(e.map(Hc)),n=Vc(e.map(Jc))??void 0;return Ga({...null===t?{maxSize:n}:{fixedSize:t},read:(t,n)=>{const r=[];return e.forEach((e=>{const[o,i]=e.read(t,n);r.push(o),n=i})),[r,n]}})}var nu;function ru(e){const t=e.map((([,e])=>e)),n=Vc(t.map(Hc)),r=Vc(t.map(Jc))??void 0;return Ka({...null===n?{getSizeFromValue:t=>e.map((([e,n])=>Wa(t[e],n))).reduce(((e,t)=>e+t),0),maxSize:r}:{fixedSize:n},write:(t,n,r)=>(e.forEach((([e,o])=>{r=o.write(t[e],n,r)})),r)})}function ou(e){const t=e.map((([,e])=>e)),n=Vc(t.map(Hc)),r=Vc(t.map(Jc))??void 0;return Ga({...null===n?{maxSize:r}:{fixedSize:n},read:(t,n)=>{const r={};return e.forEach((([e,o])=>{const[i,a]=o.read(t,n);n=a,r[e]=i})),[r,n]}})}function iu(){return nu||(nu=gs()),nu}function au(e){if(e.length\u003C32||e.length>44)throw new Pa(fi,{actualLength:e.length});const t=iu().encode(e).byteLength;if(32!==t)throw new Pa(di,{actualLength:t})}function su(e){switch(e){case\"finalized\":return 2;case\"confirmed\":return 1;case\"processed\":return 0;default:throw new Pa(Oa,{unexpectedValue:e})}}var cu=18446744073709551615n;function uu(e){return function(e){if(e\u003C0||e>cu)throw new Pa(hi)}(e),e}function lu(e,...t){return t.reduce(((e,t)=>t(e)),e)}function fu(e){if(!(\"lifetimeConstraint\"in e&&\"string\"==typeof e.lifetimeConstraint.blockhash&&\"bigint\"==typeof e.lifetimeConstraint.lastValidBlockHeight))return!1;try{return au(e.lifetimeConstraint.blockhash),!0}catch{return!1}}function du(e,t){if(\"lifetimeConstraint\"in t&&t.lifetimeConstraint.blockhash===e.blockhash&&t.lifetimeConstraint.lastValidBlockHeight===e.lastValidBlockHeight)return t;const n={...t,lifetimeConstraint:Object.freeze(e)};return Object.freeze(n),n}var hu=e=>Ka({getSizeFromValue:t=>{const[n,r]=gu(t,e[0]);if(!r)return t.length;const o=mu(r,e);return n.length+Math.ceil(o.toString(16).length/2)},write(t,n,r){if(function(e,t,n=t){if(!t.match(new RegExp(`^[${e}]*$`)))throw new Pa(xa,{alphabet:e,base:e.length,value:n})}(e,t),\"\"===t)return r;const[o,i]=gu(t,e[0]);if(!i)return n.set(new Uint8Array(o.length).fill(0),r),r+o.length;let a=mu(i,e);const s=[];for(;a>0n;)s.unshift(Number(a%256n)),a/=256n;const c=[...Array(o.length).fill(0),...s];return n.set(c,r),r+c.length}}),pu=e=>Ga({read(t,n){const r=0===n?t:t.slice(n);if(0===r.length)return[\"\",0];let o=r.findIndex((e=>0!==e));o=-1===o?r.length:o;const i=e[0].repeat(o);if(o===r.length)return[i,t.length];const a=function(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join(\"\")}(r.slice(o).reduce(((e,t)=>256n*e+BigInt(t)),0n),e);return[i+a,t.length]}});function gu(e,t){const[n,r]=e.split(new RegExp(`((?!${t}).*)`));return[n,r]}function mu(e,t){const n=BigInt(t.length);let r=0n;for(const o of e)r*=n,r+=BigInt(t.indexOf(o));return r}var vu,yu,wu,bu,Au,Su,xu=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\",Eu=()=>hu(xu),_u=()=>pu(xu);function ku(){return wu||(wu=Wc()),wu}function Iu(){return bu||(bu=Kc()),bu}var Tu=128;function Ou(){return Ka({getSizeFromValue:e=>\"legacy\"===e?0:1,maxSize:1,write:(e,t,n)=>{if(\"legacy\"===e)return n;if(e\u003C0||e>127)throw new Pa(ea,{actualVersion:e});return t.set([e|Tu],n),n+1}})}function Cu(){return Ga({maxSize:1,read:(e,t)=>{const n=e[t];if(0==(n&Tu))return[\"legacy\",t];return[n^Tu,t+1]}})}function Bu(){return ru(ju())}function Ru(){return as(ru([...ju(),[\"addressTableLookups\",Zc((vu||(vu=ru([[\"lookupTableAddress\",Rs()],[\"writableIndices\",Zc(Wc(),{size:Uc()})],[\"readableIndices\",Zc(Wc(),{size:Uc()})]])),vu),{size:Uc()})]]),(e=>\"legacy\"===e.version?e:{...e,addressTableLookups:e.addressTableLookups??[]}))}function ju(){return[[\"version\",Ou()],[\"header\",ru([[\"numSignerAccounts\",ku()],[\"numReadonlySignerAccounts\",ku()],[\"numReadonlyNonSignerAccounts\",ku()]])],[\"staticAccounts\",Zc(Rs(),{size:Uc()})],[\"lifetimeToken\",es(Eu(),32)],[\"instructions\",Zc((Au||(Au=as(ru([[\"programAddressIndex\",Wc()],[\"accountIndices\",Zc(Wc(),{size:Uc()})],[\"data\",Qa(Xc(),Uc())]]),(e=>void 0!==e.accountIndices&&void 0!==e.data?e:{...e,accountIndices:e.accountIndices??[],data:e.data??new Uint8Array(0)}))),Au),{size:Uc()})]]}function Pu(){return Ka({getSizeFromValue:e=>\"legacy\"===e.version?Bu().getSizeFromValue(e):Ru().getSizeFromValue(e),write:(e,t,n)=>\"legacy\"===e.version?Bu().write(e,t,n):Ru().write(e,t,n)})}function Nu(){return ss(ou([[\"version\",Cu()],[\"header\",ou([[\"numSignerAccounts\",Iu()],[\"numReadonlySignerAccounts\",Iu()],[\"numReadonlyNonSignerAccounts\",Iu()]])],[\"staticAccounts\",Yc(js(),{size:$c()})],[\"lifetimeToken\",ts(_u(),32)],[\"instructions\",Yc((Su||(Su=ss(ou([[\"programAddressIndex\",Kc()],[\"accountIndices\",Yc(Kc(),{size:$c()})],[\"data\",Xa(eu(),$c())]]),(e=>{if(e.accountIndices.length&&e.data.byteLength)return e;const{accountIndices:t,data:n,...r}=e;return{...r,...t.length?{accountIndices:t}:null,...n.byteLength?{data:n}:null}}))),Su),{size:$c()})],[\"addressTableLookups\",Yc((yu||(yu=ou([[\"lookupTableAddress\",js()],[\"writableIndices\",Yc(Kc(),{size:$c()})],[\"readableIndices\",Yc(Kc(),{size:$c()})]])),yu),{size:$c()})]]),(({addressTableLookups:e,...t})=>\"legacy\"!==t.version&&e?.length?{...t,addressTableLookups:e}:t))}function Lu(e,t,n){e[t]=n(e[t]??{role:wc.READONLY})}var Mu=Symbol(\"AddressMapTypeProperty\");function zu(e){const t={};for(const n of e){if(!(\"lookupTableAddress\"in n))continue;const e=t[n.lookupTableAddress]||={readableIndices:[],writableIndices:[]};n.role===wc.WRITABLE?e.writableIndices.push(n.addressIndex):e.readableIndices.push(n.addressIndex)}return Object.keys(t).sort(Ns()).map((e=>({lookupTableAddress:e,...t[e]})))}function Uu(e){let t=0,n=0,r=0;for(const o of e){if(\"lookupTableAddress\"in o)break;const e=xc(o.role);Sc(o.role)?(r++,e||n++):e||t++}return{numReadonlyNonSignerAccounts:t,numReadonlySignerAccounts:n,numSignerAccounts:r}}function $u(e,t){const n=function(e){const t={};for(const[n,r]of e.entries())t[r.address]=n;return t}(t);return e.map((({accounts:e,data:t,programAddress:r})=>({programAddressIndex:n[r],...e?{accountIndices:e.map((({address:e})=>n[e]))}:null,...t?{data:t}:null})))}function Du(e){const t=e.findIndex((e=>\"lookupTableAddress\"in e));return(-1===t?e:e.slice(0,t)).map((({address:e})=>e))}function Fu(e){const t=function(e){let t;const n=Object.entries(e).sort((([e,n],[r,o])=>{if(n[Mu]!==o[Mu]){if(0===n[Mu])return-1;if(0===o[Mu])return 1;if(2===n[Mu])return-1;if(2===o[Mu])return 1}const i=Sc(n.role);if(i!==Sc(o.role))return i?-1:1;const a=xc(n.role);return a!==xc(o.role)?a?-1:1:(t||=Ns(),1===n[Mu]&&1===o[Mu]&&n.lookupTableAddress!==o.lookupTableAddress?t(n.lookupTableAddress,o.lookupTableAddress):t(e,r))})).map((([e,t])=>({address:e,...t})));return n}(function(e,t){const n={[e]:{[Mu]:0,role:wc.WRITABLE_SIGNER}},r=new Set;for(const e of t){let t;if(Lu(n,e.programAddress,(t=>{if(r.add(e.programAddress),Mu in t){if(xc(t.role)){if(0===t[Mu])throw new Pa(Qi,{programAddress:e.programAddress});throw new Pa(Xi,{programAddress:e.programAddress})}if(2===t[Mu])return t}return{[Mu]:2,role:wc.READONLY}})),e.accounts)for(const o of e.accounts)Lu(n,o.address,(e=>{const{address:n,...i}=o;if(Mu in e)switch(e[Mu]){case 0:return e;case 1:{const n=Ec(e.role,i.role);if(\"lookupTableAddress\"in i){if(e.lookupTableAddress!==i.lookupTableAddress&&(t||=Ns())(i.lookupTableAddress,e.lookupTableAddress)\u003C0)return{[Mu]:1,...i,role:n}}else if(Sc(i.role))return{[Mu]:2,role:n};return e.role!==n?{...e,role:n}:e}case 2:{const t=Ec(e.role,i.role);if(r.has(o.address)){if(xc(i.role))throw new Pa(Xi,{programAddress:o.address});return e.role!==t?{...e,role:t}:e}return\"lookupTableAddress\"in i&&!Sc(e.role)?{...i,[Mu]:1,role:t}:e.role!==t?{...e,role:t}:e}}return\"lookupTableAddress\"in i?{...i,[Mu]:1}:{...i,[Mu]:2}}))}return n}(e.feePayer.address,e.instructions));return{...\"legacy\"!==e.version?{addressTableLookups:zu(t)}:null,header:Uu(t),instructions:$u(e.instructions,t),lifetimeToken:(n=e.lifetimeConstraint,\"nonce\"in n?n.nonce:n.blockhash),staticAccounts:Du(t),version:e.version};var n}function qu({version:e}){return Object.freeze({instructions:Object.freeze([]),version:e})}var Wu,Ku=\"SysvarRecentB1ockHashes11111111111111111111\",Gu=\"11111111111111111111111111111111\";function Vu(e,t){return{accounts:[{address:e,role:wc.WRITABLE},{address:Ku,role:wc.READONLY},{address:t,role:wc.READONLY_SIGNER}],data:new Uint8Array([4,0,0,0]),programAddress:Gu}}function Hu(e){return e.programAddress===Gu&&null!=e.data&&(4===(t=e.data).byteLength&&4===t[0]&&0===t[1]&&0===t[2]&&0===t[3])&&3===e.accounts?.length&&null!=e.accounts[0].address&&e.accounts[0].role===wc.WRITABLE&&e.accounts[1].address===Ku&&e.accounts[1].role===wc.READONLY&&null!=e.accounts[2].address&&Sc(e.accounts[2].role);var t}function Ju(e){return\"lifetimeConstraint\"in e&&\"string\"==typeof e.lifetimeConstraint.nonce&&null!=e.instructions[0]&&Hu(e.instructions[0])}function Zu(e,t){if(\"feePayer\"in t&&e===t.feePayer?.address&&function(e){return!!e&&\"address\"in e&&\"string\"==typeof e.address&&1===Object.keys(e).length}(t.feePayer))return t;const n={...t,feePayer:Object.freeze({address:e})};return Object.freeze(n),n}function Yu(e,t){return Qu([e],t)}function Qu(e,t){return Object.freeze({...t,instructions:Object.freeze([...t.instructions,...e])})}function Xu(e,t){return Object.freeze({...t,instructions:Object.freeze([...e,...t.instructions])})}function el(e,t){const n=e.staticAccounts[0];if(!n)throw new Pa(oa);const r=function(e){const{header:t}=e,n=t.numSignerAccounts-t.numReadonlySignerAccounts,r=e.staticAccounts.length-t.numSignerAccounts-t.numReadonlyNonSignerAccounts,o=[];let i=0;for(let t=0;t\u003Cn;t++)o.push({address:e.staticAccounts[i],role:wc.WRITABLE_SIGNER}),i++;for(let n=0;n\u003Ct.numReadonlySignerAccounts;n++)o.push({address:e.staticAccounts[i],role:wc.READONLY_SIGNER}),i++;for(let t=0;t\u003Cr;t++)o.push({address:e.staticAccounts[i],role:wc.WRITABLE}),i++;for(let n=0;n\u003Ct.numReadonlyNonSignerAccounts;n++)o.push({address:e.staticAccounts[i],role:wc.READONLY}),i++;return o}(e),o=\"addressTableLookups\"in e&&void 0!==e.addressTableLookups&&e.addressTableLookups.length>0?function(e,t){const n=e.map((e=>e.lookupTableAddress)),r=n.filter((e=>void 0===t[e]));if(r.length>0)throw new Pa(ta,{lookupTableAddresses:r});const o=[],i=[];for(const n of e){const e=t[n.lookupTableAddress],r=Math.max(...n.readableIndices,...n.writableIndices);if(r>=e.length)throw new Pa(na,{highestKnownIndex:e.length-1,highestRequestedIndex:r,lookupTableAddress:n.lookupTableAddress});const a=n.readableIndices.map((t=>({address:e[t],addressIndex:t,lookupTableAddress:n.lookupTableAddress,role:wc.READONLY})));o.push(...a);const s=n.writableIndices.map((t=>({address:e[t],addressIndex:t,lookupTableAddress:n.lookupTableAddress,role:wc.WRITABLE})));i.push(...s)}return[...i,...o]}(e.addressTableLookups,t?.addressesByLookupTableAddress??{}):[],i=[...r,...o],a=e.instructions.map((e=>function(e,t){const n=t[e.programAddressIndex]?.address;if(!n)throw new Pa(ra,{index:e.programAddressIndex});const r=e.accountIndices?.map((e=>t[e])),{data:o}=e;return Object.freeze({programAddress:n,...r&&r.length?{accounts:Object.freeze(r)}:{},...o&&o.length?{data:o}:{}})}(e,i))),s=a[0],c=function(e,t,n){if(t&&Hu(t)){const n=t.accounts[0].address;Cs(n);const r=t.accounts[2].address;return Cs(r),{nonce:e,nonceAccountAddress:n,nonceAuthorityAddress:r}}return{blockhash:e,lastValidBlockHeight:n??2n**64n-1n}}(e.lifetimeToken,s,t?.lastValidBlockHeight);return lu(qu({version:e.version}),(e=>Zu(n,e)),(e=>a.reduce(((e,t)=>Yu(t,e)),e)),(e=>\"blockhash\"in c?du(c,e):function({nonce:e,nonceAccountAddress:t,nonceAuthorityAddress:n},r){let o;const i=r.instructions[0];if(i&&Hu(i))if(function(e,t,n){return e.accounts[0].address===t&&e.accounts[2].address===n}(i,t,n)){if(Ju(r)&&r.lifetimeConstraint.nonce===e)return r;o=[i,...r.instructions.slice(1)]}else o=[Object.freeze(Vu(t,n)),...r.instructions.slice(1)];else o=[Object.freeze(Vu(t,n)),...r.instructions];return Object.freeze({...r,instructions:Object.freeze(o),lifetimeConstraint:Object.freeze({nonce:e})})}(c,e)))}function tl(e){const t=Object.values(e);if(0===t.length)throw new Pa(ca);return t.map((e=>e||new Uint8Array(64).fill(0)))}function nl(){return ru([[\"signatures\",as(Zc(es(Xc(),64),{size:Uc()}),tl)],[\"messageBytes\",Xc()]])}function rl(){return ss(ou([[\"signatures\",Yc(ts(eu(),64),{size:$c()})],[\"messageBytes\",eu()]]),ol)}function ol(e){const{messageBytes:t,signatures:n}=e,r=tu([Cu(),is(Kc(),2),Yc(js(),{size:$c()})]),[o,i,a]=r.decode(t),s=a.slice(0,i);if(s.length!==n.length)throw new Pa(ua,{numRequiredSignatures:i,signaturesLength:n.length,signerAddresses:s});const c={};return s.forEach(((e,t)=>{const r=n[t];r.every((e=>0===e))?c[e]=null:c[e]=r})),{messageBytes:t,signatures:Object.freeze(c)}}function il(e){const t=Fu(e),n=Pu().encode(t),r=t.staticAccounts.slice(0,t.header.numSignerAccounts),o={};for(const e of r)o[e]=null;let i;i=fu(e)?{blockhash:e.lifetimeConstraint.blockhash,lastValidBlockHeight:e.lifetimeConstraint.lastValidBlockHeight}:{nonce:e.lifetimeConstraint.nonce,nonceAccountAddress:e.instructions[0].accounts[0].address};const a={lifetimeConstraint:i,messageBytes:n,signatures:Object.freeze(o)};return Object.freeze(a)}async function al(e,t){let n,r;if(await Promise.all(e.map((async e=>{const o=await Vs(e.publicKey),i=t.signatures[o];if(void 0===i)return r||=new Set,void r.add(o);if(r)return;const a=await Oc(e.privateKey,t.messageBytes);var s,c;null!==i&&(c=i,(s=a).length===c.length&&s.every(((e,t)=>e===c[t])))||(n||={},n[o]=a)}))),r&&r.size>0){const e=Object.keys(t.signatures);throw new Pa(sa,{expectedAddresses:e,unexpectedAddresses:[...r]})}return n?Object.freeze({...t,signatures:Object.freeze({...t.signatures,...n})}):t}function sl(e){const t=[];if(Object.entries(e.signatures).forEach((([e,n])=>{n||t.push(e)})),t.length>0)throw new Pa(ia,{addresses:t})}function cl(e){const t=nl().encode(e);return As().decode(t)}function ul(e){const t={};return e.forEach((e=>{if(t[e.address]){if(t[e.address]!==e)throw new Pa(Yi,{address:e.address})}else t[e.address]=e})),Object.values(t)}function ll(e){return\"modifyAndSignTransactions\"in e&&\"function\"==typeof e.modifyAndSignTransactions}function fl(e){return\"signTransactions\"in e&&\"function\"==typeof e.signTransactions}function dl(e){return\"signAndSendTransactions\"in e&&\"function\"==typeof e.signAndSendTransactions}function hl(e){return fl(e)||ll(e)||dl(e)}function pl(e){return ul((e.accounts??[]).flatMap((e=>\"signer\"in e?e.signer:[])))}function gl(e){return ul([...e.feePayer&&hl(e.feePayer)?[e.feePayer]:[],...e.instructions.flatMap(pl)])}function ml(e,t){const n=(r=t)&&\"feePayer\"in r&&r.feePayer&&\"string\"==typeof r.feePayer.address&&!hl(r.feePayer)?e.find((e=>e.address===t.feePayer.address)):void 0;var r;return n||0!==t.instructions.length?Object.freeze({...t,...n?{feePayer:n}:null,instructions:t.instructions.map((t=>function(e,t){if(!t.accounts||0===t.accounts.length)return t;const n=new Map(ul(e).map((e=>[e.address,e])));return Object.freeze({...t,accounts:t.accounts.map((e=>{const t=n.get(e.address);return Sc(e.role)&&!(\"signer\"in e)&&t?Object.freeze({...e,signer:t}):e}))})}(e,t)))}):t}async function vl(e){const t=await Vs(e.publicKey),n={address:t,keyPair:e,signMessages:n=>Promise.all(n.map((async n=>Object.freeze({[t]:await Oc(e.privateKey,n.content)})))),signTransactions:n=>Promise.all(n.map((async n=>{const r=await al([e],n);return Object.freeze({[t]:r.signatures[t]})})))};return Object.freeze(n)}async function yl(e,t){return await vl(await Rc(e,t))}function wl(e){const t={address:e,signMessages:e=>Promise.resolve(e.map((()=>Object.freeze({})))),signTransactions:e=>Promise.resolve(e.map((()=>Object.freeze({}))))};return Object.freeze(t)}async function bl(e,t){const{partialSigners:n,modifyingSigners:r}=Al(ul(gl(e).filter(hl)),{identifySendingSigner:!1});return await Sl(e,r,n,t)}function Al(e,t={}){const n=t.identifySendingSigner??!0?function(e){const t=e.filter(dl);if(0===t.length)return � E��null;const n=t.filter((e=>!ll(e)&&!fl(e)));if(n.length>0)return n[0];return t[0]}(e):null,r=e.filter((e=>e!==n&&(ll(e)||fl(e)))),o=function(e){const t=e.filter(ll);if(0===t.length)return[];const n=t.filter((e=>!fl(e)));return n.length>0?n:[t[0]]}(r),i=r.filter(fl).filter((e=>!o.includes(e)));return Object.freeze({modifyingSigners:o,partialSigners:i,sendingSigner:n})}async function Sl(e,t=[],n=[],r){const o=il(e),i=await t.reduce((async(e,t)=>{r?.abortSignal?.throwIfAborted();const[n]=await t.modifyAndSignTransactions([await e],r);return Object.freeze(n)}),Promise.resolve(o));r?.abortSignal?.throwIfAborted();const a=await Promise.all(n.map((async e=>{const[t]=await e.signTransactions([i],r);return t}))),s={...i,signatures:Object.freeze(a.reduce(((e,t)=>({...e,...t})),i.signatures??{}))};return Object.freeze(s)}var xl=globalThis.TextEncoder;var El,_l=((El=_l||{})[El.Uninitialized=0]=\"Uninitialized\",El[El.Initialized=1]=\"Initialized\",El);var kl,Il=((kl=Il||{})[kl.Legacy=0]=\"Legacy\",kl[kl.Current=1]=\"Current\",kl);var Tl,Ol,Cl=\"11111111111111111111111111111111\",Bl=((Tl=Bl||{})[Tl.Nonce=0]=\"Nonce\",Tl),Rl=((Ol=Rl||{})[Ol.CreateAccount=0]=\"CreateAccount\",Ol[Ol.Assign=1]=\"Assign\",Ol[Ol.TransferSol=2]=\"TransferSol\",Ol[Ol.CreateAccountWithSeed=3]=\"CreateAccountWithSeed\",Ol[Ol.AdvanceNonceAccount=4]=\"AdvanceNonceAccount\",Ol[Ol.WithdrawNonceAccount=5]=\"WithdrawNonceAccount\",Ol[Ol.InitializeNonceAccount=6]=\"InitializeNonceAccount\",Ol[Ol.AuthorizeNonceAccount=7]=\"AuthorizeNonceAccount\",Ol[Ol.Allocate=8]=\"Allocate\",Ol[Ol.AllocateWithSeed=9]=\"AllocateWithSeed\",Ol[Ol.AssignWithSeed=10]=\"AssignWithSeed\",Ol[Ol.TransferSolWithSeed=11]=\"TransferSolWithSeed\",Ol[Ol.UpgradeNonceAccount=12]=\"UpgradeNonceAccount\",Ol);function jl(e){if(!e)throw new Error(\"Expected a Address.\");return\"object\"==typeof e&&\"address\"in e?e.address:Array.isArray(e)?e[0]:e}function Pl(e,t){return t=>{if(!t.value)return Object.freeze({address:e,role:wc.READONLY});const n=t.isWritable?wc.WRITABLE:wc.READONLY;return Object.freeze({address:jl(t.value),role:Nl(t.value)?_c(n):n,...Nl(t.value)?{signer:t.value}:{}})}}function Nl(e){return!!e&&\"object\"==typeof e&&\"address\"in e&&hl(e)}var Ll=2;function Ml(){return as(ru([[\"discriminator\",Dc()],[\"amount\",qc()]]),(e=>({...e,discriminator:Ll})))}const zl={log:(console.log,(...e)=>{}),info:(console.info,(...e)=>{}),warn:(console.warn,(...e)=>{}),debug:(console.debug,(...e)=>{}),error:(console.error,(...e)=>{})},Ul=se([J([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"bits\",\"sats\"]),J([\"usd\",\"aed\",\"ars\",\"aud\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"czk\",\"dkk\",\"eur\",\"gbp\",\"gel\",\"hkd\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"krw\",\"kwd\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"php\",\"pkr\",\"pln\",\"rub\",\"sar\",\"sek\",\"sgd\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"zar\",\"xdr\"]),J([\"xag\",\"xau\"])]),$l=te({id:oe(),price:pe(ee(),0),marketCap:ne(X(pe(ee(),0))),allTimeHigh:ne(X(pe(ee(),0))),allTimeLow:ne(X(pe(ee(),0))),totalVolume:ne(X(pe(ee(),0))),high1d:ne(X(pe(ee(),0))),low1d:ne(X(pe(ee(),0))),circulatingSupply:ne(X(pe(ee(),0))),dilutedMarketCap:ne(X(pe(ee(),0))),marketCapPercentChange1d:ne(X(ee())),priceChange1d:ne(X(ee())),pricePercentChange1h:ne(X(ee())),pricePercentChange1d:ne(X(ee())),pricePercentChange7d:ne(X(ee())),pricePercentChange14d:ne(X(ee())),pricePercentChange30d:ne(X(ee())),pricePercentChange200d:ne(X(ee())),pricePercentChange1y:ne(X(ee())),bondingCurveProgressPercent:ne(X(ee())),liquidity:ne(X(ee())),totalSupply:ne(X(ee())),holderCount:ne(X(ee())),isMutable:ne(X(H()))}),Dl=re(ti,X($l)),Fl=Ul,ql=te({assetType:ti,timePeriod:ne(me(oe(),/^[1-9][0-9]*[dmy]$/u)),from:ne(pe(ee(),0)),to:ne(pe(ee(),0)),vsCurrency:ne(Fl)}),Wl=te({prices:V(ie([ee(),ee()])),marketCaps:V(ie([ee(),ee()])),totalVolumes:V(ie([ee(),ee()]))}),Kl={prices:[],marketCaps:[],totalVolumes:[]};class Gl{#e;#t;#n;#r;#o;static cacheTtlsMilliseconds={fiatExchangeRates:ri.Minute,spotPrices:ri.Minute,historicalPrices:ri.Minute};constructor(e,t,n=globalThis.fetch,r=zl){const{baseUrl:o,chunkSize:i}=e.get().priceApi;L(o,oc),this.#e=n,this.#t=r,this.#n=o,this.#r=i,this.#o=t}async getFiatExchangeRates(){try{const e=await this.#e(`${this.#n}/v1/exchange-rates/fiat`);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.json()}catch(e){throw this.#t.error(e,\"Error fetching fiat exchange rates\"),e}}async#i(e,t=\"usd\"){try{if(L(e,V(ti)),L(t,Fl),0===e.length)return{};const n=[...new Set(e)],r=[];for(let e=0;e\u003Cn.length;e+=this.#r)r.push(n.slice(e,e+this.#r));const o=await Promise.all(r.map((async e=>{const n=vc({baseUrl:this.#n,path:\"/v3/spot-prices\",queryParams:{vsCurrency:t,assetIds:e.join(\",\"),includeMarketData:\"true\"}}),r=await this.#e(n);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const o=await r.json();return L(o,Dl),o}))),i=o.reduce(((e,t)=>({...e,...t})),{});return await this.#o.mset(e.map((e=>({key:`PriceApiClient:getMultipleSpotPrices:${e}:${t}`,value:i[e],ttlMilliseconds:Gl.cacheTtlsMilliseconds.spotPrices})))),i}catch(e){throw this.#t.error(e,\"Error fetching spot prices\"),e}}async#a(e,t=\"usd\"){const n=[...new Set(e)],r=\"PriceApiClient:getMultipleSpotPrices\",o=e=>`${r}:${e}:${t}`,i=await this.#o.mget(n.map(o)),a=(0,ci.mapKeys)(i,((e,t)=>(e=>{const t=new RegExp(`^${r}:(.+):(.+)$`,\"u\"),n=e.match(t);if(!n)throw new Error(\"Invalid cache key\");return n})(t)[1])),s=n.filter((e=>void 0===a[e]));if(0===s.length)return a;const c=await this.#i(s,t);return await this.#o.mset(Object.entries(c).map((([e,t])=>({key:o(e),value:t,ttlMilliseconds:Gl.cacheTtlsMilliseconds.spotPrices})))),{...a,...c}}async getMultipleSpotPrices(e,t=\"usd\"){return this.#a(e,t)}async#s(e){L(e,ql);const t=vc({baseUrl:this.#n,path:\"/v3/historical-prices/{assetType}\",pathParams:{assetType:e.assetType},queryParams:{...e.timePeriod&&{timePeriod:e.timePeriod},...e.from&&{from:e.from.toString()},...e.to&&{to:e.to.toString()},...e.vsCurrency&&{vsCurrency:e.vsCurrency}}}),n=await this.#e(t),r=await n.json();return L(r,Wl),r}async getHistoricalPrices(e){return li(this.#s.bind(this),this.#o,{functionName:\"PriceApiClient:getHistoricalPrices\",ttlMilliseconds:Gl.cacheTtlsMilliseconds.historicalPrices})(e)}}const Vl=function(e){if(e.length>=255)throw new TypeError(\"Alphabet too long\");const t=new Uint8Array(256);for(let e=0;e\u003Ct.length;e++)t[e]=255;for(let n=0;n\u003Ce.length;n++){const r=e.charAt(n),o=r.charCodeAt(0);if(255!==t[o])throw new TypeError(r+\" is ambiguous\");t[o]=n}const n=e.length,r=e.charAt(0),o=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function a(e){if(\"string\"!=typeof e)throw new TypeError(\"Expected String\");if(0===e.length)return new Uint8Array;let i=0,a=0,s=0;for(;e[i]===r;)a++,i++;const c=(e.length-i)*o+1>>>0,u=new Uint8Array(c);for(;e[i];){let r=t[e.charCodeAt(i)];if(255===r)return;let o=0;for(let e=c-1;(0!==r||o\u003Cs)&&-1!==e;e--,o++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error(\"Non-zero carry\");s=o,i++}let l=c-s;for(;l!==c&&0===u[l];)l++;const f=new Uint8Array(a+(c-l));let d=a;for(;l!==c;)f[d++]=u[l++];return f}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError(\"Expected Uint8Array\");if(0===t.length)return\"\";let o=0,a=0,s=0;const c=t.length;for(;s!==c&&0===t[s];)s++,o++;const u=(c-s)*i+1>>>0,l=new Uint8Array(u);for(;s!==c;){let e=t[s],r=0;for(let t=u-1;(0!==e||r\u003Ca)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error(\"Non-zero carry\");a=r,s++}let f=u-a;for(;f!==u&&0===l[f];)f++;let d=r.repeat(o);for(;f\u003Cu;++f)d+=e.charAt(l[f]);return d},decodeUnsafe:a,decode:function(e){const t=a(e);if(t)return t;throw new Error(\"Non-base\"+n+\" character\")}}};const Hl=Vl(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");var Jl=n(1048).hp;const Zl={[Zs.Mainnet]:\"mainnet\",[Zs.Devnet]:\"devnet\",[Zs.Testnet]:\"testnet\",[Zs.Localnet]:\"localnet\"};class Yl{#c;#t;constructor(e,t=zl){this.#c=e,this.#t=t}static isMaybeNonFungible(e){const{tokenAmount:t}=e,{decimals:n}=t;return!1}}const Ql=V(te({decimals:Z(),assetId:ti,name:ne(oe()),symbol:ne(oe()),iconUrl:ne(oc)}));class Xl{#e;#t;#n;#r;#u;static supportedNetworks=[Zs.Mainnet,Zs.Devnet];constructor(e,t=globalThis.fetch,n=zl){this.#e=t,this.#t=n;const{tokenApi:r,staticApi:o}=e.get(),{baseUrl:i,chunkSize:a}=r;L(i,oc),this.#n=i,this.#r=a,this.#u=o.baseUrl}async#l(e){L(e,V(ti));const t=vc({baseUrl:this.#n,path:\"/v3/assets\",queryParams:{assetIds:e.join(\",\")}}),n=await this.#e(t);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();return L(r,Ql),r}async getTokenMetadataFromAddresses(e){try{L(e,V(ti));const t=e.filter((e=>{const{chainId:t}=oi(e);return Xl.supportedNetworks.includes(t)}));t.length!==e.length&&this.#t.warn(`[TokenMetadataClient] Received some asset types on networks that the Token API doesn't support. They will be ignored. Supported networks: ${Xl.supportedNetworks.join(\", \")}`);const n=[];for(let e=0;e\u003Ct.length;e+=this.#r)n.push(t.slice(e,e+this.#r));const r=await Promise.all(n.map((async e=>this.#l(e)))),o=new Map;return r.flat().forEach((e=>{var t,n,r,i;const a=null===(t=e)||void 0===t?void 0:t.symbol,s=(null===(n=e)||void 0===n?void 0:n.name)??a,c=null===(r=e)||void 0===r?void 0:r.decimals;a&&s?o.set(e.assetId,{name:s,symbol:a,fungible:!Yl.isMaybeNonFungible({tokenAmount:{decimals:c}}),iconUrl:(null===(i=e)||void 0===i?void 0:i.iconUrl)??vc({baseUrl:this.#u,path:\"/api/v2/tokenIcons/assets/{assetId}.png\",pathParams:{assetId:e.assetId.replace(/:/gu,\"/\")}}),units:[{name:s,symbol:a,decimals:c}]}):this.#t.warn(`No metadata for ${e.assetId}`)})),Object.fromEntries(o)}catch(e){throw this.#t.error(e,\"Error fetching token metadata\"),e}}}const ef=J(Object.values(Zs)),tf=ae({address:oe()}),nf=Y(\"ed25519\"),rf=ae({domain:ne(oe()),address:ne(oe()),statement:ne(oe()),uri:ne(oe()),version:ne(oe()),chainId:ne(oe()),nonce:ne(oe()),issuedAt:ne(oe()),expirationTime:ne(oe()),notBefore:ne(oe()),requestId:ne(oe()),resources:ne(V(oe()))}),of=ae({account:tf,message:gc}),af=J([\"processed\",\"confirmed\",\"finalized\"]),sf=ae({preflightCommitment:ne(af),minContextSlot:ne(ee())}),cf=ae({account:tf,transaction:gc,scope:ef,options:ne(sf)}),uf=ae({...sf.schema,commitment:ne(af),skipPreflight:ne(H()),maxRetries:ne(ee())}),lf=ae({...cf.schema,scope:ef,options:ne(uf)}),ff=te({method:J([qt.SignAndSendTransaction]),params:lf}),df=te({method:J([qt.SignIn]),params:rf}),hf=te({method:J([qt.SignMessage]),params:of}),pf=te({method:J([qt.SignTransaction]),params:cf}),gf=te({signature:pc}),mf=te({signedTransaction:gc}),vf=te({signature:pc,signedMessage:gc,signatureType:nf}),yf=te({account:tf,...vf.schema}),wf=se([ff,df,hf,pf]),bf=me(oe(),/^(?:0x)?[0-9a-f]+$/iu);me(oe(),/^0x[0-9a-f]+$/iu),me(oe(),/^0x[0-9a-f]{40}$/u),me(oe(),/^0x[0-9a-fA-F]{40}$/u);function Af(e){si(function(e){return z(e,bf)}(e),\"Value must be a hexadecimal string.\")}function Sf(e){return e.startsWith(\"0x\")||e.startsWith(\"0X\")?e.substring(2):e}n(1048).hp;const xf=48,Ef=58,_f=87;!function(){const e=[]}();function kf(e){if(\"0x\"===e?.toLowerCase?.())return new Uint8Array;Af(e);const t=Sf(e).toLowerCase(),n=t.length%2==0?t:`0${t}`,r=new Uint8Array(n.length/2);for(let e=0;e\u003Cr.length;e++){const t=n.charCodeAt(2*e),o=n.charCodeAt(2*e+1),i=t-(t\u003CEf?xf:_f),a=o-(o\u003CEf?xf:_f);r[e]=16*i+a}return r}async function If({entropySource:e,derivationPath:t}){zl.log({derivationPath:t},\"Generating solana wallet\"),L(t,mc);const n=t.split(\"/\");try{const t=await async function({entropySource:e,path:t,curve:n}){return await snap.request({method:\"snap_getBip32Entropy\",params:{path:t,curve:n,...e?{source:e}:{}}})}({entropySource:e,path:n,curve:\"ed25519\"});if(!t.privateKey||!t.publicKey)throw new Error(\"Unable to derive private key\");return{privateKeyBytes:kf(t.privateKey),publicKeyBytes:kf(t.publicKey)}}catch(e){throw zl.error({error:e},\"Error deriving keypair\"),new Error(e)}}const Tf=e=>JSON.parse(JSON.stringify(e),((e,t)=>t?\"undefined\"!==t.__type?\"BigNumber\"===t.__type?new qo(t.value):\"bigint\"===t.__type?BigInt(t.value):t:void 0:t)),Of=e=>(0,ci.cloneDeepWith)(e,(e=>void 0===e?{__type:\"undefined\"}:e instanceof qo?{__type:\"BigNumber\",value:e.toString()}:\"bigint\"==typeof e?{__type:\"bigint\",value:e.toString()}:void 0)),Cf=\"send-form\",Bf=\"confirm-sign-and-send-transaction\";async function Rf(e,t){const n=Of(t);return snap.request({method:\"snap_createInterface\",params:{ui:e,context:n}})}async function jf(e,t,n){const r=Of(n);return snap.request({method:\"snap_updateInterface\",params:{id:e,ui:t,context:r}})}async function Pf(e,t){return snap.request({method:\"snap_resolveInterface\",params:{id:e,value:t}})}async function Nf(e){return snap.request({method:\"snap_dialog\",params:{id:e}})}async function Lf(){return snap.request({method:\"snap_getPreferences\"})}async function Mf(e){const t=await async function(e){const t=await snap.request({method:\"snap_getInterfaceContext\",params:{id:e}});return t?Tf(t):null}(e);if(!t)throw new Error(\"Interface context not found\");return t}function zf(e){return null==e}const Uf=(e,t)=>Object.hasOwnProperty.call(e,t);var $f;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}($f=$f||($f={}));const Df=e=>te(e);function Ff({path:e,branch:t}){const n=e[e.length-1];return Uf(t[t.length-2],n)}function qf(e){return new N({...e,type:`optional ${e.type}`,validator:(t,n)=>!Ff(n)||e.validator(t,n),refiner:(t,n)=>!Ff(n)||e.refiner(t,n)})}function Wf(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n\u003Ce.length;n++)if(!Wf(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e\u003Cn.length;e++)if(\"string\"!=typeof n[e][0]||!Wf(n[e][1])){t=!1;break}return t}return!1}const Kf=$(\"JSON\",(e=>Wf(e))),Gf=de(Kf,ve(G(),\"JSON\",(e=>z(e,Kf))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})))));const Vf=Y(\"2.0\"),Hf=X(se([ee(),oe()])),Jf=Df({code:Z(),message:oe(),data:qf(Gf),stack:qf(oe())}),Zf=se([re(oe(),Gf),V(Gf)]);Df({id:Hf,jsonrpc:Vf,method:oe(),params:qf(Zf)}),Df({jsonrpc:Vf,method:oe(),params:qf(Zf)});te({id:Hf,jsonrpc:Vf,result:ne(ce()),error:ne(Jf)});const Yf=Df({id:Hf,jsonrpc:Vf,result:Gf}),Qf=Df({id:Hf,jsonrpc:Vf,error:Jf});se([Yf,Qf]);var Xf;!function(e){e.GetGenesisHash=\"getGenesisHash\",e.GetLatestBlockhash=\"getLatestBlockhash\",e.GetMinimumBalanceForRentExemption=\"getMinimumBalanceForRentExemption\"}(Xf||(Xf={}));const ed=te({jsonrpc:Vf,id:Hf,method:Y(Xf.GetGenesisHash),params:ne(V())}),td=te({jsonrpc:Vf,id:Hf,method:Y(Xf.GetLatestBlockhash)}),nd=te({jsonrpc:Vf,id:Hf,method:Y(Xf.GetMinimumBalanceForRentExemption),params:ie([ee(),ne(te())])});var rd;!function(e){e.StartSendTransactionFlow=\"startSendTransactionFlow\",e.GetFeeForTransaction=\"getFeeForTransaction\"}(rd||(rd={}));const od={production:[Zs.Mainnet],local:[Zs.Mainnet,Zs.Devnet],test:[Zs.Localnet]},id=de(V(oc),oe(),(e=>e.split(\",\"))),ad=de(V(oe()),oe(),(e=>e.split(\",\"))),sd=te({ENVIRONMENT:J([\"local\",\"test\",\"production\"]),RPC_URL_MAINNET_LIST:id,RPC_URL_DEVNET_LIST:id,RPC_URL_TESTNET_LIST:id,RPC_URL_LOCALNET_LIST:ad,EXPLORER_BASE_URL:oc,PRICE_API_BASE_URL:oc,TOKEN_API_BASE_URL:oc,STATIC_API_BASE_URL:oc,SECURITY_ALERTS_API_BASE_URL:oc,LOCAL_API_BASE_URL:oe()});class cd{#f;constructor(){const e=this.#d();this.#f=this.#h(e)}#d(){return M({ENVIRONMENT:\"production\",RPC_URL_MAINNET_LIST:\"https://solana-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",RPC_URL_DEVNET_LIST:\"https://solana-devnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",RPC_URL_TESTNET_LIST:\"https://api.testnet.solana.com\",RPC_URL_LOCALNET_LIST:\"http://localhost:8899\",EXPLORER_BASE_URL:\"https://solscan.io\",PRICE_API_BASE_URL:\"https://price.api.cx.metamask.io\",TOKEN_API_BASE_URL:\"https://tokens.api.cx.metamask.io\",STATIC_API_BASE_URL:\"https://static.cx.metamask.io\",SECURITY_ALERTS_API_BASE_URL:\"https://security-alerts.api.cx.metamask.io\",LOCAL_API_BASE_URL:\"http://localhost:8899\"},sd)}#h(e){return{environment:e.ENVIRONMENT,networks:[{...tc[Zs.Mainnet],rpcUrls:e.RPC_URL_MAINNET_LIST},{...tc[Zs.Devnet],rpcUrls:e.RPC_URL_DEVNET_LIST},{...tc[Zs.Testnet],rpcUrls:e.RPC_URL_TESTNET_LIST},{...tc[Zs.Localnet],rpcUrls:e.RPC_URL_LOCALNET_LIST}],explorerBaseUrl:e.EXPLORER_BASE_URL,activeNetworks:od[e.ENVIRONMENT],priceApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.PRICE_API_BASE_URL,chunkSize:50},tokenApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.TOKEN_API_BASE_URL,chunkSize:50},staticApi:{baseUrl:e.STATIC_API_BASE_URL},transactions:{storageLimit:10},securityAlertsApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.SECURITY_ALERTS_API_BASE_URL}}}get(){return this.#f}getNetworkBy(e,t){const n=this.get().networks.find((n=>n[e]===t));if(!n)throw new Error(`Network ${e} not found`);return n}}const ud=(new cd).get(),ld=[\"local\",\"test\"].includes(ud.environment),fd=ld?[\"http://localhost:3000\"]:[\"https://portfolio.metamask.io\"],dd=ld?new Set([Jt.ListAccounts,Jt.GetAccount,Jt.CreateAccount,Jt.FilterAccountChains,Jt.DeleteAccount,Jt.DiscoverAccounts,Jt.GetAccountBalances,Jt.SubmitRequest,Jt.ListAccountTransactions,Jt.ListAccountAssets,rd.StartSendTransactionFlow,rd.GetFeeForTransaction,Xf.GetGenesisHash,Xf.GetLatestBlockhash]):new Set([]),hd=new Set([Jt.ListAccounts,Jt.GetAccount,Jt.CreateAccount,Jt.DeleteAccount,Jt.DiscoverAccounts,Jt.GetAccountBalances,Jt.SubmitRequest,Jt.ListAccountTransactions,Jt.ListAccountAssets,Jt.ResolveAccountAddress,rd.StartSendTransactionFlow,rd.GetFeeForTransaction,Xf.GetGenesisHash,Xf.GetLatestBlockhash]),pd=new Map([]);for(const e of fd)pd.set(e,dd);pd.set(\"metamask\",hd);const gd=(e,t)=>{var n;if(!e)throw new Ao(\"Origin not found\");if(!(null===(n=pd.get(e))||void 0===n?void 0:n.has(t)))throw new Ao(\"Permission denied\")};function md(e,t){try{L(e,t)}catch(e){throw new uo(e.message)}}function vd(e,t){try{L(e,t)}catch(e){throw new io(\"Invalid Response\")}}const yd=te({...xt.schema,scope:fc,request:wf}),wd=te({scopes:ge(V(fc)),entropySource:oe(),groupIndex:pe(ee(),0)});function bd(e){const{type:t,id:n,address:r,options:o,methods:i,scopes:a}=e;return{type:t,id:n,address:r,options:o,methods:i,scopes:a}}var Ad,Sd=((Ad=Sd||{})[Ad.Uninitialized=0]=\"Uninitialized\",Ad[Ad.Initialized=1]=\"Initialized\",Ad[Ad.Frozen=2]=\"Frozen\",Ad);var xd,Ed=((xd=Ed||{})[xd.MintTokens=0]=\"MintTokens\",xd[xd.FreezeAccount=1]=\"FreezeAccount\",xd[xd.AccountOwner=2]=\"AccountOwner\",xd[xd.CloseAccount=3]=\"CloseAccount\",xd);var _d,kd=\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\",Id=((_d=Id||{})[_d.CreateAssociatedToken=0]=\"CreateAssociatedToken\",_d[_d.CreateAssociatedTokenIdempotent=1]=\"CreateAssociatedTokenIdempotent\",_d[_d.RecoverNestedAssociatedToken=2]=\"RecoverNestedAssociatedToken\",_d);var Td,Od=\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",Cd=((Td=Cd||{})[Td.Mint=0]=\"Mint\",Td[Td.Token=1]=\"Token\",Td[Td.Multisig=2]=\"Multisig\",Td);var Bd,Rd=((Bd=Rd||{})[Bd.InitializeMint=0]=\"InitializeMint\",Bd[Bd.InitializeAccount=1]=\"InitializeAccount\",Bd[Bd.InitializeMultisig=2]=\"InitializeMultisig\",Bd[Bd.Transfer=3]=\"Transfer\",Bd[Bd.Approve=4]=\"Approve\",Bd[Bd.Revoke=5]=\"Revoke\",Bd[Bd.SetAuthority=6]=\"SetAuthority\",Bd[Bd.MintTo=7]=\"MintTo\",Bd[Bd.Burn=8]=\"Burn\",Bd[Bd.CloseAccount=9]=\"CloseAccount\",Bd[Bd.FreezeAccount=10]=\"FreezeAccount\",Bd[Bd.ThawAccount=11]=\"ThawAccount\",Bd[Bd.TransferChecked=12]=\"TransferChecked\",Bd[Bd.ApproveChecked=13]=\"ApproveChecked\",Bd[Bd.MintToChecked=14]=\"MintToChecked\",Bd[Bd.BurnChecked=15]=\"BurnChecked\",Bd[Bd.InitializeAccount2=16]=\"InitializeAccount2\",Bd[Bd.SyncNative=17]=\"SyncNative\",Bd[Bd.InitializeAccount3=18]=\"InitializeAccount3\",Bd[Bd.InitializeMultisig2=19]=\"InitializeMultisig2\",Bd[Bd.InitializeMint2=20]=\"InitializeMint2\",Bd[Bd.GetAccountDataSize=21]=\"GetAccountDataSize\",Bd[Bd.InitializeImmutableOwner=22]=\"InitializeImmutableOwner\",Bd[Bd.AmountToUiAmount=23]=\"AmountToUiAmount\",Bd[Bd.UiAmountToAmount=24]=\"UiAmountToAmount\",Bd);function jd(e){if(!e)throw new Error(\"Expected a Address.\");return\"object\"==typeof e&&\"address\"in e?e.address:Array.isArray(e)?e[0]:e}function Pd(e,t){return t=>{if(!t.value)return Object.freeze({address:e,role:wc.READONLY});const n=t.isWritable?wc.WRITABLE:wc.READONLY;return Object.freeze({address:jd(t.value),role:Nd(t.value)?_c(n):n,...Nd(t.value)?{signer:t.value}:{}})}}function Nd(e){return!!e&&\"object\"==typeof e&&\"address\"in e&&hl(e)}async function Ld(e,t={}){const{programAddress:n=\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\"}=t;return await async function({programAddress:e,seeds:t}){let n=255;for(;n>0;)try{return[await Gs({programAddress:e,seeds:[...t,new Uint8Array([n])]}),n]}catch(e){if(!ja(e,Ni))throw e;n--}throw new Pa(Li)}({programAddress:n,seeds:[Rs().encode(e.owner),Rs().encode(e.tokenProgram),Rs().encode(e.mint)]})}var Md=1;function zd(){return as(ru([[\"discriminator\",Wc()]]),(e=>({...e,discriminator:Md})))}function Ud(e,t){const n=t?.programAddress??kd,r={payer:{value:e.payer??null,isWritable:!0},ata:{value:e.ata??null,isWritable:!0},owner:{value:e.owner??null,isWritable:!1},mint:{value:e.mint??null,isWritable:!1},systemProgram:{value:e.systemProgram??null,isWritable:!1},tokenProgram:{value:e.tokenProgram??null,isWritable:!1}};r.tokenProgram.value||(r.tokenProgram.value=\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"),r.systemProgram.value||(r.systemProgram.value=\"11111111111111111111111111111111\");const o=Pd(n);return{accounts:[o(r.payer),o(r.ata),o(r.owner),o(r.mint),o(r.systemProgram),o(r.tokenProgram)],programAddress:n,data:zd().encode({})}}var $d=3;function Dd(){return as(ru([[\"discriminator\",Wc()],[\"amount\",qc()]]),(e=>({...e,discriminator:$d})))}function Fd(e,t){const n=t?.programAddress??Od,r={source:{value:e.source??null,isWritable:!0},destination:{value:e.destination??null,isWritable:!0},authority:{value:e.authority??null,isWritable:!1}},o={...e},i=(o.multiSigners??[]).map((e=>({address:e.address,role:wc.READONLY_SIGNER,signer:e}))),a=Pd(n);return{accounts:[a(r.source),a(r.destination),a(r.authority),...i],programAddress:n,data:Dd().encode(o)}}function qd(e,t){const n=t.filter((t=>!e.includes(t))),r=e.filter((e=>!t.includes(e)));return{hasDiff:n.length>0||r.length>0,added:n,deleted:r}}function Wd(e,t){const n={added:{},deleted:{},changed:{},hasDiff:!1},r=(e,o,i=\"\")=>{for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=i?`${i}.${a}`:a;if(Object.prototype.hasOwnProperty.call(o,a)){if(\"object\"==typeof e[a]&&null!==e[a]&&\"object\"==typeof o[a]&&null!==o[a])r(e[a],o[a],s);else if(e[a]!==o[a]){const e=s.split(\".\")[0];n.changed[e??a]=t[e??a],n.hasDiff=!0}}else n.deleted[s]=e[a],n.hasDiff=!0}for(const t in o)if(Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e,t)){const e=i?`${i}.${t}`:t;n.added[e]=o[t],n.hasDiff=!0}};return r(e,t),n}function Kd(e){return e.split(\"/\")[0]}function Gd(e,t){return`${e}/token:${t}`}class Vd{#t;#c;#p;#g;#m;#o;static cacheTtlsMilliseconds={tokenAccountsByOwner:5*ri.Second};constructor({connection:e,logger:t,configProvider:n,state:r,tokenMetadataService:o,cache:i}){this.#t=t,this.#c=e,this.#p=n,this.#g=r,this.#m=o,this.#o=i}async listAccountAssets(e){const{activeNetworks:t}=this.#p.get();return[...t.map((e=>`${e}/${Qs.SOL}`)),...(await this.#v(Bs(e.address),[Od,ec],t)).flatMap((e=>e.assetType))]}async#v(e,t=[Od,ec],n=[Zs.Mainnet]){if(0===t.length||0===n.length)return[];const r=n.flatMap((e=>t.map((t=>({scope:e,programId:t}))))),o=li(this.#y.bind(this),this.#o,{functionName:\"AssetsService:getTokenAccountsByOwner\",ttlMilliseconds:Vd.cacheTtlsMilliseconds.tokenAccountsByOwner});return(await Promise.all(r.map((async({scope:t,programId:n})=>await o(e,n,t))))).flat()}async#y(e,t=Od,n=Zs.Mainnet){return(await this.#c.getRpc(n).getTokenAccountsByOwner(e,{programId:t},{encoding:\"jsonParsed\"}).send()).value.map((e=>({...e,scope:n,assetType:Gd(n,e.account.data.parsed.info.mint)})))}async getAccountBalances(e,t){const n=Bs(e.address),r=await this.#m.getTokensMetadata(t),o=(0,ci.uniq)((0,ci.map)(t,Kd)),i=[Od,ec],a=await this.#v(n,i,o),s={},c=t.map((async e=>{var t,o,i;const{chainId:c}=oi(e);let u;if(e.endsWith(Qs.SOL))u=(await this.#c.getRpc(c).getBalance(n).send()).value;else{const t=a.find((t=>t.assetType===e));u=t?BigInt(t.account.data.parsed.info.tokenAmount.amount):BigInt(0)}const l=r[e],f=function(e,t){return new qo(e.toString()).div(10**t).toFixed()}(u,(null===(o=l)||void 0===o||null===(t=o.units[0])||void 0===t?void 0:t.decimals)??9);s[e]={amount:f,unit:(null===(i=l)||void 0===i?void 0:i.symbol)??\"UNKNOWN\"}}));await Promise.all(c);const u={...await this.#g.getKey(`assets.${e.id}`),...s};return await this.#g.setKey(`assets.${e.id}`,u),s}async refreshAssets(e){if(0===e.length)return void this.#t.info(\"[AssetsService] No accounts found\");this.#t.log(`[AssetsService] Refreshing assets for ${e.length} accounts`);const t=await this.#g.getKey(\"assets\")??{};for(const n of e){this.#t.log(`[AssetsService] Fetching all assets for ${n.address} in all networks`);const e=await this.listAccountAssets(n),r=t[n.id],o=Object.keys(r??{}),i=e??{},{added:a,deleted:s,hasDiff:c}=qd(o,i);c&&(this.#t.info({assetsAdded:a,assetsDeleted:s,assetsChanged:c},`[refreshAssets] Found updated assets for ${n.address}`),await wn(snap,mn.AccountAssetListUpdated,{assets:{[n.id]:{added:a,removed:s}}}));const u=await this.getAccountBalances(n,e),l=t[n.id],{added:f,deleted:d,changed:h,hasDiff:p}=Wd(l??{},u);p&&(this.#t.info({balancesAdded:f,balancesDeleted:d,balancesChanged:h},`[BalancesService] Found updated balances for ${n.address}`),await wn(snap,mn.AccountBalancesUpdated,{balances:{[n.id]:{...f,...h}}}),await this.#g.setKey(`assets.${n.id}`,u))}}}function Hd(e,t,n){if(\"string\"==typeof e)throw new Error(`An HTML element (\"${String(e)}\") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error(\"A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.\");return e({...t,key:n})}function Jd(e,t,n){return Hd(e,t,n)}const Zd='\u003Csvg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\u003Cimage width=\"16\" height=\"16\" href=\"data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUFBQUFBQUGBgUICAcICAsKCQkKCxEMDQwNDBEaEBMQEBMQGhcbFhUWGxcpIBwcICkvJyUnLzkzMzlHREddXX0BBQUFBQUFBQYGBQgIBwgICwoJCQoLEQwNDA0MERoQExAQExAaFxsWFRYbFykgHBwgKS8nJScvOTMzOUdER11dff/CABEIAPoA+gMBIgACEQEDEQH/xAA1AAEAAwEBAQEBAAAAAAAAAAAAAQIHBggEBQMBAQADAQEBAQAAAAAAAAAAAAACAwQBBQYH/9oADAMBAAIQAxAAAADxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACx204cU3mdnnYLG+IQwNvsxhgLfrRh5/egLRh59egkYefXoRCPn6mv5BH2ajuwAAAACZdFZz6/SvzfofWfLWtS2jw7WpNGO01mjJaas+P+k0tRjtNbUY38Leccnq/DxFq5f2ao7cAAAAB+36W8/9p7+DZZxp6nl7LOM3qzbLOMqs2zzjF6suyzjNqqNlnGrU5NkY7zlHP75Wjzv0mg5pAAAAAAs6jqdsMuajacMsam5HLGqORytqkxjlTVbc5lLVpjDKGsfhQlwdb1p3QAAAAAADofSXk7q/cp9MT8n0/cebe1Jpx2tS2fJNqTRkvNLUY7TWaMdqXZ8vnHPvZHmrw/u+JTGL6EAAAAABMDuvQvkLQfo6PQU55P0WLRJztTl0Sc7U5tFnOppzaOzmacujTnSrLo3x8NNFOM8zsuM+H99Aq2AAAAAATMfpWPznbNXOJdqjHi47Wec4l2jnOLdo5zi57JFxrsp5HjadRy9d0CMgAAAAJPqm+j0X8fW/oV82rPvUWRNGObUmjHe1LUZLIUY7TDPk/opk2CP5uPy+U+1qKrwAAAAPo3zPdc+23fu2/BfYXdA/AmjL+/bn1GToZ55Tl6KedmjJ0c87anL0LnuZyUTgH9fm+Q9+Bk0AAAAAAWVdWVFlRZUWVFpo4uoLxV0HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH//EAEEQAAECAwQHBAgDBgcBAAAAAAECBAADBgURF1UQMUFRkpPSEiFSohYgIjBAYaPiBzLBEyRUYnCRFBVDRYGhstH/2gAIAQEAAT8A/qXdF0XRd8ou9a4R3aOz8AO+KUo95Uc1SyoyGcs+3OIvvPhQDrMYUWPmbzhRGFFj5m74URhRY2Zu+FEYT2NmbvhRGE1jZm84URhNY2ZvOFEYTWNmjzhRGEti5o84URhLYuaPP7IjCWxc0ecKIwksXM3nCiMJLFzN5wojCSxczd/2RGEliZm8/siKt/DthYNkTLRbWlNUqWtIKJwA7Xa8JHwFK0w6qN6EJvQ1lkGfO2AeEb1HZDRq2YNpLVrJTLkyk9lCAO4D9TtJ2nQIv0C/QDAOgGL9Lp22Yt5rl1NTLky03rWrUB+p+W2KyqubUr72SpDOSSJEonzKHiPv6dsB7UT1LduLkJuM2afyy0bzvO4RZdmtbIZSGTRHZlS069qlbVK3k6AYGkQDA0DQDonTpTaVMnTpqUSkJKlrUbkhI1kmK3rJdQuRIaKUiz5BPYB7jMV41CD3++sWx3ltv5LNqm9au9Sj+VCRrUo7hFg2IzsBhLZthftmzCO+Yvao7vkNA0AxfA0A6RAMCCpKUqJUAALySbgBFeVsLXUuzbPWQxQr25m2coH/AMiFa/f0rVK6ZmO1hkiemehIIKuwoFBvFyrjGLByIc89MYsnIxz/ALIxZORjn/ZGLJyMc89MYspyP6/2xi0nIvr/AGxi2nI/r/bGLYyL6/2xi5LyM8/7Yxbl5Gef9sYuSsjPPHTGLkrI1c8dMYuSMjXzh0xi63yRfOHTFR/iO9tpktk1bBpJWLpp7fbWtPh1CCTBJPwN3udfqk6vgKcph7Ui3KW02VKEhIK1zL9atQFwJjCu1szZ+fpjCy18zZ+fpjCu1syZefpjCu1syZefpjCq18yZ+fpjCq18yZ+fpjCm18zZ+fpjCi1s0Z+fpjCe1szZ+fpjCe1s0Z+fpjCa180Z+fpjCa1szZ+fpjCa1szZefpjCW1s0Zefpi36Etan2gdrVKcSAblqlX+wTvBAMKB7ou9/T9vPKffJctriki6bLP5Vo3H9DFl2m1tdlIetV9qXMGralW1KtxGgGAYvgQDoBi+L9A0TZUtxKmSp0tK5cwFK0K7wUnWCIrWjlU+4DltethOPsE95lK8CjB+ApipnVPPAtN62yyBPk7FDeNyhsMNHbZ+2kum04TJMxPaSobR+hG0bIEXwDpB0AwIHqO2rZ+2nNXMlM2TMR2VoVqI/Q7jsisKWn049ISVTGc4kyJvy1lCvmII9+DdFH1VNsB0JThalMJyh+1RrKD40jeIkzpLiVLnSZqZkqYkKQtJvSUnUQdAOi+BF+gHQNA0WjZzO1Wc5m8lCZKmC4jaDsUk7FDYYqWnHtOv1t56SqUq8yJwHctH/ANG2B78G4xR1ZKsLttXiVzGSzeAk3mUraUg6wdojEum9zzkp64xMprc85KeuMTKa8Lzkp64xMprwvOSnrjE2mvC85KeuMTaa8LzlJ64xNprwveSnrjE6mvC95KeuMT6Z3POSnrjE+mdzzlJ6oxOpnc85Q6oxPpjc85SeqMT6YOx5yU9cYn0xue8lPXFY1tYFuWKtk1kT1zzNQpCpqAkIuPeoHtHX8APWv9S+L4vGjVo/4+Bs6zHtquA3ZN1TphBNydgG0k9wEYfVR/Ao5qIw9qj+BRzURh/VWXDmojD6qsuHNRGH1VZcOaiMPqqy4c1EYf1Xlf1ZfVGH9WZX9VHVGH1WZX9WX1Rh9VeWfVl9UYf1blJ5qOqMP6tyo81HVGH1W5T9VHVGH1XZSeajqi0qSt+yGxdPrPXLkhQSV9pKgCd/ZJ+As6z3dpu5LVrKMybMNwA/7JOwDaYpun29PMBIRcufMuLib41bh/KNnq3iL4ECO6Bd6m0d0fiBWMp6ldj2esKkBX7xOGpage5Cd6RtPvhDRrPeOJTeRKVMnTFBKEDWSYpSmJNPNSVkLezUj9rM2Aa+wn5DadI9QQDovgQNAivK2S2TPsezZl80jsOZwP5AdaE/PeYJJ99KlrmrQhAJWSAABeSdwikaTRYklLp0Ap/MRcdolJOwfPeY1QDov0iBoBi+AdNb1l/k6FWcwX+/LR7ax/oAjZ/OYUpSiSSSSbyT3kn39BubFZv5860ZqJc5KB/h1zPyJO0/JW6PSanh/vTXjj0mp7OmvHAqens6a8celFO501449Kacztrxx6U05nbXjj0ppzPGnHHpTTeeNOOPSqnM8accelVN54044FVU3njTjj0rprPWnHAqums8accelVNZ4044qav7PYNDLsp0hy7mC4LR3oljxE7VbhE+dNcTVzpswrmLUVKUokqJOsknWfgAbovMXnfF/wAzHai+L4vMdo747R3x2jvgKO+O18zHa+cXnfBJ/rX/AP/EADQRAAEDAQUFBAkFAAAAAAAAAAIAAQQDBRIUU5IREzBCVBUjMkMGICExM0RQUqIQImFyof/aAAgBAgEBPwD6pTpnVK6A3iT2fJ+z/U8GQ3InhyG5FhqzcqehUbkW7qfYnE25eBTA6piADeIlCgNFD2/ELxIhRCiFEKIUQqq93gWXXs+NT3lQu+/qitWC/m/i6e04b+annxcxFOi5iKZGfmRSo78yORS2ftJETk+1+BRgTK4bylQMhT2XO6U12ZOb5c12dMyDTwJWQawUnKNYORlIo9YG2vS4NkWoUM92fwS/H+UziY3hRCiFEKIUQog2+9S4z0ivD4eDY9rYd9xXLu+UvtRWlA6oEVowepBFPhZ4IpsPPBFMiZ4IpUbNBHXjG2x6oKsICbsBXh4AAVQhAAvES7Om9Kel1gJnSnpdYGY3y56Vg5TeQelYSVkHpWGkZJ6Vh6+UaISF9hD64iREIj73Vh2Jg6bSKw98X4ohRCiFEKIUQqVWCPTvEq1YqxuRev6Nw4Aji5MgN5yARN7EU6D1YamRTYXVBqZFMh9QGpkUqJ1AamRSonUBqZFJi54amVaXGpgRb0FKlHKqXn8PLwNqvOrzra6vP+u36t//xAA2EQABBAEBAwkECwEAAAAAAAACAAEDBAWiEjFDBhETFDAyQkRSICFBkhYjM1BTVGBhcrHB0f/aAAgBAwEBPwD70llCGMpJC2RT5jHtxtLp85jm42l0/KDFtvsaXT8pMS3mdLp+U+HbzOl0/KvCN5vS6+l+Cbfb0uqOQq5KBp6x7Ufd7rt/ftkTA3O+5ZC0dk9lvsxRgjBGCMEYI41hMBLl7PpgDvn/AIq1aGpBHBCGzGDcw+3binmbZDuosbYfwo8VbfhosNdfhamR4PIPwtTIsBkX4GpkfJzKPug1MoOSuSmmAZI+jDxntMqVOvQrhBCGyI6v3fsHkAX95J7ELeNPbr/GVddqNxl1+m3HBPk6Db7QJ8tjvjaBRZOhNIMYWgci7GWPbZHGjBGCMFJGjBOxCTEKwmYG4HQTF9cOrsZYtv3sjryP4UdSV+EjpWH4SPH2X3QGjxlx+AaPE338qaHFZSIwOOuYkKoS2ZawPZi6OT4/97F3ZOYN4l0sbeNl08P4oJ7EDcUF1mv+YD5l1uq3mA+ZkMkcjc4GxD2DROze9GCMFICMEYIwVelJbl2B3KtWjqxDFHub260cXNtmYI3i9aNg9aMWRx86OE/Qjry+hdSnM+ZgVatHWjYQb+X6F//Z\" />\u003C/svg>';function Yd(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}function Qd(e){return t=>{const{key:n=null,...r}=t;return{type:e,props:Yd(r),key:n}}}const Xd=Qd(\"Container\"),eh=Qd(\"Box\"),th=Qd(\"Heading\"),nh=Qd(\"Text\"),rh=Qd(\"Section\"),oh=Qd(\"Row\"),ih=Qd(\"Address\"),ah=Qd(\"Image\"),sh=Qd(\"Footer\"),ch=Qd(\"Button\");function uh(e,t){return`${e}:${t}`}const lh=JSON.parse('{\"D\":{\"send.title\":{\"message\":\"Send\"},\"send.balance\":{\"message\":\"Balance\"},\"send.maxButton\":{\"message\":\"Max\"},\"send.cancelButton\":{\"message\":\"Cancel\"},\"send.continueButton\":{\"message\":\"Continue\"},\"send.fromField\":{\"message\":\"From\"},\"send.toField\":{\"message\":\"To\"},\"send.amountField\":{\"message\":\"Amount\"},\"send.assetField\":{\"message\":\"Token\"},\"send.toPlaceholder\":{\"message\":\"Enter public address\"},\"send.fromRequiredError\":{\"message\":\"Account is required\"},\"send.amountRequiredError\":{\"�ځ��message\":\"Amount is required\"},\"send.amountGreatherThanMinimumBalanceForRentExemptionError\":{\"message\":\"Amount must be greater than {minimumValue}\"},\"send.insuffientSolToCoverFee\":{\"message\":\"Insufficient SOL balance to cover the transaction fee\"},\"send.toRequiredError\":{\"message\":\"To address is required\"},\"send.toInvalidError\":{\"message\":\"Invalid Solana address\"},\"send.insufficientBalance\":{\"message\":\"Insufficient balance\"},\"send.simulationTitleAPIError\":{\"message\":\"Because of an error, we couldn\\'t check for security alerts.\"},\"send.simulationMessageAPIError\":{\"message\":\"Only continue if you trust every address involved.\"},\"send.simulationTitleError\":{\"message\":\"Transaction simulation failed\"},\"send.simulationMessageError\":{\"message\":\"This transaction was reverted during simulation.\"},\"send.selectedTokenPriceNotAvailable\":{\"message\":\"Prices for tokens in {currency} are currently not available. You are still able to send tokens.\"},\"send.confirmation.title\":{\"message\":\"Review\"},\"send.confirmation.from\":{\"message\":\"From\"},\"send.confirmation.recipient\":{\"message\":\"Recipient\"},\"send.confirmation.network\":{\"message\":\"Network\"},\"send.confirmation.transactionSpeed\":{\"message\":\"Transaction speed\"},\"send.confirmation.fee\":{\"message\":\"Network fee\"},\"send.confirmation.sendButton\":{\"message\":\"Send\"},\"send.confirmation.cancelButton\":{\"message\":\"Cancel\"},\"send.confirmation.viewTransaction\":{\"message\":\"View transaction\"},\"send.send-pending.title\":{\"message\":\"Sending...\"},\"send.send-pending.subtitle\":{\"message\":\"Your transaction was submitted.\"},\"send.transaction-success.title\":{\"message\":\"Sent\"},\"send.transaction-success.subtitle\":{\"message\":\"{amount} {tokenSymbol} was successfully sent\"},\"send.transaction-failure.title\":{\"message\":\"Transaction failed\"},\"send.transaction-failure.subtitle\":{\"message\":\"Unable to send {amount} {tokenSymbol}\"},\"confirmation.account\":{\"message\":\"Account\"},\"confirmation.network\":{\"message\":\"Network\"},\"confirmation.estimatedChanges\":{\"message\":\"Estimated changes\"},\"confirmation.estimatedChanges.send\":{\"message\":\"You send\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"You receive\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"Not available\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"No changes\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee.\"},\"confirmation.advanced.show\":{\"message\":\"Show advanced\"},\"confirmation.advanced.hide\":{\"message\":\"Hide advanced\"},\"confirmation.cancelButton\":{\"message\":\"Cancel\"},\"confirmation.confirmButton\":{\"message\":\"Confirm\"},\"confirmation.title\":{\"message\":\"Transaction request\"},\"confirmation.advanced.unknownInstruction\":{\"message\":\"Unknown\"},\"confirmation.advanced.programId\":{\"message\":\"Program ID\"},\"confirmation.advanced.data\":{\"message\":\"Data\"},\"confirmation.fee\":{\"message\":\"Network fee\"},\"confirmation.feeError\":{\"message\":\"Unable to estimate fee\"},\"confirmation.origin\":{\"message\":\"Request from\"},\"confirmation.origin.tooltip\":{\"message\":\"This is the site asking for your confirmation.\"},\"confirmation.simulationErrorTitle\":{\"message\":\"This transaction was reverted during simulation.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"{reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"This is a deceptive request\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"If you approve this request, a third party known for scams will take all your assets.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Learn more\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Security advice by\"},\"confirmation.signMessage.title\":{\"message\":\"Sign message\"},\"confirmation.signMessage.message\":{\"message\":\"Message\"},\"confirmation.signIn.title\":{\"message\":\"Sign-in request\"},\"confirmation.signIn.description\":{\"message\":\"A site wants you to sign in to prove you own this account.\"},\"confirmation.signIn.domain\":{\"message\":\"Domain\"},\"confirmation.signIn.unknownDomain\":{\"message\":\"Unknown domain\"},\"confirmation.signIn.signingInWith\":{\"message\":\"Signing in with\"},\"confirmation.signIn.badAccount\":{\"message\":\"This site is asking you to sign in using the wrong account.\"},\"confirmation.signIn.message\":{\"message\":\"Message\"},\"confirmation.signIn.statement\":{\"message\":\"Statement\"},\"confirmation.signIn.version\":{\"message\":\"Version\"},\"confirmation.signIn.chainId\":{\"message\":\"Chain ID\"},\"confirmation.signIn.nonce\":{\"message\":\"Nonce\"},\"confirmation.signIn.issuedAt\":{\"message\":\"Issued at\"},\"confirmation.signIn.expirationTime\":{\"message\":\"Expiration time\"},\"confirmation.signIn.notBefore\":{\"message\":\"Not before\"},\"confirmation.signIn.requestId\":{\"message\":\"Request ID\"},\"confirmation.signIn.resources\":{\"message\":\"Resources\"},\"transactionScan.errors.accountAlreadyInUse\":{\"message\":\"An account with the same address already exists.\"},\"transactionScan.errors.insufficientSol\":{\"message\":\"Account does not have enough SOL to perform the operation.\"},\"transactionScan.errors.slippageToleranceExceeded\":{\"message\":\"The transaction was reverted because the slippage tolerance was exceeded.\"},\"transactionScan.errors.unknownError\":{\"message\":\"An unknown error occurred.\"}}}'),fh=JSON.parse('{\"D\":{\"send.title\":{\"message\":\"Enviar\"},\"send.balance\":{\"message\":\"Saldo\"},\"send.maxButton\":{\"message\":\"Máx.\"},\"send.cancelButton\":{\"message\":\"Cancelar\"},\"send.continueButton\":{\"message\":\"Continuar\"},\"send.fromField\":{\"message\":\"De\"},\"send.toField\":{\"message\":\"Para\"},\"send.amountField\":{\"message\":\"Monto\"},\"send.assetField\":{\"message\":\"Token\"},\"send.toPlaceholder\":{\"message\":\"Introduzca la dirección pública\"},\"send.fromRequiredError\":{\"message\":\"La cuenta es obligatoria\"},\"send.amountRequiredError\":{\"message\":\"El monto es obligatorio\"},\"send.amountGreatherThanMinimumBalanceForRentExemptionError\":{\"message\":\"El valor debe ser superior a {minimumValue}\"},\"send.insuffientSolToCoverFee\":{\"message\":\"Saldo de SOL insuficiente para cubrir la tarifa de transacción\"},\"send.toRequiredError\":{\"message\":\"La dirección del destinatario es obligatoria\"},\"send.toInvalidError\":{\"message\":\"Dirección de Solana no válida\"},\"send.insufficientBalance\":{\"message\":\"Saldo insuficiente\"},\"send.simulationTitleError\":{\"message\":\"Simulación de transacción fallida\"},\"send.simulationMessageError\":{\"message\":\"Esta transacción se revirtió durante la simulación.\"},\"send.selectedTokenPriceNotAvailable\":{\"message\":\"Los precios de los tokens en {currency} no están disponibles actualmente. Aún puede enviar tokens.\"},\"send.confirmation.title\":{\"message\":\"Revisar\"},\"send.confirmation.from\":{\"message\":\"De\"},\"send.confirmation.recipient\":{\"message\":\"Destinatario\"},\"send.confirmation.network\":{\"message\":\"Red\"},\"send.confirmation.transactionSpeed\":{\"message\":\"Velocidad de la transacción\"},\"send.confirmation.fee\":{\"message\":\"Tarifa de red\"},\"send.confirmation.sendButton\":{\"message\":\"Enviar\"},\"send.confirmation.cancelButton\":{\"message\":\"Cancelar\"},\"send.confirmation.viewTransaction\":{\"message\":\"Ver transacción\"},\"send.send-pending.title\":{\"message\":\"Enviando...\"},\"send.send-pending.subtitle\":{\"message\":\"Se envió su transacción.\"},\"send.transaction-success.title\":{\"message\":\"Enviado\"},\"send.transaction-success.subtitle\":{\"message\":\"El envío de {amount} {tokenSymbol} se realizó correctamente\"},\"send.transaction-failure.title\":{\"message\":\"Transacción fallida\"},\"send.transaction-failure.subtitle\":{\"message\":\"Error al enviar {amount} {tokenSymbol}\"},\"confirmation.account\":{\"message\":\"Cuenta\"},\"confirmation.network\":{\"message\":\"Red\"},\"confirmation.estimatedChanges\":{\"message\":\"Cambios estimados\"},\"confirmation.estimatedChanges.send\":{\"message\":\"Usted envía\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"Usted recibe\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"No disponible\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"Sin cambios\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Los cambios estimados son los que podrían producirse si sigue adelante con esta transacción. Esto es solo una predicción, no una garantía.\"},\"confirmation.advanced.show\":{\"message\":\"Mostrar avanzadas\"},\"confirmation.advanced.hide\":{\"message\":\"Ocultar avanzadas\"},\"confirmation.cancelButton\":{\"message\":\"Cancelar\"},\"confirmation.confirmButton\":{\"message\":\"Confirmar\"},\"confirmation.title\":{\"message\":\"Solicitud de transacción\"},\"confirmation.advanced.unknownInstruction\":{\"message\":\"Desconocida\"},\"confirmation.advanced.programId\":{\"message\":\"ID del programa\"},\"confirmation.advanced.data\":{\"message\":\"Datos\"},\"confirmation.fee\":{\"message\":\"Tarifa de red\"},\"confirmation.feeError\":{\"message\":\"No se puede calcular la tarifa\"},\"confirmation.simulationErrorTitle\":{\"message\":\"Esta transacción se revirtió durante la simulación.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"Motivo: {reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"Esta es una solicitud engañosa\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"Si aprueba esta solicitud, un tercero conocido por sus estafas se quedará con todos sus activos.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Conozca más\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Asesoramiento de seguridad por\"},\"confirmation.signMessage.title\":{\"message\":\"Firmar mensaje\"},\"confirmation.signMessage.message\":{\"message\":\"Mensaje\"},\"confirmation.signIn.title\":{\"message\":\"Solicitud de inicio de sesión\"},\"confirmation.signIn.description\":{\"message\":\"Un sitio quiere que inicie sesión para demostrar que usted es el titular de esta cuenta.\"},\"confirmation.signIn.requestFrom\":{\"message\":\"Solicitud de\"},\"confirmation.signIn.unknownDomain\":{\"message\":\"Dominio desconocido\"},\"confirmation.signIn.signingInWith\":{\"message\":\"Iniciar sesión con\"},\"confirmation.signIn.badAccount\":{\"message\":\"Este sitio le pide que inicie sesión con la cuenta incorrecta.\"},\"confirmation.signIn.message\":{\"message\":\"Mensaje\"},\"confirmation.signIn.statement\":{\"message\":\"Declaración\"},\"confirmation.signIn.version\":{\"message\":\"Versión\"},\"confirmation.signIn.chainId\":{\"message\":\"ID de cadena\"},\"confirmation.signIn.nonce\":{\"message\":\"Nonce\"},\"confirmation.signIn.issuedAt\":{\"message\":\"Emitido a las\"},\"confirmation.signIn.expirationTime\":{\"message\":\"Hora de caducidad\"},\"confirmation.signIn.notBefore\":{\"message\":\"No antes de\"},\"confirmation.signIn.requestId\":{\"message\":\"ID de solicitud\"},\"confirmation.signIn.resources\":{\"message\":\"Recursos\"}}}'),dh={en:lh.D,es:fh.D},hh=\"en\";function ph(e){const t=dh[e]??dh[hh];return(e,n)=>{var r,o;let i=(null===(o=t)||void 0===o||null===(r=o[e])||void 0===r?void 0:r.message)??e;return n&&i&&Object.keys(n).forEach((e=>{const t=new RegExp(`\\\\{${e}\\\\}`,\"gu\");i=i.replace(t,n[e]??\"\")})),i}}const gh=({label:e,value:t})=>null!=t?Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:e}),Hd(nh,{children:t})]}):null,mh=1e-6,vh=3,yh=\"0\",wh=new qo(mh).decimalPlaces();function bh(e,t){const[n]=t.split(\"_\");try{const r=new qo(e);if(r.isNaN())return yh;if(r.isZero())return yh;if(r.abs().lt(mh))return`\u003C${function(e,t){const n=new qo(t),r=n.decimalPlaces(),o=n.toFixed(r??0),[i]=e.split(\"_\"),[a,s]=o.split(\".\"),c=new Intl.NumberFormat(i).format(a);return s?`${c}.${s}`:c}(t,mh)}`;if(r.abs().lt(1))return new Intl.NumberFormat(n,{maximumSignificantDigits:vh}).format(Number(r.toFixed(wh??0)));const o=r.abs().integerValue().toString().length,i=Math.max(0,vh-o+1);return new Intl.NumberFormat(t,{maximumFractionDigits:i}).format(r.toFixed(i))}catch(e){return console.error(e),yh}}function Ah(e,t,n){const r=new qo(e).toNumber(),[o]=n.split(\"_\");return r.toLocaleString(o,{style:\"currency\",currency:t,maximumFractionDigits:2,minimumFractionDigits:2})}const Sh=({asset:e,preferences:t})=>{const n=e.type;return Jd(eh,{direction:\"vertical\",crossAlignment:\"end\",children:[Jd(eh,{direction:\"horizontal\",alignment:\"center\",children:[Jd(nh,{color:\"in\"===n?\"success\":\"error\",children:[\"in\"===n?\"+\":\"-\",bh(e.value??0,t.locale)]}),e.imageSvg?Hd(eh,{alignment:\"center\",center:!0,children:Hd(ah,{borderRadius:\"full\",src:e.imageSvg})}):null,Hd(nh,{children:e.symbol??\"\"})]}),e.price?Hd(nh,{color:\"muted\",children:Ah(e.price.toString(),t.currency,t.locale)}):null]})},xh=Qd(\"Tooltip\");var Eh;!function(e){e.AddSquare=\"add-square\",e.Add=\"add\",e.Arrow2Down=\"arrow-2-down\",e.Arrow2Left=\"arrow-2-left\",e.Arrow2Right=\"arrow-2-right\",e.Arrow2Up=\"arrow-2-up\",e.Arrow2UpRight=\"arrow-2-up-right\",e.ArrowDoubleLeft=\"arrow-double-left\",e.ArrowDoubleRight=\"arrow-double-right\",e.ArrowDown=\"arrow-down\",e.ArrowLeft=\"arrow-left\",e.ArrowRight=\"arrow-right\",e.ArrowUp=\"arrow-up\",e.BankToken=\"bank-token\",e.Bank=\"bank\",e.Book=\"book\",e.Bookmark=\"bookmark\",e.Bridge=\"bridge\",e.Calculator=\"calculator\",e.CardPos=\"card-pos\",e.CardToken=\"card-token\",e.Card=\"card\",e.Category=\"category\",e.Chart=\"chart\",e.CheckBold=\"check-bold\",e.Check=\"check\",e.Clock=\"clock\",e.Close=\"close\",e.CodeCircle=\"code-circle\",e.Coin=\"coin\",e.Confirmation=\"confirmation\",e.Connect=\"connect\",e.CopySuccess=\"copy-success\",e.Copy=\"copy\",e.Customize=\"customize\",e.Danger=\"danger\",e.Dark=\"dark\",e.Data=\"data\",e.Diagram=\"diagram\",e.DocumentCode=\"document-code\",e.DragDrop=\"drag-drop\",e.DraggingAnimation=\"dragging-animation\",e.PinningAnimation=\"pinning-animation\",e.Edit=\"edit\",e.Eraser=\"eraser\",e.Ethereum=\"ethereum\",e.Expand=\"expand\",e.Explore=\"explore\",e.Export=\"export\",e.EyeSlash=\"eye-slash\",e.Eye=\"eye\",e.Filter=\"filter\",e.Flag=\"flag\",e.FlashSlash=\"flash-slash\",e.Flash=\"flash\",e.FullCircle=\"full-circle\",e.Gas=\"gas\",e.GlobalSearch=\"global-search\",e.Global=\"global\",e.Graph=\"graph\",e.Hardware=\"hardware\",e.Heart=\"heart\",e.Hierarchy=\"hierarchy\",e.Home=\"home\",e.Import=\"import\",e.Info=\"info\",e.Key=\"key\",e.Light=\"light\",e.Link=\"link\",e.Loading=\"loading\",e.LockCircle=\"lock-circle\",e.LockSlash=\"lock-slash\",e.Lock=\"lock\",e.Login=\"login\",e.Logout=\"logout\",e.Menu=\"menu\",e.MessageQuestion=\"message-question\",e.Messages=\"messages\",e.MinusBold=\"minus-bold\",e.MinusSquare=\"minus-square\",e.Minus=\"minus\",e.Mobile=\"mobile\",e.Money=\"money\",e.Monitor=\"monitor\",e.MoreHorizontal=\"more-horizontal\",e.MoreVertical=\"more-vertical\",e.NotificationCircle=\"notification-circle\",e.Notification=\"notification\",e.PasswordCheck=\"password-check\",e.People=\"people\",e.Pin=\"pin\",e.ProgrammingArrows=\"programming-arrows\",e.Custody=\"custody\",e.Question=\"question\",e.Received=\"received\",e.Refresh=\"refresh\",e.Save=\"save\",e.ScanBarcode=\"scan-barcode\",e.ScanFocus=\"scan-focus\",e.Scan=\"scan\",e.Scroll=\"scroll\",e.Search=\"search\",e.SecurityCard=\"security-card\",e.SecurityCross=\"security-cross\",e.SecurityKey=\"security-key\",e.SecuritySearch=\"security-search\",e.SecuritySlash=\"security-slash\",e.SecurityTick=\"security-tick\",e.SecurityTime=\"security-time\",e.SecurityUser=\"security-user\",e.Security=\"security\",e.Send1=\"send-1\",e.Send2=\"send-2\",e.Setting=\"setting\",e.Slash=\"slash\",e.SnapsMobile=\"snaps-mobile\",e.SnapsPlus=\"snaps-plus\",e.Snaps=\"snaps\",e.Speedometer=\"speedometer\",e.Star=\"star\",e.Stake=\"stake\",e.Student=\"student\",e.SwapHorizontal=\"swap-horizontal\",e.SwapVertical=\"swap-vertical\",e.Tag=\"tag\",e.Tilde=\"tilde\",e.Timer=\"timer\",e.Trash=\"trash\",e.TrendDown=\"trend-down\",e.TrendUp=\"trend-up\",e.UserCircleAdd=\"user-circle-add\",e.UserCircleLink=\"user-circle-link\",e.UserCircleRemove=\"user-circle-remove\",e.UserCircle=\"user-circle\",e.User=\"user\",e.WalletCard=\"wallet-card\",e.WalletMoney=\"wallet-money\",e.Wallet=\"wallet\",e.Warning=\"warning\",e.Twitter=\"twitter\",e.QrCode=\"qr-code\",e.UserCheck=\"user-check\",e.Unpin=\"unpin\",e.Ban=\"ban\",e.Bold=\"bold\",e.CircleX=\"circle-x\",e.Download=\"download\",e.FileIcon=\"file\",e.Flask=\"flask\",e.Plug=\"plug\",e.Share=\"share\",e.Square=\"square\",e.Tint=\"tint\",e.Upload=\"upload\",e.Usb=\"usb\",e.Wifi=\"wifi\",e.PlusMinus=\"plus-minus\"}(Eh||(Eh={}));const _h=Qd(\"Icon\"),kh=({preferences:e})=>{const t=ph(e.locale);return Jd(eh,{direction:\"horizontal\",center:!0,children:[Hd(nh,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges\")}),Hd(xh,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:Hd(_h,{name:\"info\"})})]})},Ih=Qd(\"Skeleton\"),Th=({preferences:e})=>{const t=ph(e.locale);return Jd(rh,{direction:\"vertical\",children:[Hd(kh,{preferences:e}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.estimatedChanges.send\")}),Hd(eh,{children:Jd(eh,{direction:\"vertical\",crossAlignment:\"end\",children:[Hd(Ih,{width:100,height:20}),Hd(Ih,{width:40,height:20})]})})]}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.estimatedChanges.receive\")}),Hd(eh,{children:Jd(eh,{direction:\"vertical\",crossAlignment:\"end\",children:[Hd(Ih,{width:100,height:20}),Hd(Ih,{width:40,height:20})]})})]})]})},Oh=({changes:e,preferences:t,scanFetchStatus:n,scanStatus:r})=>{var o,i,a,s,c,u;const l=ph(t.locale),f=\"fetched\"===n,d=\"error\"===n;if(\"fetching\"===n)return Hd(Th,{preferences:t});if(d||f&&\"ERROR\"===r)return Jd(rh,{direction:\"vertical\",children:[Hd(kh,{preferences:t}),Hd(nh,{color:\"alternative\",children:l(\"confirmation.estimatedChanges.notAvailable\")})]});const h=(null===(o=e)||void 0===o?void 0:o.assets.filter((e=>\"out\"===e.type)))??[],p=(null===(i=e)||void 0===i?void 0:i.assets.filter((e=>\"in\"===e.type)))??[],g=h.length>0||p.length>0;return Jd(rh,f&&!g?{direction:\"vertical\",children:[Hd(kh,{preferences:t}),Hd(nh,{color:\"alternative\",children:l(\"confirmation.estimatedChanges.noChanges\")})]}:{children:[Hd(kh,{preferences:t}),(null===(a=h)||void 0===a?void 0:a.length)>0?Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.estimatedChanges.send\")}),Hd(eh,{children:Hd(eh,{children:null===(s=h)||void 0===s?void 0:s.map((e=>Hd(Sh,{asset:e,preferences:t})))})})]}):null,Hd(eh,{children:null}),(null===(c=p)||void 0===c?void 0:c.length)>0?Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.estimatedChanges.receive\")}),Hd(eh,{children:Hd(eh,{children:null===(u=p)||void 0===u?void 0:u.map((e=>Hd(Sh,{asset:e,preferences:t})))})})]}):null]})};var Ch;!function(e){e.Cancel=\"confirm-sign-in-cancel\",e.Confirm=\"confirm-sign-in-confirm\"}(Ch||(Ch={}));const Bh={[Ch.Cancel]:async function({id:e}){await Pf(e,!1)},[Ch.Confirm]:async function({id:e}){await Pf(e,!0)}},Rh=({params:e,origin:t,account:n,scope:r,preferences:o,networkImage:i})=>{const a=ph(o.locale),s=t?new URL(t).hostname:null,{domain:c,statement:u,uri:l,version:f,chainId:d,nonce:h,issuedAt:p,expirationTime:g,notBefore:m,requestId:v,resources:y,address:w}=e,b=uh(r,n.address),A=w?uh(r,w):null,S=A!==b;return Jd(Xd,{children:[Jd(eh,{children:[Jd(eh,{alignment:\"center\",center:!0,children:[Hd(eh,{children:null}),Hd(th,{size:\"lg\",children:a(\"confirmation.signIn.title\")}),Hd(nh,{color:\"muted\",alignment:\"center\",children:a(\"confirmation.signIn.description\")})]}),o.simulateOnChainActions?Hd(Oh,{changes:null,scanStatus:null,preferences:o,scanFetchStatus:\"fetched\"}):null,Jd(rh,{children:[s?Hd(oh,{label:a(\"confirmation.origin\"),tooltip:a(\"confirmation.origin.tooltip\"),children:Hd(nh,{children:s})}):null,Hd(oh,{label:a(\"confirmation.signIn.domain\"),children:Hd(nh,{children:c??a(\"confirmation.signIn.unknownDomain\")})}),Hd(oh,{label:a(\"confirmation.signIn.signingInWith\"),tooltip:S?a(\"confirmation.signIn.badAccount\"):void 0,variant:S?\"warning\":\"default\",children:Hd(ih,{address:b,truncate:!0,displayName:!0,avatar:!0})})]}),Jd(rh,{children:[Hd(nh,{fontWeight:\"medium\",children:a(\"confirmation.signIn.message\")}),Hd(nh,{children:u??\"\"}),Hd(gh,{label:\"URL\",value:l}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.network\")}),Jd(eh,{direction:\"horizontal\",alignment:\"center\",children:[Hd(eh,{alignment:\"center\",center:!0,children:Hd(ah,{borderRadius:\"medium\",src:i??Zd})}),Hd(nh,{children:tc[r].name})]})]}),A?Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.account\")}),Hd(ih,{address:A,truncate:!0,displayName:!0,avatar:!0})]}):null,Hd(gh,{label:a(\"confirmation.signIn.version\"),value:f}),Hd(gh,{label:a(\"confirmation.signIn.chainId\"),value:d}),Hd(gh,{label:a(\"confirmation.signIn.nonce\"),value:h}),Hd(gh,{label:a(\"confirmation.signIn.issuedAt\"),value:p}),Hd(gh,{label:a(\"confirmation.signIn.expirationTime\"),value:g}),Hd(gh,{label:a(\"confirmation.signIn.notBefore\"),value:m}),Hd(gh,{label:a(\"confirmation.signIn.requestId\"),value:v}),y&&y.length>0?Jd(eh,{alignment:\"space-between\",direction:\"vertical\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.signIn.resources\")}),Hd(eh,{direction:\"vertical\",children:y.map((e=>Hd(nh,{children:e},e)))})]}):null]})]}),Jd(sh,{children:[Hd(ch,{name:Ch.Cancel,children:a(\"confirmation.cancelButton\")}),Hd(ch,{name:Ch.Confirm,children:a(\"confirmation.confirmButton\")})]})]})};var jh;!function(e){e.Cancel=\"confirm-sign-message-cancel\",e.Confirm=\"confirm-sign-message-confirm\"}(jh||(jh={}));const Ph={[jh.Cancel]:async function({id:e}){await Pf(e,!1)},[jh.Confirm]:async function({id:e}){await Pf(e,!0)}},Nh=({message:e,account:t,scope:n,locale:r,networkImage:o,origin:i})=>{const a=ph(r),{address:s}=t,c=i?new URL(i).hostname:null,u=uh(n,s);return Jd(Xd,{children:[Jd(eh,{children:[Jd(eh,{alignment:\"center\",center:!0,children:[Hd(eh,{children:null}),Hd(th,{size:\"lg\",children:a(\"confirmation.signMessage.title\")})]}),Jd(rh,{children:[Hd(eh,{direction:\"horizontal\",center:!0,children:Hd(nh,{fontWeight:\"medium\",children:a(\"confirmation.signMessage.message\")})}),Hd(eh,{alignment:\"space-between\",children:Hd(nh,{children:e})})]}),Jd(rh,{children:[c?Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",center:!0,children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.origin\")}),Hd(xh,{content:a(\"confirmation.origin.tooltip\"),children:Hd(_h,{name:\"question\",color:\"muted\"})})]}),Hd(nh,{children:c})]}):null,Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.account\")}),Hd(ih,{address:u,truncate:!0,displayName:!0,avatar:!0})]}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:a(\"confirmation.network\")}),Jd(eh,{direction:\"horizontal\",alignment:\"center\",children:[Hd(eh,{alignment:\"center\",center:!0,children:Hd(ah,{borderRadius:\"medium\",src:o??Zd})}),Hd(nh,{children:tc[n].name})]})]})]})]}),Jd(sh,{children:[Hd(ch,{name:jh.Cancel,children:a(\"confirmation.cancelButton\")}),Hd(ch,{name:jh.Confirm,children:a(\"confirmation.confirmButton\")})]})]})};const Lh=e=>qo(e.toString()).dividedBy(Js),Mh=e=>qo(e.toString()).multipliedBy(Js).integerValue(qo.ROUND_DOWN);function zh(e){return e.length>12?`${e.slice(0,5)}...${e.slice(-5)}`:e}var Uh;!function(e){e.ShowAdvanced=\"confirm-sign-and-send-transaction-show-advanced\",e.Cancel=\"confirm-sign-and-send-transaction-cancel\",e.Confirm=\"confirm-sign-and-send-transaction-confirm\"}(Uh||(Uh={}));const $h={[Uh.ShowAdvanced]:async function({id:e,context:t}){const n={...t,advanced:{...t.advanced,shown:!t.advanced.shown}};await jf(e,Hd(Xh,{context:n}),n)},[Uh.Cancel]:async function({id:e}){await Pf(e,!1)},[Uh.Confirm]:async function({id:e}){await Pf(e,!0)}},Dh=Qd(\"Link\");function Fh(e,t,n){const{cluster:r}=tc[e];return vc({baseUrl:\"https://solscan.io\",path:`/${t}/${n}`,queryParams:r?{cluster:r}:void 0})}const qh=({programId:e,data:t,scope:n,locale:r})=>{const o=ph(r);return Jd(rh,{alignment:\"start\",children:[Hd(nh,{color:\"alternative\",fontWeight:\"bold\",children:o(\"confirmation.advanced.unknownInstruction\")}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{color:\"alternative\",alignment:\"start\",children:o(\"confirmation.advanced.programId\")}),Hd(Dh,{href:Fh(n,\"address\",e),children:Hd(ih,{avatar:!1,address:uh(n,e),truncate:!0})})]}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{color:\"alternative\",children:o(\"confirmation.advanced.data\")}),Hd(nh,{children:zh(t)})]})]})},Wh=({instructions:e,showInstructions:t,locale:n,scope:r})=>{const o=ph(n),i=t?\"hide\":\"show\",a=t?\"arrow-up\":\"arrow-down\";return Jd(eh,{alignment:\"start\",children:[Jd(ch,{name:Uh.ShowAdvanced,children:[o(`confirmation.advanced.${i}`),\"&nbsp;\",Hd(_h,{name:a,color:\"primary\"})]}),t&&Hd(eh,{children:e.map((e=>Hd(qh,{locale:n,scope:r,...e})))})]})},Kh=Qd(\"Banner\"),Gh={AccountAlreadyInUse:\"transactionScan.errors.accountAlreadyInUse\",ResultWithNegativeLamports:\"transactionScan.errors.insufficientSol\",SlippageToleranceExceeded:\"transactionScan.errors.slippageToleranceExceeded\",ExceededDesiredSlippageLimit:\"transactionScan.errors.slippageToleranceExceeded\"};function Vh(e,t){const n=ph(t.locale),{code:r}=e;if(!r)return n(\"transactionScan.errors.unknownError\");return n(Gh[r]??\"transactionScan.errors.unknownError\")}const Hh={Malicious:\"danger\",Warning:\"warning\"},Jh=({preferences:e,validation:t,error:n,scanFetchStatus:r})=>{var o;const i=ph(e.locale);if(\"error\"===r)return Hd(Kh,{title:i(\"send.simulationTitleAPIError\"),severity:\"danger\",children:Hd(nh,{children:i(\"send.simulationMessageAPIError\")})});if(!n&&!t)return Hd(eh,{children:null});if(n)return Hd(Kh,{title:i(\"confirmation.simulationErrorTitle\"),severity:\"warning\",children:Hd(nh,{children:i(\"confirmation.simulationErrorSubtitle\",{reason:Vh(n,e)})})});if(!t)return Hd(eh,{children:null});const a=Hh[null===(o=t)||void 0===o?void 0:o.type];return a?Jd(Kh,{title:i(\"confirmation.validationErrorTitle\"),severity:a,children:[Hd(nh,{children:i(\"confirmation.validationErrorSubtitle\")}),Hd(nh,{size:\"sm\",children:Hd(Dh,{href:\"https://support.metamask.io/configure/wallet/how-to-turn-on-security-alerts/\",children:i(\"confirmation.validationErrorLearnMore\")})}),Jd(nh,{size:\"sm\",children:[Hd(_h,{color:\"primary\",name:\"security-tick\"}),\" \",i(\"confirmation.validationErrorSecurityAdviced\"),\" \",Hd(Dh,{href:\"https://www.blockaid.io\",children:\"Blockaid\"})]})]}):Hd(eh,{children:null})};function Zh(e,t,n){return`${bh(e,n)} ${t}`}function Yh(e,t){return new qo(e).multipliedBy(t).toString()}const Qh=({origin:e,accountAddress:t,scope:n,feeInSol:r,nativePrice:o,fetchingPricesStatus:i,preferences:a,networkImage:s})=>{const{currency:c,locale:u}=a,l=ph(u),f=e?new URL(e).hostname:null,d=\"fetching\"===i,h=r&&o&&!(\"error\"===i)?Ah(Yh(r,o),c,u):\"\";return Jd(rh,{children:[f?Jd(eh,{children:[Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",center:!0,children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.origin\")}),Hd(xh,{content:l(\"confirmation.origin.tooltip\"),children:Hd(_h,{name:\"question\",color:\"muted\"})})]}),Hd(nh,{children:f})]}),Hd(eh,{children:null})]}):null,Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.account\")}),Hd(ih,{address:uh(n,t),truncate:!0,displayName:!0,avatar:!0})]}),Hd(eh,{children:null}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.network\")}),Jd(eh,{direction:\"horizontal\",alignment:\"center\",children:[Hd(eh,{alignment:\"center\",center:!0,children:Hd(ah,{borderRadius:\"medium\",src:s??\"\"})}),Hd(nh,{children:tc[n].name})]})]}),Hd(eh,{children:null}),Jd(eh,{alignment:\"space-between\",direction:\"horizontal\",children:[Hd(nh,{fontWeight:\"medium\",color:\"alternative\",children:l(\"confirmation.fee\")}),r?Jd(eh,{direction:\"horizontal\",alignment:\"center\",children:[d?Hd(Ih,{width:80}):Hd(nh,{color:\"muted\",children:h}),Hd(nh,{children:Zh(r,tc[n].nativeToken.symbol,u)})]}):Hd(xh,{content:l(\"confirmation.feeError\"),children:Hd(_h,{name:\"warning\"})})]})]})},Xh=({context:e})=>{var t,n,r,o,i,a,s;const c=ph(e.preferences.locale),u=e.feeEstimatedInSol,{nativeToken:l}=tc[e.scope],f=(null===(t=e.tokenPrices[l.caip19Id])||void 0===t?void 0:t.price)??null,d=\"fetching\"===e.scanFetchStatus||\"ERROR\"===(null===(n=e.scan)||void 0===n?void 0:n.status);return Jd(Xd,{children:[Jd(eh,{children:[e.preferences.useSecurityAlerts?Hd(Jh,{scanFetchStatus:e.scanFetchStatus,validation:(null===(r=e.scan)||void 0===r?void 0:r.validation)??null,error:(null===(o=e.scan)||void 0===o?void 0:o.error)??null,preferences:e.preferences}):null,Jd(eh,{alignment:\"center\",center:!0,children:[Hd(eh,{children:null}),Hd(th,{size:\"lg\",children:c(\"confirmation.title\")}),Hd(eh,{children:null})]}),e.preferences.simulateOnChainActions?Hd(Oh,{scanStatus:(null===(i=e.scan)||void 0===i?void 0:i.status)??null,scanFetchStatus:e.scanFetchStatus,changes:(null===(a=e.scan)||void 0===a?void 0:a.estimatedChanges)??null,preferences:e.preferences}):null,Hd(Qh,{accountAddress:(null===(s=e.account)||void 0===s?void 0:s.address)??null,scope:e.scope,feeInSol:u,nativePrice:f,fetchingPricesStatus:e.tokenPricesFetchStatus,preferences:e.preferences,networkImage:e.networkImage,origin:e.origin}),Hd(Wh,{instructions:e.advanced.instructions,showInstructions:e.advanced.shown,locale:e.preferences.locale,scope:e.scope})]}),Jd(sh,{children:[Hd(ch,{name:Uh.Cancel,children:c(\"confirmation.cancelButton\")}),Hd(ch,{name:Uh.Confirm,disabled:d,children:c(\"confirmation.confirmButton\")})]})]})},ep={method:qt.SignAndSendTransaction,scope:Zs.Mainnet,networkImage:Zd,account:null,transaction:\"\",scan:null,scanFetchStatus:\"fetching\",feeEstimatedInSol:\"0\",tokenPrices:{},tokenPricesFetchStatus:\"fetching\",origin:\"\",preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!0,useNftDetection:!0},advanced:{shown:!1,instructions:[]}};async function tp(e){const t={...ep,...e},n=Lf().then((e=>{t.preferences=e})).catch((()=>{t.preferences=ep.preferences})),r=Rm.extractInstructionsFromUnknownBase64String(t.transaction,t.scope).then((e=>{t.advanced.instructions=function(e){const t=[];return e.forEach((e=>{var n;t.push({programId:e.programAddress,data:Hl.encode((null===(n=e)||void 0===n?void 0:n.data)?new Uint8Array(e.data):new Uint8Array)})})),t}(e)})).catch((e=>{console.error(e),t.advanced.instructions=[]}));await Promise.all([n,r]);const{currency:o,useExternalPricingData:i,useSecurityAlerts:a,simulateOnChainActions:s}=t.preferences,c=await Rf(Hd(Xh,{context:t}),t),u=Nf(c),l={...t},f=[tc[t.scope].nativeToken.caip19Id];let d;i?d=Lm.getMultipleSpotPrices(f,o).then((e=>{l.tokenPrices=e,l.tokenPricesFetchStatus=\"fetched\"})).catch((()=>{l.tokenPricesFetchStatus=\"error\"})):(l.tokenPricesFetchStatus=\"fetched\",l.tokenPrices={});const h=Rm.getFeeFromBase64StringInLamports(t.transaction,l.scope).then((e=>{l.fe�����eEstimatedInSol=e?Lh(e).toString():null})).catch((()=>{l.feeEstimatedInSol=null}));await Promise.all([d,h]),await jf(c,Hd(Xh,{context:l}),l);const p={...l},g=[];if(s&&g.push(\"simulation\"),a&&g.push(\"validation\"),s||a){var m;const e=Fm.scanTransaction({method:p.method,accountAddress:(null===(m=p.account)||void 0===m?void 0:m.address)??\"\",transaction:p.transaction,scope:p.scope,origin:p.origin,options:g}).then((async e=>{p.scanFetchStatus=\"fetched\",p.scan=e})).catch((()=>{p.scan=null,p.scanFetchStatus=\"error\"}));await Promise.all([e])}else p.scanFetchStatus=\"fetched\",p.scan=null;return await jf(c,Hd(Xh,{context:p}),p),await Om.setKey(`mapInterfaceNameToId.${Bf}`,c),u}var np;!function(e){e.OnTransactionAdded=\"onTransactionAdded\",e.OnTransactionApproved=\"onTransactionApproved\",e.OnTransactionSubmitted=\"onTransactionSubmitted\",e.OnTransactionFinalized=\"onTransactionFinalized\",e.OnTransactionRejected=\"onTransactionRejected\",e.OnSignTransaction=\"onSignTransaction\",e.OnAccountsRefresh=\"onAccountsRefresh\"}(np||(np={}));function rp(e){return JSON.parse(function(e){const t=[];let n=!1;for(let r=0;r\u003Ce.length;r++){let o=!1;if(\"\\\\\"===e[r]&&(t.push(e[r++]),o=!o),'\"'!==e[r]){if(!n){const n=op(e,r);if(n?.length){r+=n.length-1,n.match(/\\.|[eE]-/)?t.push(n):t.push(ip(n));continue}}t.push(e[r])}else t.push(e[r]),o||(n=!n)}return t.join(\"\")}(e),((e,t)=>function(e){return!!e&&\"object\"==typeof e&&\"$n\"in e&&\"string\"==typeof e.$n}(t)?function({$n:e}){if(e.match(/[eE]/)){const[t,n]=e.split(/[eE]/);return BigInt(t)*BigInt(10)**BigInt(n)}return BigInt(e)}(t):t))}function op(e,t){if(!e[t]?.match(/[-\\d]/))return null;const n=e.slice(t).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/);return n?n[0]:null}function ip(e){return`{\"$n\":\"${e}\"}`}var ap=0n;function sp(){const e=ap;return ap++,e.toString()}function cp(e){return function(e){return new Proxy(e.api,{defineProperty:()=>!1,deleteProperty:()=>!1,get:(t,n,r)=>function(...o){const i=n.toString(),a=Reflect.get(t,i,r);if(!a)throw new Pa(Ta,{method:i,params:o});const s=a(...o);return function({transport:e},t){return{send:async n=>await t.execute({signal:n?.abortSignal,transport:e})}}(e,s)}})}(e)}function up(e){return new Proxy({},{defineProperty:()=>!1,deleteProperty:()=>!1,get(...t){const[n,r]=t,o=r.toString();return function(...t){const n=Object.freeze({methodName:o,params:t}),r=e?.requestTransformer?e?.requestTransformer(n):n;return Object.freeze({execute:async({signal:t,transport:n})=>{const o=function(e){return{id:sp(),jsonrpc:\"2.0\",method:e.methodName,params:e.params}}(r),i=await n({payload:o,signal:t});return e?.responseTransformer?e.responseTransformer(i,r):i}})}}})}function lp(e){return null!=e&&\"object\"==typeof e&&!Array.isArray(e)&&(\"jsonrpc\"in e&&\"2.0\"===e.jsonrpc&&\"method\"in e&&\"string\"==typeof e.method&&\"params\"in e)}var fp={};function dp(e){return function t(n,r){if(Array.isArray(n))return n.map(((e,n)=>{const o={...r,keyPath:[...r.keyPath,n]};return t(e,o)}));if(\"object\"==typeof n&&null!==n){const e={};for(const o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;const i={...r,keyPath:[...r.keyPath,o]};e[o]=t(n[o],i)}return e}return e.reduce(((e,t)=>t(e,r)),n)}}function hp(e,t){return n=>{const r=dp(e);return Object.freeze({...n,params:r(n.params,t)})}}function pp(e){return\"bigint\"==typeof e?Number(e):e}function gp({commitmentPropertyName:e,params:t,optionsObjectPositionInParams:n,overrideCommitment:r}){const o=t[n];if(void 0===o||o&&\"object\"==typeof o&&!Array.isArray(o))if(o&&e in o){if(!o[e]||\"finalized\"===o[e]){const r=[...t],{[e]:i,...a}=o;return Object.keys(a).length>0?r[n]=a:n===r.length-1?r.length--:r[n]=void 0,r}}else if(\"finalized\"!==r){const i=[...t];return i[n]={...o,[e]:r},i}return t}function mp(e){return(t,{keyPath:n})=>(\"bigint\"==typeof t&&e&&(t>Number.MAX_SAFE_INTEGER||t\u003C-Number.MAX_SAFE_INTEGER)&&e(n,t),t)}var vp={accountNotifications:1,blockNotifications:1,getAccountInfo:1,getBalance:1,getBlock:1,getBlockHeight:0,getBlockProduction:0,getBlocks:2,getBlocksWithLimit:2,getEpochInfo:0,getFeeForMessage:1,getInflationGovernor:0,getInflationReward:1,getLargestAccounts:0,getLatestBlockhash:0,getLeaderSchedule:1,getMinimumBalanceForRentExemption:1,getMultipleAccounts:1,getProgramAccounts:1,getSignaturesForAddress:1,getSlot:0,getSlotLeader:0,getStakeMinimumDelegation:0,getSupply:0,getTokenAccountBalance:1,getTokenAccountsByDelegate:2,getTokenAccountsByOwner:2,getTokenLargestAccounts:1,getTokenSupply:1,getTransaction:1,getTransactionCount:0,getVoteAccounts:0,isBlockhashValid:1,logsNotifications:1,programNotifications:1,requestAirdrop:2,sendTransaction:1,signatureNotifications:1,simulateTransaction:1};function yp(e){const t=e?.onIntegerOverflow;return n=>{return lu(n,t?(r=t,e=>hp([mp(((...t)=>r(e,...t)))],{keyPath:[]})(e)):e=>e,hp([pp],{keyPath:[]}),function({defaultCommitment:e,optionsObjectPositionByMethod:t}){return n=>{const{params:r,methodName:o}=n;if(!Array.isArray(r))return n;const i=t[o];return null==i?n:Object.freeze({methodName:o,params:gp({commitmentPropertyName:\"sendTransaction\"===o?\"preflightCommitment\":\"commitment\",optionsObjectPositionInParams:i,overrideCommitment:e,params:r})})}}({defaultCommitment:e?.defaultCommitment,optionsObjectPositionByMethod:vp}));var r}}function wp(e){return t=[bp(e)],n={keyPath:[]},e=>dp(t)(e,n);var t,n}function bp(e){return function(t,{keyPath:n}){return\"number\"==typeof t&&Number.isInteger(t)||\"bigint\"==typeof t?function(e,t){return t.some((t=>{if(t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--){const r=e[n],o=t[n];if(o!==r&&(o!==fp||\"number\"!=typeof r))return!1}return!0}))}(n,e)?Number(t):BigInt(t):t}}function Ap(e){return(t,n)=>{const r=n.methodName,o=e?.allowedNumericKeyPaths&&r?e.allowedNumericKeyPaths[r]:void 0;return lu(t,(e=>(e=>{const t=e;if(\"error\"in t)throw Da(t.error);return t})(e)),(e=>e.result),(e=>wp(o??[])(e,n)))}}var Sp,xp=[[\"data\",\"parsed\",\"info\",\"tokenAmount\",\"decimals\"],[\"data\",\"parsed\",\"info\",\"tokenAmount\",\"uiAmount\"],[\"data\",\"parsed\",\"info\",\"rentExemptReserve\",\"decimals\"],[\"data\",\"parsed\",\"info\",\"rentExemptReserve\",\"uiAmount\"],[\"data\",\"parsed\",\"info\",\"delegatedAmount\",\"decimals\"],[\"data\",\"parsed\",\"info\",\"delegatedAmount\",\"uiAmount\"],[\"data\",\"parsed\",\"info\",\"extensions\",fp,\"state\",\"olderTransferFee\",\"transferFeeBasisPoints\"],[\"data\",\"parsed\",\"info\",\"extensions\",fp,\"state\",\"newerTransferFee\",\"transferFeeBasisPoints\"],[\"data\",\"parsed\",\"info\",\"extensions\",fp,\"state\",\"preUpdateAverageRate\"],[\"data\",\"parsed\",\"info\",\"extensions\",fp,\"state\",\"currentRate\"]],Ep=[...xp,[\"data\",\"parsed\",\"info\",\"lastExtendedSlotStartIndex\"],[\"data\",\"parsed\",\"info\",\"slashPenalty\"],[\"data\",\"parsed\",\"info\",\"warmupCooldownRate\"],[\"data\",\"parsed\",\"info\",\"decimals\"],[\"data\",\"parsed\",\"info\",\"numRequiredSigners\"],[\"data\",\"parsed\",\"info\",\"numValidSigners\"],[\"data\",\"parsed\",\"info\",\"stake\",\"delegation\",\"warmupCooldownRate\"],[\"data\",\"parsed\",\"info\",\"exemptionThreshold\"],[\"data\",\"parsed\",\"info\",\"burnPercent\"],[\"data\",\"parsed\",\"info\",\"commission\"],[\"data\",\"parsed\",\"info\",\"votes\",fp,\"confirmationCount\"]],_p=[[\"index\"],[\"instructions\",fp,\"accounts\",fp],[\"instructions\",fp,\"programIdIndex\"],[\"instructions\",fp,\"stackHeight\"]],kp=[[\"addressTableLookups\",fp,\"writableIndexes\",fp],[\"addressTableLookups\",fp,\"readonlyIndexes\",fp],[\"header\",\"numReadonlySignedAccounts\"],[\"header\",\"numReadonlyUnsignedAccounts\"],[\"header\",\"numRequiredSignatures\"],[\"instructions\",fp,\"accounts\",fp],[\"instructions\",fp,\"programIdIndex\"],[\"instructions\",fp,\"stackHeight\"]];function Ip(e){return up({requestTransformer:yp(e),responseTransformer:Ap({allowedNumericKeyPaths:Tp()})})}function Tp(){return Sp||(Sp={getAccountInfo:Ep.map((e=>[\"value\",...e])),getBlock:[[\"transactions\",fp,\"meta\",\"preTokenBalances\",fp,\"accountIndex\"],[\"transactions\",fp,\"meta\",\"preTokenBalances\",fp,\"uiTokenAmount\",\"decimals\"],[\"transactions\",fp,\"meta\",\"postTokenBalances\",fp,\"accountIndex\"],[\"transactions\",fp,\"meta\",\"postTokenBalances\",fp,\"uiTokenAmount\",\"decimals\"],[\"transactions\",fp,\"meta\",\"rewards\",fp,\"commission\"],..._p.map((e=>[\"transactions\",fp,\"meta\",\"innerInstructions\",fp,...e])),...kp.map((e=>[\"transactions\",fp,\"transaction\",\"message\",...e])),[\"rewards\",fp,\"commission\"]],getClusterNodes:[[fp,\"featureSet\"],[fp,\"shredVersion\"]],getInflationGovernor:[[\"initial\"],[\"foundation\"],[\"foundationTerm\"],[\"taper\"],[\"terminal\"]],getInflationRate:[[\"foundation\"],[\"total\"],[\"validator\"]],getInflationReward:[[fp,\"commission\"]],getMultipleAccounts:Ep.map((e=>[\"value\",fp,...e])),getProgramAccounts:Ep.flatMap((e=>[[\"value\",fp,\"account\",...e],[fp,\"account\",...e]])),getRecentPerformanceSamples:[[fp,\"samplePeriodSecs\"]],getTokenAccountBalance:[[\"value\",\"decimals\"],[\"value\",\"uiAmount\"]],getTokenAccountsByDelegate:xp.map((e=>[\"value\",fp,\"account\",...e])),getTokenAccountsByOwner:xp.map((e=>[\"value\",fp,\"account\",...e])),getTokenLargestAccounts:[[\"value\",fp,\"decimals\"],[\"value\",fp,\"uiAmount\"]],getTokenSupply:[[\"value\",\"decimals\"],[\"value\",\"uiAmount\"]],getTransaction:[[\"meta\",\"preTokenBalances\",fp,\"accountIndex\"],[\"meta\",\"preTokenBalances\",fp,\"uiTokenAmount\",\"decimals\"],[\"meta\",\"postTokenBalances\",fp,\"accountIndex\"],[\"meta\",\"postTokenBalances\",fp,\"uiTokenAmount\",\"decimals\"],[\"meta\",\"rewards\",fp,\"commission\"],..._p.map((e=>[\"meta\",\"innerInstructions\",fp,...e])),...kp.map((e=>[\"transaction\",\"message\",...e]))],getVersion:[[\"feature-set\"]],getVoteAccounts:[[\"current\",fp,\"commission\"],[\"delinquent\",fp,\"commission\"]],simulateTransaction:[...Ep.map((e=>[\"value\",\"accounts\",fp,...e])),..._p.map((e=>[\"value\",\"innerInstructions\",fp,...e]))]}),Sp}Object.assign({\"accept-charset\":!0,\"access-control-request-headers\":!0,\"access-control-request-method\":!0,connection:!0,\"content-length\":!0,cookie:!0,date:!0,dnt:!0,expect:!0,host:!0,\"keep-alive\":!0,origin:!0,\"permissions-policy\":!0,referer:!0,te:!0,trailer:!0,\"transfer-encoding\":!0,upgrade:!0,via:!0},{\"accept-encoding\":!0});var Op=[\"getAccountInfo\",\"getBalance\",\"getBlock\",\"getBlockCommitment\",\"getBlockHeight\",\"getBlockProduction\",\"getBlocks\",\"getBlocksWithLimit\",\"getBlockTime\",\"getClusterNodes\",\"getEpochInfo\",\"getEpochSchedule\",\"getFeeForMessage\",\"getFirstAvailableBlock\",\"getGenesisHash\",\"getHealth\",\"getHighestSnapshotSlot\",\"getIdentity\",\"getInflationGovernor\",\"getInflationRate\",\"getInflationReward\",\"getLargestAccounts\",\"getLatestBlockhash\",\"getLeaderSchedule\",\"getMaxRetransmitSlot\",\"getMaxShredInsertSlot\",\"getMinimumBalanceForRentExemption\",\"getMultipleAccounts\",\"getProgramAccounts\",\"getRecentPerformanceSamples\",\"getRecentPrioritizationFees\",\"getSignaturesForAddress\",\"getSignatureStatuses\",\"getSlot\",\"getSlotLeader\",\"getSlotLeaders\",\"getStakeMinimumDelegation\",\"getSupply\",\"getTokenAccountBalance\",\"getTokenAccountsByDelegate\",\"getTokenAccountsByOwner\",\"getTokenLargestAccounts\",\"getTokenSupply\",\"getTransaction\",\"getTransactionCount\",\"getVersion\",\"getVoteAccounts\",\"index\",\"isBlockhashValid\",\"minimumLedgerSlot\",\"requestAirdrop\",\"sendTransaction\",\"simulateTransaction\"];function Cp(e){return lp(e)&&Op.includes(e.method)}function Bp(e){return function(e){const{fromJson:t,headers:n,toJson:r,url:o}=e,i=n&&function(e){const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}(n);return async function({payload:e,signal:n}){const a=r?r(e):JSON.stringify(e),s={body:a,headers:{...i,accept:\"application/json\",\"content-length\":a.length.toString(),\"content-type\":\"application/json; charset=utf-8\"},method:\"POST\",signal:n},c=await fetch(o,s);if(!c.ok)throw new Pa(Ia,{headers:c.headers,message:c.statusText,statusCode:c.status});return t?t(await c.text(),e):await c.json()}}({...e,fromJson:(e,t)=>Cp(t)?rp(e):JSON.parse(e),toJson:e=>{return Cp(e)?(t=e,function(e){return e.replace(/\\{\\s*\"\\$n\"\\s*:\\s*\"(-?\\d+)\"\\s*\\}/g,\"$1\")}(JSON.stringify(t,((e,t)=>\"bigint\"==typeof t?function(e){return{$n:`${e}`}}(t):t),n))):JSON.stringify(e);var t,n}})}var Rp=Object.prototype.toString,jp=Object.keys||function(e){const t=[];for(const n in e)t.push(n);return t};function Pp(e,t){let n,r,o,i,a,s,c;if(!0===e)return\"true\";if(!1===e)return\"false\";switch(typeof e){case\"object\":if(null===e)return null;if(\"toJSON\"in e&&\"function\"==typeof e.toJSON)return Pp(e.toJSON(),t);if(c=Rp.call(e),\"[object Array]\"===c){for(o=\"[\",r=e.length-1,n=0;n\u003Cr;n++)o+=Pp(e[n],!0)+\",\";return r>-1&&(o+=Pp(e[n],!0)),o+\"]\"}if(\"[object Object]\"===c){for(i=jp(e).sort(),r=i.length,o=\"\",n=0;n\u003Cr;)a=i[n],s=Pp(e[a],!1),void 0!==s&&(o&&(o+=\",\"),o+=JSON.stringify(a)+\":\"+s),n++;return\"{\"+o+\"}\"}return JSON.stringify(e);case\"function\":case\"undefined\":return t?null:void 0;case\"bigint\":return`${e.toString()}n`;case\"string\":return JSON.stringify(e);default:return isFinite(e)?e:null}}function Np(e){const t=Pp(e,!1);if(void 0!==t)return\"\"+t}function Lp(e,t,n){let r=\"\";if(\"number\"==typeof t[0]){const e=t[0]+1,n=e%10,o=e%100;r=1==n&&11!=o?e+\"st\":2==n&&12!=o?e+\"nd\":3==n&&13!=o?e+\"rd\":e+\"th\"}else r=`\\`${t[0].toString()}\\``;const o=t.length>1?t.slice(1).map((e=>\"number\"==typeof e?`[${e}]`:e)).join(\".\"):void 0,i=new Pa(ka,{argumentLabel:r,keyPath:t,methodName:e,optionalPathLabel:o?` at path \\`${o}\\``:\"\",value:n,...void 0!==o?{path:o}:void 0});return Na(i,Lp),i}var Mp,zp={defaultCommitment:\"confirmed\",onIntegerOverflow(e,t,n){throw Lp(e.methodName,t,n)}},Up=globalThis.AbortController;function $p(e){return lp(e)?Np([e.method,e.params]):void 0}function Dp(e){const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}function Fp(e){return lu(Bp({...e,headers:{...!1,...e.headers?Dp(e.headers):void 0,\"solana-client\":\"js/2.1.0\"}}),(e=>function(e,t){let n;return async function(r){const{payload:o,signal:i}=r,a=t(o);if(void 0===a)return await e(r);if(n||(queueMicrotask((()=>{n=void 0})),n={}),null==n[a]){const t=new Up,o=(async()=>{try{return await e({...r,signal:t.signal})}catch(e){if(e===(Mp||={}))return;throw e}})();n[a]={abortController:t,numConsumers:0,responsePromise:o}}const s=n[a];if(s.numConsumers++,i){const e=s.responsePromise;return await new Promise(((t,n)=>{const r=e=>{i.removeEventListener(\"abort\",r),s.numConsumers-=1,queueMicrotask((()=>{0===s.numConsumers&&s.abortController.abort(Mp||={})})),n(e.target.reason)};i.addEventListener(\"abort\",r),e.then(t).catch(n).finally((()=>{i.removeEventListener(\"abort\",r)}))}))}return await s.responsePromise}}(e,$p)))}function qp(e){return cp({api:Ip(zp),transport:e})}const Wp=[\"getTransaction\",\"getSignaturesForAddress\"],Kp=e=>{const t=Fp({url:e}),n=Fp({url:e,headers:{\"x-bigtable\":\"disabled\"}});return async(...e)=>{const{payload:r}=e[0],{method:o}=r,i=Wp.includes(o);return zl.info(`[🚌 ToggleInfuraBigtableLookupsTransport] RPC method is ${o}. ${i?\"Enabling\":\"Disabling\"} BigTable lookups.`),i?t(...e):n(...e)}},Gp=e=>async(...t)=>{let n;const r=e.length;for(const[o,i]of e.entries())try{return zl.info(`[🚌 FailoverTransport] Attempting to use transport ${o+1} of ${r}`),await i(...t)}catch(e){n=e;const t=o===r-1;zl.error(`[🚌 FailoverTransport] Transport failed: ${e}. ${t?\"No more transports to try.\":\"Trying next transport...\"}`)}throw n};async function Vp(e){return new Promise((t=>setTimeout(t,e)))}const Hp=e=>async(...t)=>{const{payload:n}=t[0],{method:r}=n;let o;for(let n=0;n\u003C4;n++)try{return zl.info(`[🚌 RetryingTransport] Attempt \"${r}\" ${n+1} of 4`),await e(...t)}catch(e){if(zl.error(`[🚌 RetryingTransport] Error during attempt \"${r}\" ${n+1} of 4: ${e}`),o=e,n\u003C3){const e=(i=n,Math.min(400*Math.pow(2,i),1500));zl.info(`[🚌 RetryingTransport] Sleeping for ${e}ms`),await Vp(e)}}var i;throw o};function Jp(e){return!(\"exists\"in e)||\"exists\"in e&&e.exists}function Zp(e,t){if(!t)return Object.freeze({address:e,exists:!1});const n=bs().encode(t.data[0]);return Object.freeze({...Qp(t),address:e,data:n,exists:!0})}function Yp(e,t){if(!t)return Object.freeze({address:e,exists:!1});const n=t.data.parsed.info;return Object.freeze({...Qp(t),address:e,data:n,exists:!0})}function Qp(e){return Object.freeze({executable:e.executable,lamports:e.lamports,programAddress:e.owner,space:e.space})}var Xp=\"ComputeBudget111111111111111111111111111111\",eg={blockhash:\"11111111111111111111111111111111\",lastValidBlockHeight:0n},tg=2;function ng(e){return function(e,t){return e.programAddress===t}(e,Xp)&&function(e){return void 0!==e.data}(e)&&e.data[0]===tg}async function rg({abortSignal:e,rpc:t,transactionMessage:n,...r}){const o=Ju(n);let i;i=o||fu(n)?n:du(eg,n);const a=n.instructions.findIndex(ng),s=function(e){const t=new Uint8Array(5);return t[0]=tg,Dc().write(e,t,1),Object.freeze({data:t,programAddress:Xp})}(14e5);if(-1===a)i=Yu(s,i);else{const e=[...i.instructions];e.splice(a,1,s),i=Object.freeze({...i,instructions:e})}const c=cl(il(i));try{const{value:{err:n,unitsConsumed:i}}=await t.simulateTransaction(c,{...r,encoding:\"base64\",replaceRecentBlockhash:!o,sigVerify:!1}).send({abortSignal:e});if(null==i)throw new Pa(la);const a=i>4294967295n?4294967295:Number(i);if(n)throw new Pa(fa,{cause:n,unitsConsumed:a});return a}catch(e){if(ja(e,fa))throw e;throw new Pa(la,{cause:e})}}function og({rpc:e}){return async function(t,n){return await rg({...n,rpc:e,transactionMessage:t})}}async function ig(e,t,n){if(0===e.length)return{};const r=await async function(e,t,n={}){const{abortSignal:r,...o}=n;return(await e.getMultipleAccounts(t,{...o,encoding:\"jsonParsed\"}).send({abortSignal:r})).value.map(((e,n)=>e&&\"object\"==typeof e&&\"parsed\"in e.data?Yp(t[n],e):Zp(t[n],e)))}(t,e,n);return function(e){const t=e.filter((e=>Jp(e)&&e.data instanceof Uint8Array));if(t.length>0){const e=t.map((e=>e.address));throw new Pa(zi,{addresses:e})}}(r),function(e){const t=e.filter((e=>!e.exists));if(t.length>0){const e=t.map((e=>e.address));throw new Pa(Mi,{addresses:e})}}(r),r.reduce(((e,t)=>({...e,[t.address]:t.data.addresses})),{})}async function ag(e,t,n){const r=(\"addressTableLookups\"in e&&void 0!==e.addressTableLookups&&e.addressTableLookups.length>0?e.addressTableLookups:[]).map((e=>e.lookupTableAddress)),{lastValidBlockHeight:o,...i}=n??{};return el(e,{addressesByLookupTableAddress:r.length>0?await ig(r,t,i):{},lastValidBlockHeight:o})}function sg(e,t){return!t?.preflightCommitment&&function(e,t){return e===t?0:su(e)\u003Csu(t)?-1:1}(e,\"finalized\")\u003C0?{...t,preflightCommitment:e}:t}async function cg({abortSignal:e,commitment:t,rpc:n,transaction:r,...o}){const i=cl(r);return await n.sendTransaction(i,{...sg(t,o),encoding:\"base64\"}).send({abortSignal:e})}const ug=async(e,t,n)=>lu(e,bs().encode,Nu().decode,(async e=>ag(e,t,n))),lg=async(e,t,n)=>lu(e,Nu().decode,(async e=>ag(e,t,n))),fg=async e=>lu(e,bs().encode,rl().decode),dg=async(e,t,n)=>(async e=>new Promise(((t,n)=>{if(0===e.length)return void n(new AggregateError([],\"No promises to resolve\"));let r=0;const o=[];e.forEach(((i,a)=>{Promise.resolve(i).then((e=>t(e)),(t=>{o[a]=t,r+=1,r===e.length&&n(new AggregateError(o,\"All promises rejected\"))}))}))})))([fg(e),ug(e,t,n)]);var hg,pg=\"ComputeBudget111111111111111111111111111111\",gg=((hg=gg||{})[hg.RequestUnits=0]=\"RequestUnits\",hg[hg.RequestHeapFrame=1]=\"RequestHeapFrame\",hg[hg.SetComputeUnitLimit=2]=\"SetComputeUnitLimit\",hg[hg.SetComputeUnitPrice=3]=\"SetComputeUnitPrice\",hg[hg.SetLoadedAccountsDataSizeLimit=4]=\"SetLoadedAccountsDataSizeLimit\",hg);function mg(e){const t=\"data\"in e?e.data:e;if(qa(t,Wc().encode(0),0))return 0;if(qa(t,Wc().encode(1),0))return 1;if(qa(t,Wc().encode(2),0))return 2;if(qa(t,Wc().encode(3),0))return 3;if(qa(t,Wc().encode(4),0))return 4;throw new Error(\"The provided instruction could not be identified as a computeBudget instruction.\")}var vg=2;function yg(){return as(ru([[\"discriminator\",Wc()],[\"units\",Dc()]]),(e=>({...e,discriminator:vg})))}function wg(e,t){const n={...e};return{programAddress:t?.programAddress??pg,data:yg().encode(n)}}var bg=3;function Ag(){return as(ru([[\"discriminator\",Wc()],[\"microLamports\",qc()]]),(e=>({...e,discriminator:bg})))}function Sg(e,t){const n={...e};return{programAddress:t?.programAddress??pg,data:Ag().encode(n)}}const xg=(e,t)=>(e=>Boolean(e.feePayer))(t)?t:Zu(e,t),Eg=e=>e.programAddress===pg&&mg({data:new Uint8Array,...e})===gg.SetComputeUnitPrice,_g=e=>e.instructions.filter(Boolean).some(Eg),kg=e=>e.programAddress===pg&&mg({data:new Uint8Array,...e})===gg.SetComputeUnitLimit,Ig=e=>e.instructions.filter(Boolean).some(kg);class Tg{#c;#t;static defaultComputeUnitPriceInMicroLamportsPerComputeUnit=10000n;constructor(e,t){this.#c=e,this.#t=t}async getLatestBlockhash(e){try{return(await this.#c.getRpc(e).getLatestBlockhash().send()).value}catch(e){throw this.#t.error(e),e}}async getComputeUnitEstimate(e,t){const n=og({rpc:this.#c.getRpc(t)});return await n(e)}async getFeeFromBase64StringInLamports(e,t){try{L(e,gc);const n=await dg(e,this.#c.getRpc(t)),r=\"instructions\"in n?e:Ss().decode(n.messageBytes),o=this.#c.getRpc(t),i=await o.getFeeForMessage(r,{commitment:\"confirmed\"}).send();return this.#t.log(`Transaction is estimated to cost ${i.value} lamports`),i.value}catch(e){return this.#t.error(e),null}}async waitForTransactionCommitment(e,t,n){L(e,pc);const r=this.#c.getRpc(n);return async function(e,t){var n,r;const o=(null===(n=t)||void 0===n?void 0:n.maxAttempts)??10,i=(null===(r=t)||void 0===r?void 0:r.delayMs)??1e3;let a=0;for(;a\u003Co;)try{return await e()}catch(e){if(a+=1,a===o)throw e;await new Promise((e=>setTimeout(e,i)))}throw new Error(\"Unreachable\")}((async()=>{this.#t.log(`🔎 Checking if transaction ${e} has reached commitment level ${t}`);const n=await r.getTransaction(Cc(e),{commitment:t,maxSupportedTransactionVersion:0}).send();if(n)return this.#t.log(`🎉 Transaction ${e} has reached commitment level ${t}`),n;const o=`⚠️ Transaction with signature ${e} not found or has not yet reached requested commitment level: ${t}`;throw this.#t.warn(o),new Error(o)}),{delayMs:200})}async partiallySignBase64String(e,t,n,r){const o=this.#c.getRpc(n),i=await dg(e,o,r);if(\"instructions\"in i)return this.#w(i,t,n);if(Object.values(i.signatures).every((e=>!e))){const{messageBytes:e}=i,a=await lg(e,o,r);return this.#w(a,t,n)}return this.#b(i,t)}async#w(e,t,n){const{privateKeyBytes:r}=await If({entropySource:t.entropySource,derivationPath:t.derivationPath}),o=await yl(r),i=fu(e)?e.lifetimeConstraint:await this.getLatestBlockhash(n),a=_g(e),s=Tg.defaultComputeUnitPriceInMicroLamportsPerComputeUnit,c=!Ig(e)||!a,u=await lu(e,(e=>xg(o.address,e)),(e=>{return t=i,fu(n=e)?n:du(t,n);var t,n}),(e=>((e,t,n)=>_g(e)?e:Xu([Sg(t,n)],e))(e,{microLamports:s})),(async e=>c?(async(e,t,n)=>{try{var r,o;const i=e.instructions.filter(Boolean),a=og({rpc:t}),s=await a(e,null===(r=n)||void 0===r?void 0:r.getComputeUnitEstimateConfig).catch((e=>{if(ja(e,fa))return e.context.unitsConsumed;throw e}));return{...(0,ci.cloneDeep)(e),instructions:[...i.filter((e=>!kg(e))),wg({units:s},null===(o=n)||void 0===o?void 0:o.getSetComputeUnitLimitInstructionConfig)]}}catch(t){return e}})(e,this.#c.getRpc(n)):e)),l=ml([o],u);return await bl(l)}async#b(e,t){const{privateKeyBytes:n}=await If({entropySource:t.entropySource,derivationPath:t.derivationPath});return al([await Rc(n)],e)}async extractInstructionsFromUnknownBase64String(e,t){const n=this.#c.getRpc(t),r=await dg(e,n);if(\"instructions\"in r)return r.instructions;return(await lg(r.messageBytes,n)).instructions}}Error;function Og(e){return function(e){return function(e){return\"object\"==typeof e&&null!==e&&\"message\"in e}(e)&&\"string\"==typeof e.message?e.message:null==e?\"\":String(e)}(e).replace(/\\.$/u,\"\")}function Cg(e,t){return n=e,Boolean(\"string\"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class Bg extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}function Rg(e,t=\"Assertion failed.\",n=Bg){if(!e){if(t instanceof Error)throw t;throw Cg(n,t)}}function jg(e,t,n=\"Assertion failed\",r=Bg){try{_r(e,t)}catch(e){throw Cg(r,`${n}: ${Og(e)}.`)}}function Pg(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function Ng(...e){const t=(e,t)=>n=>e(t(n)),n=Array.from(e).reverse().reduce(((e,n)=>e?t(e,n.encode):n.encode),void 0),r=e.reduce(((e,n)=>e?t(e,n.decode):n.decode),void 0);return{encode:n,decode:r}}function Lg(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&\"number\"!=typeof t[0])throw new Error(\"alphabet.encode input should be an array of numbers\");return t.map((t=>{if(Pg(t),t\u003C0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&\"string\"!=typeof t[0])throw new Error(\"alphabet.decode input should be array of strings\");return t.map((t=>{if(\"string\"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: \"${t}\". Allowed: ${e}`);return n}))}}}function Mg(e=\"\"){if(\"string\"!=typeof e)throw new Error(\"join separator should be string\");return{encode:t=>{if(!Array.isArray(t)||t.length&&\"string\"!=typeof t[0])throw new Error(\"join.encode input should be array of strings\");for(let e of t)if(\"string\"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if(\"string\"!=typeof t)throw new Error(\"join.decode input should be string\");return t.split(e)}}}function zg(e,t=\"=\"){if(Pg(e),\"string\"!=typeof t)throw new Error(\"padding chr should be string\");return{encode(n){if(!Array.isArray(n)||n.length&&\"string\"!=typeof n[0])throw new Error(\"padding.encode input should be array of strings\");for(let e of n)if(\"string\"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&\"string\"!=typeof n[0])throw new Error(\"padding.encode input should be array of strings\");for(let e of n)if(\"string\"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error(\"Invalid padding: string should have whole number of bytes\");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error(\"Invalid padding: string has too much padding\");return n.slice(0,r)}}}function Ug(e){if(\"function\"!=typeof e)throw new Error(\"normalize fn should be function\");return{encode:e=>e,decode:t=>e(t)}}function $g(e,t,n){if(t\u003C2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n\u003C2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error(\"convertRadix: data should be array\");if(!e.length)return[];let r=0;const o=[],i=Array.from(e);for(i.forEach((e=>{if(Pg(e),e\u003C0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,a=!0;for(let o=r;o\u003Ci.length;o++){const s=i[o],c=t*e+s;if(!Number.isSafeInteger(c)||t*e/t!==e||c-s!=t*e)throw new Error(\"convertRadix: carry overflow\");e=c%n;const u=Math.floor(c/n);if(i[o]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error(\"convertRadix: carry overflow\");a&&(u?a=!1:r=o)}if(o.push(e),a)break}for(let t=0;t\u003Ce.length-1&&0===e[t];t++)o.push(0);return o.reverse()}const Dg=(e,t)=>t?Dg(t,e%t):e,Fg=(e,t)=>e+(t-Dg(e,t));function qg(e,t,n,r){if(!Array.isArray(e))throw new Error(\"convertRadix2: data should be array\");if(t\u003C=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n\u003C=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Fg(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Fg(t,n)}`);let o=0,i=0;const a=2**n-1,s=[];for(const r of e){if(Pg(r),r>=2**t)throw new Error(`convertRadix2: invalid data word=${r} from=${t}`);if(o=o\u003C\u003Ct|r,i+t>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=n;i-=n)s.push((o>>i-n&a)>>>0);o&=2**i-1}if(o=o\u003C\u003Cn-i&a,!r&&i>=t)throw new Error(\"Excess padding\");if(!r&&o)throw new Error(`Non-zero padding: ${o}`);return r&&i>0&&s.push(o>>>0),s}function Wg(e){return Pg(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error(\"radix.encode input should be Uint8Array\");return $g(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&\"number\"!=typeof t[0])throw new Error(\"radix.decode input should be array of strings\");return Uint8Array.from($g(t,e,256))}}}function Kg(e,t=!1){if(Pg(e),e\u003C=0||e>32)throw new Error(\"radix2: bits should be in (0..32]\");if(Fg(8,e)>32||Fg(e,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error(\"radix2.encode input should be Uint8Array\");return qg(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&\"number\"!=typeof n[0])throw new Error(\"radix2.decode input should be array of strings\");return Uint8Array.from(qg(n,e,8,t))}}}Ng(Kg(4),Lg(\"0123456789ABCDEF\"),Mg(\"\")),Ng(Kg(5),Lg(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),zg(5),Mg(\"\")),Ng(Kg(5),Lg(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),zg(5),Mg(\"\")),Ng(Kg(5),Lg(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),Mg(\"\"),Ug((e=>e.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\"))));const Gg=Ng(Kg(6),Lg(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),zg(6),Mg(\"\")),Vg=(Ng(Kg(6),Lg(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),zg(6),Mg(\"\")),Ng(Kg(6),Lg(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),Mg(\"\")),e=>Ng(Wg(58),Lg(e),Mg(\"\")));Vg(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),Ng(Lg(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),Mg(\"\"));Ng(Kg(4),Lg(\"0123456789abcdef\"),Mg(\"\"),Ug((e=>{if(\"string\"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));n(1048).hp;!function(){const e=[]}();function Hg(e){return e instanceof Uint8Array}function Jg(e){Rg(Hg(e),\"Value must be a Uint8Array.\")}class Zg extends TypeError{constructor(e,t){let n;const{message:r,explanation:o,...i}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(\".\")} -- ${r}`;super(o??s),null!=o&&(this.cause=s),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function Yg(e){return\"object\"==typeof e&&null!==e}function Qg(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function Xg(e,t,n,r){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \\`${a}\\`${s?` with refinement \\`${s}\\``:\"\"}, but received: \\`${Qg(r)}\\``}=e;return{value:r,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*em(e,t,n,r){(function(e){return Yg(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=Xg(o,t,n,r);e&&(yield e)}}function*tm(e,t,n={}){const{path:r=[],branch:o=[e],coerce:i=!1,mask:a=!1}=n,s={path:r,branch:o};if(i&&(e=t.coercer(e,s),a&&\"type\"!==t.type&&Yg(t.schema)&&Yg(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let c=\"valid\";for(const r of t.validator(e,s))r.explanation=n.message,c=\"not_valid\",yield[r,void 0];for(let[u,l,f]of t.entries(e,s)){const t=tm(l,f,{path:void 0===u?r:[...r,u],branch:void 0===u?o:[...o,l],coerce:i,mask:a,message:n.message});for(const n of t)n[0]?(c=null===n[0].refinement||void 0===n[0].refinement?\"not_valid\":\"not_refined\",yield[n[0],void 0]):i&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):Yg(e)&&(void 0!==l||u in e)&&(e[u]=l))}if(\"not_valid\"!==c)for(const r of t.refiner(e,s))r.explanation=n.message,c=\"not_refined\",yield[r,void 0];\"valid\"===c&&(yield[void 0,e])}class nm{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>em(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>em(o(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=im(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return function(e,t,n){const r=im(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}is(e){return function(e,ti�6(�){const n=im(e,t);return!n[0]}(e,this)}mask(e,t){return function(e,t,n){const r=im(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return im(e,this,t)}}const rm=\"EXACT_OPTIONAL\";class om extends nm{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=rm}static isExactOptional(e){return Yg(e)&&\"brand\"in e&&e.brand===rm}}function im(e,t,n={}){const r=tm(e,t,n),o=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(o[0]){return[new Zg(o[0],(function*(){for(const e of r)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}function am(){return lm(\"never\",(()=>!1))}function sm(e){const t=e?Object.keys(e):[],n=am();return new nm({type:\"object\",schema:e??null,*entries(r){if(e&&Yg(r)){const o=new Set(Object.keys(r));for(const n of t){o.delete(n);const t=e[n];om.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(r,n)||(yield[n,r[n],e[n]])}for(const e of o)yield[e,r[e],n]}},validator:e=>Yg(e)||`Expected an object, but received: ${Qg(e)}`,coercer:e=>Yg(e)?{...e}:e})}function cm(){return lm(\"string\",(e=>\"string\"==typeof e||`Expected a string, but received: ${Qg(e)}`))}function um(...e){const t=\"type\"===e[0]?.type,n=e.map((({schema:e})=>e)),r=Object.assign({},...n);return t?function(e){const t=Object.keys(e);return new nm({type:\"type\",schema:e,*entries(n){if(Yg(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>Yg(e)||`Expected an object, but received: ${Qg(e)}`,coercer:e=>Yg(e)?{...e}:e})}(r):sm(r)}function lm(e,t){return new nm({type:e,schema:null,validator:t})}function fm(e){return lm(JSON.stringify(e),function(e){const t=Qg(e),n=typeof e;return new nm({type:\"literal\",schema:\"string\"===n||\"number\"===n||\"boolean\"===n?e:null,validator:n=>n===e||`Expected the literal \\`${t}\\`, but received: ${Qg(n)}`})}(e).validator)}function dm(e,t,n){return new nm({...e,*refiner(r,o){yield*e.refiner(r,o);const i=em(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}var hm;!function(e){e.Copyable=\"copyable\",e.Divider=\"divider\",e.Heading=\"heading\",e.Panel=\"panel\",e.Spinner=\"spinner\",e.Text=\"text\",e.Image=\"image\",e.Row=\"row\",e.Address=\"address\",e.Button=\"button\",e.Input=\"input\",e.Form=\"form\"}(hm||(hm={}));const pm=sm({type:cm()}),gm=(um(pm,sm({value:lm(\"unknown\",(()=>!0))})),um(pm,sm({type:fm(hm.Image),value:dm(cm(),\"SVG\",(e=>!!e.includes(\"\u003Csvg\")||\"Value is not a valid SVG.\"))}))),mm=function(e,t,n=[]){return(...r)=>{if(1===r.length&&function(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(r[0])){const n={...r[0],type:e};return jg(n,t,`Invalid ${e} component`),n}const o=n.reduce(((e,t,n)=>void 0!==r[n]?{...e,[t]:r[n]}:e),{type:e});return jg(o,t,`Invalid ${e} component`),o}}(hm.Image,gm,[\"value\"]);async function vm(e,t){const n=await async function(e,t){if(\"function\"!=typeof fetch)throw new Error(`Failed to fetch image data from \"${e}\": Using this function requires the \"endowment:network-access\" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from \"${e}\": ${t.status} ${t.statusText}`);const n=await t.blob();return Rg(\"image/jpeg\"===n.type||\"image/png\"===n.type,\"Expected image data to be a JPEG or PNG image.\"),n}))}(e,t),r=new Uint8Array(await n.arrayBuffer());return`data:${n.type};base64,${function(e){return Jg(e),Gg.encode(e)}(r)}`}const ym='\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\" width=\"48\" height=\"48\">\\n  \u003Cpath fill=\"#999999\" d=\"M42.75 24c0 10.59375-8.53125 19.21875-19.125 19.21875-10.6875 0-19.21875-8.625-19.21875-19.21875 0-10.59375 8.53125-19.21875 19.21875-19.21875 10.59375 0 19.125 8.625 19.125 19.21875zM23.625 14.0625c-3.09375 0-5.90625 2.25-5.90625 5.4375 0 0.84375 0.75 1.59375 1.59375 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375 0-1.125 1.03125-2.25 2.71875-2.25 1.59375 0 2.625 1.125 2.625 2.25 0 0.5625-0.375 1.03125-1.3125 1.59375l0 0c-1.125 0.75-3 1.96875-3 4.5l0 0.46875c0 0.84375 0.75 1.59375 1.6875 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375l0-0.46875c0-0.65625 0.28125-1.125 1.40625-1.78125 1.03125-0.65625 2.8125-1.875 2.8125-4.3125 0-3.1875-2.8125-5.4375-5.8125-5.4375zM23.53125 31.875c-0.84375 0-1.59375 0.65625-1.59375 1.59375 0 0.84375 0.75 1.59375 1.59375 1.59375l0.09375 0c0.84375 0 1.59375-0.75 1.59375-1.59375 0-0.9375-0.75-1.59375-1.59375-1.59375z\"/>\\n\u003C/svg>';function wm(e){return e.includes(\"swift:0/iso4217:\")}function bm({scope:e,transactionData:t}){var n;const r=function(e){var t,n;const r=new qo((null===(n=e.meta)||void 0===n||null===(t=n.fee)||void 0===t?void 0:t.toString())??\"0\");return r.dividedBy(Js)}(t),o=function(e){const t=e.transaction.signatures.length;return qo(5e3).dividedBy(Js).multipliedBy(t)}(t),i=r.minus(o),a=[{type:\"base\",asset:{fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol,amount:o.toString()}}];return(null===(n=i)||void 0===n?void 0:n.isGreaterThan(0))&&a.push({type:\"priority\",asset:{fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol,amount:i.toString()}}),a}function Am({scope:e,transactionData:t}){var n,r,o,i,a,s,c,u;const l=bm({scope:e,transactionData:t}),f=[],d=[],h=new Map((null===(r=t.meta)||void 0===r||null===(n=r.preBalances)||void 0===n?void 0:n.map(((e,t)=>[t,new qo(e.toString())])))??[]),p=new Map((null===(i=t.meta)||void 0===i||null===(o=i.postBalances)||void 0===o?void 0:o.map(((e,t)=>[t,new qo(e.toString())])))??[]),g=[...t.transaction.message.accountKeys,...(null===(s=t.meta)||void 0===s||null===(a=s.loadedAddresses)||void 0===a?void 0:a.writable)??[],...(null===(u=t.meta)||void 0===u||null===(c=u.loadedAddresses)||void 0===c?void 0:c.readonly)??[]],m=new Set([...Array.from(h.keys()),...Array.from(p.keys())]);for(const n of m){var v,y;const r=null===(v=g[n])||void 0===v?void 0:v.toString();if(!r)continue;const o=h.get(n)??new qo(0),i=p.get(n)??new qo(0),a=0===n?Lh((null===(y=t.meta)||void 0===y?void 0:y.fee)??0):new qo(0),s=o.minus(i).dividedBy(new qo(Js)).minus(a);if(s.isZero())continue;const c=s.absoluteValue().toString();o.isGreaterThan(i)&&f.push({address:r,asset:{fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol,amount:c}}),o.isLessThan(i)&&d.push({address:r,asset:{fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol,amount:c}})}const w=function({scope:e,transactionData:t}){const{instructions:n}=t.transaction.message,r=[],o=[],i=t.transaction.message.accountKeys.findIndex((e=>e===Cl));if(-1===i)return{from:r,to:o};return n.forEach((n=>{const{accounts:a,data:s,programIdIndex:c}=n;if(c!==i)return;const[u,l]=a;if(void 0===u||void 0===l||u!==l)return;const f=t.transaction.message.accountKeys[u],d=t.transaction.message.accountKeys[l];if(!f||!d||f!==d)return;const h=function(e){let t=BigInt(0);for(let n=4;n\u003C12;n++)t|=BigInt(e[n]??0)\u003C\u003CBigInt(8*(n-4));return qo(t.toString()).dividedBy(Js)}(Hl.decode(s));r.push({address:f,asset:{amount:h.toString(),fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol}}),o.push({address:d,asset:{amount:h.toString(),fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol}})})),{from:r,to:o}}({scope:e,transactionData:t});return w.from.length>0&&f.push(...w.from),w.to.length>0&&d.push(...w.to),{fees:l,from:f,to:d}}function Sm({scope:e,transactionData:t}){var n,r,o,i;const a=bm({scope:e,transactionData:t}),s=[...t.transaction.message.accountKeys,...(null===(r=t.meta)||void 0===r||null===(n=r.loadedAddresses)||void 0===n?void 0:n.writable)??[],...(null===(i=t.meta)||void 0===i||null===(o=i.loadedAddresses)||void 0===o?void 0:o.readonly)??[]],c=[],u=[],{instructions:l}=t.transaction.message;l.forEach((t=>{const{accounts:n,data:r,programIdIndex:o}=t;if(s[o]!==Cl)return;const[i,a]=n;if(void 0===i||void 0===a)return;const l=s[i],f=s[a];if(!l||!f)return;const d=Hl.decode(r),h=function(e){let t=BigInt(0);for(let n=0;n\u003C4;n++)t|=BigInt(e[n]??0)\u003C\u003CBigInt(8*n);return Number(t)}(d);if(2!==h)return;const p=function(e){let t=BigInt(0);for(let n=4;n\u003C12;n++)t|=BigInt(e[n]??0)\u003C\u003CBigInt(8*(n-4));return qo(t.toString()).dividedBy(Js)}(d);c.push({address:l,asset:{amount:p.toString(),fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol}}),u.push({address:f,asset:{amount:p.toString(),fungible:!0,type:tc[e].nativeToken.caip19Id,unit:tc[e].nativeToken.symbol}})}));return{fees:a,from:xm(c),to:xm(u)}}function xm(e){return e.reduce(((e,t)=>{var n,r;const o=e.find((e=>{var n,r,o;return!0===(null===(r=e)||void 0===r||null===(n=r.asset)||void 0===n?void 0:n.fungible)&&!0===(null===(o=t.asset)||void 0===o?void 0:o.fungible)&&e.asset.type===t.asset.type&&e.address===t.address}));if(o&&!0===(null===(n=o.asset)||void 0===n?void 0:n.fungible)&&!0===(null===(r=t.asset)||void 0===r?void 0:r.fungible)){const e=new qo(o.asset.amount).plus(t.asset.amount);o.asset.amount=e.toString()}else e.push(t);return e}),[])}function Em({scope:e,transactionData:t}){var n,r,o,i,a,s,c,u;const l=[],f=[],d=new Map((null===(r=t.meta)||void 0===r||null===(n=r.preTokenBalances)||void 0===n?void 0:n.map((e=>[e.accountIndex,new qo(e.uiTokenAmount.amount)])))??[]),h=new Map((null===(i=t.meta)||void 0===i||null===(o=i.postTokenBalances)||void 0===o?void 0:o.map((e=>[e.accountIndex,new qo(e.uiTokenAmount.amount)])))??[]),p=new Set([...(null===(s=t.meta)||void 0===s||null===(a=s.preTokenBalances)||void 0===a?void 0:a.map((e=>e.accountIndex)))??[],...(null===(u=t.meta)||void 0===u||null===(c=u.postTokenBalances)||void 0===c?void 0:c.map((e=>e.accountIndex)))??[]]);for(const n of p){var g,m,v,y;const r=d.get(n)??new qo(0),o=(h.get(n)??new qo(0)).minus(r);if(o.isZero())continue;const i=(null===(m=t.meta)||void 0===m||null===(g=m.preTokenBalances)||void 0===g?void 0:g.find((e=>e.accountIndex===n)))??(null===(y=t.meta)||void 0===y||null===(v=y.postTokenBalances)||void 0===v?void 0:v.find((e=>e.accountIndex===n)));if(!i)continue;const{mint:a,uiTokenAmount:{decimals:s},owner:c}=i,u=Gd(e,a);if(!c)continue;const p=o.absoluteValue().dividedBy(new qo(10).pow(s)).toString();o.isNegative()&&l.push({address:c,asset:{fungible:!0,type:u,unit:\"\",amount:p}}),o.isPositive()&&f.push({address:c,asset:{fungible:!0,type:u,unit:\"\",amount:p}})}const w=function({scope:e,transactionData:t}){const{instructions:n}=t.transaction.message,r=[],o=[],i=t.transaction.message.accountKeys.findIndex((e=>e===Od));if(-1===i)return{from:r,to:o};return n.forEach((n=>{var a,s,c,u,l,f;const{accounts:d,data:h,programIdIndex:p}=n;if(p!==i)return;let g,m;if(5===d.length?(g=d[0],m=d[2]):3===d.length&&(g=d[0],m=d[1]),void 0===g||void 0===m||g!==m)return;const v=t.transaction.message.accountKeys[g],y=t.transaction.message.accountKeys[m];if(!v||!y||v!==y)return;const w=function(e){let t=BigInt(0);for(let n=1;n\u003C9;n++)t|=BigInt(e[n]??0)\u003C\u003CBigInt(8*(n-1));return qo(t.toString()).dividedBy(1e6)}(Hl.decode(h)),b=null===(c=t.meta)||void 0===c||null===(s=c.preTokenBalances)||void 0===s||null===(a=s.find((e=>e.accountIndex===g)))||void 0===a?void 0:a.mint,A=null===(f=t.meta)||void 0===f||null===(l=f.preTokenBalances)||void 0===l||null===(u=l.find((e=>e.accountIndex===g)))||void 0===u?void 0:u.owner;if(!b||!A)return;const S=Gd(e,b);r.push({address:A,asset:{amount:w.toString(),fungible:!0,type:S,unit:\"\"}}),o.push({address:A,asset:{amount:w.toString(),fungible:!0,type:S,unit:\"\"}})})),{from:r,to:o}}({scope:e,transactionData:t});return w.from.length>0&&l.push(...w.from),w.to.length>0&&f.push(...w.to),{from:l,to:f}}function _m({scope:e,address:t,transactionData:n}){if(!n)return null;const r=n.transaction.signatures[0];if(!r)return null;const o=r,i=Number(n.blockTime),a=function(e){var t,n;const r=(null===(t=e.meta)||void 0===t?void 0:t.err)||(null===(n=e.meta)||void 0===n?void 0:n.status)&&\"Err\"in e.meta.status,o=r?It.Failed:It.Confirmed;return o}(n);let s=[],c=[],u=[];const l=(a===It.Failed?Sm:Am)({scope:e,transactionData:n});s=l.fees,c=l.from,u=l.to;const{from:f,to:d}=Em({scope:e,transactionData:n});let h=[...f,...c],p=[...d,...u];const g=function({address:e,status:t,from:n,to:r}){if(0===n.length||0===r.length||t===It.Failed)return Tt.Unknown;const o=n.filter((t=>t.address===e)),i=r.filter((t=>t.address===e)),a=o.length>0,s=i.length>0,c=n.every((t=>r.some((n=>{var r,o;return n.address===e&&!0===(null===(r=t.asset)||void 0===r?void 0:r.fungible)&&!0===(null===(o=n.asset)||void 0===o?void 0:o.fungible)&&t.asset.type===n.asset.type})))),u=r.every((t=>n.some((n=>{var r,o;return n.address===e&&!0===(null===(r=n.asset)||void 0===r?void 0:r.fungible)&&!0===(null===(o=t.asset)||void 0===o?void 0:o.fungible)&&n.asset.type===t.asset.type}))));if(c&&u)return Tt.Send;if(a&&s)return Tt.Swap;if(a)return Tt.Send;return Tt.Receive}({address:t,status:a,from:h,to:p});g===Tt.Swap&&(h=h.filter((e=>e.address===t)),p=p.filter((e=>e.address===t))),g===Tt.Receive&&(p=p.filter((e=>e.address===t)),s=[]);const m=function({address:e,from:t,to:n,type:r,status:o}){if(r===Tt.Receive&&!km({address:e,to:n}))return!1;if(o===It.Failed&&!km({address:e,to:n}))return!1;return!0}({address:t,from:h,to:p,type:g,status:a});return m?(a===It.Failed&&(h=[],p=[]),{id:o,account:t,timestamp:i,chain:e,status:a,type:g,from:h,to:p,fees:s,events:[{status:a,timestamp:i}]}):null}function km({address:e,to:t}){const{hasReceivedSOL:n,receivedSOLAmount:r}=t.reduce(((t,n)=>{var r;return n.address!==e||!(null===(r=n.asset)||void 0===r?void 0:r.fungible)||n.asset.type!==Ys.SolMainnet&&n.asset.type!==Ys.SolDevnet?t:{hasReceivedSOL:!0,receivedSOLAmount:t.receivedSOLAmount.plus(n.asset.amount)}}),{hasReceivedSOL:!1,receivedSOLAmount:new Fo(0)});return!(n&&!r.isGreaterThanOrEqualTo(.001))}class Im{#c;#A;#t;#S=3e4;#x=10000n;constructor(e,t,n){this.#c=e,this.#A=t,this.#t=n}async buildTransactionMessage(e){this.#t.log(\"Build transfer SPL token transaction message\");const{from:t,to:n,mint:r,amount:o,network:i}=e;si(r,\"Mint is required\");const{privateKeyBytes:a}=await If({entropySource:t.entropySource,derivationPath:t.derivationPath}),s=await yl(a),c=await this.getTokenAccount({mint:r,network:i});Im.assertAccountExists(c);const u=c.programAddress,l=function(e,t){const n=new qo(e.toString());if(n.isNegative())throw new Error(\"Token amount cannot be negative\");const r=n.times(10**t).integerValue(qo.ROUND_DOWN);return BigInt(r.toString())}(o,this.getDecimals(c)),[f,d]=await Promise.all([Im.deriveAssociatedTokenAccountAddress({mint:r,owner:s.address,tokenProgram:u}),Im.deriveAssociatedTokenAccountAddress({mint:r,owner:n,tokenProgram:u})]),h=await this.#A.getLatestBlockhash(i),p=lu(qu({version:0}),(e=>Zu(s.address,e)),(e=>du(h,e)),(e=>Qu([Ud({mint:r,payer:s,tokenProgram:u,owner:n,ata:d}),Fd({source:f,destination:d,authority:s,amount:l},{programAddress:u})],e)));return Xu([wg({units:this.#S}),Sg({microLamports:this.#x})],p)}static async deriveAssociatedTokenAccountAddress({mint:e,owner:t,tokenProgram:n}){return(await Ld({mint:e,owner:t,tokenProgram:n}))[0]}async getTokenAccount({mint:e,network:t}){const n=this.#c.getRpc(t),r=await async function(e,t,n={}){const{abortSignal:r,...o}=n,{value:i}=await e.getAccountInfo(t,{...o,encoding:\"jsonParsed\"}).send({abortSignal:r});return i&&\"object\"==typeof i&&\"parsed\"in i.data?Yp(t,i):Zp(t,i)}(n,e);return r}getDecimals(e){Im.assertAccountExists(e),Im.assertAccountDecoded(e);const{decimals:t}=e.data;if(!t)throw new Error(`Decimals not found for ${e}`);return t}static isAccountExists(e){return e.exists}static assertAccountExists(e){if(!Im.isAccountExists(e))throw new Error(\"Token account does not exist\")}static assertAccountNotExists(e){if(Im.isAccountExists(e))throw new Error(\"Token account exists\")}static isAccountDecoded(e){return Im.assertAccountExists(e),!(e.data instanceof Uint8Array)}static assertAccountDecoded(e){if(Im.assertAccountExists(e),!Im.isAccountDecoded(e))throw new Error(\"Token account is encoded. Implement a decoder.\")}getComputeUnitLimit(){return this.#S}getComputeUnitPriceMicroLamportsPerComputeUnit(){return this.#x}}const Tm=new cd,Om=new class{#f;constructor(e){this.#f=e}async get(){const e=await snap.request({method:\"snap_getState\",params:{encrypted:this.#f.encrypted}}),t=Tf(e??{});var n,r;return n=this.#f.defaultState,r=t,{...n,...Object.fromEntries(Object.entries(r).filter((([e,t])=>null!=t&&(!t||\"object\"!=typeof t||Object.keys(t).length>0))))}}async getKey(e){const t=await snap.request({method:\"snap_getState\",params:{key:e,encrypted:this.#f.encrypted}});if(null!==t)return Tf(t)}async setKey(e,t){await snap.request({method:\"snap_setState\",params:{key:e,value:Of(t),encrypted:this.#f.encrypted}})}async update(e){return this.get().then((async t=>{const n=e(t);return await snap.request({method:\"snap_manageState\",params:{operation:\"update\",newState:Of(n),encrypted:this.#f.encrypted}}),n}))}async deleteKey(e){await this.update((t=>((0,ci.unset)(t,e),t)))}}({encrypted:!1,defaultState:{keyringAccounts:{},mapInterfaceNameToId:{},transactions:{},signatures:{},assets:{},tokenPrices:{}}}),Cm=new class{#g;prefix;logger;constructor(e,t=console,n=\"__cache__default\"){this.#g=e,this.logger=t,this.prefix=n}async get(e){return(await this.mget([e]))[e]}async set(e,t,n=Number.MAX_SAFE_INTEGER){this.#E(n),await this.#g.setKey(`${this.prefix}.${e}`,{value:t,expiresAt:Math.min(Date.now()+(n??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}#E(e){if(void 0!==e){if(\"number\"!=typeof e)throw new Error(\"TTL must be a number\");if(e\u003C0)throw new Error(\"TTL must be positive\");if(e>Number.MAX_SAFE_INTEGER)throw new Error(\"TTL must be less than 2^53 - 1\")}}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){await this.#g.setKey(this.prefix,{})}async has(e){return void 0!==await this.get(e)}async keys(){const e=await this.#g.getKey(this.prefix);return Object.keys(e??{})}async size(){const e=await this.#g.getKey(this.prefix);return Object.keys(e??{}).length}async peek(e){var t,n;return null===(n=null===(t=await this.#g.getKey(this.prefix))||void 0===t?void 0:t[e])||void 0===n?void 0:n.value}async mget(e){const t=await this.#g.getKey(this.prefix),n=Object.entries(t??{}).filter((([t])=>e.includes(t))),r=n.filter((([e,t])=>t&&t.expiresAt\u003CDate.now()));return await this.mdelete(r.map((([e])=>e))),n.reduce(((e,[t,n])=>void 0===n?(this.logger.info(`[StateCache] ❌ Cache miss for key \"${t}\"`),e):(n.expiresAt\u003CDate.now()?(this.logger.info(`[StateCache] ⌛ Cache expired for key \"${t}\"`),e[t]=void 0):(this.logger.info(`[StateCache] 🎉 Cache hit for key \"${t}\"`),e[t]=n.value),e)),{})}async mset(e){if(0!==e.length)if(1!==e.length)e.forEach((({ttlMilliseconds:e})=>{this.#E(e)})),await this.#g.update((t=>{const n=t[this.prefix]??{};return e.forEach((({key:e,value:t,ttlMilliseconds:r})=>{void 0!==t&&(n[e]={value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})})),t[this.prefix]=n,t}));else{si(e[0]);const{key:t,value:n,ttlMilliseconds:r}=e[0];await this.set(t,n,r)}}async mdelete(e){const t={};return await this.#g.update((n=>{const r=n[this.prefix]??{};return e.forEach((e=>{void 0===r[e]?t[e]=!1:(delete r[e],t[e]=!0)})),n[this.prefix]=r,n})),t}}(Om,zl),Bm=new class{#p;#_=new Map;constructor(e){this.#p=e}#k(e){const t=this.#p.getNetworkBy(\"caip2Id\",e);var n;const r=qp(lu(t.rpcUrls,(n=Kp,e=>e.map(n)),Gp,Hp));return this.#_.set(e,r),r}getRpc(e){return L(e,fc),this.#_.get(e)??this.#k(e)}}(Tm),Rm=new Tg(Bm,zl),jm=new class{#c;#t;#S=450;#x=10000n;constructor(e,t){this.#c=e,this.#t=t}async buildTransactionMessage(e){try{const{from:t,to:n,amount:r,network:o}=e,i=Bs(t.address),a=BigInt(Mh(r).toString()),s=(await this.#c.getRpc(o).getLatestBlockhash().send()).value,c=lu(qu({version:0}),(e=>Zu(i,e)),(e=>du(s,e)),(e=>Yu(function(e,t){const n=t?.programAddress??Cl,r={source:{value:e.source??null,isWritable:!0},destination:{value:e.destination??null,isWritable:!0}},o={...e},i=Pl(n);return{accounts:[i(r.source),i(r.destination)],programAddress:n,data:Ml().encode(o)}}({amount:a,destination:n,source:wl(i)}),e)));return Xu([wg({units:this.#S}),Sg({microLamports:this.#x})],c)}catch(e){throw this.#t.error({error:e},\"Error building transaction message\"),e}}getComputeUnitLimit(){return this.#S}getComputeUnitPriceMicroLamportsPerComputeUnit(){return this.#x}}(Bm,zl),Pm=new Im(Bm,Rm,zl),Nm=new Xl(Tm),Lm=new Gl(Tm,Cm),Mm=new class{#I;#t;constructor({tokenMetadataClient:e,logger:t}){this.#I=e,this.#t=t}async getTokensMetadata(e){if(0===e.length)return this.#t.warn(`No tokens to get metadata for ${e.join(\", \")}`),{};return await this.#I.getTokenMetadataFromAddresses(e)}async generateImageComponent(e,t=48,n=48){return e?async function(e,{width:t,height:n=t,request:r}){Rg(\"number\"==typeof t&&t>0,\"Expected width to be a number greater than 0.\"),Rg(\"number\"==typeof n&&n>0,\"Expected height to be a number greater than 0.\");const o=await vm(e,r),i=`width=\"${t}\" height=\"${n}\"`;return mm(`\u003Csvg ${i.trim()} xmlns=\"http://www.w3.org/2000/svg\">\u003Cimage ${i.trim()} href=\"${o}\" />\u003C/svg>`)}(e,{width:t,height:n}).then((e=>e.value)).catch((()=>ym)):ym}}({tokenMetadataClient:Nm,logger:zl}),zm=new Vd({connection:Bm,logger:zl,configProvider:Tm,state:Om,tokenMetadataService:Mm,cache:Cm}),Um=new class{#c;#t;#m;#g;#p;constructor({logger:e,connection:t,tokenMetadataService:n,state:r,configProvider:o}){this.#c=t,this.#m=n,this.#t=e,this.#g=r,this.#p=o}async fetchLatestAddressTransactions(e,t){const n=this.#p.get().activeNetworks,r=(await Promise.all(n.map((async n=>this.#T(n,e,{limit:t}))))).flatMap((({data:e})=>e)).sort(((e,t)=>(t.timestamp??0)-(e.timestamp??0)));return r}async#T(e,t,n){const r=(await this.#c.getRpc(e).getSignaturesForAddress(t,n.next?{limit:n.limit,before:n.next}:{limit:n.limit}).send()).map((({signature:e})=>e)),o=await this.#g.getKey(`signatures.${t}`)??[];await this.#g.setKey(`signatures.${t}`,[...new Set([...o,...r])]);const i=(await this.getTransactionsDataFromSignatures({scope:e,signatures:r})).reduce(((n,r)=>{const o=_m({scope:e,address:t,transactionData:r});return o&&n.push(o),n}),[]),a=await this.#O({[t]:i.map((e=>({...e,account:t})))}),s=r.length===n.limit?r[r.length-1]??null:null;return{data:a[t]??[],next:s}}async fetchLatestSignatures(e,t,n){this.#t.log(`[TransactionsService.fetchAllSignatures] Fetching all signatures for ${t} on ${e}`);const r=(await this.#c.getRpc(e).getSignaturesForAddress(t,{limit:n}).send()).map((({signature:e})=>e)),o=await this.#g.getKey(`signatures.${t}`)??[];return await this.#g.setKey(`signatures.${t}`,[...new Set([...o,...r])]),r}async getTransactionsDataFromSignatures({scope:e,signatures:t}){return await Promise.all(t.map((async t=>this.#c.getRpc(e).getTransaction(t,{maxSupportedTransactionVersion:0}).send())))}async refreshTransactions(e){try{if(this.#t.log(`[TransactionsService] Refreshing transactions for ${e.length} accounts`),!e.length)return void this.#t.log(\"[TransactionsService] No accounts found\");const t=this.#p.get().activeNetworks,n=await this.#g.getKey(\"transactions\")??{},r=this.#C(n),o=await this.#B({scopes:t,accounts:e,existingSignatures:r}),i=await this.#R({scopes:t,accounts:e,newSignaturesMapping:o}),a=await this.#O(i);await wn(snap,mn.AccountTransactionsUpdated,{transactions:a});const s=this.#j({accounts:e,previousTransactionsByAccount:n,newTransactionsByAccount:i});await this.#g.setKey(\"transactions\",s)}catch(e){this.#t.error(\"[TransactionsService] Error. Releasing lock...\",e)}}#C(e){return new Set(Object.values(e??{}).flat().map((e=>e.id)))}async#B({scopes:e=[Zs.Mainnet,Zs.Devnet],accounts:t,existingSignatures:n}){const r={byNetwork:new Map(e.map((e=>[e,new Set]))),byAccountAndNetwork:new Map(t.map((t=>[t.id,new Map(e.map((e=>[e,new Set])))])))};for(const o of t)for(const t of e){this.#t.log(`[TransactionsService] Fetching signatures for ${o.address} on ${t}...`);const e=await this.fetchLatestSignatures(t,Bs(o.address),this.#p.get().transactions.storageLimit),i=e.filter((e=>!n.has(e)));if(!i.length){this.#t.log(`[TransactionsService] Found 0 new signatures out of ${e.length} total for address ${o.address} on network ${t}`);continue}const a=r.byNetwork.get(t),s=r.byAccountAndNetwork.get(o.id).get(t);i.forEach((e=>{a.add(e),s.add(e)})),this.#t.info(`[TransactionsService] Found ${i.length} new signatures (${e.length} total) for ${o.address} on ${t}`)}return r}async#R({scopes:e=[Zs.Mainnet,Zs.Devnet],accounts:t,newSignaturesMapping:n}){const r={};for(const i of e){const e=n.byNetwork.get(i);if(!e.size)continue;const a=Array.from(e),s=await this.getTransactionsDataFromSignatures({scope:i,signatures:a});for(const e of t){var o;r[e.id]||(r[e.id]=[]);const t=n.byAccountAndNetwork.get(e.id).get(i),a=s.filter((e=>{var n,r;const o=null===(r=e)||void 0===r||null===(n=r.transaction)||void 0===n?void 0:n.signatures[0];return o&&t.has(o)})).map((t=>{const n=_m({scope:i,address:e.address,transactionData:t});return n?{...n,account:e.id}:null})).filter((e=>null!==e));null===(o=r[e.id])||void 0===o||o.push(...a)}}return r}#j({accounts:e,previousTransactionsByAccount:t,newTransactionsByAccount:n}){return Object.fromEntries(e.map((e=>[e.id,[...t[e.id]??[],...n[e.id]??[]].sort(((e,t)=>(e.timestamp??0)-(t.timestamp??0))).slice(0,this.#p.get().transactions.storageLimit)])))}async#O(e){const t=[...new Set(Object.values(e).flatMap((e=>e.flatMap((({from:e,to:t})=>[...e,...t].filter((e=>{var t;return null===(t=e.asset)||void 0===t?void 0:t.fungible})).map((e=>e.asset.type)))))))],n=await this.#m.getTokensMetadata(t);return Object.keys(e).forEach((t=>{var r;null===(r=e[t])||void 0===r||r.forEach((e=>{e.from.forEach((e=>{var t,r;(null===(t=e.asset)||void 0===t?void 0:t.fungible)&&n[e.asset.type]&&(e.asset.unit=(null===(r=n[e.asset.type])||void 0===r?void 0:r.symbol)??\"\")})),e.to.forEach((e=>{var t,r;(null===(t=e.asset)||void 0===t?void 0:t.fungible)&&n[e.asset.type]&&(e.asset.unit=(null===(r=n[e.asset.type])||void 0===r?void 0:r.symbol)??\"\")}))}))})),e}}({logger:zl,connection:Bm,tokenMetadataService:Mm,state:Om,configProvider:Tm}),$m=new class{#t=zl;constructor(e=zl){this.#t=e}async trackEventTransactionAdded(e,t,n){this.#t.log(\"[📣 AnalyticsService] Tracking event transaction added\"),L(t,gc)}async trackEventTransactionApproved(e,t,n){this.#t.log(\"[📣 AnalyticsService] Tracking event transaction approved\"),L(t,gc)}async trackEventTransactionSubmitted(e,t,n,r){this.#t.log(\"[📣 AnalyticsService] Tracking event transaction submitted\"),L(t,gc)}async trackEventTransactionFinalized(e,t){this.#t.log(\"[📣 AnalyticsService] Tracking event transaction finalized\")}async trackEventTransactionRejected(e,t,n){this.#t.log(\"[📣 AnalyticsService] Tracking event transaction rejected\"),L(t,gc)}}(zl),Dm=new class{#c;#A;#t;constructor(e,t,n=zl){this.#c=e,this.#A=t,this.#t=n}async resolveAccountAddress(e,t,n){const{method:r,params:o}=n,i=e.filter((e=>e.scopes.includes(t)));if(0===i.length)throw new Error(\"No accounts with this scope\");switch(r){case qt.SignIn:{const{address:e}=o;if(!e)throw new Error(\"No address\");return uh(t,e)}case qt.SignAndSendTransaction:case qt.SignMessage:case qt.SignTransaction:{var a;const{account:e}=o,n=null===(a=i.find((t=>t.address===e.address)))||void 0===a?void 0:a.address;if(!n)throw new Error(\"Account not found\");return uh(t,n)}default:throw this.#t.warn({method:r},\"Unsupported method\"),new Error(\"Unsupported method\")}}async signTransaction(e,t){var n;L(t.request,pf),L(t.scope,fc);const{transaction:r,scope:o,options:i}=t.request.params,a=(null===(n=i)||void 0===n?void 0:n.minContextSlot)?{minContextSlot:BigInt(i.minContextSlot)}:void 0,s=(e=>lu(e,nl().encode,As().decode))(await this.#A.partiallySignBase64String(r,e,o,a)),c={signedTransaction:s};return L(c,mf),await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT3S\",request:{method:np.OnSignTransaction,params:{accountId:e.id}}}}),c}async signAndSendTransaction(e,t){var n,r,o,i,a,s,c;L(t.request,ff),L(t.scope,fc);const{request:{params:{transaction:u,options:l}},scope:f}=t,d=(null===(n=l)||void 0===n?void 0:n.minContextSlot)?{minContextSlot:BigInt(l.minContextSlot)}:void 0,h=await this.#A.partiallySignBase64String(u,e,f,d),p=function(e){Wu||(Wu=ms());const t=Object.values(e.signatures)[0];if(!t)throw new Pa(aa);return Wu.decode(t)}(h),g=function({rpc:e}){return async function(t,n){await cg({...n,rpc:e,transaction:t})}}({rpc:this.#c.getRpc(f)}),m=Fh(f,\"tx\",p);this.#t.info(`Sending transaction: ${m}`),sl(h);const v={...(null===(r=l)||void 0===r?void 0:r.preflightCommitment)?{preflightCommitment:l.preflightCommitment}:{},...(null===(o=l)||void 0===o?void 0:o.minContextSlot)?{minContextSlot:BigInt(l.minContextSlot)}:{},...(null===(i=l)||void 0===i?void 0:i.maxRetries)?{maxRetries:BigInt(l.maxRetries)}:{},commitment:\"confirmed\",skipPreflight:!0};await g(h,v),await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionSubmitted,params:{accountId:e.id,base64EncodedTransaction:u,signature:p,scope:f}}}});const y={signature:p};L(y,gf);const w=(null===(a=l)||void 0===a?void 0:a.commitment)&&\"processed\"!==(null===(s=l)||void 0===s?void 0:s.commitment)?null===(c=l)||void 0===c?void 0:c.commitment:\"confirmed\",b=await this.#A.waitForTransactionCommitment(p,w,f),A={..._m({scope:f,address:Bs(e.address),transactionData:b}),account:e.id};return await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionFinalized,params:{accountId:e.id,transaction:A}}}}),y}async signMessage(e,t){L(t.request,hf);const{message:n}=t.request.params,r=Ss().encode(n),o=ks().decode(r),{privateKeyBytes:i}=await If({entropySource:e.entropySource,derivationPath:e.derivationPath}),a=await yl(i),s=function(e,t={}){return Object.freeze({content:\"string\"==typeof e?(new xl).encode(e):e,signatures:Object.freeze({...t})})}(o),[c]=await a.signMessages([s]);L(c,te());const u=c[Bs(e.address)];var l;L(u,(l=Uint8Array,$(\"instance\",(e=>e instanceof l||`Expected a \\`${l.name}\\` instance, but received: ${B(e)}`))));const f={signature:ms().decode(u),signedMessage:n,signatureType:\"ed25519\"};return L(f,vf),f}async signIn(e,t){L(t.request,df);const{address:n}=e,{params:r}=t.request,o=this.#P(r),i=ks().encode(o),a=Ss().decode(i),s={id:globalThis.crypto.randomUUID(),scope:t.scope,account:e.id,origin:t.origin,request:{method:qt.SignMessage,params:{account:{address:n},message:a}}},c={account:{address:n},...await this.signMessage(e,s)};return L(c,yf),c}async verifySignature(e,t,n){L(t,pc),L(n,gc);const{privateKeyBytes:r}=await If({entropySource:e.entropySource,derivationPath:e.derivationPath}),o=await yl(r),i=fs(ps).encode(t),a=Ss().encode(n);return await Bc(o.keyPair.publicKey,i,a)}#P(e){let t=`${e.domain} wants you to sign in with your Solana account:\\n`;t+=`${e.address}`,e.statement&&(t+=`\\n\\n${e.statement}`);const n=[];if(e.uri&&n.push(`URI: ${e.uri}`),e.version&&n.push(`Version: ${e.version}`),e.chainId&&n.push(`Chain ID: ${e.chainId}`),e.nonce&&n.push(`Nonce: ${e.nonce}`),e.issuedAt&&n.push(`Issued At: ${e.issuedAt}`),e.expirationTime&&n.push(`Expiration Time: ${e.expirationTime}`),e.notBefore&&n.push(`Not Before: ${e.notBefore}`),e.requestId&&n.push(`Request ID: ${e.requestId}`),e.resources){n.push(\"Resources:\");for(const t of e.resources)n.push(`- ${t}`)}return n.length&&(t+=`\\n\\n${n.join(\"\\n\")}`),t}}(Bm,Rm,zl),Fm=new class{#N;#t;#m;constructor(e,t,n){this.#N=e,this.#m=t,this.#t=n}async scanTransaction({method:e,accountAddress:t,transaction:n,scope:r,origin:o,options:i=[\"simulation\",\"validation\"]}){try{var a,s;const c=await this.#N.scanTransactions({method:e,accountAddress:t,transactions:[n],scope:r,origin:o,options:i}),u=this.#L(c);if(!(null===(s=u)||void 0===s||null===(a=s.estimatedChanges)||void 0===a?void 0:a.assets))return null;const l={...u},f=u.estimatedChanges.assets.map((async(e,t)=>{const{logo:n}=e;if(n)return this.#m.generateImageComponent(n,16,16).then((e=>{var n,r,o;e&&(null===(o=l)||void 0===o||null===(r=o.estimatedChanges)||void 0===r||null===(n=r.assets)||void 0===n?void 0:n[t])&&(l.estimatedChanges.assets[t].imageSvg=e)})).catch((()=>null))}));return await Promise.all(f??[]),l}catch(e){return this.#t.error(e),null}}#L(e){var t,n,r,o,i,a,s,c,u,l;return{status:null===(t=e)||void 0===t?void 0:t.status,estimatedChanges:{assets:(null===(i=e.result)||void 0===i||null===(o=i.simulation)||void 0===o||null===(r=o.account_summary)||void 0===r||null===(n=r.account_assets_diff)||void 0===n?void 0:n.map((e=>{var t,n,r,o;return{type:e.in?\"in\":\"out\",symbol:\"symbol\"in e.aM� �sset?e.asset.symbol:e.asset_type,name:\"name\"in e.asset?e.asset.name:e.asset_type,logo:\"logo\"in e.asset?e.asset.logo:null,value:(null===(t=e.in)||void 0===t?void 0:t.value)??(null===(n=e.out)||void 0===n?void 0:n.value)??null,price:(null===(r=e.in)||void 0===r?void 0:r.usd_price)??(null===(o=e.out)||void 0===o?void 0:o.usd_price)??null,imageSvg:null}})))??[]},validation:{type:null===(s=e.result)||void 0===s||null===(a=s.validation)||void 0===a?void 0:a.result_type,reason:null===(u=e.result)||void 0===u||null===(c=u.validation)||void 0===c?void 0:c.reason},error:(null===(l=e)||void 0===l?void 0:l.error_details)?{type:\"type\"in e.error_details?e.error_details.type:null,code:\"code\"in e.error_details?e.error_details.code:null}:null}}}(new class{#e;#t;#n;constructor(e,t=globalThis.fetch,n=zl){const{baseUrl:r}=e.get().securityAlertsApi;this.#e=t,this.#t=n,this.#n=r}async scanTransactions({method:e,accountAddress:t,transactions:n,scope:r,origin:o,options:i}){const a=Jl.from(Hl.decode(t)).toString(\"base64\");this.#t.info(\"Scanning transaction\");return(await this.#e(`${this.#n}/solana/message/scan`,{headers:{\"Content-Type\":\"application/json\",accept:\"application/json\"},method:\"POST\",body:JSON.stringify({method:e,encoding:\"base64\",account_address:a,metadata:{url:o},chain:Zl[r],transactions:n,options:i})})).json()}}(Tm),Mm,zl),qm=new class{async handleKeyringRequest(e,t){const{request:{method:n}}=e;switch(n){case qt.SignAndSendTransaction:case qt.SignTransaction:return this.#M(e,t);case qt.SignMessage:return this.#z(e,t);case qt.SignIn:return this.#U(e,t);default:throw new Error(`Unsupported method: ${n}`)}}async#M(e,t){L(e.request,se([ff,pf]));const{request:{method:n,params:{transaction:r}},scope:o,account:i}=e;await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionAdded,params:{accountId:i,base64EncodedTransaction:r,scope:o}}}});return await tp({...ep,scope:o,method:n,origin:e.origin,transaction:r,account:t})?(await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionApproved,params:{accountId:i,base64EncodedTransaction:r,scope:o}}}}),!0):(await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionRejected,params:{accountId:i,base64EncodedTransaction:r,scope:o}}}}),!1)}async#z(e,t){const n=await async function(e,t){L(e.request,hf);const{request:{params:{message:n}},scope:r,origin:o}=e,i=Ss().encode(n),a=ks().decode(i),s=await Lf().then((e=>e.locale)).catch((()=>hh));return Nf(await Rf(Hd(Nh,{message:a,account:t,scope:r,locale:s,networkImage:Zd,origin:o}),{}))}(e,t);return Boolean(n)}async#U(e,t){const n=await async function(e,t){L(e.request,df);const{request:{params:n},scope:r,origin:o}=e,i=await Lf();return Nf(await Rf(Hd(Rh,{params:n,account:t,scope:r,preferences:i,networkImage:Zd,origin:o}),{}))}(e,t);return Boolean(n)}},Wm=new class{#g;#t;#$;#D;#F;#q;constructor({state:e,logger:t,transactionsService:n,assetsService:r,walletService:o,confirmationHandler:i}){this.#g=e,this.#t=t,this.#$=n,this.#D=r,this.#F=o,this.#q=i}async listAccounts(){try{const e=await this.#g.getKey(\"keyringAccounts\")??{};return(0,ci.sortBy)(Object.values(e),[\"entropySource\",\"index\"])}catch(e){throw this.#t.error({error:e},\"Error listing accounts\"),new Error(\"Error listing accounts\")}}async getAccount(e){try{md({accountId:e},ic);return await this.#g.getKey(`keyringAccounts.${e}`)}catch(e){throw this.#t.error({error:e},\"Error getting account\"),new io(e)}}async getAccountOrThrow(e){const t=await this.getAccount(e);if(!t)throw new Error(`Account \"${e}\" not found`);return t}#W(e,t){return function(e){if(0===e.length)return 0;const t=e.map((e=>e.index)).sort(((e,t)=>e-t));let n=0;for(const e of t){if(e!==n)break;n+=1}return n}(e.filter((e=>e.entropySource===t)))}#K(e){return`m/44'/501'/${e}'/0'`}#G(e){const t=e.split(\"/\")[3];if(!t)throw new Error(\"Invalid derivation path\");const n=parseInt(t.replace(\"'\",\"\"),10);return L(n,Z()),n}async#V(){const e=(await async function(){return await snap.request({method:\"snap_listEntropySources\"})}()).find((({primary:e})=>e));if(!e)throw new Error(\"No default entropy source found - this can never happen\");return e.id}async createAccount(e){const t=globalThis.crypto.randomUUID();try{var n,r,o;const i=await this.listAccounts(),a=(null===(n=e)||void 0===n?void 0:n.entropySource)??await this.#V(),s=(null===(r=e)||void 0===r?void 0:r.derivationPath)?this.#G(e.derivationPath):this.#W(i,a),c=(null===(o=e)||void 0===o?void 0:o.derivationPath)?e.derivationPath:this.#K(s),u=i.find((e=>e.derivationPath===c&&e.entropySource===a));if(u)return this.#t.warn(\"[🔑 Keyring] An account already exists with the same derivation path and entropy source. Skipping account creation.\"),bd(u);const{publicKeyBytes:l}=await If({entropySource:a,derivationPath:c}),f=js().decode(l.slice(1)),{importedAccount:d,accountNameSuggestion:h,metamask:p,...g}=e??{},m={id:t,entropySource:a,derivationPath:c,index:s,type:dt.DataAccount,address:f,scopes:[Dt.Mainnet,Dt.Testnet,Dt.Devnet],options:{...g,entropySource:a,derivationPath:c,index:s},methods:[qt.SignAndSendTransaction,qt.SignTransaction,qt.SignMessage,qt.SignIn]};await this.#g.setKey(`keyringAccounts.${m.id}`,m);const v=bd(m);return await this.emitEvent(mn.AccountCreated,{account:v,accountNameSuggestion:h??`Solana Account ${s+1}`,displayAccountNameSuggestion:!h,displayConfirmation:!1,...p?{metamask:p}:{}}),v}catch(e){throw this.#t.error({error:e},\"Error creating account\"),await this.#H(t),new Error(`Error creating account: ${e.message}`)}}async#H(e){await Promise.all([this.#g.deleteKey(`keyringAccounts.${e}`),this.#g.deleteKey(`transactions.${e}`),this.#g.deleteKey(`assets.${e}`)])}async deleteAccount(e){try{md({accountId:e},ac),await this.#H(e),await this.emitEvent(mn.AccountDeleted,{id:e})}catch(e){throw this.#t.error({error:e},\"Error deleting account\"),e}}async listAccountAssets(e){try{md({accountId:e},sc);const t=await this.getAccountOrThrow(e),n=await this.#D.listAccountAssets(t);return vd(n,rn),n}catch(e){throw this.#t.error({error:e},\"Error listing account assets\"),e}}async getAccountBalances(e,t){try{md({accountId:e,assets:t},cc);const n=await this.getAccountOrThrow(e),r=await this.#D.getAccountBalances(n,t);return vd(r,lc),r}catch(e){throw this.#t.error({error:e},\"Error getting account balances\"),e}}async emitEvent(e,t){await wn(snap,e,t)}async filterAccountChains(e,t){throw new Error(`Implement me! ${e} ${t.toString()}`)}async updateAccount(e){throw new Error(`Implement me! ${JSON.stringify(e)}`)}async submitRequest(e){return{pending:!1,result:await this.#J(e)}}async#J(e){L(e,yd);const{request:{method:t,params:n},scope:r,account:o}=e,i=await this.getAccountOrThrow(o);if(!i.scopes.includes(r))throw new Error(`Scope \"${r}\" is not allowed for this account`);if(!i.methods.includes(t))throw new Error(`Method \"${t}\" is not allowed for this account`);if(\"scope\"in n&&r!==n.scope)throw new Error(`Scope \"${r}\" does not match \"${n.scope}\" in request.params`);if(!await this.#q.handleKeyringRequest(e,i))throw new xo;switch(t){case qt.SignAndSendTransaction:return this.#F.signAndSendTransaction(i,e);case qt.SignTransaction:return this.#F.signTransaction(i,e);case qt.SignMessage:return this.#F.signMessage(i,e);case qt.SignIn:return this.#F.signIn(i,e);default:throw new ho(`Unsupported method: ${t}`)}}async listAccountTransactions(e,t){try{var n;md({accountId:e,pagination:t},uc);const r=await this.getAccount(e);if(!r)throw new Error(\"Account not found\");const o=await this.#g.getKey(`transactions.${e}`)??[];if(!o.length){const e=(await this.#$.fetchLatestAddressTransactions(Bs(r.address),t.limit)).map((e=>({...e,account:r.id})));return await this.#g.setKey(`transactions.${r.id}`,e),{data:e,next:null}}const i=t.next?o.findIndex((e=>e.id===t.next)):0,a=o.slice(i,i+t.limit),s=i+t.limit\u003Co.length;return{data:a,next:s?(null===(n=o[i+t.limit])||void 0===n?void 0:n.id)??null:null}}catch(e){throw this.#t.error({error:e},\"Error listing account transactions\"),e}}async resolveAccountAddress(e,t){try{L(e,fc);const{method:n,params:r}=t,o={method:n,params:r};L(o,wf);const i=await this.listAccounts();return{address:await this.#F.resolveAccountAddress(i,e,o)}}catch(e){return this.#t.error({error:e},\"Error resolving account address\"),null}}async discoverAccounts(e,t,n){try{L({scopes:e,entropySource:t,groupIndex:n},wd);const r=this.#K(n),o=await If({entropySource:t,derivationPath:r}),i=js().decode(o.publicKeyBytes.slice(1)),a=[];for(const t of e)a.push(this.#$.fetchLatestSignatures(t,i,1));const s=await Promise.all(a);return s.some((e=>e.length>0))?[{type:\"bip44\",scopes:e,derivationPath:r}]:[]}catch(e){throw this.#t.error({error:e},\"Error discovering accounts\"),e}}}({state:Om,transactionsService:Um,logger:zl,assetsService:zm,walletService:Dm,confirmationHandler:qm}),Km=new class{#Z;#t;constructor(e,t=zl){this.#Z=e,this.#t=t}#Y(e){if(!wm(e))throw new Error(\"Passed caipAssetType is not a fiat asset\");return oi(e).assetReference.toLowerCase()}async getMultipleTokenConversions(e,t=!1){if(0===e.length)return{};const n=e.flatMap((e=>[e.from,e.to])).filter((e=>!wm(e))),[r,o]=await Promise.all([this.#Z.getFiatExchangeRates(),this.#Z.getMultipleSpotPrices(n,\"usd\")]),i={};return e.forEach((e=>{const{from:n,to:a}=e;let s,c;if(i[n]||(i[n]={}),wm(n)){var u;const e=null===(u=r[this.#Y(n)])||void 0===u?void 0:u.value;if(!e)return void(i[n][a]=null);s=new qo(1).dividedBy(e)}else{var l;s=new qo((null===(l=o[n])||void 0===l?void 0:l.price)??0)}if(wm(a)){var f;const e=null===(f=r[this.#Y(a)])||void 0===f?void 0:f.value;if(!e)return void(i[n][a]=null);c=new qo(1).dividedBy(e)}else{var d;c=new qo((null===(d=o[a])||void 0===d?void 0:d.price)??0)}if(s.isZero()||c.isZero())return void(i[n][a]=null);const h=s.dividedBy(c).toString(),p=t&&o[n]?this.#Q(o[n],c):void 0,g=Date.now();i[n][a]={rate:h,conversionTime:g,expirationTime:g+Gl.cacheTtlsMilliseconds.historicalPrices,...t&&p?{marketData:p}:{}}})),i}#Q(e,t){const n=(0,ci.pick)(e,[\"marketCap\",\"totalVolume\",\"circulatingSupply\",\"allTimeHigh\",\"allTimeLow\",\"pricePercentChange1h\",\"pricePercentChange1d\",\"pricePercentChange7d\",\"pricePercentChange14d\",\"pricePercentChange30d\",\"pricePercentChange200d\",\"pricePercentChange1y\"]),r=e=>null==e?\"\":new qo(e).dividedBy(t).toString(),o=(e,t)=>null==t?{}:{[e]:t},i={...o(\"PT1H\",n.pricePercentChange1h),...o(\"P1D\",n.pricePercentChange1d),...o(\"P7D\",n.pricePercentChange7d),...o(\"P14D\",n.pricePercentChange14d),...o(\"P30D\",n.pricePercentChange30d),...o(\"P200D\",n.pricePercentChange200d),...o(\"P1Y\",n.pricePercentChange1y)};return{marketCap:r(n.marketCap),totalVolume:r(n.totalVolume),circulatingSupply:(n.circulatingSupply??0).toString(),allTimeHigh:r(n.allTimeHigh),allTimeLow:r(n.allTimeLow),...Object.keys(i).length>0?{pricePercentChange:i}:{}}}async getHistoricalPrice(e,t){L(e,at),L(t,at);const n=oi(t).assetReference.toLowerCase();L(n,Fl);const r=[\"1d\",\"7d\",\"1m\",\"3m\",\"1y\",\"1000y\"].map((async r=>this.#Z.getHistoricalPrices({assetType:e,timePeriod:r,vsCurrency:n}).then((e=>({timePeriod:r,response:e}))).catch((n=>(this.#t.warn(`Error fetching historical prices for ${e} to ${t} with time period ${r}. Returning null object.`,n),{timePeriod:r,response:Kl}))))),o=(await Promise.all(r)).reduce(((e,{timePeriod:t,response:n})=>(e[`P${t.toUpperCase()}`]=n.prices.map((e=>[e[0],e[1].toString()])),e)),{}),i=Date.now();return{intervals:o,updateTime:i,expirationTime:i+Gl.cacheTtlsMilliseconds.historicalPrices}}}(Lm),Gm=new Yl(Bm,zl),Vm={configProvider:Tm,connection:Bm,keyring:Wm,priceApiClient:Lm,state:Om,cache:Cm,assetsService:zm,tokenPricesService:Km,transactionHelper:Rm,transactionsService:Um,sendSolBuilder:jm,sendSplTokenBuilder:Pm,walletService:Dm,transactionScanService:Fm,analyticsService:$m,confirmationHandler:qm,nftService:Gm},Hm=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnSignTransaction),params:te({accountId:nc})}),Jm=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnTransactionAdded),params:te({accountId:nc,base64EncodedTransaction:gc,scope:fc})}),Zm=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnTransactionApproved),params:te({accountId:nc,base64EncodedTransaction:gc,scope:fc})}),Ym=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnTransactionFinalized),params:te({accountId:nc,transaction:Ct})}),Qm=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnTransactionRejected),params:te({accountId:nc,base64EncodedTransaction:gc,scope:fc})}),Xm=te({id:oe(),jsonrpc:Y(\"2.0\"),method:Y(np.OnTransactionSubmitted),params:te({accountId:nc,base64EncodedTransaction:gc,signature:oe(),scope:fc})}),ev={[np.OnTransactionAdded]:async({request:e})=>{try{zl.info(\"[onTransactionAdded] Cronjob triggered\",e),L(e,Jm);const{accountId:t,base64EncodedTransaction:n,scope:r}=e.params,o=await Wm.getAccountOrThrow(t);await $m.trackEventTransactionAdded(o,n,r)}catch(e){throw zl.error(e),new so(e)}},[np.OnTransactionApproved]:async({request:e})=>{try{zl.info(\"[onTransactionApproved] Cronjob triggered\",e),L(e,Zm);const{accountId:t,base64EncodedTransaction:n,scope:r}=e.params,o=await Wm.getAccountOrThrow(t);await $m.trackEventTransactionApproved(o,n,r)}catch(e){throw zl.error(e),new so(e)}},[np.OnTransactionSubmitted]:async({request:e})=>{try{zl.info(\"[onTransactionSubmitted] Cronjob triggered\",e),L(e,Xm);const{accountId:t,base64EncodedTransaction:n,signature:r,scope:o}=e.params,i=await Wm.getAccountOrThrow(t);await $m.trackEventTransactionSubmitted(i,n,r,o)}catch(e){throw zl.error(e),new so(e)}},[np.OnTransactionFinalized]:async({request:e})=>{try{zl.info(\"[onTransactionFinalized] Cronjob triggered\",e),L(e,Ym);const{accountId:t,transaction:n}=e.params,r=await Wm.getAccountOrThrow(t),o=await Wm.listAccounts(),i=n.from.map((e=>e.address)),a=n.to.map((e=>e.address)),s=[r.address,...i,...a],c=o.filter((e=>s.includes(e.address))),u=zm.refreshAssets(c),l=Um.refreshTransactions(c),f=$m.trackEventTransactionFinalized(r,n);await Promise.all([u,l,f])}catch(e){throw zl.error(e),new so(e)}},[np.OnTransactionRejected]:async({request:e})=>{try{zl.info(\"[onTransactionRejected] Cronjob triggered\",e),L(e,Qm);const{accountId:t,base64EncodedTransaction:n,scope:r}=e.params,o=await Wm.getAccountOrThrow(t);await $m.trackEventTransactionRejected(o,n,r)}catch(e){throw zl.error(e),new so(e)}},[np.OnSignTransaction]:async({request:e})=>{try{zl.info(\"[onSignTransaction] Cronjob triggered\",e),L(e,Hm);const{accountId:t}=e.params,n=await Wm.getAccountOrThrow(t),r=zm.refreshAssets([n]),o=Um.refreshTransactions([n]);await Promise.all([r,o])}catch(e){throw zl.error(e),new so(e)}},[np.OnAccountsRefresh]:async()=>{try{zl.info(\"[onAccountsRefresh] Cronjob triggered\");const e=await Wm.listAccounts(),t=Zs.Mainnet,n=e.map((async e=>{const n=await Om.getKey(`signatures.${e.address}`)??[],[r]=await Um.fetchLatestSignatures(t,Bs(e.address),1);return zl.log(`[onAccountsRefresh] Latest signature for account ${e.address} is ${r}`),{account:e,didChange:r&&!n.includes(r)}})),r=(await Promise.all(n)).filter((e=>e.didChange)).map((e=>e.account));if(0===r.length)return void zl.info(\"[onAccountsRefresh] No accounts with changes, skipping refresh\");zl.info(`[onAccountsRefresh] Found ${r.length} accounts with changes`),await zm.refreshAssets(r).catch((e=>{zl.warn(\"[onAccountsRefresh] Caught error while refreshing assets\",e)})),await Um.refreshTransactions(r).catch((e=>{zl.warn(\"[onAccountsRefresh] Caught error while refreshing transactions\",e)})),zl.info(`[onAccountsRefresh] Successfully refreshed ${r.length} accounts`)}catch(e){zl.error(\"[onAccountsRefresh] Error\",e)}}};var tv;!function(e){e.RefreshSend=\"refreshSend\",e.RefreshConfirmationEstimation=\"refreshConfirmationEstimation\",e.ScheduleRefreshAccounts=\"scheduleRefreshAccounts\"}(tv||(tv={}));const nv=Qd(\"Form\"),rv=Qd(\"Field\"),ov=Qd(\"AssetSelector\"),iv=({title:e,backButtonName:t})=>Jd(eh,{direction:\"horizontal\",alignment:\"space-between\",center:!0,children:[t?Hd(ch,{name:t,children:Hd(_h,{name:\"arrow-left\",color:\"primary\",size:\"md\"})}):null,Hd(th,{size:\"sm\",children:e}),Jd(eh,{direction:\"horizontal\",children:[Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(eh,{children:null})]})]}),av=Qd(\"Selector\"),sv=Qd(\"SelectorOption\"),cv=Qd(\"Card\");function uv(e){return e?e.length\u003C=10?\"\":`${e.slice(0,6)}...${e.slice(-4)}`:\"\"}const lv=({accounts:e,balances:t,price:n,name:r,scope:o,selectedAccountId:i,error:a,locale:s,currency:c})=>{const u=ph(s),l=Object.values(e);return Hd(rv,{label:u(\"send.fromField\"),error:a,children:Hd(av,{name:r,value:i,title:\"From\",children:l.map((e=>{var r;const i=null===(r=t[e.id])||void 0===r?void 0:r[`${o}/${Qs.SOL}`],{amount:a,unit:u}=i??{},l=void 0!==a&&u?Zh(a,u,s):\"\",f=void 0!==a&&null!==n&&c?Ah(Yh(a,n),c,s):\"-\";return Hd(sv,{value:e.id,children:Hd(cv,{value:l,extra:f,description:uv(e.address),title:Hd(ih,{address:uh(o,e.address),truncate:!0,displayName:!0,avatar:!0})})})}))})})},fv=Qd(\"Input\");var dv,hv;!function(e){e.Form=\"send-form\",e.DestinationAccountInput=\"send-to\",e.BackButton=\"send-back-button\",e.SourceAccountSelector=\"send-account-selector\",e.AmountInput=\"send-amount-input\",e.AssetSelector=\"send-asset-selector\",e.SwapCurrencyButton=\"send-swap-currency\",e.MaxAmountButton=\"send-amount-input-max\",e.CancelButton=\"send-cancel-button\",e.SendButton=\"send-submit-button\",e.ClearButton=\"send-clear-button\",e.CloseButton=\"send-close-button\"}(dv||(dv={})),function(e){e.TOKEN=\"TOKEN\",e.FIAT=\"USD\"}(hv||(hv={}));const pv=({name:e,value:t,tokenSymbol:n,currency:r,currencyType:o,error:i,locale:a,swapCurrencyButtonDisabled:s=!1})=>{const c=ph(a),u=o===hv.FIAT?r.toUpperCase():n;return Jd(rv,{label:c(\"send.amountField\"),error:i,children:[Hd(fv,{name:e,type:\"number\",min:0,placeholder:\"0\",step:.01,value:t??void 0}),Jd(eh,{direction:\"horizontal\",center:!0,children:[Hd(eh,{direction:\"vertical\",alignment:\"center\",children:Hd(nh,{size:\"sm\",children:u})}),Hd(ch,{name:dv.SwapCurrencyButton,disabled:s,children:Hd(_h,{name:\"swap-vertical\",color:s?\"muted\":\"primary\",size:\"md\"})})]})]})},gv=({name:e,value:t,error:n,locale:r,showClearButton:o,disabled:i})=>{const a=ph(r);return Jd(rv,{label:a(\"send.toField\"),error:n,children:[Hd(fv,{name:e,placeholder:i?\"\":a(\"send.toPlaceholder\"),value:t??void 0,disabled:i}),o?Hd(eh,{children:Hd(ch,{name:dv.ClearButton,children:Hd(_h,{name:Eh.Close,color:\"primary\"})})}):null]})},mv=e=>{var t,n;const{amount:r,tokenPrices:o,tokenCaipId:i,currencyType:a}=e,s=null===(n=o)||void 0===n||null===(t=n[i])||void 0===t?void 0:t.price;if(a===hv.TOKEN)return r;if(void 0===s)throw new Error(\"Token price is undefined, cannot convert to fiat amount.\");return null===r?null:qo(r).dividedBy(qo(s)).toString()},vv=e=>{var t,n;const{selectedTokenMetadata:r}=e;return{...r??{},tokenSymbol:(null===(t=r)||void 0===t?void 0:t.symbol)??\"UNKNOWN\",tokenImage:(null===(n=r)||void 0===n?void 0:n.imageSvg)??ym}},yv=e=>{var t,n;const{tokenCaipId:r,tokenPrices:o}=e;return null===(n=o)||void 0===n||null===(t=n[r])||void 0===t?void 0:t.price},wv=e=>{var t,n,r;const{balances:o,fromAccountId:i,tokenCaipId:a}=e;return(null===(r=o)||void 0===r||null===(n=r[i])||void 0===n||null===(t=n[a])||void 0===t?void 0:t.amount)??\"0\"},bv=e=>{var t,n;const{tokenCaipId:r,scope:o}=e;return r===(null===(n=tc[o])||void 0===n||null===(t=n.nativeToken)||void 0===t?void 0:t.caip19Id)},Av=Qd(\"Spinner\"),Sv=({title:e,subtitle:t,iconSrc:n,isLoading:r})=>Jd(eh,{alignment:\"center\",center:!0,children:[Jd(eh,{direction:\"horizontal\",center:!0,children:[r?Hd(Av,{}):null,n&&!r?Hd(ah,{borderRadius:\"full\",src:n}):null]}),Hd(th,{size:\"lg\",children:e}),t?Hd(nh,{color:\"muted\",children:t}):null]}),xv=Qd(\"Value\"),Ev=({context:e})=>{var t,n;const{scope:r,fromAccountId:o,toAddress:i,accounts:a,feeEstimatedInSol:s,preferences:{locale:c,currency:u},transaction:l,feePaidInSol:f,tokenPrices:d}=e,h=ph(c),p=tc[r],g=null===(t=a.find((e=>e.id===o)))||void 0===t?void 0:t.address,m=uh(r,g),v=p.name,y=p.nativeToken.symbol,w=null===(n=d[p.nativeToken.caip19Id])||void 0===n?void 0:n.price,b=l?f:s,A=b?Zh(b,y,c):\"\",S=void 0===w||null===b?\"\":Ah(Yh(b,w),u,c);return Jd(eh,{children:[Jd(rh,{children:[Hd(oh,{label:h(\"send.confirmation.from\"),children:Hd(Dh,{href:Fh(r,\"address\",g),children:Hd(ih,{address:m,displayName:!0})})}),i?Hd(oh,{label:h(\"send.confirmation.recipient\"),children:Hd(Dh,{href:Fh(r,\"address\",i),children:Hd(ih,{address:uh(r,i),displayName:!0})})}):null]}),Jd(rh,{children:[Hd(oh,{label:h(\"send.confirmation.network\"),children:Hd(nh,{children:v})}),Hd(oh,{label:h(\"send.confirmation.transactionSpeed\"),children:Hd(nh,{children:\"\u003C1s\"})}),Hd(oh,{label:h(\"send.confirmation.fee\"),children:Hd(xv,{extra:S,value:A})})]})]})};var _v;!function(e){e.BackButton=\"transaction-confirmation-back-button\",e.CancelButton=\"transaction-confirmation-cancel-button\",e.ConfirmButton=\"transaction-confirmation-submit-button\"}(_v||(_v={}));const kv={\"send-form\":({context:e,inputToAddress:t,inputAmount:n})=>{var r,o,i,a,s,c,u,l,f,d,h;const{accounts:p,fromAccountId:g,amount:m,toAddress:v,validation:y,currencyType:w,tokenCaipId:b,scope:A,balances:S,tokenPricesFetchStatus:x,buildingTransaction:E,error:_,loading:k,transactionMessage:I,preferences:{locale:T,currency:O}}=e,C=ph(T),B=null===(r=S[g])||void 0===r?void 0:r[b],R=null===(o=B)||void 0===o?void 0:o.amount,j=(null===(i=B)||void 0===i?void 0:i.unit)??\"\",P=void 0!==R,N=p.find((e=>e.id===g)),L=(null===(a=N)||void 0===a?void 0:a.address)?uh(A,N.address):\"\",M=(e=>{var t,n,r,o;const{tokenPrices:i,scope:a}=e;return null===(o=i)||void 0===o||null===(t=o[null===(r=tc[a])||void 0===r||null===(n=r.nativeToken)||void 0===n?void 0:n.caip19Id])||void 0===t?void 0:t.price})(e),z=yv(e),U=void 0===R||\"0\"===R,$=void 0===z,D=\"error\"===x||\"fetched\"===x&&$,F=(P?{[hv.FIAT]:Ah(Yh(R,z??0),O,T),[hv.TOKEN]:Zh(R,j,T)}:{[hv.FIAT]:\"\",[hv.TOKEN]:\"\"})[w],q=g.length>0&&!!v&&v.length>0&&zf(null===(s=y)||void 0===s?void 0:s[dv.DestinationAccountInput]),W=!zf(I)&&\"\"!==I,K=Boolean(v&&v.length>0),G=g.length>0&&!!m&&m.length>0&&!!v&&v.length>0&&Object.values(y).every(zf)&&P&&!E&&W;return Jd(Xd,{backgroundColor:\"alternative\",children:[Jd(eh,{children:[Hd(iv,{title:C(\"send.title\"),backButtonName:dv.BackButton}),Jd(nv,{name:dv.Form,children:[D&&Hd(Kh,{title:\"\",severity:\"info\",children:Hd(nh,{children:C(\"send.selectedTokenPriceNotAvailable\",{currency:O})})}),Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(lv,{name:dv.SourceAccountSelector,scope:A,error:(null===(u=y)||void 0===u||null===(c=u[dv.SourceAccountSelector])||void 0===c?void 0:c.message)??\"\",accounts:p,selectedAccountId:g,balances:S,price:M??null,locale:T,currency:O}),Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(gv,{locale:T,disabled:k,name:dv.DestinationAccountInput,value:t??null,showClearButton:K,error:(null===(f=y)||void 0===f||null===(l=f[dv.DestinationAccountInput])||void 0===l?void 0:l.message)??\"\"}),q&&Jd(eh,{children:[Hd(eh,{children:null}),Hd(eh,{children:null}),Hd(eh,{children:null}),Jd(eh,{direction:\"horizontal\",children:[Hd(rv,{label:C(\"send.assetField\"),children:Hd(ov,{chainIds:[A],value:b,name:dv.AssetSelector,addresses:L?[L]:[]})}),Hd(pv,{name:dv.AmountInput,error:(null===(h=y)||void 0===h||null===(d=h[dv.AmountInput])||void 0===d?void 0:d.message)??\"\",currencyType:w,tokenSymbol:j,currency:O,value:n??null,locale:T,swapCurrencyButtonDisabled:$||U})]}),Jd(eh,{direction:\"horizontal\",alignment:\"space-between\",center:!0,children:[F?Hd(nh,{size:\"sm\",color:\"muted\",children:`${C(\"send.balance\")}: ${F}`}):Hd(eh,{children:null}),Hd(ch,{size:\"sm\",name:dv.MaxAmountButton,disabled:U,children:C(\"send.maxButton\")})]})]}),_&&Jd(eh,{children:[Hd(eh,{children:null}),Hd(Kh,{title:C(_.title),severity:\"warning\",children:Hd(nh,{children:C(_.message)})})]})]})]}),Jd(sh,{children:[Hd(ch,{name:dv.CancelButton,children:C(\"send.cancelButton\")}),Hd(ch,{name:dv.SendButton,disabled:!G,loading:E,children:C(\"send.continueButton\")})]})]})},\"transaction-confirmation\":({context:e})=>{const{preferences:{currency:t,locale:n}}=e,r=ph(n),{tokenImage:o,tokenSymbol:i}=vv(e),a=mv(e),s=yv(e),c=void 0===s?\"\":Ah(Yh(a??\"0\",s),t,n);return Jd(Xd,{children:[Jd(eh,{children:[Hd(iv,{title:r(\"send.confirmation.title\"),backButtonName:_v.BackButton}),Hd(Sv,{title:Zh(a??\"0\",i,n),subtitle:c,iconSrc:o}),Hd(Ev,{context:e})]}),Jd(sh,{children:[Hd(ch,{name:_v.CancelButton,children:r(\"send.confirmation.cancelButton\")}),Hd(ch,{name:_v.ConfirmButton,loading:e.loading,disabled:e.loading,children:r(\"send.confirmation.sendButton\")})]})]})},\"send-pending\":({context:e})=>{const t=ph(e.preferences.locale);return Hd(Xd,{children:Jd(eh,{children:[Hd(eh,{children:null}),Hd(Sv,{title:t(\"send.send-pending.title\"),subtitle:t(\"send.send-pending.subtitle\"),isLoading:!0}),Hd(Ev,{context:e})]})})},\"transaction-success\":({context:e})=>{var t,n;const{preferences:r,transaction:o,scope:i}=e,a=ph(r.locale),{tokenSymbol:s}=vv(e),c=mv(e);return Hd(Xd,{children:Jd(eh,{children:[Hd(eh,{children:null}),Hd(Sv,{title:a(\"send.transaction-success.title\"),subtitle:a(\"send.transaction-success.subtitle\",{amount:bh(c??\"0\",r.locale),tokenSymbol:s}),iconSrc:'\u003Csvg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\\n\u003Cpath d=\"M24.0002 3.99902C12.9802 3.99902 4.00024 12.979 4.00024 23.999C4.00024 35.019 12.9802 43.999 24.0002 43.999C35.0202 43.999 44.0002 35.019 44.0002 23.999C44.0002 12.979 35.0202 3.99902 24.0002 3.99902ZM33.5602 19.399L22.2202 30.739C21.9402 31.019 21.5602 31.179 21.1602 31.179C20.7602 31.179 20.3802 31.019 20.1002 30.739L14.4402 25.079C13.8602 24.499 13.8602 23.539 14.4402 22.959C15.0202 22.379 15.9802 22.379 16.5602 22.959L21.1602 27.559L31.4402 17.279C32.0202 16.699 32.9802 16.699 33.5602 17.279C34.1402 17.859 34.1402 18.799 33.5602 19.399Z\" fill=\"#1C8234\"/>\\n\u003C/svg>\\n'}),Hd(Ev,{context:e}),(null===(t=o)||void 0===t?void 0:t.signature)?Hd(eh,{alignment:\"center\",center:!0,children:Hd(Dh,{href:Fh(i,\"tx\",null===(n=o)||void 0===n?void 0:n.signature),children:a(\"send.confirmation.viewTransaction\")})}):null]})})},\"transaction-failure\":({context:e})=>{const{preferences:t}=e,n=ph(t.locale),{tokenSymbol:r}=vv(e),o=mv(e);return Hd(Xd,{children:Jd(eh,{children:[Hd(eh,{children:null}),Hd(Sv,{title:n(\"send.transaction-failure.title\"),subtitle:n(\"send.transaction-failure.subtitle\",{amount:o??\"0\",tokenSymbol:r}),iconSrc:'\u003Csvg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\\n\u003Cpath d=\"M40.8277 29.5283L29.7931 8.40143C28.3104 5.55884 26.2586 4 24 4C21.7414 4 19.6896 5.55884 18.2069 8.40143L7.17228 29.5283C5.77572 32.2241 5.62055 34.81 6.74125 36.8456C7.86194 38.8813 10.0689 40 12.9654 40H35.0346C37.9311 40 40.1381 38.8813 41.2588 36.8456C42.3795 34.81 42.2243 32.2058 40.8277 29.5283ZM22.7069 16.8375C22.7069 16.0856 23.2931 15.462 24 15.462C24.7069 15.462 25.2931 16.0856 25.2931 16.8375V26.0071C25.2931 26.759 24.7069 27.3826 24 27.3826C23.2931 27.3826 22.7069 26.759 22.7069 26.0071V16.8375ZM25.2241 32.811C25.1379 32.8844 25.0517 32.9577 24.9655 33.0311C24.8621 33.1044 24.7586 33.1595 24.6552 33.1961C24.5517 33.2511 24.4483 33.2878 24.3276 33.3062C24.2241 33.3245 24.1034 33.3428 24 33.3428C23.8965 33.3428 23.7759 33.3245 23.6552 33.3062C23.5517 33.2878 23.4483 33.2511 23.3448 33.1961C23.2414 33.1595 23.1379 33.1044 23.0345 33.0311C22.9483 32.9577 22.8621 32.8844 22.7759 32.811C22.4655 32.4626 22.2758 31.9857 22.2758 31.5089C22.2758 31.0321 22.4655 30.5553 22.7759 30.2068C22.8621 30.1335 22.9483 30.0601 23.0345 29.9868C23.1379 29.9134 23.2414 29.8584 23.3448 29.8217C23.4483 29.7667 23.5517 29.73 23.6552 29.7117C23.8793 29.6567 24.1207 29.6567 24.3276 29.7117C24.4483 29.73 24.5517 29.7667 24.6552 29.8217C24.7586 29.8584 24.8621 29.9134 24.9655 29.9868C25.0517 30.0601 25.1379 30.1335 25.2241 30.2068C25.5345 30.5553 25.7241 31.0321 25.7241 31.5089C25.7241 31.9857 25.5345 32.4626 25.2241 32.811Z\" fill=\"#BF5208\"/>\\n\u003C/svg>\\n'}),Hd(Ev,{context:e})]})})}},Iv=({context:e,inputToAddress:t,inputAmount:n})=>{const r=e.stage??\"send-form\";return Hd(kv[r],{context:e,inputToAddress:t,inputAmount:n})};function Tv(e,t,n){var r;return n[e]?(null===(r=n[e])||void 0===r?void 0:r.map((e=>e(t))).find((e=>null!==e)))??null:null}function Ov(e){const t=Pv(e),n={[dv.SourceAccountSelector]:e.fromAccountId,[dv.AmountInput]:e.amount,[dv.DestinationAccountInput]:e.toAddress};return Object.entries(t).every((([e,t])=>{const r=n[e];return!!r&&t.every((e=>null===e(r)))}))}const Cv=(e,t)=>{const n=ph(t);return t=>{const r=\"\"===t?{message:n(e),value:t}:null;return r?{message:r.message,value:t}:null}},Bv=(e,t)=>{const n=ph(t);return t=>{try{return Bs(t),null}catch{return{message:n(e),value:t}}}},Rv=e=>{const{minimumBalanceForRentExemptionSol:t,preferences:{locale:n},feeEstimatedInSol:r}=e,o=ph(n);return n=>{if(\"\"===n)return{message:\"\",value:n};const i=mv({...e,amount:n}),a=Mh(i??\"0\"),s=wv(e),c=Mh(s),u=Mh(r??\"0\"),l=Mh(t??\"0\");if(a.isZero())return{message:\"\",value:n};if(a.gt(c))return{message:o(\"send.insufficientBalance\"),value:n};const f=(e=>wv({...e,tokenCaipId:tc[e.scope].nativeToken.caip19Id}))(e),d=Mh(f);if(d.isZero())return{message:o(\"send.insuffientSolToCoverFee\"),value:n};if(bv(e)){if(a.lt(l))return{message:o(\"send.amountGreatherThanMinimumBalanceForRentExemptionError\",{minimumValue:t}),value:n};if(a.plus(u).plus(l).gt(c))return{message:o(\"send.insuffientSolToCoverFee\"),value:n}}else{if(u.plus(l).gt(d))return{message:o(\"send.insuffientSolToCoverFee\"),value:n}}return null}},jv=te({scope:J([...Object.values(Zs)]),account:nc,assetId:ne(ti)}),Pv=e=>({[dv.SourceAccountSelector]:[Cv(\"send.fromRequiredError\",e.preferences.locale)],[dv.AmountInput]:[Rv(e),Cv(\"send.amountRequiredError\",e.preferences.locale)],[dv.DestinationAccountInput]:[Cv(\"send.toRequiredError\",e.preferences.locale),Bv(\"send.toInvalidError\",e.preferences.locale)]}),Nv={scope:Zs.Mainnet,fromAccountId:\"\",amount:\"\",toAddress:\"\",feeEstimatedInSol:\"0\",feePaidInSol:\"0\",tokenCaipId:Ys.SolMainnet,accounts:[],currencyType:hv.TOKEN,validation:{},balances:{},assets:[],tokenPrices:{},selectedTokenMetadata:null,tokenPricesFetchStatus:\"initial\",preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!0,useNftDetection:!0},error:null,buildingTransaction:!1,transactionMessage:null,transaction:null,stage:\"send-form\",minimumBalanceForRentExemptionSol:\"0.002\",loading:!0},Lv={...{[tv.RefreshSend]:async()=>{const[e,t,n]=await Promise.all([Om.getKey(\"assets\"),Om.getKey(\"mapInterfaceNameToId\"),Lf().catch((()=>Nv.preferences))]);try{zl.info(`[${tv.RefreshSend}] Cronjob triggered`);const o=Object.values(e??{}).flatMap((e=>Object.keys(e)));let i={};try{i=await Lm.getMultipleSpotPrices(o,n.currency),await Om.setKey(\"tokenPrices\",i),zl.info(`[${tv.RefreshSend}] ✅ Token prices were properly refreshed and saved in the state.`)}catch(e){zl.info({error:e},`[${tv.RefreshSend}] ❌ Could not update the token prices in the state.`)}try{var r;const e=null===(r=t)||void 0===r?void 0:r[Cf];if(e){const t=await Mf(e);if(\"transaction-confirmation\"!==t.stage)return void zl.info(`[${tv.RefreshSend}] ❌ Not in transaction confirmation stage`);if(!t.assets)return void zl.info(`[${tv.RefreshSend}] ❌ No assets found`);const n={...t,tokenPrices:{...t.tokenPrices,...i}};await jf(e,Hd(Iv,{context:n}),n)}}catch(e){zl.info({error:e},`[${tv.RefreshSend}] ❌ Could not update the interface`)}zl.info(`[${tv.RefreshSend}] ✅ Cronjob suceeded`)}catch(e){zl.info({error:e},`[${tv.RefreshSend}] ❌ Cronjob failed`)}},[tv.RefreshConfirmationEstimation]:async()=>{try{zl.info(`[${tv.RefreshConfirmationEstimation}] Cronjob triggered`);const n=(await Om.getKey(\"mapInterfaceNameToId\")??{})[Bf];try{if(n){var e,t;const r=await Mf(n);if(!((null===(e=r.account)||void 0===e?void 0:e.address)&&r.transaction&&r.scope&&r.method))return void zl.info(`[${tv.RefreshConfirmationEstimation}] Context is missing required fields`);if(!(null===(t=r.preferences)||void 0===t?void 0:t.simulateOnChainActions))return void zl.info(`[${tv.RefreshConfirmationEstimation}] Transaction simulation is disabled in preferences`);const o={...r,scanFetchStatus:\"fetching\"};await jf(n,Hd(Xh,{context:o}),o);const i=await Fm.scan};԰�Transaction({method:r.method,accountAddress:r.account.address,transaction:r.transaction,scope:r.scope,origin:r.origin}),a={...await Mf(n),scanFetchStatus:\"fetched\",scan:i};zl.info(`[${tv.RefreshConfirmationEstimation}] New scan fetched`),await jf(n,Hd(Xh,{context:a}),a)}zl.info(`[${tv.RefreshConfirmationEstimation}] Cronjob suceeded`)}catch(e){if(!n)return void zl.info(`[${tv.RefreshConfirmationEstimation}] No interface context found`);const t={...await Mf(n),scanFetchStatus:\"fetched\"};await jf(n,Hd(Xh,{context:t}),t),zl.info({error:e},`[${tv.RefreshConfirmationEstimation}] Could not update the interface. But rolled back status to fetched.`)}}catch(e){zl.info({error:e},`[${tv.RefreshConfirmationEstimation}] Cronjob failed`)}},[tv.ScheduleRefreshAccounts]:async()=>{zl.info(\"[scheduleRefreshAccounts] Cronjob triggered\");const e=await Om.getKey(\"didUpdate\");let t=await Om.getKey(\"refreshAccountsInterval\");t&&e||(t=2*(Math.random()||Number.MIN_VALUE),await Om.setKey(\"refreshAccountsInterval\",t),await Om.setKey(\"didUpdate\",!0)),await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:`PT${t}M`,request:{method:np.OnAccountsRefresh,params:{}}}}),zl.info(`[scheduleRefreshAccounts] Scheduling next refresh in ${t} minutes`)}},...ev},Mv={[rd.StartSendTransactionFlow]:async({request:e})=>{const{params:t}=e;L(t,jv);const{scope:n,account:r}=t,o=t.assetId??tc[n].nativeToken.caip19Id,i={...Nv,scope:n,fromAccountId:r,tokenCaipId:o,loading:!0},[a,s]=await Promise.all([Om.get(),Lf().catch((()=>Nv.preferences))]),{assets:c,keyringAccounts:u,tokenPrices:l}=a;i.balances=function({scope:e,balances:t}){return Object.fromEntries(Object.entries(t).map((([t,n])=>[t,Object.fromEntries(Object.entries(n).filter((([t,n])=>{const r=t===tc[e].nativeToken.caip19Id,o=t.startsWith(e),i=\"0\"!==n.amount;return r||o&&i})))])))}({scope:n,balances:c});const f=c[i.fromAccountId]??{};i.assets=Object.keys(f),i.accounts=Object.values(u),i.preferences=s,i.tokenPrices=l??{};const d=await Rf(Hd(Iv,{context:i}),i),h=Nf(d),p=Mm.getTokensMetadata([i.tokenCaipId]).then((e=>{var t,n;const r=e[i.tokenCaipId];(null===(t=r)||void 0===t?void 0:t.symbol)&&(null===(n=r)||void 0===n?void 0:n.name)&&(i.selectedTokenMetadata={symbol:r.symbol,name:r.name,asset:i.tokenCaipId,imageSvg:null})})).catch((()=>null));let g;i.preferences.useExternalPricingData?g=Lm.getMultipleSpotPrices(i.assets,i.preferences.currency).then((e=>{i.tokenPrices={...i.tokenPrices,...e},i.tokenPricesFetchStatus=\"fetched\"})).catch((()=>{i.tokenPricesFetchStatus=\"error\"})):i.tokenPricesFetchStatus=\"fetched\";const m=Bm.getRpc(n).getMinimumBalanceForRentExemption(BigInt(0)).send().then((e=>{i.minimumBalanceForRentExemptionSol=Lh(e).toString()})).catch((()=>{}));return i.loading=!0,await jf(d,Hd(Iv,{context:i}),i),i.loading=!1,await Promise.all([g,p,m]),await jf(d,Hd(Iv,{context:i}),i),await Om.setKey(`mapInterfaceNameToId.${Cf}`,d),h},[rd.GetFeeForTransaction]:async({request:e})=>{L(e.params,dc);const{transaction:t,scope:n}=e.params;try{const e=await Rm.getFeeFromBase64StringInLamports(t,n);if(null===e)throw new Error(\"Failed to get fee for transaction\");const r={value:e.toString()};return L(r,hc),r}catch(e){throw zl.error(e),new so(e)}}};const zv=2n**255n-19n,Uv=2n**252n+27742317777372353535851937790883648493n,$v=0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,Dv=0x6666666666666666666666666666666666666666666666666666666666666658n,Fv={a:-1n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,p:zv,n:Uv,h:8,Gx:$v,Gy:Dv},qv=(e=\"\")=>{throw new Error(e)},Wv=e=>\"string\"==typeof e,Kv=(e,t)=>!(e=>e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name)(e)||\"number\"==typeof t&&t>0&&e.length!==t?qv(\"Uint8Array of valid length expected\"):e,Gv=e=>new Uint8Array(e),Vv=(e,t)=>Kv(Wv(e)?ty(e):Gv(Kv(e)),t),Hv=(e,t=zv)=>{let n=e%t;return n>=0n?n:t+n},Jv=e=>e instanceof Zv?e:qv(\"Point expected\");class Zv{constructor(e,t,n,r){this.ex=e,this.ey=t,this.ez=n,this.et=r}static fromAffine(e){return new Zv(e.x,e.y,1n,Hv(e.x*e.y))}static fromHex(e,t=!1){const{d:n}=Fv,r=(e=Vv(e,32)).slice(),o=e[31];r[31]=-129&o;const i=ry(r);!t||0n\u003C=i&&i\u003C2n**256n||qv(\"bad y coord 1\"),t||0n\u003C=i&&i\u003Czv||qv(\"bad y coord 2\");const a=Hv(i*i),s=Hv(a-1n),c=Hv(n*a+1n);let{isValid:u,value:l}=cy(s,c);u||qv(\"bad y coordinate 3\");const f=1n===(1n&l),d=0!=(128&o);return!t&&0n===l&&d&&qv(\"bad y coord 3\"),d!==f&&(l=Hv(-l)),new Zv(l,i,1n,Hv(l*i))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}equals(e){const{ex:t,ey:n,ez:r}=this,{ex:o,ey:i,ez:a}=Jv(e),s=Hv(t*a),c=Hv(o*r),u=Hv(n*a),l=Hv(i*r);return s===c&&u===l}is0(){return this.equals(Qv)}negate(){return new Zv(Hv(-this.ex),this.ey,this.ez,Hv(-this.et))}double(){const{ex:e,ey:t,ez:n}=this,{a:r}=Fv,o=Hv(e*e),i=Hv(t*t),a=Hv(2n*Hv(n*n)),s=Hv(r*o),c=e+t,u=Hv(Hv(c*c)-o-i),l=s+i,f=l-a,d=s-i,h=Hv(u*f),p=Hv(l*d),g=Hv(u*d),m=Hv(f*l);return new Zv(h,p,m,g)}add(e){const{ex:t,ey:n,ez:r,et:o}=this,{ex:i,ey:a,ez:s,et:c}=Jv(e),{a:u,d:l}=Fv,f=Hv(t*i),d=Hv(n*a),h=Hv(o*l*c),p=Hv(r*s),g=Hv((t+n)*(i+a)-f-d),m=Hv(p-h),v=Hv(p+h),y=Hv(d-u*f),w=Hv(g*m),b=Hv(v*y),A=Hv(g*y),S=Hv(m*v);return new Zv(w,b,S,A)}mul(e,t=!0){if(0n===e)return!0===t?qv(\"cannot multiply by 0\"):Qv;if(\"bigint\"==typeof e&&0n\u003Ce&&e\u003CUv||qv(\"invalid scalar, must be \u003C L\"),!t&&this.is0()||1n===e)return this;if(this.equals(Yv))return Iy(e).p;let n=Qv,r=Yv;for(let o=this;e>0n;o=o.double(),e>>=1n)1n&e?n=n.add(o):t&&(r=r.add(o));return n}multiply(e){return this.mul(e)}clearCofactor(){return this.mul(BigInt(Fv.h),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.mul(Uv/2n,!1).double();return Uv%2n&&(e=e.add(this)),e.is0()}toAffine(){const{ex:e,ey:t,ez:n}=this;if(this.equals(Qv))return{x:0n,y:1n};const r=iy(n);return 1n!==Hv(n*r)&&qv(\"invalid inverse\"),{x:Hv(e*r),y:Hv(t*r)}}toRawBytes(){const{x:e,y:t}=this.toAffine(),n=ny(t);return n[31]|=1n&e?128:0,n}toHex(){return ey(this.toRawBytes())}}Zv.BASE=new Zv($v,Dv,1n,Hv($v*Dv)),Zv.ZERO=new Zv(0n,1n,1n,0n);const{BASE:Yv,ZERO:Qv}=Zv,Xv=(e,t)=>e.toString(16).padStart(t,\"0\"),ey=e=>Array.from(e).map((e=>Xv(e,2))).join(\"\"),ty=e=>{const t=e.length;(!Wv(e)||t%2)&&qv(\"hex invalid 1\");const n=Gv(t/2);for(let t=0;t\u003Cn.length;t++){const r=2*t,o=e.slice(r,r+2),i=Number.parseInt(o,16);(Number.isNaN(i)||i\u003C0)&&qv(\"hex invalid 2\"),n[t]=i}return n},ny=e=>ty(Xv(e,64)).reverse(),ry=e=>BigInt(\"0x\"+ey(Gv(Kv(e)).reverse())),oy=(...e)=>{const t=Gv(e.reduce(((e,t)=>e+Kv(t).length),0));let n=0;return e.forEach((e=>{t.set(e,n),n+=e.length})),t},iy=(e,t=zv)=>{(0n===e||t\u003C=0n)&&qv(\"no inverse n=\"+e+\" mod=\"+t);let n=Hv(e,t),r=t,o=0n,i=1n,a=1n,s=0n;for(;0n!==n;){const e=r/n,t=r%n,c=o-a*e,u=i-s*e;r=n,n=t,o=a,i=s,a=c,s=u}return 1n===r?Hv(o,t):qv(\"no inverse\")},ay=(e,t)=>{let n=e;for(;t-- >0n;)n*=n,n%=zv;return n},sy=19681161376707505956807079304988542015446066515923890162744021073123829784752n,cy=(e,t)=>{const n=Hv(t*t*t),r=(e=>{const t=e*e%zv*e%zv,n=ay(t,2n)*t%zv,r=ay(n,1n)*e%zv,o=ay(r,5n)*r%zv,i=ay(o,10n)*o%zv,a=ay(i,20n)*i%zv,s=ay(a,40n)*a%zv,c=ay(s,80n)*s%zv,u=ay(c,80n)*s%zv,l=ay(u,10n)*o%zv;return{pow_p_5_8:ay(l,2n)*e%zv,b2:t}})(e*Hv(n*n*t)).pow_p_5_8;let o=Hv(e*n*r);const i=Hv(t*o*o),a=o,s=Hv(o*sy),c=i===e,u=i===Hv(-e),l=i===Hv(-e*sy);return c&&(o=a),(u||l)&&(o=s),1n===(1n&Hv(o))&&(o=Hv(-o)),{isValid:c||u,value:o}},uy=e=>Hv(ry(e),Uv);let ly;const fy=(...e)=>Ey.sha512Async(...e),dy=(...e)=>\"function\"==typeof ly?ly(...e):qv(\"etc.sha512Sync not set\"),hy=e=>{const t=e.slice(0,32);t[0]&=248,t[31]&=127,t[31]|=64;const n=e.slice(32,64),r=uy(t),o=Yv.mul(r),i=o.toRawBytes();return{head:t,prefix:n,scalar:r,point:o,pointBytes:i}},py=e=>fy(Vv(e,32)).then(hy),gy=e=>hy(dy(Vv(e,32))),my=e=>py(e).then((e=>e.pointBytes));function vy(e,t){return e?fy(t.hashable).then(t.finish):t.finish(dy(t.hashable))}const yy=(e,t,n)=>{const{pointBytes:r,scalar:o}=e,i=uy(t),a=Yv.mul(i).toRawBytes();return{hashable:oy(a,r,n),finish:e=>{const t=Hv(i+uy(e)*o,Uv);return Kv(oy(a,ny(t)),64)}}},wy=async(e,t)=>{const n=Vv(e),r=await py(t),o=await fy(r.prefix,n);return vy(!0,yy(r,o,n))},by={zip215:!0},Ay=(e,t,n,r=by)=>{t=Vv(t),e=Vv(e,64);const{zip215:o}=r;let i,a,s,c,u=new Uint8Array;try{i=Zv.fromHex(n,o),a=Zv.fromHex(e.slice(0,32),o),s=ry(e.slice(32,64)),c=Yv.mul(s,!1),u=oy(a.toRawBytes(),i.toRawBytes(),t)}catch(e){}return{hashable:u,finish:e=>{if(null==c)return!1;if(!o&&i.isSmallOrder())return!1;const t=uy(e);return a.add(i.mul(t,!1)).add(c.negate()).clearCofactor().is0()}}},Sy=async(e,t,n,r=by)=>vy(!0,Ay(e,t,n,r)),xy=()=>\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,Ey={bytesToHex:ey,hexToBytes:ty,concatBytes:oy,mod:Hv,invert:iy,randomBytes:(e=32)=>{const t=xy();return t&&t.getRandomValues||qv(\"crypto.getRandomValues must be defined\"),t.getRandomValues(Gv(e))},sha512Async:async(...e)=>{const t=xy();t&&t.subtle||qv(\"crypto.subtle or etc.sha512Async must be defined\");const n=oy(...e);return Gv(await t.subtle.digest(\"SHA-512\",n.buffer))},sha512Sync:void 0};Object.defineProperties(Ey,{sha512Sync:{configurable:!1,get:()=>ly,set(e){ly||(ly=e)}}});const _y={getExtendedPublicKeyAsync:py,getExtendedPublicKey:gy,randomPrivateKey:()=>Ey.randomBytes(32),precompute:(e=8,t=Yv)=>(t.multiply(3n),t)};let ky;const Iy=e=>{const t=ky||(ky=(()=>{const e=[];let t=Yv,n=t;for(let r=0;r\u003C33;r++){n=t,e.push(n);for(let r=1;r\u003C128;r++)n=n.add(t),e.push(n);t=n.double()}return e})()),n=(e,t)=>{let n=t.negate();return e?n:t};let r=Qv,o=Yv;const i=BigInt(255),a=BigInt(8);for(let s=0;s\u003C33;s++){const c=128*s;let u=Number(e&i);e>>=a,u>128&&(u-=256,e+=1n);const l=c,f=c+Math.abs(u)-1,d=s%2!=0,h=u\u003C0;0===u?o=o.add(n(d,t[l])):r=r.add(n(h,t[f]))}return{p:r,f:o}};function Ty(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Oy=n(1048).hp;const Cy=\"8d9df0f7-1363-4d2c-8152-ce4ed78f27d8\",By=[48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32];function Ry(e){return Oy.from(e).toString(\"base64\").replace(/\\+/gu,\"-\").replace(/\\//gu,\"_\").replace(/[=]/gu,\"\")}function jy(e){const t=e.replace(/-/gu,\"+\").replace(/_/gu,\"/\");return new Uint8Array(Oy.from(t,\"base64\"))}function Py(e){return\"Ed25519\"===e||\"object\"==typeof e&&\"Ed25519\"===e.name}function Ny(){const{subtle:e}=globalThis.crypto;Object.defineProperty(globalThis,\"isSecureContext\",{value:!0,writable:!0,configurable:!0}),Object.defineProperty(e,\"generateKey\",{value:async(...e)=>Py(e[0])?await async function(e,t,n){const r=_y.randomPrivateKey(),o=await my(r),i=Array.from(n);return{privateKey:{algorithm:{name:\"Ed25519\"},extractable:t,type:\"private\",usages:i,[Cy]:r},publicKey:{algorithm:{name:\"Ed25519\"},extractable:!0,type:\"public\",usages:i,[Cy]:o}}}(...e):await globalThis.crypto.subtle.generateKey(...e),writable:!0,configurable:!0}),Object.defineProperty(e,\"exportKey\",{value:async(...e)=>Py(e[1].algorithm)?await async function(e,t){if(!t.extractable)throw new DOMException(\"key is not extractable\",\"InvalidAccessException\");const n=t[Cy];switch(e){case\"raw\":if(\"public\"!==t.type)throw new DOMException(\"Unable to export a raw Ed25519 private key\",\"InvalidAccessError\");return n.buffer;case\"pkcs8\":if(\"private\"!==t.type)throw new DOMException(\"Unable to export a pkcs8 Ed25519 public key\",\"InvalidAccessError\");return new Uint8Array([...By,...n]).buffer;case\"jwk\":{const e={crv:\"Ed25519\",ext:t.extractable,key_ops:t.usages,kty:\"OKP\"};if(\"private\"===t.type){const t=await my(n);return Object.freeze({...e,d:Ry(n),x:Ry(t)})}return Object.freeze({...e,x:Ry(n)})}case\"spki\":{if(\"public\"!==t.type)throw new DOMException(\"Only public keys can be exported as SPKI\",\"InvalidAccessError\");const e=new Uint8Array([48,5,6,3,43,101,112]),r=new Uint8Array([3,n.length+1,0,...n]);return new Uint8Array([48,e.length+r.length,...e,...r]).buffer}default:throw new Error(`Unsupported export format: ${e}`)}}(...e):await globalThis.crypto.subtle.exportKey(...e),writable:!0,configurable:!0}),Object.defineProperty(e,\"sign\",{value:async(...e)=>{const[t,n]=e;return Py(t)&&Py(n.algorithm)?await async function(e,t,n){if(\"private\"!==t.type)throw new DOMException(\"Key is not private\",\"NotAllowedError\");if(!t.usages.includes(\"sign\"))throw new DOMException(\"Key usage not allowed\",\"NotAllowedError\");const r=Ty(n),o=t[Cy],i=function(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteLength)}(await wy(r,o));return i}(...e):await globalThis.crypto.subtle.sign(...e)},writable:!0,configurable:!0}),Object.defineProperty(e,\"verify\",{value:async(...e)=>{const[t,n]=e;return Py(t)&&Py(n.algorithm)?await async function(e,t,n,r){if(\"public\"!==t.type)throw new DOMException(\"Key is not public\",\"NotAllowedError\");if(!t.usages.includes(\"verify\"))throw new DOMException(\"Key usage not allowed\",\"NotAllowedError\");const o=Ty(n),i=Ty(r),a=t[Cy];return await Sy(o,i,a)}(...e):await globalThis.crypto.subtle.verify(...e)},writable:!0,configurable:!0}),Object.defineProperty(e,\"importKey\",{value:async(...e)=>Py(e[2])?await async function(e,t,n,r,o){const i=Array.from(o);switch(e){case\"raw\":{const e=Ty(t);if(32!==e.length)throw new DOMException(\"Ed25519 raw keys must be exactly 32-bytes\",\"DataError\");return{algorithm:{name:\"Ed25519\"},extractable:r,type:\"public\",usages:i.filter((e=>\"verify\"===e)),[Cy]:e}}case\"pkcs8\":{const e=Ty(t);if(48!==e.length)throw new DOMException(\"Invalid PKCS8 key data length\",\"DataError\");if(!e.slice(0,16).every(((e,t)=>e===By[t])))throw new DOMException(\"Invalid PKCS8 header\",\"DataError\");return{algorithm:{name:\"Ed25519\"},extractable:r,type:\"private\",usages:i.filter((e=>\"sign\"===e)),[Cy]:e.slice(16)}}case\"jwk\":{const e=t;if(\"OKP\"!==e.kty||\"Ed25519\"!==e.crv)throw new DOMException(\"Invalid Ed25519 JWK\",\"DataError\");const n=\"d\"in e?\"private\":\"public\";if(\"public\"===n&&!e.x)throw new DOMException(\"Ed25519 JWK is missing public key\",\"DataError\");if(!(\"private\"!==n||e.d&&e.x))throw new DOMException(\"Ed25519 JWK is missing key data\",\"DataError\");const o=\"private\"===n?e.d:e.x;return{algorithm:{name:\"Ed25519\"},extractable:r,type:n,usages:i.filter((e=>\"private\"===n?\"sign\"===e:\"verify\"===e)),[Cy]:jy(o)}}case\"spki\":{const e=Ty(t);if(48!==e[0])throw new DOMException(\"Invalid SPKI format\",\"DataError\");const n=2;if(48!==e[n]||6!==e[n+2]||3!==e[n+3]||43!==e[n+4]||101!==e[n+5]||112!==e[n+6])throw new DOMException(\"Not an Ed25519 key\",\"DataError\");const r=n+7+2;return{algorithm:{name:\"Ed25519\"},extractable:!0,type:\"public\",usages:i.filter((e=>\"verify\"===e)),[Cy]:e.slice(r)}}default:throw new Error(`Unsupported import format: ${e}`)}}(...e):await globalThis.crypto.subtle.importKey(...e),writable:!0,configurable:!0})}const Ly=async e=>Promise.resolve().then(e);Error;function My(e){return[io,ho,xo,po,ho,go,mo,vo,yo,wo,bo,Ao,So,so,co,uo,lo,fo].some((t=>e instanceof t))}const zy=uu(5000n);class Uy{#X;constructor(e){this.#X=e}#ee(){const e=this.#X.getComputeUnitLimit(),t=this.#X.getComputeUnitPriceMicroLamportsPerComputeUnit();return lu(e,(e=>qo(e)),(e=>e.multipliedBy(t.toString())),(e=>e.dividedToIntegerBy(Hs.toString())),(e=>e.toString()),BigInt,uu)}getFee(){const e=this.#ee();return uu(zy+e)}}var $y=n(4255),Dy=n.n($y),Fy=n(3804),qy=n.n(Fy);class Wy extends Error{constructor(e=\"Operation cancelled\"){super(e),this.name=\"CancellationError\"}}const Ky=async e=>{const{fromAccountId:t,tokenCaipId:n,scope:r,toAddress:o}=e,i=mv(e),a=await Wm.getAccountOrThrow(t);if(!o||!i)throw new Error(\"Invalid transaction parameters\");const s=n===tc[r].nativeToken.caip19Id,c=s?jm:Pm,u=new Uy(c),l={from:a,to:Bs(o),amount:i,network:r,...s?{}:{mint:Bs(oi(n).assetReference)}},f=await c.buildTransactionMessage(l),d=await(async e=>lu(e,Fu,Pu().encode,As().decode))(f);return{feeInLamports:u.getFee(),base64EncodedTransactionMessage:d}},Gy=qy()((async(e,t)=>{try{if(!Ov(t))return;const n={buildingTransaction:!0,transactionMessage:null,feeEstimatedInSol:null};await jf(e,Hd(Iv,{context:{...t,...n}}),{...t,...n});const{feeInLamports:r,base64EncodedTransactionMessage:o}=await Ky(t),i={transactionMessage:o,feeEstimatedInSol:r?Lh(r).toString():null,buildingTransaction:!1},a=await Mf(e);await jf(e,Hd(Iv,{context:{...a,...i}}),{...a,...i})}catch(t){zl.error(\"Could not build the send transaction\",t);const n={error:{title:\"send.simulationTitleError\",message:\"send.simulationMessageError\"},transactionMessage:null,feeEstimatedInSol:null,buildingTransaction:!1},r=await Mf(e);await jf(e,Hd(Iv,{context:{...r,...n}}),{...r,...n})}}),(function(e){const t=(e=>(...t)=>{const n=new AbortController,r=[...t];r.some((e=>e instanceof AbortSignal))||r.push(n.signal);const o=Promise.race([e(...r),new Promise(((e,t)=>{n.signal.addEventListener(\"abort\",(()=>{t(new Wy)}))}))]);return o.cancel=()=>n.abort(),o})(e);let n=null;return async(...e)=>{if(n&&\"function\"==typeof n.cancel){const e=\"Cancelling previous task\";console.warn(e),n.cancel()}const r=t(...e);n=r;try{return await r}finally{n===r&&(n=null)}}}),Dy()(500));const Vy={[dv.BackButton]:async function({id:e}){await Pf(e,!1),await Om.deleteKey(`mapInterfaceNameToId.${Cf}`)},[dv.SourceAccountSelector]:async function({id:e,event:t,context:n}){n.fromAccountId=t.value,n.error=null,n.validation[dv.SourceAccountSelector]=Tv(dv.SourceAccountSelector,n.fromAccountId,Pv(n)),n.amount&&(n.validation[dv.AmountInput]=Tv(dv.AmountInput,n.amount,Pv(n))),await jf(e,Hd(Iv,{context:n}),n),await Gy(e,n)},[dv.AmountInput]:async function({id:e,event:t,context:n}){var r,o;const i={...n};i.amount=t.value,i.error=null;const a=Tv(dv.AmountInput,i.amount,Pv(i));if(a&&(null===(r=i.validation[dv.AmountInput])||void 0===r?void 0:r.message)!==(null===(o=a)||void 0===o?void 0:o.message))return i.validation[dv.AmountInput]=a,void await jf(e,Hd(Iv,{context:i}),i);null===a&&(i.validation[dv.AmountInput]=null,await jf(e,Hd(Iv,{context:i}),i),await Gy(e,i))},[dv.AssetSelector]:async function({id:e,event:t,context:n}){if(\"object\"!=typeof t.value||!(\"asset\"in t.value))return;const r=t.value.asset;if(n.tokenCaipId===r)return;const o=r===tc[n.scope].nativeToken.caip19Id?jm:Pm,i=new Uy(o).getFee(),a={tokenCaipId:r,feeEstimatedInSol:Lh(i).toString(),selectedTokenMetadata:{symbol:t.value.symbol,name:t.value.name,asset:t.value.asset,imageSvg:null},amount:\"\",error:null},s=(0,ci.merge)(n,a);await jf(e,Hd(Iv,{context:s,inputAmount:\"\"}),s),await Gy(e,n)},[dv.SwapCurrencyButton]:async function({id:e,context:t}){if(t.error=null,t.currencyType=t.currencyType===hv.TOKEN?hv.FIAT:hv.TOKEN,!t.amount)return void await jf(e,Hd(Iv,{context:t}),t);const n=qo(t.amount??\"0\"),{price:r}=t.tokenPrices[t.tokenCaipId]??{price:0};t.currencyType===hv.TOKEN&&(t.amount=n.dividedBy(r).toString()),t.currencyType===hv.FIAT&&(t.amount=n.multipliedBy(r).toString()),await jf(e,Hd(Iv,{context:t,inputAmount:t.amount}),t)},[dv.MaxAmountButton]:async function({id:e,context:t}){const{currencyType:n,minimumBalanceForRentExemptionSol:r,tokenCaipId:o,tokenPrices:i}=t,a={...t},s=wv(t);if(bv(t)){const e=Mh(s),t=new Uy(jm).getFee().toString(),n=Mh(r),o=e.minus(t).minus(n).minus(1),i=qo.maximum(o,qo(0)),c=Lh(i);a.amount=c.toString()}else a.amount=s;if(n===hv.FIAT){const{price:e}=i[o]??{price:0};a.amount=Yh(a.amount,e)}a.error=null,a.validation[dv.AmountInput]=Tv(dv.AmountInput,a.amount,Pv(a)),await jf(e,Hd(Iv,{context:a,inputAmount:a.amount}),a),await Gy(e,a)},[dv.DestinationAccountInput]:async function({id:e,event:t,context:n}){const r={...n};r.toAddress=t.value,r.error=null;const o=Tv(dv.DestinationAccountInput,r.toAddress,Pv(r));r.validation[dv.DestinationAccountInput]=o,await jf(e,Hd(Iv,{context:r}),r),null===o&&await Gy(e,r)},[dv.ClearButton]:async function({id:e,context:t}){t.toAddress=\"\",t.error=null,await jf(e,Hd(Iv,{context:t,inputToAddress:t.toAddress}),t)},[dv.CancelButton]:async function({id:e}){await Pf(e,!1),await Om.deleteKey(`mapInterfaceNameToId.${Cf}`)},[dv.SendButton]:async function({id:e,context:t}){var n;if(!Ov(t))return;const r={...t};r.stage=\"transaction-confirmation\",r.loading=!0,await jf(e,Hd(Iv,{context:r}),r);const[o,i]=await Promise.all([Lm.getMultipleSpotPrices(t.assets,t.preferences.currency).then((e=>e)).catch((()=>null)),t.selectedTokenMetadata?Mm.generateImageComponent(vc({baseUrl:Tm.get().staticApi.baseUrl,path:\"/api/v2/tokenIcons/assets/{assetId}.png\",pathParams:{assetId:null===(n=t.selectedTokenMetadata)||void 0===n?void 0:n.asset.replace(/:/gu,\"/\")}})):null]);o&&i&&(r.tokenPrices=o,r.selectedTokenMetadata=t.selectedTokenMetadata?{...t.selectedTokenMetadata,imageSvg:i}:null),r.loading=!1,await jf(e,Hd(Iv,{context:r}),r),await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionAdded,params:{accountId:t.fromAccountId,base64EncodedTransaction:t.transactionMessage,scope:t.scope}}}})}};const Hy={[_v.BackButton]:async function({id:e,context:t}){const n={...t,stage:\"send-form\"};await jf(e,Hd(Iv,{context:n,inputAmount:t.amount??\"\",inputToAddress:t.toAddress??\"\"}),n)},[_v.CancelButton]:async function({id:e,context:t}){const{fromAccountId:n,transactionMessage:r,scope:o}=t;await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionRejected,params:{accountId:n,base64EncodedTransaction:r,scope:o}}}}),await Pf(e,!1),await Om.deleteKey(`mapInterfaceNameToId.${Cf}`)},[_v.ConfirmButton]:async function({id:e,context:t}){const{scope:n,fromAccountId:r,feeEstimatedInSol:o,transactionMessage:i}=t;if(t.error=null,!i)return t.stage=\"send-form\",void await jf(e,Hd(Iv,{context:t}),t);await snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:\"PT1S\",request:{method:np.OnTransactionApproved,params:{accountId:t.fromAccountId,base64EncodedTransaction:t.transactionMessage,scope:t.scope}}}});const a={...t,stage:\"send-pending\"};await jf(e,Hd(Iv,{context:a}),a);let s=null;try{const e=await Wm.getAccountOrThrow(r);s=(await Dm.signAndSendTransaction(e,{id:globalThis.crypto.randomUUID(),scope:n,account:r,origin:\"snap\",request:{method:qt.SignAndSendTransaction,params:{transaction:i,scope:n,account:{address:\"\"}}}})).signature}catch(e){zl.error({error:e},\"Error submitting request\")}const c={...t,stage:s?\"transaction-success\":\"transaction-failure\",feePaidInSol:o,transaction:{result:s?\"success\":\"failure\",signature:s}};await jf(e,Hd(Iv,{context:c}),c)}};Object.defineProperty(globalThis,\"DOMException\",{value:Error,writable:!0,configurable:!0,enumerable:!0}),Ny(),Object.defineProperty(globalThis,\"queueMicrotask\",{value:Ly,writable:!0,configurable:!0,enumerable:!0}),qo.config({EXPONENTIAL_AT:16});const Jy=async({origin:e,request:t})=>{try{zl.log(\"[🔄 onRpcRequest]\",t.method,t);const{method:n}=t;gd(e,n);const r=Mv[n];if(!r)throw new ho(`RpcRequest method ${n} not found. Available methods: ${Object.values(rd).toString()}`);return r({origin:e,request:t})}catch(e){let t=e;throw My(e)||(t=new io(e)),zl.error(`onRpcRequest error: ${JSON.stringify(t.toJSON(),null,2)}`),t}},Zy=async({origin:e,request:t})=>{try{return zl.log(\"[🔑 onKeyringRequest]\",t.method,t),gd(e,t.method),t.method===Jt.SubmitRequest&&t.params&&!(\"origin\"in t.params)&&(t.params.origin=\"https://metamask.io\"),await yn(Wm,t)}catch(e){let n=e;throw My(e)||(n=new io(e)),zl.error(`onKeyringRequest - ${t.method} - Error: ${JSON.stringify(n.toJSON(),null,2)}`),n}},Yy=async({id:e,event:t,context:n})=>{if(zl.log(\"[👇 onUserInput]\",e,t),!t.name)return;const r={...Vy,...Hy,...$h,...Ph,...Bh}[t.name];r&&await r({id:e,event:t,context:n,snapContext:Vm})},Qy=async({request:e})=>{zl.log(\"[⏱️ onCronjob]\",e.method,e);const{method:t}=e;L(t,J([...Object.values(tv),...Object.values(np)]));const{locked:n,active:r}=await async function(){return await snap.request({method:\"snap_getClientStatus\"})}();if(zl.log(\"[🔑 onCronjob] Client status\",{locked:n,active:r}),n)return Promise.resolve();if(!1===r){const e=await Om.getKey(\"lastCronjobRun\"),t=18e5;if(zl.log(\"[🔑 onCronjob] Last cronjob run\",{lastCronjobRun:e}),e&&Date.now()-e\u003Ct)return zl.log(\"[🔑 onCronjob] Skipping cronjob because it has been run in the last 30 minutes\"),Promise.resolve()}await Om.setKey(\"lastCronjobRun\",Date.now()),zl.log(\"[🔑 onCronjob] Running cronjob\",{method:t});return(0,Lv[t])({request:e})},Xy=async e=>{const{assets:t}=e;return{assets:await Nm.getTokenMetadataFromAddresses(t)}},ew=async e=>{try{zl.log(\"[💱 onAssetsConversion]\",e);const{conversions:t,includeMarketData:n}=e;return{conversionRates:await Km.getMultipleTokenConversions(t,n)}}catch(e){throw zl.error(\"[💱 onAssetsConversion]\",e),new so(e)}},tw=async({scope:e,request:t})=>{switch(L(e,fc),t.method){case Xf.GetGenesisHash:return L(t,ed),Bm.getRpc(e).getGenesisHash().send();case Xf.GetLatestBlockhash:L(t,td);return(await Bm.getRpc(e).getLatestBlockhash().send()).value.blockhash;case Xf.GetMinimumBalanceForRentExemption:L(t,nd);return(await Bm.getRpc(e).getMinimumBalanceForRentExemption(BigInt(t.params[0]),t.params[1]).send()).toString();default:throw new Error(`Unsupported method: ${t.method}`)}},nw=async e=>{try{zl.log(\"[📈 onAssetHistoricalPrice]\",e);const{from:t,to:n}=e;L(t,ti),L(n,ti);return{historicalPrice:await Km.getHistoricalPrice(t,n)}}catch(e){return zl.error(\"[📈 onAssetHistoricalPrice]\",e),null}}})(),module.exports=r})();","status":"stopped","version":"1.32.0","versionHistory":[{"date":1.750696483464e+12,"origin":"metamask","version":"1.32.0"}]}},"unencryptedSnapStates":{}},"SnapInsightsController":{},"SnapInterfaceController":{"interfaces":{}},"SnapsRegistry":{"database":null,"databaseUnavailable":false,"lastUpdated":null},"SubjectMetadataController":{"subjectMetadata":{"https://accounts.youtube.com":{"extensionId":null,"iconUrl":null,"name":"accounts.youtube.com","origin":"https://accounts.youtube.com","subjectType":"website"},"https://challenges.cloudflare.com":{"extensionId":null,"iconUrl":null,"name":"Checking your Browser…","origin":"https://challenges.cloudflare.com","subjectType":"website"},"https://chatgpt.com":{"extensionId":null,"iconUrl":"https://cdn.oaistatic.com/assets/favicon-miwirzcw.ico","name":"ChatGPT","origin":"https://chatgpt.com","subjectType":"website"},"https://discord.com":{"extensionId":null,"iconUrl":"https://discord.com/assets/favicon.ico","name":"Discord","origin":"https://discord.com","subjectType":"website"},"https://doxbin.net":{"extensionId":null,"iconUrl":null,"name":"larps4fun | Doxbin","origin":"https://doxbin.net","subjectType":"website"},"https://grok.com":{"extensionId":null,"iconUrl":null,"name":"grok.com","origin":"https://grok.com","subjectType":"website"},"https://md-112.webhostbox.net:2083":{"extensionId":null,"iconUrl":"data:image/x-icon;base64,AAABAAEAICAAAAEAIADSAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAAplJREFUWIXt1j2IHGUYB/DfOzdnjIKFkECIVWIKvUFsIkRExa9KJCLaWAgWJx4DilZWgpDDiI0wiViIoGATP1CCEDYHSeCwUBBkgiiKURQJFiLo4d0eOxYzC8nsO9m9XcXC+8MW+3z+9/l6l2383xH+iSBpElyTdoda26xsDqp/h0CVZ3vwKm7tMBngAs7h7eRYebG6hMtMBHbMBX89vfARHprQ5U8cwdFQlIOZCVR5di1+w/wWXT/EY6EoN5NZCODuKZLDwzgSMCuBe2fwfX6QZwtpWzqfBBtLC3txF/ZhxKbBGx0EfsTJS77vwmGjlZrD4mUzUOXZjVjGI65cnTXchB8iupdDUb7QinsQZ7GzZftdQj2JVZ49iC/w6JjksIo7OnS9tiA5Vn6GtyK2+1MY5NkhfGDygVrBAxH5WkPuMjR7/3UsUFLl2Q68s4XkA3ws3v9zoSjX28Kr5wL1xrTxa6ou+f6OZGvqPg9v1wZeaUjcELE/DVfNhWFSvy/enOIZ9eq1sTokEMNLWI79oirP8g6fXpVnh7GEvY1sV/OJ4f0UhyKKk6EoX4x5pEkgXv6L6OM99YqNw/c4kXSwG5nkIfpLCynuiahW1GWeJHkfT4aiXO9atz1XcD6I6yLyHu6bIPk6Hg9FeYZ63y9EjBarPDvQ8VJ1nd9V3D4m+RncForyxFCQ4hSeahlej88Hefauurdwaufr5z/F/ZHAX6nL+mZE18e36IWiHLkFocqzW9QXcNz1+wUHxJ/f10JRPjvGP4pk/vj5L3F8AtufdD+/p6dJDknzX+05fDLGtife/766t9MRgFCUffWTudwE3AqBlVCUf0xLYGTQqzzbhydwJ3Y34g318J1tmX+DPBTlz9MS2MY2/nP8DTGaqeTDf30rAAAAAElFTkSuQmCC","name":"cPanel Login","origin":"https://md-112.webhostbox.net:2083","subjectType":"website"},"https://metamask.github.io":{"extensionId":null,"iconUrl":null,"name":"MetaMask \u003C = > Ledger Bridge","origin":"https://metamask.github.io","subjectType":"website"},"https://ogs.google.com":{"extensionId":null,"iconUrl":null,"name":"ogs.google.com","origin":"https://ogs.google.com","subjectType":"website"},"https://privacy.sexy":{"extensionId":null,"iconUrl":"https://privacy.sexy/favicon.ico","name":"privacy.sexy - Maximize Your Privacy and Security","origin":"https://privacy.sexy","subjectType":"website"},"https://tpc.googlesyndication.com":{"extensionId":null,"iconUrl":null,"name":"tpc.googlesyndication.com","origin":"https://tpc.googlesyndication.com","subjectType":"website"},"https://vilebin.sh":{"extensionId":null,"iconUrl":null,"name":"twink | Vilebin","origin":"https://vilebin.sh","subjectType":"website"},"https://www.altgenator.com":{"extensionId":null,"iconUrl":"https://www.altgenator.com/favicon.ico","name":"AltGenator - Roblox Account Generator","origin":"https://www.altgenator.com","subjectType":"website"},"https://www.google.com":{"extensionId":null,"iconUrl":null,"name":"reCAPTCHA","origin":"https://www.google.com","subjectType":"website"},"https://www.tiktok.com":{"extensionId":null,"iconUrl":null,"name":"TikTok - Make Your Day","origin":"https://www.tiktok.com","subjectType":"website"},"https://www.youtube.com":{"extensionId":null,"iconUrl":"https://www.youtube.com/s/desktop/6d463d26/img/logos/favicon.ico","name":"YouTube","origin":"https://www.youtube.com","subjectType":"website"},"https://x.com":{"extensionId":null,"iconUrl":"https://abs.twimg.com/favicons/twitter.3.ico","name":"X (formerly Twitter)","origin":"https://x.com","subjectType":"website"},"npm:@metamask/ens-resolver-snap":{"extensionId":null,"iconUrl":null,"name":"Ethereum Name Service resolver","origin":"npm:@metamask/ens-resolver-snap","subjectType":"snap","svgIcon":"\u003Csvg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" height=\"3rem\">\n  \u003Cpath fill=\"url(#ENSWithGradient_svg__a)\"\n        d=\"M4.049 5.663a2.9 2.9 0 0 1 .942-1.038L11.611 0 4.828 11.222s-.592-1.002-.823-1.51a4.8 4.8 0 0 1 .044-4.05m-2.732 7.74a7.55 7.55 0 0 0 2.963 5.489L11.602 24s-4.58-6.606-8.445-13.178a6.6 6.6 0 0 1-.776-2.242 3.6 3.6 0 0 1 0-1.076c-.101.187-.297.57-.297.57a8.7 8.7 0 0 0-.79 2.534c-.077.93-.07 1.867.023 2.796m18.668.89c-.237-.507-.824-1.509-.824-1.509L12.391 24l6.62-4.622c.394-.263.717-.62.942-1.038a4.8 4.8 0 0 0 .044-4.05zm2.688-3.694a7.55 7.55 0 0 0-2.963-5.488L12.4 0s4.577 6.606 8.445 13.179a6.6 6.6 0 0 1 .773 2.24c.054.358.054.72 0 1.077.1-.187.296-.57.296-.57.392-.799.659-1.654.791-2.534.078-.93.07-1.866-.02-2.796z\"/>\n  \u003Cdefs>\n    \u003ClinearGradient id=\"ENSWithGradient_svg__a\" x1=\"15.574\" x2=\"-8.982\" y1=\"26.845\" y2=\"-11.906\"\n                    gradientUnits=\"userSpaceOnUse\">\n      \u003Cstop stop-color=\"#44BCF0\"/>\n      \u003Cstop offset=\"0.428\" stop-color=\"#628BF3\"/>\n      \u003Cstop offset=\"1\" stop-color=\"#A099FF\"/>\n    \u003C/linearGradient>\n  \u003C/defs>\n\u003C/svg>\n","version":"0.1.2"},"npm:@metamask/institutional-wallet-snap":{"extensionId":null,"iconUrl":null,"name":"Institutional Wallet","origin":"npm:@metamask/institutional-wallet-snap","subjectType":"snap","svgIcon":"\u003Csvg width=\"24\" height=\"25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\u003Cpath d=\"M17.037 0H6.975C2.605 0 0 2.617 0 6.987v10.05c0 4.37 2.605 6.975 6.975 6.975h10.05c4.37 0 6.975-2.605 6.975-6.976V6.988C24.012 2.617 21.407 0 17.037 0ZM11.49 17.757c0 .36-.18.684-.492.876a.975.975 0 0 1-.54.156 1.11 1.11 0 0 1-.469-.108l-4.202-2.1a1.811 1.811 0 0 1-.985-1.61v-3.973c0-.36.18-.685.493-.877a1.04 1.04 0 0 1 1.008-.048l4.202 2.101a1.8 1.8 0 0 1 .997 1.609v3.974h-.012Zm-.252-6.423L6.723 8.896a1.045 1.045 0 0 1-.528-.924c0-.384.204-.744.528-.924l4.515-2.438a1.631 1.631 0 0 1 1.524 0l4.515 2.438c.324.18.528.528.528.924s-.204.744-.528.924l-4.515 2.438c-.24.132-.504.192-.768.192a1.54 1.54 0 0 1-.756-.192Zm7.972 3.638c0 .684-.385 1.308-.997 1.608l-4.202 2.101c-.144.072-.3.108-.468.108a.975.975 0 0 1-.54-.156 1.017 1.017 0 0 1-.493-.876v-3.974c0-.684.384-1.309.997-1.609l4.202-2.101a1.04 1.04 0 0 1 1.008.048c.313.192.493.516.493.877v3.974Z\" fill=\"#24272A\"/>\u003C/svg>\n","version":"1.3.1"},"npm:@metamask/message-signing-snap":{"extensionId":null,"iconUrl":null,"name":"Sign in with MetaMask","origin":"npm:@metamask/message-signing-snap","subjectType":"snap","svgIcon":"\u003Csvg width=\"500\" height=\"500\" viewBox=\"0 0 500 500\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\u003Crect width=\"500\" height=\"500\" fill=\"black\"/>\n\u003Cg filter=\"url(#�%�O�filter0_f_8_91)\">\n\u003Cpath d=\"M249.444 373.519C249.444 373.519 364.118 343.192 364.118 257.188L378.333 248.251L364.118 239.314L378.333 230.378L364.118 221.441V203.568V185.695V149.948V114.202L301.639 132.596C267.566 142.628 231.323 142.628 197.25 132.596L134.771 114.202V149.948V167.821V185.695V203.568V221.441L120.556 230.378L134.771 239.314L120.556 248.251L134.771 257.188C134.771 343.192 249.444 373.519 249.444 373.519Z\" fill=\"#F1CA77\"/>\n\u003C/g>\n\u003Cpath d=\"M249.445 406.215C249.445 406.215 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888L249.445 162.179L134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 406.215 249.445 406.215Z\" fill=\"#233447\"/>\n\u003Cpath d=\"M249.445 399.107C249.445 399.107 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888L249.445 162.179L134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 399.107 249.445 399.107Z\" fill=\"#123AF0\"/>\n\u003Cpath d=\"M249.445 392C249.445 392 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888L249.445 162.179L134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 392 249.445 392Z\" fill=\"#CD6116\"/>\n\u003Cpath d=\"M249.445 382.049C249.445 382.049 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888L249.445 162.179L134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 382.049 249.445 382.049Z\" fill=\"#E4751F\"/>\n\u003Cpath d=\"M249.445 370.676C249.445 370.676 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888L249.445 162.179L134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 370.676 249.445 370.676Z\" fill=\"#F6851B\"/>\n\u003Cpath d=\"M249.445 352.196C249.445 352.196 364.118 348.879 364.118 262.874L378.333 253.937L364.118 245.001L378.333 236.064L364.118 227.127V209.254V191.381V155.634V119.888C290.105 147.184 208.784 147.184 134.771 119.888V155.634V173.508V191.381V209.254V227.127L120.556 236.064L134.771 245.001L120.556 253.937L134.771 262.874C134.771 348.879 249.445 352.196 249.445 352.196Z\" fill=\"url(#paint0_linear_8_91)\"/>\n\u003Cdefs>\n\u003Cfilter id=\"filter0_f_8_91\" x=\"94.9674\" y=\"88.6133\" width=\"308.954\" height=\"310.494\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\n\u003CfeFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/>\n\u003CfeBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"/>\n\u003CfeGaussianBlur stdDeviation=\"12.7941\" result=\"effect1_foregroundBlur_8_91\"/>\n\u003C/filter>\n\u003ClinearGradient id=\"paint0_linear_8_91\" x1=\"144.012\" y1=\"132.09\" x2=\"425.482\" y2=\"446.967\" gradientUnits=\"userSpaceOnUse\">\n\u003Cstop stop-color=\"#F1CA77\"/>\n\u003Cstop offset=\"1\" stop-color=\"#F6851B\"/>\n\u003C/linearGradient>\n\u003C/defs>\n\u003C/svg>\n","version":"1.1.2"},"npm:@metamask/solana-wallet-snap":{"extensionId":null,"iconUrl":null,"name":"Solana","origin":"npm:@metamask/solana-wallet-snap","subjectType":"snap","svgIcon":"\u003Csvg width=\"101\" height=\"101\" viewBox=\"0 0 101 101\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\u003Cpath d=\"M100.48 69.3817L83.8068 86.8015C83.4444 87.1799 83.0058 87.4816 82.5185 87.6878C82.0312 87.894 81.5055 88.0003 80.9743 88H1.93563C1.55849 88 1.18957 87.8926 0.874202 87.6912C0.558829 87.4897 0.31074 87.2029 0.160416 86.8659C0.0100923 86.529 -0.0359181 86.1566 0.0280382 85.7945C0.0919944 85.4324 0.263131 85.0964 0.520422 84.8278L17.2061 67.408C17.5676 67.0306 18.0047 66.7295 18.4904 66.5234C18.9762 66.3172 19.5002 66.2104 20.0301 66.2095H99.0644C99.4415 66.2095 99.8104 66.3169 100.126 66.5183C100.441 66.7198 100.689 67.0067 100.84 67.3436C100.99 67.6806 101.036 68.0529 100.972 68.415C100.908 68.7771 100.737 69.1131 100.48 69.3817ZM83.8068 34.3032C83.4444 33.9248 83.0058 33.6231 82.5185 33.4169C82.0312 33.2108 81.5055 33.1045 80.9743 33.1048H1.93563C1.55849 33.1048 1.18957 33.2121 0.874202 33.4136C0.558829 33.6151 0.31074 33.9019 0.160416 34.2388C0.0100923 34.5758 -0.0359181 34.9482 0.0280382 35.3103C0.0919944 35.6723 0.263131 36.0083 0.520422 36.277L17.2061 53.6968C17.5676 54.0742 18.0047 54.3752 18.4904 54.5814C18.9762 54.7875 19.5002 54.8944 20.0301 54.8952H99.0644C99.4415 54.8952 99.8104 54.7879 100.126 54.5864C100.441 54.3849 100.689 54.0981 100.84 53.7612C100.99 53.4242 101.036 53.0518 100.972 52.6897C100.908 52.3277 100.737 51.9917 100.48 51.723L83.8068 34.3032ZM1.93563 21.7905H80.9743C81.5055 21.7907 82.0312 21.6845 82.5185 21.4783C83.0058 21.2721 83.4444 20.9704 83.8068 20.592L100.48 3.17219C100.737 2.90357 100.908 2.56758 100.972 2.2055C101.036 1.84342 100.99 1.47103 100.84 1.13408C100.689 0.79713 100.441 0.510296 100.126 0.308823C99.8104 0.107349 99.4415 1.24074e-05 99.0644 0L20.0301 0C19.5002 0.000878397 18.9762 0.107699 18.4904 0.313848C18.0047 0.519998 17.5676 0.821087 17.2061 1.19848L0.524723 18.6183C0.267681 18.8866 0.0966198 19.2223 0.0325185 19.5839C-0.0315829 19.9456 0.0140624 20.3177 0.163856 20.6545C0.31365 20.9913 0.561081 21.2781 0.875804 21.4799C1.19053 21.6817 1.55886 21.7896 1.93563 21.7905Z\" fill=\"url(#paint0_linear_174_4403)\"/>\n\u003Cdefs>\n\u003ClinearGradient id=\"paint0_linear_174_4403\" x1=\"8.52558\" y1=\"90.0973\" x2=\"88.9933\" y2=\"-3.01622\" gradientUnits=\"userSpaceOnUse\">\n\u003Cstop offset=\"0.08\" stop-color=\"#9945FF\"/>\n\u003Cstop offset=\"0.3\" stop-color=\"#8752F3\"/>\n\u003Cstop offset=\"0.5\" stop-color=\"#5497D5\"/>\n\u003Cstop offset=\"0.6\" stop-color=\"#43B4CA\"/>\n\u003Cstop offset=\"0.72\" stop-color=\"#28E0B9\"/>\n\u003Cstop offset=\"0.97\" stop-color=\"#19FB9B\"/>\n\u003C/linearGradient>\n\u003C/defs>\n\u003C/svg>\n","version":"1.32.0"}}},"SwapsController":{},"TokenBalancesController":{"tokenBalances":{}},"TokenListController":{"preventPollingOnNetworkRestart":false,"tokensChainsCache":{}},"TokenRatesController":{"marketData":{}},"TokensController":{"allDetectedTokens":{},"allIgnoredTokens":{},"allTokens":{}},"TransactionController":{"lastFetchedBlockNumbers":{},"methodData":{},"submitHistory":[],"transactions":[]},"UserOperationController":{"userOperations":{}},"UserStorageController":{"hasAccountSyncingSyncedAtLeastOnce":false,"isAccountSyncingEnabled":true,"isAccountSyncingReadyToBeDispatched":false,"isBackupAndSyncEnabled":true},"config":{},"firstTimeInfo":{"date":1.750696483359e+12,"version":"12.20.0"}}