@multiversx/sdk-dapp 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/UI/DappModal/hooks/index.js +1 -1
- package/UI/DappModal/hooks/useDappModal.js +1 -1
- package/UI/DappModal/index.js +1 -1
- package/UI/ExplorerLink/ExplorerLink.js +1 -1
- package/UI/ExplorerLink/index.js +1 -1
- package/UI/ModalContainer/ModalContainer.js +1 -1
- package/UI/ModalContainer/index.js +1 -1
- package/UI/NotificationModal/index.js +1 -1
- package/UI/SignTransactionsModals/SignTransactionsModals.js +1 -1
- package/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +1 -1
- package/UI/SignTransactionsModals/SignWithDeviceModal/index.js +1 -1
- package/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
- package/UI/SignTransactionsModals/SignWithLedgerModal/index.js +1 -1
- package/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
- package/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
- package/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
- package/UI/SignTransactionsModals/components/TransactionStatusToast.js +1 -1
- package/UI/SignTransactionsModals/components/index.js +1 -1
- package/UI/SignTransactionsModals/index.js +1 -1
- package/UI/TimeAgo/TimeAgo.js +1 -1
- package/UI/TimeAgo/index.js +1 -1
- package/UI/TokenDetails/index.js +1 -1
- package/UI/TransactionDetails/TransactionDetails.js +1 -1
- package/UI/TransactionDetails/components/TransactionDetailsBody.js +1 -1
- package/UI/TransactionDetails/components/index.js +1 -1
- package/UI/TransactionDetails/index.js +1 -1
- package/UI/TransactionInfo/TransactionInfo.js +1 -1
- package/UI/TransactionInfo/components/AddressDetailItem/AddressDetailitem.js +1 -1
- package/UI/TransactionInfo/components/AddressDetailItem/index.js +1 -1
- package/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
- package/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/OperationList.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/DetailedItem.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/OperationBlock.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/OperationRow.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/OperationText.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/OperationToken.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/components/index.js +1 -1
- package/UI/TransactionInfo/components/OperationsList/index.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/ScResultsList.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultHash/ResultHash.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultHash/index.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultReceiver/ResultReceiver.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultReceiver/index.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultSender/ResultSender.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/components/ResultSender/index.js +1 -1
- package/UI/TransactionInfo/components/ScResultsList/index.js +1 -1
- package/UI/TransactionInfo/components/ScrDetailItem/ScrDetailItem.js +1 -1
- package/UI/TransactionInfo/components/ScrDetailItem/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/TransactionAction.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/ActionText/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/ActionToken.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/TransactionActionBlock/components/TransactionActionCollection.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/TransactionActionBlock/components/TransactionActionNft.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/TransactionActionBlock/components/TransactionActionToken.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/TransactionActionBlock/components/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/TransactionActionBlock/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/components/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionAction/index.js +1 -1
- package/UI/TransactionInfo/components/TransactionLogs/TransactionLogs.js +1 -1
- package/UI/TransactionInfo/components/TransactionLogs/index.js +1 -1
- package/UI/TransactionInfo/components/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoAge/TransactionInfoAge.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoAge/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoFee/TransactionInfoFee.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoFee/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoFrom/TransactionInfoFrom.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoFrom/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoMethod/TransactionInfoMethod.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoMethod/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoMiniblock/TransactionInfoMiniblock.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoMiniblock/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoScResults/TransactionInfoScResults.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoScResults/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTo/TransactionInfoTo.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTo/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTokenOperations/TransactionInfoTokenOperations.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTokenOperations/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoValue/TransactionInfoValue.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoValue/index.js +1 -1
- package/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
- package/UI/TransactionInfo/index.js +1 -1
- package/UI/TransactionsTable/TransactionsTable.js +1 -1
- package/UI/TransactionsTable/components/LockedTokenAddressIcon.js +1 -1
- package/UI/TransactionsTable/components/TransactionHash.js +1 -1
- package/UI/TransactionsTable/components/TransactionReceiver.js +1 -1
- package/UI/TransactionsTable/components/TransactionRow.js +1 -1
- package/UI/TransactionsTable/components/TransactionSender.js +1 -1
- package/UI/TransactionsTable/components/TransactionShardsTransition.js +1 -1
- package/UI/TransactionsTable/components/TransactionValue/TransactionValue.js +1 -1
- package/UI/TransactionsTable/components/TransactionValue/index.js +1 -1
- package/UI/TransactionsTable/components/index.js +1 -1
- package/UI/TransactionsTable/index.js +1 -1
- package/UI/TransactionsToastList/TransactionsToastList.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/CustomToast.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/IconToast.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/components/IconToastFooter/IconToastFooter.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/components/IconToastFooter/components/TransactionToastFooter.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/components/IconToastFooter/components/index.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/components/IconToastFooter/index.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/IconToast/index.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/SimpleToast.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/components/index.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/helpers/index.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/helpers/useMemoizedCloseButton.js +1 -1
- package/UI/TransactionsToastList/components/CustomToast/index.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToast/components/TransactionToastContent.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToast/components/index.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
- package/UI/TransactionsToastList/components/TransactionToastGuard.js +1 -1
- package/UI/TransactionsToastList/components/index.js +1 -1
- package/UI/TransactionsToastList/index.js +1 -1
- package/UI/extension/ExtensionLoginButton/index.js +1 -1
- package/UI/index.js +1 -1
- package/UI/ledger/LedgerLoginButton/index.js +1 -1
- package/UI/ledger/LedgerLoginContainer/AddressRow.js +1 -1
- package/UI/ledger/LedgerLoginContainer/AddressTable.js +1 -1
- package/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
- package/UI/ledger/LedgerLoginContainer/index.js +1 -1
- package/UI/ledger/index.js +1 -1
- package/UI/pages/UnlockPage/index.js +1 -1
- package/UI/pages/index.js +1 -1
- package/UI/walletConnect/WalletConnectLoginButton/index.js +1 -1
- package/UI/walletConnect/WalletConnectLoginContainer/index.js +1 -1
- package/UI/walletConnect/index.js +1 -1
- package/UI/webWallet/WebWalletLoginButton/index.js +1 -1
- package/__chunks__/{chunk-3PWOZSFG.js → chunk-6JPAXTK6.js} +2 -2
- package/__chunks__/{chunk-6BKASPUT.js → chunk-7NFQGQ5Q.js} +2 -2
- package/__chunks__/{chunk-IYJJQRS2.js → chunk-JVO3OTWJ.js} +2 -2
- package/__chunks__/{chunk-BHP7MLTJ.js → chunk-PAYBBQDI.js} +2 -2
- package/__chunks__/chunk-Q3JOZ2CP.js +2 -0
- package/__chunks__/chunk-T7D7BT5X.js +2 -0
- package/__chunks__/{chunk-6XBUOELQ.js → chunk-U2L6FONJ.js} +2 -2
- package/__chunks__/{chunk-2BOUSQ3X.js → chunk-VMMI6YPU.js} +2 -2
- package/__chunks__/{chunk-6W5JFCQR.js → chunk-VSFOSOV7.js} +2 -2
- package/__commonjs/UI/DappModal/index.js +2 -2
- package/__commonjs/UI/ModalContainer/ModalContainer.js +2 -2
- package/__commonjs/UI/ModalContainer/index.js +2 -2
- package/__commonjs/UI/NotificationModal/index.js +2 -2
- package/__commonjs/UI/SignTransactionsModals/SignWithExtensionModal/index.js +3 -3
- package/__commonjs/UI/SignTransactionsModals/index.js +21 -21
- package/__commonjs/UI/TimeAgo/TimeAgo.js +2 -2
- package/__commonjs/UI/TimeAgo/index.js +2 -2
- package/__commonjs/UI/TransactionInfo/TransactionInfo.js +22 -22
- package/__commonjs/UI/TransactionInfo/components/OperationsList/OperationList.js +2 -2
- package/__commonjs/UI/TransactionInfo/components/index.js +24 -24
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoAge/TransactionInfoAge.js +4 -4
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoAge/index.js +4 -4
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoFrom/index.js +2 -2
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoScResults/TransactionInfoScResults.js +13 -13
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoScResults/index.js +13 -13
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTo/TransactionInfoTo.js +2 -2
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoTo/index.js +2 -2
- package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/index.js +22 -22
- package/__commonjs/UI/TransactionInfo/index.js +24 -24
- package/__commonjs/UI/TransactionsTable/TransactionsTable.js +8 -8
- package/__commonjs/UI/TransactionsTable/components/LockedTokenAddressIcon.js +2 -2
- package/__commonjs/UI/TransactionsTable/components/TransactionRow.js +9 -9
- package/__commonjs/UI/TransactionsTable/index.js +11 -11
- package/__commonjs/UI/index.js +1 -1
- package/__commonjs/UI/ledger/LedgerLoginContainer/AddressRow.js +3 -3
- package/__commonjs/__mocks__/index.js +1 -1
- package/__commonjs/__mocks__/utils/index.js +1 -1
- package/__commonjs/__mocks__/utils/renderWithProvider.js +1 -1
- package/__commonjs/apiCalls/configuration/index.js +1 -1
- package/__commonjs/apiCalls/transactions/getTransactionsByHashes.js +1 -1
- package/__commonjs/components/ProviderInitializer.js +1 -1
- package/__commonjs/hooks/signMessage/useGetLastSignedMessageSession.js +1 -1
- package/__commonjs/hooks/transactions/index.js +1 -1
- package/__commonjs/hooks/transactions/useGetActiveTransactionsStatus.js +1 -1
- package/__commonjs/hooks/transactions/useGetFailedTransactions.js +1 -1
- package/__commonjs/hooks/transactions/useGetSignTransactionsError.js +1 -1
- package/__commonjs/hooks/transactions/useGetSuccessfulTransactions.js +1 -1
- package/__commonjs/hooks/useGetNetworkConfig.js +1 -1
- package/__commonjs/utils/account/getAccountShard.js +1 -1
- package/__commonjs/utils/account/getLatestNonce.js +1 -1
- package/__commonjs/utils/network/index.js +1 -1
- package/__commonjs/utils/transactions/getInterpretedTransaction/helpers/getHumanReadableTimeFormat.js +1 -1
- package/__commonjs/utils/transactions/getInterpretedTransaction/helpers/index.js +2 -2
- package/__commonjs/wrappers/AuthenticatedRoutesWrapper/index.js +1 -1
- package/__commonjs/wrappers/DappProvider/index.js +1 -1
- package/__commonjs/wrappers/index.js +1 -1
- package/__mocks__/index.js +1 -1
- package/__mocks__/utils/index.js +1 -1
- package/__mocks__/utils/renderWithProvider.js +1 -1
- package/apiCalls/accounts/getAccountFromApi.js +1 -1
- package/apiCalls/accounts/index.js +1 -1
- package/apiCalls/configuration/getNetworkConfig.js +1 -1
- package/apiCalls/configuration/index.js +1 -1
- package/apiCalls/getScamAddressData.js +1 -1
- package/apiCalls/index.js +1 -1
- package/apiCalls/transactions/getTransactionsByHashes.js +1 -1
- package/apiCalls/transactions/index.js +1 -1
- package/apiCalls/transactions/sendSignedTransactions.js +1 -1
- package/apiCalls/utils/getCleanApiAddress.js +1 -1
- package/apiCalls/utils/index.js +1 -1
- package/components/LogoutListener/LogoutListener.js +1 -1
- package/components/LogoutListener/helpers/index.js +1 -1
- package/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
- package/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
- package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
- package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
- package/components/LogoutListener/index.js +1 -1
- package/components/ProviderInitializer.js +1 -1
- package/components/TransactionSender/TransactionSender.js +1 -1
- package/components/TransactionSender/index.js +1 -1
- package/components/TransactionStatusToast/FailedTransactionStatusToast.js +1 -1
- package/components/TransactionsTracker/TransactionTracker.js +1 -1
- package/components/TransactionsTracker/index.js +1 -1
- package/components/TransactionsTracker/useTransactionsTracker.js +1 -1
- package/hooks/account/index.js +1 -1
- package/hooks/account/useGetAccount.js +1 -1
- package/hooks/account/useGetAccountInfo.js +1 -1
- package/hooks/account/useGetIsLoggedIn.js +1 -1
- package/hooks/account/useGetLoginInfo.js +1 -1
- package/hooks/account/useGetWebsocketEvent.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/login/index.js +1 -1
- package/hooks/login/useExtensionLogin.js +1 -1
- package/hooks/login/useLedgerLogin.js +1 -1
- package/hooks/login/useLoginService.js +1 -1
- package/hooks/login/useWalletConnectLogin.js +1 -1
- package/hooks/login/useWalletConnectV2Login.js +1 -1
- package/hooks/login/useWebWalletLogin.js +1 -1
- package/hooks/signMessage/index.js +1 -1
- package/hooks/signMessage/useGetLastSignedMessageSession.js +1 -1
- package/hooks/signMessage/useGetSignMessageSession.js +1 -1
- package/hooks/signMessage/useGetSignedMessageStatus.js +1 -1
- package/hooks/signMessage/useSignMessage.js +1 -1
- package/hooks/transactions/helpers/getShouldMoveTransactionsToSignedState.js +1 -1
- package/hooks/transactions/helpers/index.js +1 -1
- package/hooks/transactions/helpers/useSetTransactionNonces.js +1 -1
- package/hooks/transactions/index.js +1 -1
- package/hooks/transactions/useCheckTransactionStatus/checkBatch.js +1 -1
- package/hooks/transactions/useCheckTransactionStatus/index.js +1 -1
- package/hooks/transactions/useCheckTransactionStatus/useCheckTransactionStatus.js +1 -1
- package/hooks/transactions/useGetActiveTransactionsStatus.js +1 -1
- package/hooks/transactions/useGetFailedTransactions.js +1 -1
- package/hooks/transactions/useGetPendingTransactions.js +1 -1
- package/hooks/transactions/useGetSignTransactionsError.js +1 -1
- package/hooks/transactions/useGetSignedTransactions.js +1 -1
- package/hooks/transactions/useGetSuccessfulTransactions.js +1 -1
- package/hooks/transactions/useGetTokenDetails.js +1 -1
- package/hooks/transactions/useGetTransactionDisplayInfo.js +1 -1
- package/hooks/transactions/useParseSignedTransactions.js +1 -1
- package/hooks/transactions/useSignTransactions.js +1 -1
- package/hooks/transactions/useSignTransactionsCommonData.js +1 -1
- package/hooks/transactions/useSignTransactionsWithDevice.js +1 -1
- package/hooks/transactions/useSignTransactionsWithLedger.js +1 -1
- package/hooks/transactions/useTrackTransactionStatus.js +1 -1
- package/hooks/useGetNetworkConfig.js +1 -1
- package/hooks/useGetNotification.js +1 -1
- package/hooks/websocketListener/index.js +1 -1
- package/hooks/websocketListener/useInitializeWebsocketConnection.js +1 -1
- package/hooks/websocketListener/useRegisterWebsocketListener.js +1 -1
- package/package.json +1 -1
- package/reduxStore/selectors/index.js +1 -1
- package/reduxStore/selectors/transactionsSelectors.js +1 -1
- package/services/index.js +1 -1
- package/services/transactions/index.js +1 -1
- package/services/transactions/sendTransactions.js +1 -1
- package/services/transactions/transformAndSignTransactions.js +1 -1
- package/utils/account/getAccount.js +1 -1
- package/utils/account/getAccountBalance.js +1 -1
- package/utils/account/getAccountShard.js +1 -1
- package/utils/account/getAddress.js +1 -1
- package/utils/account/getLatestNonce.js +1 -1
- package/utils/account/index.js +1 -1
- package/utils/account/refreshAccount.js +1 -1
- package/utils/account/signMessage.js +1 -1
- package/utils/getIsLoggedIn.js +1 -1
- package/utils/index.js +1 -1
- package/utils/logout.js +1 -1
- package/utils/network/getChainID.js +1 -1
- package/utils/network/getEgldLabel.js +1 -1
- package/utils/network/getNetworkConfig.js +1 -1
- package/utils/network/index.js +1 -1
- package/utils/transactions/getAllTransactionsLink.js +1 -1
- package/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.js +1 -1
- package/utils/transactions/getInterpretedTransaction/helpers/getHumanReadableTimeFormat.d.ts +2 -1
- package/utils/transactions/getInterpretedTransaction/helpers/getHumanReadableTimeFormat.js +1 -1
- package/utils/transactions/getInterpretedTransaction/helpers/index.js +1 -1
- package/utils/transactions/getInterpretedTransaction/index.js +1 -1
- package/utils/transactions/getTransactionLink.js +1 -1
- package/utils/transactions/index.js +1 -1
- package/web/hooks/index.js +1 -1
- package/web/hooks/useIdleTimer.js +1 -1
- package/web/index.js +1 -1
- package/wrappers/AppInitializer.js +1 -1
- package/wrappers/AuthenticatedRoutesWrapper/index.js +1 -1
- package/wrappers/AxiosInterceptorContext/AxiosInterceptorContext.js +1 -1
- package/wrappers/AxiosInterceptorContext/components/AxiosInterceptor.js +1 -1
- package/wrappers/AxiosInterceptorContext/components/AxiosInterceptorContextProvider.js +1 -1
- package/wrappers/AxiosInterceptorContext/components/LoginInfoListener.js +1 -1
- package/wrappers/AxiosInterceptorContext/components/index.js +1 -1
- package/wrappers/AxiosInterceptorContext/index.js +1 -1
- package/wrappers/DappProvider/CustomComponents.js +1 -1
- package/wrappers/DappProvider/index.js +1 -1
- package/wrappers/index.js +1 -1
- package/__chunks__/chunk-EXJ5ZTBR.js +0 -2
- package/__chunks__/chunk-ZPDZ3RNC.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Oc=Object.create;var jt=Object.defineProperty,Fc=Object.defineProperties,_c=Object.getOwnPropertyDescriptor,Uc=Object.getOwnPropertyDescriptors,Bc=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols,Wc=Object.getPrototypeOf,sn=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable;var Io=(e,t,r)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))sn.call(t,r)&&Io(e,r,t[r]);if(cr)for(var r of cr(t))bo.call(t,r)&&Io(e,r,t[r]);return e},E=(e,t)=>Fc(e,Uc(t));var ko=e=>typeof e=="symbol"?e:e+"",Qe=(e,t)=>{var r={};for(var o in e)sn.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&cr)for(var o of cr(e))t.indexOf(o)<0&&bo.call(e,o)&&(r[o]=e[o]);return r};var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=(e,t)=>{for(var r in t)jt(e,r,{get:t[r],enumerable:!0})},Eo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bc(t))!sn.call(e,i)&&i!==r&&jt(e,i,{get:()=>t[i],enumerable:!(o=_c(t,i))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Oc(Wc(e)):{},Eo(t||!e||!e.__esModule?jt(r,"default",{value:e,enumerable:!0}):r,e)),qt=e=>Eo(jt({},"__esModule",{value:!0}),e);var T=(e,t,r)=>new Promise((o,i)=>{var l=u=>{try{d(r.next(u))}catch(g){i(g)}},p=u=>{try{d(r.throw(u))}catch(g){i(g)}},d=u=>u.done?o(u.value):Promise.resolve(u.value).then(l,p);d((r=r.apply(e,t)).next())});var Co=lr(pr=>{"use strict";n();pr.byteLength=Gc;pr.toByteArray=Hc;pr.fromByteArray=qc;var ge=[],ae=[],$c=typeof Uint8Array!="undefined"?Uint8Array:Array,an="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(tt=0,Lo=an.length;tt<Lo;++tt)ge[tt]=an[tt],ae[an.charCodeAt(tt)]=tt;var tt,Lo;ae["-".charCodeAt(0)]=62;ae["_".charCodeAt(0)]=63;function Po(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("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function Gc(e){var t=Po(e),r=t[0],o=t[1];return(r+o)*3/4-o}function Vc(e,t,r){return(t+r)*3/4-r}function Hc(e){var t,r=Po(e),o=r[0],i=r[1],l=new $c(Vc(e,o,i)),p=0,d=i>0?o-4:o,u;for(u=0;u<d;u+=4)t=ae[e.charCodeAt(u)]<<18|ae[e.charCodeAt(u+1)]<<12|ae[e.charCodeAt(u+2)]<<6|ae[e.charCodeAt(u+3)],l[p++]=t>>16&255,l[p++]=t>>8&255,l[p++]=t&255;return i===2&&(t=ae[e.charCodeAt(u)]<<2|ae[e.charCodeAt(u+1)]>>4,l[p++]=t&255),i===1&&(t=ae[e.charCodeAt(u)]<<10|ae[e.charCodeAt(u+1)]<<4|ae[e.charCodeAt(u+2)]>>2,l[p++]=t>>8&255,l[p++]=t&255),l}function zc(e){return ge[e>>18&63]+ge[e>>12&63]+ge[e>>6&63]+ge[e&63]}function jc(e,t,r){for(var o,i=[],l=t;l<r;l+=3)o=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),i.push(zc(o));return i.join("")}function qc(e){for(var t,r=e.length,o=r%3,i=[],l=16383,p=0,d=r-o;p<d;p+=l)i.push(jc(e,p,p+l>d?d:p+l));return o===1?(t=e[r-1],i.push(ge[t>>2]+ge[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],i.push(ge[t>>10]+ge[t>>4&63]+ge[t<<2&63]+"=")),i.join("")}});var Do=lr(cn=>{n();cn.read=function(e,t,r,o,i){var l,p,d=i*8-o-1,u=(1<<d)-1,g=u>>1,f=-7,h=r?i-1:0,I=r?-1:1,P=e[t+h];for(h+=I,l=P&(1<<-f)-1,P>>=-f,f+=d;f>0;l=l*256+e[t+h],h+=I,f-=8);for(p=l&(1<<-f)-1,l>>=-f,f+=o;f>0;p=p*256+e[t+h],h+=I,f-=8);if(l===0)l=1-g;else{if(l===u)return p?NaN:(P?-1:1)*(1/0);p=p+Math.pow(2,o),l=l-g}return(P?-1:1)*p*Math.pow(2,l-o)};cn.write=function(e,t,r,o,i,l){var p,d,u,g=l*8-i-1,f=(1<<g)-1,h=f>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=o?0:l-1,k=o?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,p=f):(p=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-p))<1&&(p--,u*=2),p+h>=1?t+=I/u:t+=I*Math.pow(2,1-h),t*u>=2&&(p++,u/=2),p+h>=f?(d=0,p=f):p+h>=1?(d=(t*u-1)*Math.pow(2,i),p=p+h):(d=t*Math.pow(2,h-1)*Math.pow(2,i),p=0));i>=8;e[r+P]=d&255,P+=k,d/=256,i-=8);for(p=p<<i|d,g+=i;g>0;e[r+P]=p&255,P+=k,p/=256,g-=8);e[r+P-k]|=b*128}});var Ho=lr(Tt=>{"use strict";n();var ln=Co(),ft=Do(),No=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Tt.Buffer=m;Tt.SlowBuffer=Qc;Tt.INSPECT_MAX_BYTES=50;var ur=2147483647;Tt.kMaxLength=ur;m.TYPED_ARRAY_SUPPORT=Kc();!m.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&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.");function Kc(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(r){return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(!!m.isBuffer(this))return this.buffer}});Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(!!m.isBuffer(this))return this.byteOffset}});function ve(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,m.prototype),t}function m(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return mn(e)}return Oo(e,t,r)}m.poolSize=8192;function Oo(e,t,r){if(typeof e=="string")return Zc(e,t);if(ArrayBuffer.isView(e))return Jc(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(fe(e,ArrayBuffer)||e&&fe(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(fe(e,SharedArrayBuffer)||e&&fe(e.buffer,SharedArrayBuffer)))return un(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return m.from(o,t,r);var i=Xc(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return m.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)}m.from=function(e,t,r){return Oo(e,t,r)};Object.setPrototypeOf(m.prototype,Uint8Array.prototype);Object.setPrototypeOf(m,Uint8Array);function Fo(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Yc(e,t,r){return Fo(e),e<=0?ve(e):t!==void 0?typeof r=="string"?ve(e).fill(t,r):ve(e).fill(t):ve(e)}m.alloc=function(e,t,r){return Yc(e,t,r)};function mn(e){return Fo(e),ve(e<0?0:gn(e)|0)}m.allocUnsafe=function(e){return mn(e)};m.allocUnsafeSlow=function(e){return mn(e)};function Zc(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!m.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=_o(e,t)|0,o=ve(r),i=o.write(e,t);return i!==r&&(o=o.slice(0,i)),o}function pn(e){for(var t=e.length<0?0:gn(e.length)|0,r=ve(t),o=0;o<t;o+=1)r[o]=e[o]&255;return r}function Jc(e){if(fe(e,Uint8Array)){var t=new Uint8Array(e);return un(t.buffer,t.byteOffset,t.byteLength)}return pn(e)}function un(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,m.prototype),o}function Xc(e){if(m.isBuffer(e)){var t=gn(e.length)|0,r=ve(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||fn(e.length)?ve(0):pn(e);if(e.type==="Buffer"&&Array.isArray(e.data))return pn(e.data)}function gn(e){if(e>=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Qc(e){return+e!=e&&(e=0),m.alloc(+e)}m.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==m.prototype};m.compare=function(t,r){if(fe(t,Uint8Array)&&(t=m.from(t,t.offset,t.byteLength)),fe(r,Uint8Array)&&(r=m.from(r,r.offset,r.byteLength)),!m.isBuffer(t)||!m.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var o=t.length,i=r.length,l=0,p=Math.min(o,i);l<p;++l)if(t[l]!==r[l]){o=t[l],i=r[l];break}return o<i?-1:i<o?1:0};m.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}};m.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return m.alloc(0);var o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;var i=m.allocUnsafe(r),l=0;for(o=0;o<t.length;++o){var p=t[o];if(fe(p,Uint8Array))l+p.length>i.length?m.from(p).copy(i,l):Uint8Array.prototype.set.call(i,p,l);else if(m.isBuffer(p))p.copy(i,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length}return i};function _o(e,t){if(m.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||fe(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&r===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return dn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Vo(e).length;default:if(i)return o?-1:dn(e).length;t=(""+t).toLowerCase(),i=!0}}m.byteLength=_o;function el(e,t,r){var o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return pl(this,t,r);case"utf8":case"utf-8":return Bo(this,t,r);case"ascii":return cl(this,t,r);case"latin1":case"binary":return ll(this,t,r);case"base64":return sl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ul(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}m.prototype._isBuffer=!0;function rt(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}m.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)rt(this,r,r+1);return this};m.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)rt(this,r,r+3),rt(this,r+1,r+2);return this};m.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)rt(this,r,r+7),rt(this,r+1,r+6),rt(this,r+2,r+5),rt(this,r+3,r+4);return this};m.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?Bo(this,0,t):el.apply(this,arguments)};m.prototype.toLocaleString=m.prototype.toString;m.prototype.equals=function(t){if(!m.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:m.compare(this,t)===0};m.prototype.inspect=function(){var t="",r=Tt.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};No&&(m.prototype[No]=m.prototype.inspect);m.prototype.compare=function(t,r,o,i,l){if(fe(t,Uint8Array)&&(t=m.from(t,t.offset,t.byteLength)),!m.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),i===void 0&&(i=0),l===void 0&&(l=this.length),r<0||o>t.length||i<0||l>this.length)throw new RangeError("out of range index");if(i>=l&&r>=o)return 0;if(i>=l)return-1;if(r>=o)return 1;if(r>>>=0,o>>>=0,i>>>=0,l>>>=0,this===t)return 0;for(var p=l-i,d=o-r,u=Math.min(p,d),g=this.slice(i,l),f=t.slice(r,o),h=0;h<u;++h)if(g[h]!==f[h]){p=g[h],d=f[h];break}return p<d?-1:d<p?1:0};function Uo(e,t,r,o,i){if(e.length===0)return-1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,fn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=m.from(t,o)),m.isBuffer(t))return t.length===0?-1:Ro(e,t,r,o,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ro(e,[t],r,o,i);throw new TypeError("val must be string, number or Buffer")}function Ro(e,t,r,o,i){var l=1,p=e.length,d=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;l=2,p/=2,d/=2,r/=2}function u(P,k){return l===1?P[k]:P.readUInt16BE(k*l)}var g;if(i){var f=-1;for(g=r;g<p;g++)if(u(e,g)===u(t,f===-1?0:g-f)){if(f===-1&&(f=g),g-f+1===d)return f*l}else f!==-1&&(g-=g-f),f=-1}else for(r+d>p&&(r=p-d),g=r;g>=0;g--){for(var h=!0,I=0;I<d;I++)if(u(e,g+I)!==u(t,I)){h=!1;break}if(h)return g}return-1}m.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};m.prototype.indexOf=function(t,r,o){return Uo(this,t,r,o,!0)};m.prototype.lastIndexOf=function(t,r,o){return Uo(this,t,r,o,!1)};function tl(e,t,r,o){r=Number(r)||0;var i=e.length-r;o?(o=Number(o),o>i&&(o=i)):o=i;var l=t.length;o>l/2&&(o=l/2);for(var p=0;p<o;++p){var d=parseInt(t.substr(p*2,2),16);if(fn(d))return p;e[r+p]=d}return p}function rl(e,t,r,o){return dr(dn(t,e.length-r),e,r,o)}function nl(e,t,r,o){return dr(gl(t),e,r,o)}function ol(e,t,r,o){return dr(Vo(t),e,r,o)}function il(e,t,r,o){return dr(fl(t,e.length-r),e,r,o)}m.prototype.write=function(t,r,o,i){if(r===void 0)i="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")i=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,i===void 0&&(i="utf8")):(i=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-r;if((o===void 0||o>l)&&(o=l),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return tl(this,t,r,o);case"utf8":case"utf-8":return rl(this,t,r,o);case"ascii":case"latin1":case"binary":return nl(this,t,r,o);case"base64":return ol(this,t,r,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return il(this,t,r,o);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function sl(e,t,r){return t===0&&r===e.length?ln.fromByteArray(e):ln.fromByteArray(e.slice(t,r))}function Bo(e,t,r){r=Math.min(e.length,r);for(var o=[],i=t;i<r;){var l=e[i],p=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=r){var u,g,f,h;switch(d){case 1:l<128&&(p=l);break;case 2:u=e[i+1],(u&192)===128&&(h=(l&31)<<6|u&63,h>127&&(p=h));break;case 3:u=e[i+1],g=e[i+2],(u&192)===128&&(g&192)===128&&(h=(l&15)<<12|(u&63)<<6|g&63,h>2047&&(h<55296||h>57343)&&(p=h));break;case 4:u=e[i+1],g=e[i+2],f=e[i+3],(u&192)===128&&(g&192)===128&&(f&192)===128&&(h=(l&15)<<18|(u&63)<<12|(g&63)<<6|f&63,h>65535&&h<1114112&&(p=h))}}p===null?(p=65533,d=1):p>65535&&(p-=65536,o.push(p>>>10&1023|55296),p=56320|p&1023),o.push(p),i+=d}return al(o)}var Mo=4096;function al(e){var t=e.length;if(t<=Mo)return String.fromCharCode.apply(String,e);for(var r="",o=0;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=Mo));return r}function cl(e,t,r){var o="";r=Math.min(e.length,r);for(var i=t;i<r;++i)o+=String.fromCharCode(e[i]&127);return o}function ll(e,t,r){var o="";r=Math.min(e.length,r);for(var i=t;i<r;++i)o+=String.fromCharCode(e[i]);return o}function pl(e,t,r){var o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);for(var i="",l=t;l<r;++l)i+=Tl[e[l]];return i}function ul(e,t,r){for(var o=e.slice(t,r),i="",l=0;l<o.length-1;l+=2)i+=String.fromCharCode(o[l]+o[l+1]*256);return i}m.prototype.slice=function(t,r){var o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);var i=this.subarray(t,r);return Object.setPrototypeOf(i,m.prototype),i};function $(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return i};m.prototype.readUintBE=m.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t+--r],l=1;r>0&&(l*=256);)i+=this[t+--r]*l;return i};m.prototype.readUint8=m.prototype.readUInt8=function(t,r){return t=t>>>0,r||$(t,1,this.length),this[t]};m.prototype.readUint16LE=m.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||$(t,2,this.length),this[t]|this[t+1]<<8};m.prototype.readUint16BE=m.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||$(t,2,this.length),this[t]<<8|this[t+1]};m.prototype.readUint32LE=m.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||$(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};m.prototype.readUint32BE=m.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};m.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return l*=128,i>=l&&(i-=Math.pow(2,8*r)),i};m.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=r,l=1,p=this[t+--i];i>0&&(l*=256);)p+=this[t+--i]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*r)),p};m.prototype.readInt8=function(t,r){return t=t>>>0,r||$(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};m.prototype.readInt16LE=function(t,r){t=t>>>0,r||$(t,2,this.length);var o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};m.prototype.readInt16BE=function(t,r){t=t>>>0,r||$(t,2,this.length);var o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};m.prototype.readInt32LE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};m.prototype.readInt32BE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};m.prototype.readFloatLE=function(t,r){return t=t>>>0,r||$(t,4,this.length),ft.read(this,t,!0,23,4)};m.prototype.readFloatBE=function(t,r){return t=t>>>0,r||$(t,4,this.length),ft.read(this,t,!1,23,4)};m.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||$(t,8,this.length),ft.read(this,t,!0,52,8)};m.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||$(t,8,this.length),ft.read(this,t,!1,52,8)};function te(e,t,r,o,i,l){if(!m.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<l)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(t,r,o,i){if(t=+t,r=r>>>0,o=o>>>0,!i){var l=Math.pow(2,8*o)-1;te(this,t,r,o,l,0)}var p=1,d=0;for(this[r]=t&255;++d<o&&(p*=256);)this[r+d]=t/p&255;return r+o};m.prototype.writeUintBE=m.prototype.writeUIntBE=function(t,r,o,i){if(t=+t,r=r>>>0,o=o>>>0,!i){var l=Math.pow(2,8*o)-1;te(this,t,r,o,l,0)}var p=o-1,d=1;for(this[r+p]=t&255;--p>=0&&(d*=256);)this[r+p]=t/d&255;return r+o};m.prototype.writeUint8=m.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,1,255,0),this[r]=t&255,r+1};m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};m.prototype.writeIntLE=function(t,r,o,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*o-1);te(this,t,r,o,l-1,-l)}var p=0,d=1,u=0;for(this[r]=t&255;++p<o&&(d*=256);)t<0&&u===0&&this[r+p-1]!==0&&(u=1),this[r+p]=(t/d>>0)-u&255;return r+o};m.prototype.writeIntBE=function(t,r,o,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*o-1);te(this,t,r,o,l-1,-l)}var p=o-1,d=1,u=0;for(this[r+p]=t&255;--p>=0&&(d*=256);)t<0&&u===0&&this[r+p+1]!==0&&(u=1),this[r+p]=(t/d>>0)-u&255;return r+o};m.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};m.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};m.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};m.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};m.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Wo(e,t,r,o,i,l){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $o(e,t,r,o,i){return t=+t,r=r>>>0,i||Wo(e,t,r,4,34028234663852886e22,-34028234663852886e22),ft.write(e,t,r,o,23,4),r+4}m.prototype.writeFloatLE=function(t,r,o){return $o(this,t,r,!0,o)};m.prototype.writeFloatBE=function(t,r,o){return $o(this,t,r,!1,o)};function Go(e,t,r,o,i){return t=+t,r=r>>>0,i||Wo(e,t,r,8,17976931348623157e292,-17976931348623157e292),ft.write(e,t,r,o,52,8),r+8}m.prototype.writeDoubleLE=function(t,r,o){return Go(this,t,r,!0,o)};m.prototype.writeDoubleBE=function(t,r,o){return Go(this,t,r,!1,o)};m.prototype.copy=function(t,r,o,i){if(!m.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<o&&(i=o),i===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-o&&(i=t.length-r+o);var l=i-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,i):Uint8Array.prototype.set.call(t,this.subarray(o,i),r),l};m.prototype.fill=function(t,r,o,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,o=this.length):typeof o=="string"&&(i=o,o=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!m.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){var l=t.charCodeAt(0);(i==="utf8"&&l<128||i==="latin1")&&(t=l)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);var p;if(typeof t=="number")for(p=r;p<o;++p)this[p]=t;else{var d=m.isBuffer(t)?t:m.from(t,i),u=d.length;if(u===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<o-r;++p)this[p+r]=d[p%u]}return this};var dl=/[^+/0-9A-Za-z-_]/g;function ml(e){if(e=e.split("=")[0],e=e.trim().replace(dl,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function dn(e,t){t=t||1/0;for(var r,o=e.length,i=null,l=[],p=0;p<o;++p){if(r=e.charCodeAt(p),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&l.push(239,191,189);continue}else if(p+1===o){(t-=3)>-1&&l.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&l.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&l.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;l.push(r)}else if(r<2048){if((t-=2)<0)break;l.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;l.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;l.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return l}function gl(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function fl(e,t){for(var r,o,i,l=[],p=0;p<e.length&&!((t-=2)<0);++p)r=e.charCodeAt(p),o=r>>8,i=r%256,l.push(i),l.push(o);return l}function Vo(e){return ln.toByteArray(ml(e))}function dr(e,t,r,o){for(var i=0;i<o&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function fe(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function fn(e){return e!==e}var Tl=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var o=r*16,i=0;i<16;++i)t[o+i]=e[r]+e[i];return t}()});var Yo=lr((id,Ko)=>{n();var _=Ko.exports={},Te,ye;function Tn(){throw new Error("setTimeout has not been defined")}function yn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Te=setTimeout:Te=Tn}catch(e){Te=Tn}try{typeof clearTimeout=="function"?ye=clearTimeout:ye=yn}catch(e){ye=yn}})();function zo(e){if(Te===setTimeout)return setTimeout(e,0);if((Te===Tn||!Te)&&setTimeout)return Te=setTimeout,setTimeout(e,0);try{return Te(e,0)}catch(t){try{return Te.call(null,e,0)}catch(r){return Te.call(this,e,0)}}}function yl(e){if(ye===clearTimeout)return clearTimeout(e);if((ye===yn||!ye)&&clearTimeout)return ye=clearTimeout,clearTimeout(e);try{return ye(e)}catch(t){try{return ye.call(null,e)}catch(r){return ye.call(this,e)}}}var Ae=[],yt=!1,nt,mr=-1;function hl(){!yt||!nt||(yt=!1,nt.length?Ae=nt.concat(Ae):mr=-1,Ae.length&&jo())}function jo(){if(!yt){var e=zo(hl);yt=!0;for(var t=Ae.length;t;){for(nt=Ae,Ae=[];++mr<t;)nt&&nt[mr].run();mr=-1,t=Ae.length}nt=null,yt=!1,yl(e)}}_.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ae.push(new qo(e,t)),Ae.length===1&&!yt&&zo(jo)};function qo(e,t){this.fun=e,this.array=t}qo.prototype.run=function(){this.fun.apply(null,this.array)};_.title="browser";_.browser=!0;_.env={};_.argv=[];_.version="";_.versions={};function Ie(){}_.on=Ie;_.addListener=Ie;_.once=Ie;_.off=Ie;_.removeListener=Ie;_.removeAllListeners=Ie;_.emit=Ie;_.prependListener=Ie;_.prependOnceListener=Ie;_.listeners=function(e){return[]};_.binding=function(e){throw new Error("process.binding is not supported")};_.cwd=function(){return"/"};_.chdir=function(e){throw new Error("process.chdir is not supported")};_.umask=function(){return 0}});var s,a,sd,n=v(()=>{s=A(Ho()),a=A(Yo()),sd=function(e){function t(){var o=this||self;return delete e.prototype.__magic__,o}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var r=__magic__;return r}(Object)});var ht=v(()=>{"use strict";n()});var Zo=v(()=>{"use strict";n()});var Jo=v(()=>{"use strict";n()});var Xo=v(()=>{"use strict";n()});var R=v(()=>{"use strict";n()});var Qo=v(()=>{"use strict";n()});var ei=v(()=>{"use strict";n()});var Z=v(()=>{"use strict";n()});var ti=v(()=>{"use strict";n()});var ri=v(()=>{"use strict";n()});var J=v(()=>{"use strict";n();Zo();Jo();Xo();R();Qo();ei();Z();ti();ri()});var ot,ni,bd,oi,kd,ii,Ed,Ld,Sl,St=v(()=>{"use strict";n();J();ot={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://devnet-wallet.multiversx.com",apiAddress:"https://devnet-api.multiversx.com",explorerAddress:"http://devnet-explorer.multiversx.com",apiTimeout:"4000"},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://testnet-wallet.multiversx.com",apiAddress:"https://testnet-api.multiversx.com",explorerAddress:"http://testnet-explorer.multiversx.com",apiTimeout:"4000"},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://wallet.multiversx.com",apiAddress:"https://api.multiversx.com",explorerAddress:"https://explorer.multiversx.com",apiTimeout:"4000"}},{chainId:ni,egldLabel:bd}=ot["devnet"],{chainId:oi,egldLabel:kd}=ot["testnet"],{chainId:ii,egldLabel:Ed}=ot["mainnet"],Ld={["devnet"]:ni,["testnet"]:oi,["mainnet"]:ii},Sl={[ni]:"devnet",[oi]:"testnet",[ii]:"mainnet"}});var hn=v(()=>{"use strict";n()});var si=v(()=>{"use strict";n()});var gr,Sn=v(()=>{"use strict";n();gr="transaction-status-toast-id"});var Kt,fr,ai,ci,Tr,li,xt,D=v(()=>{"use strict";n();ht();St();hn();si();Sn();Kt=5e4,fr=1e9,ai=1,ci=1,Tr="logout",li="login",xt="0"});var wt,yr=v(()=>{"use strict";n();wt=()=>Date.now()/1e3});var pi=v(()=>{"use strict";n()});var ui=v(()=>{"use strict";n()});var xn=v(()=>{"use strict";n();yr();pi();ui()});var vn={};et(vn,{getItem:()=>wl,localStorageKeys:()=>ce,removeItem:()=>vl,setItem:()=>xl});var ce,wn,xl,wl,vl,it=v(()=>{"use strict";n();xn();ce={loginExpiresAt:"sdk-dapp-login-expires-at",logoutEvent:"sdk-dapp-logout-event"},wn=typeof localStorage!="undefined",xl=({key:e,data:t,expires:r})=>{!wn||localStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},wl=e=>{if(!wn)return;let t=localStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:wt()>=r.expires?(localStorage.removeItem(String(e)),null):r.data},vl=e=>{!wn||localStorage.removeItem(String(e))}});var An={};et(An,{clear:()=>fi,getItem:()=>mi,removeItem:()=>gi,setItem:()=>di,storage:()=>Al});var di,mi,gi,fi,Al,Ti=v(()=>{"use strict";n();di=({key:e,data:t,expires:r})=>{sessionStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},mi=e=>{let t=sessionStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:Date.now()>=r.expires?(sessionStorage.removeItem(String(e)),null):r.data},gi=e=>sessionStorage.removeItem(String(e)),fi=()=>sessionStorage.clear(),Al={setItem:di,getItem:mi,removeItem:gi,clear:fi}});var be,vt=v(()=>{"use strict";n();it();Ti();be={session:An,local:vn}});var In,G,oe,Y=v(()=>{"use strict";n();In=require("@reduxjs/toolkit");D();G=(0,In.createAction)(Tr),oe=(0,In.createAction)(li,e=>({payload:e}))});var kn,yi,hi,hr,bn,Si,st,rm,Sr,nm,En,Il,om,At,xi,wi,vi,Ln=v(()=>{"use strict";n();kn=require("@multiversx/sdk-core"),yi=require("@reduxjs/toolkit"),hi=require("redux-persist");D();vt();it();Y();hr={balance:"...",address:"",nonce:0,txCount:0,scrCount:0,claimableRewards:xt},bn={address:"",websocketEvent:null,accounts:{"":hr},ledgerAccount:null,publicKey:"",walletConnectAccount:null,isAccountLoading:!0,accountLoadingError:null},Si=(0,yi.createSlice)({name:"accountInfoSlice",initialState:bn,reducers:{setAddress:(e,t)=>{let r=t.payload;e.address=r,e.publicKey=new kn.Address(r).hex()},setAccount:(e,t)=>{let r=e.address===t.payload.address;e.accounts={[e.address]:r?t.payload:hr},e.shard=t.payload.shard,e.isAccountLoading=!1,e.accountLoadingError=null},setAccountNonce:(e,t)=>{let{address:r}=e;e.accounts[r].nonce=t.payload},setAccountShard:(e,t)=>{e.shard=t.payload},setLedgerAccount:(e,t)=>{e.ledgerAccount=t.payload},updateLedgerAccount:(e,t)=>{e.ledgerAccount!=null&&(e.ledgerAccount.index=t.payload.index,e.ledgerAccount.address=t.payload.address)},setWalletConnectAccount:(e,t)=>{e.walletConnectAccount=t.payload},setIsAccountLoading:(e,t)=>{e.isAccountLoading=t.payload,e.accountLoadingError=null},setAccountLoadingError:(e,t)=>{e.accountLoadingError=t.payload,e.isAccountLoading=!1},setWebsocketEvent:(e,t)=>{e.websocketEvent={timestamp:Date.now(),message:t.payload}}},extraReducers:e=>{e.addCase(G,()=>(be.local.removeItem(ce.loginExpiresAt),bn)),e.addCase(oe,(t,r)=>{let{address:o}=r.payload;t.address=o,t.publicKey=new kn.Address(o).hex()}),e.addCase(hi.REHYDRATE,(t,r)=>{var g;if(!((g=r.payload)!=null&&g.account))return;let{account:o}=r.payload,{address:i,shard:l,accounts:p,publicKey:d}=o;t.address=i,t.shard=l;let u=p&&i in p;t.accounts=u?p:bn.accounts,t.publicKey=d})}}),{setAccount:st,setAddress:rm,setAccountNonce:Sr,setAccountShard:nm,setLedgerAccount:En,updateLedgerAccount:Il,setWalletConnectAccount:om,setIsAccountLoading:At,setAccountLoadingError:xi,setWebsocketEvent:wi}=Si.actions,vi=Si.reducer});function Yt(){return new Date().setHours(new Date().getHours()+24)}function Zt(e){be.local.setItem({key:ce.loginExpiresAt,data:e,expires:e})}var Pn=v(()=>{"use strict";n();vt();it()});var Ii,Ai,bi,gm,xr,bl,wr,fm,Cn,ki,Ei,Li,vr=v(()=>{"use strict";n();Ii=require("@reduxjs/toolkit");Pn();R();Y();Ai={loginMethod:"",walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,walletLogin:null,extensionLogin:null,isLoginSessionInvalid:!1},bi=(0,Ii.createSlice)({name:"loginInfoSlice",initialState:Ai,reducers:{setLoginMethod:(e,t)=>{e.loginMethod=t.payload},setTokenLogin:(e,t)=>{e.tokenLogin=t.payload},setTokenLoginSignature:(e,t)=>{(e==null?void 0:e.tokenLogin)!=null&&(e.tokenLogin.signature=t.payload)},setWalletLogin:(e,t)=>{e.walletLogin=t.payload},setWalletConnectLogin:(e,t)=>{e.walletConnectLogin=t.payload},setLedgerLogin:(e,t)=>{e.ledgerLogin=t.payload},invalidateLoginSession:e=>{e.isLoginSessionInvalid=!0},setLogoutRoute:(e,t)=>{e.logoutRoute=t.payload}},extraReducers:e=>{e.addCase(G,()=>Ai),e.addCase(oe,(t,r)=>{t.loginMethod=r.payload.loginMethod,Zt(Yt())})}}),{setLoginMethod:gm,setWalletConnectLogin:xr,setLedgerLogin:bl,setTokenLogin:wr,setTokenLoginSignature:fm,setWalletLogin:Cn,invalidateLoginSession:ki,setLogoutRoute:Ei}=bi.actions,Li=bi.reducer});var Ci,Pi,Di,Ni,kl,Sm,El,Ri,Dn=v(()=>{"use strict";n();Ci=require("@reduxjs/toolkit");Y();Pi={},Di=(0,Ci.createSlice)({name:"modalsSlice",initialState:Pi,reducers:{setTxSubmittedModal:(e,t)=>{e.txSubmittedModal=t.payload},setNotificationModal:(e,t)=>{e.notificationModal=t.payload},clearTxSubmittedModal:e=>{e.txSubmittedModal=void 0},clearNotificationModal:e=>{e.notificationModal=void 0}},extraReducers:e=>{e.addCase(G,()=>Pi)}}),{setTxSubmittedModal:Ni,setNotificationModal:kl,clearTxSubmittedModal:Sm,clearNotificationModal:El}=Di.actions,Ri=Di.reducer});var Mi,Oi,ke,at=v(()=>{"use strict";n();Mi=!1,Oi=(e=!0)=>{Mi=e},ke=(e,t=0)=>{Mi||setTimeout(()=>{window.location.href=e,window.location.assign(e)},t)}});function It({callbackRoute:e,onLoginRedirect:t,options:r}){let o=Boolean(e),i=typeof t=="function",l=i?0:Ll;o&&e!=null&&setTimeout(()=>{if(i)return t(e,r);window.location.pathname.includes(e)||ke(e)},l)}var Ll,Fi=v(()=>{"use strict";n();at();Ll=200});function Nn(e){return e[Math.floor(Math.random()*e.length)]}var _i=v(()=>{"use strict";n()});var Rn=v(()=>{"use strict";n();hn()});var bt=v(()=>{"use strict";n();Fi();_i();Rn()});var Ui,Bi,Mn,Pl,Wi,On,$i,Gi,Ar=v(()=>{"use strict";n();Ui=require("@reduxjs/toolkit"),Bi=A(require("lodash.omit"));bt();Mn={id:"not-configured",chainId:"",name:"NOT CONFIGURED",egldLabel:"",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"",walletConnectBridgeAddress:"",walletConnectV2RelayAddress:"",walletConnectV2ProjectId:"",walletConnectV2Options:{},walletAddress:"",apiAddress:"",explorerAddress:"",apiTimeout:"4000"},Pl={network:Mn,chainID:"-1"},Wi=(0,Ui.createSlice)({name:"appConfig",initialState:Pl,reducers:{initializeNetworkConfig:(e,t)=>{let r=Nn(t.payload.walletConnectBridgeAddresses),o=Nn(t.payload.walletConnectV2RelayAddresses),i=(0,Bi.default)(t.payload,"walletConnectBridgeAddresses","walletConnectV2RelayAddresses");e.network=E(y(y({},e.network),i),{walletConnectBridgeAddress:r,walletConnectV2RelayAddress:o})},setChainID:(e,t)=>{e.chainID=t.payload}}}),{initializeNetworkConfig:On,setChainID:$i}=Wi.actions,Gi=Wi.reducer});var Vi,Fn,Hi,Bm,Wm,$m,Ir,br=v(()=>{"use strict";n();Vi=require("@reduxjs/toolkit");J();Y();Fn={isSigning:!1,signedSessions:{}},Hi=(0,Vi.createSlice)({name:"signedMessageInfoSliceState",initialState:Fn,reducers:{setSignSession:(e,t)=>{let{sessionId:r,signedSession:o,errorMessage:i}=t.payload;return E(y({},e),{errorMessage:i!=null?i:e.errorMessage,isSigning:o.status==="pending",signedSessions:E(y({},e.signedSessions),{[r]:o})})},setSignSessionState:(e,t)=>y(y({},e),t.payload),clearSignedMessageInfo:()=>Fn},extraReducers:e=>{e.addCase(G,()=>Fn)}}),{setSignSession:Bm,clearSignedMessageInfo:Wm,setSignSessionState:$m}=Hi.actions,Ir=Hi.reducer});var ji,qi,zi,Ki,_n,Un,Ym,Zm,Jm,Xm,kr,Er=v(()=>{"use strict";n();ji=require("@reduxjs/toolkit"),qi=require("redux-persist");Sn();J();yr();Y();zi={customToasts:[],transactionToasts:[],failTransactionToast:null},Ki=(0,ji.createSlice)({name:"toastsSlice",initialState:zi,reducers:{addCustomToast:(e,t)=>{e.customToasts.push(E(y({},t.payload),{type:"custom",toastId:t.payload.toastId||`custom-toast-${e.customToasts.length+1}`}))},removeCustomToast:(e,t)=>{e.customToasts=e.customToasts.filter(r=>r.toastId!==t.payload)},addTransactionToast:(e,t)=>{e.transactionToasts.push({type:"transaction",startTimestamp:wt(),toastId:t.payload||`custom-toast-${e.transactionToasts.length+1}`})},removeTransactionToast:(e,t)=>{e.transactionToasts=e.transactionToasts.filter(r=>r.toastId!==t.payload)},addFailTransactionToast:(e,t)=>{e.failTransactionToast=E(y({},t.payload),{toastId:gr})},removeFailTransactionToast:e=>{e.failTransactionToast=null}},extraReducers:e=>{e.addCase(G,()=>zi),e.addCase(qi.REHYDRATE,(t,r)=>{var i,l;let o=(l=(i=r.customToasts)==null?void 0:i.filter(p=>!("component"in p)))!=null?l:[];t.customToasts=o})}}),{addCustomToast:_n,removeCustomToast:Un,addTransactionToast:Ym,removeTransactionToast:Zm,addFailTransactionToast:Jm,removeFailTransactionToast:Xm}=Ki.actions,kr=Ki.reducer});var Yi,Wn,$n,Gn,Cl,Bn,Zi,rg,Dl,Vn,Lr,Pr=v(()=>{"use strict";n();Yi=require("@reduxjs/toolkit");Y();Wn="Transaction failed",$n="Transaction successful",Gn="Processing transaction",Cl="Transaction submitted",Bn={},Zi=(0,Yi.createSlice)({name:"transactionsInfo",initialState:Bn,reducers:{setTransactionsDisplayInfo(e,t){let{sessionId:r,transactionsDisplayInfo:o}=t.payload;r!=null&&(e[r]={errorMessage:(o==null?void 0:o.errorMessage)||Wn,successMessage:(o==null?void 0:o.successMessage)||$n,processingMessage:(o==null?void 0:o.processingMessage)||Gn,submittedMessage:(o==null?void 0:o.submittedMessage)||Cl,transactionDuration:o==null?void 0:o.transactionDuration})},clearTransactionsInfoForSessionId(e,t){t.payload!=null&&delete e[t.payload]},clearTransactionsInfo:()=>Bn},extraReducers:e=>{e.addCase(G,()=>Bn)}}),{clearTransactionsInfo:rg,setTransactionsDisplayInfo:Dl,clearTransactionsInfoForSessionId:Vn}=Zi.actions,Lr=Zi.reducer});function Ee(e){return e!=null&&(Bl(e)||Vl(e))}function ct(e){return e!=null&&(Wl(e)||Hl(e))}function lt(e){return e!=null&&($l(e)||zl(e))}function Hn(e){return e!=null&&Gl(e)}function Bl(e){return e!=null&&Nl.includes(e)}function Wl(e){return e!=null&&Rl.includes(e)}function $l(e){return e!=null&&Ml.includes(e)}function Gl(e){return e!=null&&Ol.includes(e)}function Vl(e){return e!=null&&Fl.includes(e)}function Hl(e){return e!=null&&_l.includes(e)}function zl(e){return e!=null&&Ul.includes(e)}var Nl,Rl,Ml,Ol,Fl,_l,Ul,Et=v(()=>{"use strict";n();R();Nl=["sent"],Rl=["success"],Ml=["fail","cancelled","timedOut"],Ol=["timedOut"],Fl=["pending"],_l=["success"],Ul=["fail","invalid"]});var Ji,Xi,Jt,jl,Qi,Xt,pt,ql,Lt,Kl,Yl,ug,Zl,Cr,zn,Dr,Nr=v(()=>{"use strict";n();Ji=require("@reduxjs/toolkit"),Xi=require("redux-persist");R();Et();Y();Jt={signedTransactions:{},transactionsToSign:null,signTransactionsError:null,signTransactionsCancelMessage:null,customTransactionInformationForSessionId:{}},jl={signWithoutSending:!1,sessionInformation:null,redirectAfterSign:!1},Qi=(0,Ji.createSlice)({name:"transactionsSlice",initialState:Jt,reducers:{moveTransactionsToSignedState:(e,t)=>{var u,g;let{sessionId:r,transactions:o,errorMessage:i,status:l,redirectRoute:p}=t.payload,d=((u=e.customTransactionInformationForSessionId)==null?void 0:u[r])||jl;e.signedTransactions[r]={transactions:o,status:l,errorMessage:i,redirectRoute:p,customTransactionInformation:d},((g=e==null?void 0:e.transactionsToSign)==null?void 0:g.sessionId)===r&&(e.transactionsToSign=Jt.transactionsToSign)},clearSignedTransaction:(e,t)=>{e.signedTransactions[t.payload]&&delete e.signedTransactions[t.payload]},clearTransactionToSign:e=>{e!=null&&e.transactionsToSign&&(e.transactionsToSign=null)},updateSignedTransaction:(e,t)=>{e.signedTransactions=y(y({},e.signedTransactions),t.payload)},updateSignedTransactions:(e,t)=>{let{sessionId:r,status:o,errorMessage:i,transactions:l}=t.payload;e.signedTransactions[r]!=null&&(e.signedTransactions[r].status=o,i!=null&&(e.signedTransactions[r].errorMessage=i),l!=null&&(e.signedTransactions[r].transactions=l))},updateSignedTransactionStatus:(e,t)=>{var d,u,g,f,h,I;let{sessionId:r,status:o,errorMessage:i,transactionHash:l}=t.payload,p=(u=(d=e.signedTransactions)==null?void 0:d[r])==null?void 0:u.transactions;if(p!=null){e.signedTransactions[r].transactions=p.map(b=>b.hash===l?E(y({},b),{status:o,errorMessage:i}):b);let P=(f=(g=e.signedTransactions[r])==null?void 0:g.transactions)==null?void 0:f.every(b=>ct(b.status)),k=(I=(h=e.signedTransactions[r])==null?void 0:h.transactions)==null?void 0:I.every(b=>lt(b.status));P&&(e.signedTransactions[r].status="success"),k&&(e.signedTransactions[r].status="fail")}},setTransactionsToSign:(e,t)=>{e.transactionsToSign=t.payload;let{sessionId:r,customTransactionInformation:o}=t.payload;e.customTransactionInformationForSessionId[r]=o,e.signTransactionsError=null},clearAllTransactionsToSign:e=>{e.transactionsToSign=Jt.transactionsToSign,e.signTransactionsError=null},clearAllSignedTransactions:e=>{e.signedTransactions=Jt.signedTransactions},setSignTransactionsError:(e,t)=>{e.signTransactionsError=t.payload},setSignTransactionsCancelMessage:(e,t)=>{e.signTransactionsCancelMessage=t.payload}},extraReducers:e=>{e.addCase(G,()=>Jt),e.addCase(Xi.REHYDRATE,(t,r)=>{var p;if(t.signTransactionsCancelMessage=null,!((p=r.payload)!=null&&p.transactions))return;let{signedTransactions:o,customTransactionInformationForSessionId:i}=r.payload.transactions,l=Object.entries(o).reduce((d,[u,g])=>{let f=new Date(u),h=new Date;return h.setHours(h.getHours()+5),h-f>0||(d[u]=g),d},{});i!=null&&(t.customTransactionInformationForSessionId=i),o!=null&&(t.signedTransactions=l)})}}),{updateSignedTransactionStatus:Xt,updateSignedTransactions:pt,setTransactionsToSign:ql,clearAllTransactionsToSign:Lt,clearAllSignedTransactions:Kl,clearSignedTransaction:Yl,clearTransactionToSign:ug,setSignTransactionsError:Zl,setSignTransactionsCancelMessage:Cr,moveTransactionsToSignedState:zn}=Qi.actions,Dr=Qi.reducer});var C=v(()=>{"use strict";n();Ln();vr();Dn();Ar();br();Er();Pr();Nr()});var jn=v(()=>{"use strict";n()});var os,ns,is,Og,Fg,_g,Ug,Bg,Wg,ss,as=v(()=>{"use strict";n();os=require("@reduxjs/toolkit");Y();ns={visible:!1,modal:{showHeader:!0,showFooter:!1,headerText:"",footerText:""}},is=(0,os.createSlice)({name:"dappModalsSlice",initialState:ns,reducers:{setDappModalVisibility:(e,t)=>{e.visible=t.payload},setDappModalHeaderVisibility:(e,t)=>{e.modal.showHeader=t.payload},setDappModalFooterVisibility:(e,t)=>{e.modal.showFooter=t.payload},setDappModalHeaderText:(e,t)=>{e.modal.headerText=t.payload},setDappModalFooterText:(e,t)=>{e.modal.footerText=t.payload},setDappModalConfig:(e,t)=>{e.modal=y({},t.payload)}},extraReducers:e=>{e.addCase(G,()=>ns)}}),{setDappModalVisibility:Og,setDappModalHeaderVisibility:Fg,setDappModalFooterVisibility:_g,setDappModalHeaderText:Ug,setDappModalFooterText:Bg,setDappModalConfig:Wg}=is.actions,ss=is.reducer});var cs,ep,tp,Ct,Fr=v(()=>{"use strict";n();cs=require("@reduxjs/toolkit");jn();Ln();as();vr();Dn();Ar();br();Er();Pr();Nr();ep={["account"]:vi,["dappModal"]:ss,["loginInfo"]:Li,["modals"]:Ri,["networkConfig"]:Gi,["signedMessageInfo"]:Ir,["toasts"]:kr,["transactionsInfo"]:Lr,["transactions"]:Dr},tp=(e={})=>(0,cs.combineReducers)(y(y({},ep),e)),Ct=tp});var us={};et(us,{default:()=>lp});function _r(e,t=[]){return{key:e,version:1,storage:ps.default,blacklist:t}}var $e,ls,ps,rp,np,op,ip,sp,ap,cp,lp,ds=v(()=>{"use strict";n();$e=require("redux-persist"),ls=A(require("redux-persist/lib/storage")),ps=A(require("redux-persist/lib/storage/session"));Fr();C();br();Er();Pr();Nr();jn();rp={2:e=>E(y({},e),{networkConfig:Mn})};np=_r("sdk-dapp-transactionsInfo"),op=_r("sdk-dapp-transactions",["transactionsToSign"]),ip=_r("sdk-dapp-toasts"),sp=_r("sdk-dapp-signedMessageInfo"),ap={key:"sdk-dapp-store",version:2,storage:ls.default,whitelist:["account","loginInfo","modals","networkConfig"],migrate:(0,$e.createMigrate)(rp,{debug:!1})},cp={["toasts"]:(0,$e.persistReducer)(ip,kr),["transactions"]:(0,$e.persistReducer)(op,Dr),["transactionsInfo"]:(0,$e.persistReducer)(np,Lr),["signedMessageInfo"]:(0,$e.persistReducer)(sp,Ir)},lp=(0,$e.persistReducer)(ap,Ct(cp))});var ms={};et(ms,{default:()=>pp});var pp,gs=v(()=>{"use strict";n();Fr();pp=Ct()});var fs={};et(fs,{default:()=>dp});var le,up,dp,Ts=v(()=>{"use strict";n();le=require("redux-persist"),up=[le.FLUSH,le.REHYDRATE,le.PAUSE,le.PERSIST,le.PURGE,le.REGISTER],dp=up});var Ss={};et(Ss,{default:()=>hs});function hs(e){return(0,ys.persistStore)(e)}var ys,xs=v(()=>{"use strict";n();ys=require("redux-persist")});var Qu={};et(Qu,{AppInitializer:()=>mo,AuthenticatedRoutesWrapper:()=>la,AxiosInterceptor:()=>To,AxiosInterceptorContext:()=>fu,AxiosInterceptorContextProvider:()=>go,DappProvider:()=>Xu,LoginInfoListener:()=>fo,useAxiosInterceptorContext:()=>_t});module.exports=qt(Qu);n();n();var no=A(require("react"));n();var Es=require("react"),Dt=require("react-redux");n();var qn=require("@reduxjs/toolkit"),Is=require("react-redux/lib/utils/Subscription");C();n();var ts=A(require("lodash.throttle"));D();n();var es=A(require("lodash.isequal")),Rr=require("reselect");J();var x=(0,Rr.createSelectorCreator)(Rr.defaultMemoize,es.default),Pt=(e,t)=>e!=""&&Boolean(t);C();Pn();vt();it();var Jl=[Tr],Mr=!1,Xl=(0,ts.default)(()=>{Zt(Yt())},5e3),rs=e=>t=>r=>{var u;if(Jl.includes(r.type))return t(r);let o=e.getState(),i=be.local.getItem(ce.loginExpiresAt);if(!Pt((u=o==null?void 0:o.loginInfo)==null?void 0:u.loginMethod,o==null?void 0:o.account.address))return t(r);if(i==null)return Zt(Yt());let p=Date.now();return i-p<0&&!Mr?setTimeout(()=>{Mr=!0,e.dispatch(ki())},1e3):(Mr&&(Mr=!1),Xl()),t(r)};n();n();function Or(){return typeof sessionStorage!="undefined"}var ws=Or()?(ds(),qt(us)).default:(gs(),qt(ms)).default,vs=Or()?(Ts(),qt(fs)).default:[],As=Or()?(xs(),qt(Ss)).default:e=>e;Fr();var w=(0,qn.configureStore)({reducer:ws,middleware:e=>e({serializableCheck:{ignoredActions:[...vs,Sr.type,st.type],ignoredPaths:["payload.nonce","account.account.nonce","providers.accountProvider"]}}).concat(rs)}),bs=(0,Is.createSubscription)(w),ks=As(w),gf=(0,qn.configureStore)({reducer:Ct});var mp={store:w,subscription:bs},Qt=(0,Es.createContext)(mp),hf=(0,Dt.createStoreHook)(Qt),M=(0,Dt.createDispatchHook)(Qt),S=(0,Dt.createSelectorHook)(Qt);n();n();C();var Le=e=>e.account,Pe=x(Le,e=>e.address),Ge=x(Le,Pe,(e,t)=>t in e.accounts?e.accounts[t]:hr),Ls=x(Le,Ge,(e,t)=>{let i=e,{accounts:r}=i,o=Qe(i,["accounts"]);return E(y({},o),{account:t})}),gp=x(Ge,e=>e.balance),Ps=x(Ge,e=>{var t;return((t=e==null?void 0:e.nonce)==null?void 0:t.valueOf())||0}),vf=x(Le,e=>e.shard),Kn=x(Le,e=>e.ledgerAccount),Af=x(Le,e=>e.walletConnectAccount),Cs=x(Le,e=>e.isAccountLoading),If=x(Le,e=>e.accountLoadingError),Yn=x(Le,e=>e.websocketEvent);n();var q=e=>e.loginInfo,Ds=x(q,e=>e.loginMethod),Ce=x(q,Pe,(e,t)=>Pt(e.loginMethod,t)),Ns=x(q,e=>e.walletConnectLogin),Rs=x(q,e=>e.ledgerLogin),Nt=x(q,e=>e.walletLogin),Ms=x(q,e=>e.isLoginSessionInvalid),Ur=x(q,e=>e.tokenLogin),Rt=x(q,e=>e.logoutRoute);n();var Os=e=>e.modals,Cf=x(Os,e=>e.txSubmittedModal),fp=x(Os,e=>e.notificationModal);n();var he=e=>e.networkConfig,er=x(he,e=>e.chainID),Fs=x(he,e=>e.network.walletConnectBridgeAddress),_s=x(he,e=>e.network.walletConnectV2RelayAddress),Us=x(he,e=>e.network.walletConnectV2ProjectId),Bs=x(he,e=>e.network.walletConnectV2Options),Br=x(he,e=>e.network.walletConnectDeepLink),pe=x(he,e=>e.network),Wr=x(pe,e=>e.apiAddress),Ws=x(pe,e=>e.explorerAddress),$s=x(pe,e=>e.egldLabel);n();var Zn=e=>e.signedMessageInfo,Of=x(Zn,e=>e.isSigning),Ff=x(Zn,e=>e.errorMessage),_f=x(Zn,e=>{let t=Object.keys(e.signedSessions),r=t.length;return e.signedSessions[t[r-1]]});n();var Jn=e=>e.toasts,Wf=x(Jn,e=>e.customToasts),$f=x(Jn,e=>e.transactionToasts),Gf=x(Jn,e=>e.failTransactionToast);n();C();var Gs={errorMessage:Wn,successMessage:$n,processingMessage:Gn},Tp=e=>e.transactionsInfo,yp=x(Tp,(e,t)=>t,(e,t)=>t!=null&&(e==null?void 0:e[Number(t)])||Gs);n();n();var se=require("@multiversx/sdk-core");D();n();function Xn(e){try{return s.Buffer.from(e,"base64").toString()===atob(e)}catch(t){return!1}}function Mt(e){return atob(e)}function Ot(e){var i,l,p;let{data:t}=e,r=Xn(t!=null?t:"")?se.TransactionPayload.fromEncoded(t):new se.TransactionPayload(t),o=new se.Transaction(y({value:e.value.valueOf(),data:r,nonce:e.nonce.valueOf(),receiver:new se.Address(e.receiver),sender:new se.Address(e.sender),gasLimit:(i=e.gasLimit.valueOf())!=null?i:Kt,gasPrice:(l=e.gasPrice.valueOf())!=null?l:fr,chainID:e.chainID.valueOf(),version:new se.TransactionVersion((p=e.version)!=null?p:ai)},e.options?{options:new se.TransactionOptions(e.options)}:{}));return o.applySignature({hex:()=>e.signature||""},new se.Address(e.sender)),o}n();Et();n();var Sp=A(require("bignumber.js"));J();n();n();n();n();var wp=require("@multiversx/sdk-core"),vp=A(require("bignumber.js"));R();n();var zs=require("@multiversx/sdk-core");function xp(e){try{let t=new zs.Address(e);return Boolean(t.bech32())}catch(t){return!1}}function tr(e){return(e==null?void 0:e.startsWith("erd"))&&e.length===62&&/^\w+$/.test(e)&&xp(e)}n();n();n();var Ip=require("@multiversx/sdk-core/out");n();D();n();var js=require("@multiversx/sdk-core");J();n();n();n();n();R();n();n();n();n();n();n();n();var qs="dapp/config",Ks="network/config";var $r="accounts";var Qn="blocks";n();n();n();n();Z();n();n();Z();n();n();n();var Np=A(require("bignumber.js"));D();n();var Dp=require("@multiversx/sdk-core"),eo=A(require("bignumber.js"));D();n();var Pp=A(require("bignumber.js"));n();eo.default.config({ROUNDING_MODE:eo.default.ROUND_FLOOR});n();n();n();D();n();n();n();n();D();n();D();n();var Rp=require("@multiversx/sdk-core");D();n();var rr=require("@multiversx/sdk-core"),Fp=require("@multiversx/sdk-network-providers");D();n();n();var Mp=A(require("bignumber.js"));D();n();D();n();n();n();n();n();D();n();Z();var Up=["reDelegateRewards","claimRewards","unBond"],Bp=["wrapEgld","unwrapEgld"],Wp=["unStake"],$p=["unDelegate"];n();n();n();D();n();var zp=A(require("bignumber.js"));n();n();n();Z();n();var jp=A(require("bignumber.js"));n();n();n();n();Z();n();n();n();var Yp=A(require("linkifyjs"));n();D();n();var Zp=A(require("bignumber.js"));n();J();n();n();R();n();R();n();n();n();Z();n();Z();n();var Jp=A(require("bignumber.js"));D();Z();n();Z();n();var ea=require("react");J();n();n();Z();n();var Xp=require("@multiversx/sdk-core/out"),Qp=A(require("bignumber.js"));Z();n();Z();n();n();R();var dw=[{label:"Raw",value:"raw"},{label:"Text",value:"text"},{label:"Decimal",value:"decimal"},{label:"Smart",value:"smart"}];n();var ta=require("react");J();n();var tu=require("react");Z();var Sw=["create","localMint","ESDTLocalMint","addQuantity","burn","localBurn","ESDTLocalBurn","wipe","writeLog","signalError"];var zr=e=>e.transactions,He=x(zr,e=>e.signedTransactions),ru=x(zr,e=>e.signTransactionsError),ra=x(zr,e=>e.signTransactionsCancelMessage),jr=e=>t=>Object.entries(t).reduce((r,[o,i])=>(e(i.status)&&(r[o]=i),r),{}),ro=x(He,jr(Ee)),na=x(He,jr(ct)),oa=x(He,jr(lt)),nu=x(He,jr(Hn)),ia=x(zr,e=>{var t;return(e==null?void 0:e.transactionsToSign)==null?null:E(y({},e.transactionsToSign),{transactions:((t=e==null?void 0:e.transactionsToSign)==null?void 0:t.transactions.map(r=>Ot(r)))||[]})}),ou=x(He,(e,t)=>t,(e,t)=>t!=null?(e==null?void 0:e[t])||{}:{});at();n();n();function sa(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(r){}}}function aa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=iu(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let l=i[0],p=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((g,f,h)=>{if(f==="*"){let I=d[h]||"";p=l.slice(0,l.length-I.length).replace(/(.)\/+$/,"$1")}return g[f]=su(d[h]||"",f),g},{}),pathname:l,pathnameBase:p,pattern:e}}function iu(e,t=!1,r=!0){sa(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(p,d)=>(o.push(d),"([^\\/]+)"));return e.endsWith("*")?(o.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=r?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(i,t?void 0:"i"),o]}function su(e,t){try{return decodeURIComponent(e)}catch(r){return sa(!1,`The value for the URL param "${t}" will not be decoded because the string "${e}" is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}var ca=(e,t)=>e.filter(({authenticatedRoute:i})=>Boolean(i)).some(({path:i})=>aa(i,t)!==null);var la=({children:e,routes:t,unlockRoute:r,onRedirect:o})=>{let i=S(Ce),l=S(Cs),p=S(Nt),u=ca(t,window.location.pathname)&&!i&&p==null;return l||p?null:u?(o?o(r):ke(r),null):no.default.createElement(no.default.Fragment,null,e)};n();var Re=A(require("react")),Pa=require("@multiversx/sdk-core/out");n();n();n();var pa=A(require("axios"));function ua(e){return T(this,null,function*(){let{apiAddress:t,apiTimeout:r}=pe(w.getState()),o=e.map(l=>pa.default.post(`${t}/transactions`,l.toPlainObject(),{timeout:parseInt(r)}));return(yield Promise.all(o)).map(({data:l})=>l.txHash)})}n();var da=A(require("axios"));function qr(e){return T(this,null,function*(){let t=Wr(w.getState()),r=e.map(i=>i.hash),{data:o}=yield da.default.get(`${t}/transactions`,{params:{hashes:r.join(","),withScResults:!0}});return e.map(({hash:i,previousStatus:l})=>{let p=o.find(d=>(d==null?void 0:d.txHash)===i);return{hash:i,data:p==null?void 0:p.data,invalidTransaction:p==null,status:p==null?void 0:p.status,results:p==null?void 0:p.results,sender:p==null?void 0:p.sender,receiver:p==null?void 0:p.receiver,previousStatus:l,hasStatusChanged:p&&p.status!==l}})})}n();var cu=A(require("axios"));n();n();var lu=A(require("axios"));n();var pu=A(require("axios"));n();n();n();var ga=A(require("axios"));n();n();var Kr=e=>{let t=e!=null?e:Wr(w.getState());return t.endsWith("/")?t.slice(0,-1):t};function fa(e){return T(this,null,function*(){if(!e)return null;let r=`${Kr()}/${$r}/${e}`;try{let{data:o}=yield ga.default.get(r);return o}catch(o){console.error("error fetching configuration for ",r)}return null})}n();n();St();n();var Ta=A(require("axios"));function oo(e){return T(this,null,function*(){let t=`${e}/${qs}`;try{let{data:o}=yield Ta.default.get(t);if(o!=null){let i="egldDenomination";if(i in o){let r=o,{[i]:l,decimals:p}=r,d=Qe(r,[ko(i),"decimals"]);return E(y({},d),{decimals:l,digits:p})}return o}}catch(o){console.error("error fetching configuration for ",t)}return null})}n();var ya=A(require("axios"));function ha(){return T(this,null,function*(){var r;let t=`${Kr()}/${Ks}`;try{let{data:o}=yield ya.default.get(t);if(o!=null)return(r=o==null?void 0:o.data)==null?void 0:r.config}catch(o){console.error("error fetching configuration for ",t)}return null})}n();St();n();St();n();var uu=A(require("axios"));St();n();var De=()=>S(Ls);Ar();n();n();n();n();var Sa=require("@multiversx/sdk-extension-provider"),xa=require("@multiversx/sdk-hw-provider"),wa=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectProvider"),va=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectV2Provider"),io=require("@multiversx/sdk-web-wallet-provider");D();R();var du="/dapp/init",ut=e=>{switch(e==null?void 0:e.constructor){case io.WalletProvider:return"wallet";case wa.WalletConnectProvider:return"walletconnect";case va.WalletConnectV2Provider:return"walletconnectv2";case xa.HWProvider:return"ledger";case Sa.ExtensionProvider:return"extension";case Yr:return"";default:return"extra"}},so=e=>new io.WalletProvider(`${e}${du}`),ao=e=>T(void 0,null,function*(){if(!e.isInitialized())throw new Error("Unable to get version. Provider not initialized");let t=e.hwApp,{contractData:r,version:o}=yield t.getAppConfiguration();return{version:o,dataEnabled:r===ci}}),Ne=e=>`Unable to perform ${e}, Provider not initialized`,Yr=class{init(){return Promise.resolve(!1)}login(t){throw new Error(Ne(`login with options: ${t}`))}logout(t){throw new Error(Ne(`logout with options: ${t}`))}getAddress(){throw new Error(Ne("getAddress"))}isInitialized(){return!1}isConnected(){return Promise.resolve(!1)}sendTransaction(t,r){throw new Error(Ne(`sendTransaction with transactions: ${t} options: ${r}`))}signTransaction(t,r){throw new Error(Ne(`signTransaction with transactions: ${t} options: ${r}`))}signTransactions(t,r){throw new Error(Ne(`signTransactions with transactions: ${t} options: ${r}`))}signMessage(t,r){throw new Error(Ne(`signTransactions with ${t} and options ${r}`))}sendCustomMessage({method:t,params:r}){throw new Error(Ne(`sendCustomMessage with method: ${t} params: ${r}`))}sendCustomRequest(t){throw new Error(Ne(`sendSessionEvent with options: ${t}`))}ping(){return Promise.resolve(!1)}},co=new Yr;var po=co,lo=null;function Se(e){po=e}function Aa(e){lo=e}function Ia(){lo!=null&&(po=lo)}function re(){return po||co}Y();J();n();function me(){return Ce(w.getState())}n();n();R();n();n();function ba(){let e=re();return ut(e)}function ue(e){return ba()===e}function ze(){let{search:e}=window.location,t=w.getState(),r=re(),o=Pe(t),i=Ce(t),l=Nt(t);if(!r)throw"provider not initialized";return ue("ledger")&&i?new Promise(p=>{p(o)}):!ue("")&&!ue("wallet")&&!ue("extra")?r.getAddress():new Promise(p=>{if(l!=null){let d=new URLSearchParams(e),u=Object.fromEntries(d);tr(u.address)&&p(u.address)}i&&p(o),p("")})}n();function je(e){return T(this,null,function*(){return yield fa(e)})}n();C();function ka(e){w.dispatch(Sr(e))}n();function Ft(e){let t=w.getState(),r=Ps(t);return e?r&&!isNaN(r)?Math.max(r,e.nonce):e.nonce:r}n();n();C();var Ea=()=>T(void 0,null,function*(){try{let e=yield ze();try{let t=yield je(e);if(t!=null){let r=E(y({},t),{nonce:Ft(t)});return w.dispatch(st(r)),r}}catch(t){console.error("Failed getting account ",t)}}catch(e){console.error("Failed getting address ",e)}return null});function Zr(){return T(this,null,function*(){let e=re();if(e==null)throw"Provider not initialized";if(!e.isInitialized||e.isInitialized())return Ea();try{if(!e.init)throw"Current provider does not have init() function";return(yield e.init())?Ea():void 0}catch(t){console.error("Failed initializing provider ",t)}})}n();var La=require("@multiversx/sdk-core");n();Y();J();at();vt();it();var mu=e=>{be.local.setItem({key:ce.logoutEvent,data:e,expires:0}),be.local.removeItem(ce.logoutEvent)};function X(e,t){return T(this,null,function*(){let r=re(),o=ut(r),i=me(),l=o==="wallet";if(!i||!r){uo(e,t,!1);return}try{let p=yield ze();mu(p)}catch(p){uo(e,t,!1),console.error("error fetching logout address",p)}l&&Oi(),w.dispatch(G());try{let d=l&&!e?window.location.origin:e;l?setTimeout(()=>{r.logout({callbackUrl:d})}):(yield r.logout({callbackUrl:d}),uo(e,t,l))}catch(p){console.error("error logging out",p)}})}function uo(e,t,r){e&&!r&&(typeof t=="function"?t(e):ke(e))}vr();function mo({customNetworkConfig:e={},children:t,environment:r,logoutRoute:o}){let[i,l]=(0,Re.useState)(!1),p=De(),d=S(Ms),{address:u,publicKey:g}=p,f=M();function h(){return T(this,null,function*(){let P=!(e!=null&&e.skipFetchFromServer),k=e==null?void 0:e.apiAddress,b=ot[r]||{},O=y(y({},b),e);if(P){let N=b==null?void 0:b.apiAddress,V=yield oo(k||N);if(V!=null){let ne=y(y(y({},b),V),e);f(On(ne));return}}f(On(O))})}function I(){return T(this,null,function*(){f(Ei(o)),yield h(),l(!0)})}return(0,Re.useEffect)(()=>{u&&new Pa.Address(u).hex()!==g&&X(o)},[u,g,o]),(0,Re.useEffect)(()=>{I()},[e,r,o]),(0,Re.useEffect)(()=>{p.address&&d&&X(o)},[d,p.address,o]),i?Re.default.createElement(Re.default.Fragment,null,t):null}n();var Vt=A(require("react")),Nc=require("react-redux"),Rc=require("redux-persist/integration/react");n();var Fe=require("react"),Ga=require("@multiversx/sdk-extension-provider"),Va=require("@multiversx/sdk-hw-provider");n();var _a=require("react"),Xr=require("@multiversx/sdk-core");n();n();var dt=()=>S(Ge);n();n();n();n();n();var Me=A(require("react"));var Ca=(0,Me.createContext)({}),gu=w.getState();function go({children:e}){let[t,r]=(0,Me.useState)(),[o,i]=(0,Me.useState)(q(gu)),l={address:t,setAddress:r,isLoggedIn:Pt(o.loginMethod,t),loginInfo:o,setLoginInfo:p=>i(p)};return Me.default.createElement(Ca.Provider,{value:l},e)}function _t(){let e=(0,Me.useContext)(Ca);if(e===void 0||Object.values(e).length===0)throw new Error("useAxiosInterceptorContext must be used within an AxiosInterceptorContextProvider");return e}n();var nr=A(require("react"));var fo=({children:e=null})=>{var l;let{address:t}=dt(),r=S(q),{setLoginInfo:o,setAddress:i}=_t();return(0,nr.useEffect)(()=>{i(t),o(r)},[(l=r.tokenLogin)==null?void 0:l.loginToken,t]),nr.default.createElement(nr.default.Fragment,null,e)};n();var qe=A(require("react")),Jr=A(require("axios"));var To=({children:e,authenticatedDomanis:t})=>{var d;let{loginInfo:r}=_t(),o=(d=r==null?void 0:r.tokenLogin)==null?void 0:d.nativeAuthToken,i=(0,qe.useRef)(-1),l=()=>{Jr.default.interceptors.response.use(u=>u,u=>{var f,h;let g=(f=u.config)==null?void 0:f.url;return(h=u.config)!=null&&h.params&&(g+=`?${new URLSearchParams(u.config.params).toString()}`),console.error("Axios error for: ",g),Promise.reject(u)})},p=()=>{Jr.default.interceptors.request.eject(i.current),i.current=Jr.default.interceptors.request.use(u=>T(void 0,null,function*(){return t.includes(String(u==null?void 0:u.baseURL))&&(u.headers={Authorization:`Bearer ${o}`}),u}),u=>{Promise.reject(u)})};return(0,qe.useEffect)(l,[]),(0,qe.useEffect)(()=>{o&&p()},[o]),qe.default.createElement(qe.default.Fragment,null,e)};var fu={Interceptor:To,Listener:fo,Provider:go};n();n();var or=()=>{let e=re(),t=ut(e);return{provider:e,providerType:t}};n();C();n();n();n();var Da,ir={hostname:typeof window!="undefined"?(Da=window==null?void 0:window.location)==null?void 0:Da.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},sr=e=>{var r,o,i,l;return e===!0?ir:{hostname:(r=e==null?void 0:e.hostname)!=null?r:ir.hostname,expirySeconds:(o=e==null?void 0:e.expirySeconds)!=null?o:ir.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:ir.apiAddress,tokenExpirationToastWarningSeconds:(l=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?l:ir.tokenExpirationToastWarningSeconds}};n();var Tu=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),Ut=e=>Tu(s.Buffer.from(e,"utf8").toString("base64"));n();var Na=A(require("axios"));function Ra(e){return T(this,null,function*(){let{data:t}=yield Na.default.get(`${e}/${Qn}?size=1&fields=hash,timestamp`),[r]=t;return r})}n();n();n();function yu(e){return Object.prototype.toString.call(e)==="[object String]"}var Ma=e=>{if(!e||!yu(e))return null;try{let[t,r,o]=e.split("."),i=Mt(t),l=Mt(r),[p,d,u,g]=l.split("."),f=JSON.parse(Mt(g)),h=Mt(p),I={ttl:Number(u),address:i,extraInfo:f,host:h,signature:o,blockHash:d,body:l};return g==="e30"&&delete I.extraInfo,I}catch(t){return null}};var Oa=({address:e,token:t,signature:r})=>{let o=Ut(e),i=Ut(t);return`${o}.${i}.${r}`};n();yr();var Bt=e=>{let t=Ma(e);if(!t)return{isExpired:!1};let r=wt(),{ttl:o,extraInfo:i}=t,l=i.timestamp;if(!l)return{isExpired:!1};let p=l+o,d=r>p,u=p-r;return{isExpired:d,expiresAt:p,secondsUntilExpires:u}};var Fa=e=>{let{hostname:t,apiAddress:r,expirySeconds:o}=sr(e);return{getNativeAuthConfig:sr,initialize:(...p)=>T(void 0,[...p],function*(l={}){let{hash:d,timestamp:u}=yield Ra(r),g=Ut(JSON.stringify(y(y({},l),u?{timestamp:u}:{})));return`${Ut(t)}.${d}.${o}.${g}`}),getToken:Oa,getTokenExpiration:Bt}};n();var hu=(e,t)=>{var r;return t?t===!0?e:(r=t.apiAddress)!=null?r:e:null},Oe=e=>{let t=S(pe),r=S(Ur),o=(0,_a.useRef)(r==null?void 0:r.loginToken),i=hu(t.apiAddress,e),l=sr(y(y({},e===!0?{}:e),i?{apiAddress:i}:{})),p=Boolean(e),d=Fa(l),{address:u}=dt(),g=M(),f=k=>{o.current=k,g(wr(y({loginToken:k},i?{nativeAuthConfig:l}:{})))},h=()=>T(void 0,null,function*(){try{return yield d.initialize()}catch(k){console.error("Unable to get block. Login failed.",k);return}}),I=({address:k,signature:b})=>{let O=o.current;if(!O)throw"Token not found. Call `setLoginToken` first.";if(!p){g(wr({loginToken:O,signature:b}));return}let N=d.getToken({address:k,token:O,signature:b});g(wr(y({loginToken:O,signature:b,nativeAuthToken:N},i?{nativeAuthConfig:l}:{})))};return{configuration:l,setLoginToken:f,getNativeAuthLoginToken:h,setTokenLoginInfo:I,refreshNativeAuthTokenLogin:b=>T(void 0,[b],function*({signMessageCallback:k}){let O=yield h();if(o.current=O,!O)return;let N=new Xr.SignableMessage({address:new Xr.Address(u),message:s.Buffer.from(O)}),V=yield k(N,{});I({address:u,signature:V.toJSON().signature})})}};n();var Ke=require("react"),Ua=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectProvider");n();var Qr=require("react");function Wt(e,t=[]){let r=(0,Qr.useRef)(!0);(0,Qr.useEffect)(()=>{r.current?r.current=!1:e()},t)}Y();C();R();bt();var yo=({logoutRoute:e,callbackRoute:t,nativeAuth:r,token:o,onLoginRedirect:i})=>{let l=M(),p=15e3,d=r!=null,u=Oe(r),g=o,[f,h]=(0,Ke.useState)(""),[I,P]=(0,Ke.useState)(""),{provider:k}=or(),b=S(Fs),O=S(Br),N=(0,Ke.useRef)(k),V=(0,Ke.useRef)(!0),ne,Q=Boolean(I),Ye=!Q,Ue=Q?`${O}?wallet-connect=${encodeURIComponent(I)}`:"";(0,Ke.useEffect)(()=>{Je();let B=setInterval(()=>{Je()},p);return()=>clearInterval(B)},[k]),Wt(()=>{!o||L()},[o]),Wt(()=>{N.current=k},[k]);let U=()=>{X(e)},Ze=()=>{V.current=!1};function Je(){return T(this,null,function*(){var we,z;if(k==null||!ue("walletconnect")||!Boolean((z=(we=N.current)==null?void 0:we.walletConnector)==null?void 0:z.connected))return;let H={method:"heartbeat",params:{}};try{yield N.current.sendCustomMessage(H)}catch(ee){console.error("Connection lost",ee),U()}})}function Ht(){return T(this,null,function*(){var B;try{let H=N.current;if(me()||H==null||!ue("walletconnect"))return;if(!V.current){try{yield(B=N.current)==null?void 0:B.logout()}catch(j){console.warn("Unable to logout")}return}let z=yield H.getAddress();if(!z){console.warn("Login cancelled.");return}let ee=yield H.getSignature(),gt={address:z,loginMethod:"walletconnect"},W={logoutRoute:e,loginType:"walletConnect",callbackRoute:t!=null?t:window.location.href};l(xr(W)),ee&&u.setTokenLoginInfo({signature:ee,address:z}),l(oe(gt)),H.walletConnector.on("heartbeat",()=>{clearInterval(ne),ne=setInterval(()=>{console.log("Maiar Wallet Connection Lost"),U(),clearInterval(ne)},15e4)}),It({callbackRoute:t,onLoginRedirect:i,options:{address:z,signature:ee}})}catch(H){h("Invalid address"),console.error(H)}})}function zt(B=!0){return T(this,null,function*(){var ee,gt;let H=B&&!I;if(!b||((gt=(ee=N==null?void 0:N.current)==null?void 0:ee.isInitialized)==null?void 0:gt.call(ee))&&!H)return;let we={onClientLogin:Ht,onClientLogout:U},z=new Ua.WalletConnectProvider(b,we);yield z.init(),V.current=!0,Se(z),N.current=z,B&&L()})}function L(){return T(this,null,function*(){var z;if(!b)return;let B=yield(z=N.current)==null?void 0:z.login();if(!Boolean(B))return;if(d&&!g&&(g=yield u.getNativeAuthLoginToken(),!g)){console.warn("Fetching block failed. Login cancelled.");return}if(!g){P(B);return}u.setLoginToken(g);let we=`${B}&token=${g}`;P(we)})}let F=Boolean(f),Xe=me();return[zt,{error:f,loginFailed:F,isLoading:Ye&&!F,isLoggedIn:Xe&&!F},{uriDeepLink:Ue,walletConnectUri:I,cancelLogin:Ze}]};n();var xe=require("react"),Ba=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectV2Provider");Y();C();R();bt();var ho=({callbackRoute:e,logoutRoute:t,token:r,nativeAuth:o,onLoginRedirect:i})=>{let l=M(),p=o!=null,d=Oe(o),u=r,[g,f]=(0,xe.useState)(""),[h,I]=(0,xe.useState)(""),[P,k]=(0,xe.useState)(!0),[b,O]=(0,xe.useState)([]),N=re(),V=S(_s),ne=S(Us),Q=S(Bs),Ye=S(er),Ue=S(Br),U=(0,xe.useRef)(N),Ze=(0,xe.useRef)(!0),Je=["erd_cancelAction"],Ht=P?"":`${Ue}?wallet-connect=${encodeURIComponent(h)}`;Wt(()=>{!r||z()},[r]),Wt(()=>{U.current=N},[N]),(0,xe.useEffect)(()=>{k(!Boolean(h))},[h]);let zt=()=>{X(t)},L=W=>{console.log("wc2 session event: ",W)},F=()=>{Ze.current=!1};function Xe(){return T(this,null,function*(){var W;try{let j=U.current;if(me()||j==null||!ue("walletconnectv2"))return;if(!Ze.current){try{yield(W=U.current)==null?void 0:W.logout()}catch(ed){console.warn("Unable to logout")}return}let de=yield j.getAddress();if(!de){console.warn("Login cancelled.");return}let Be=yield j.getSignature(),on={address:de,loginMethod:"walletconnectv2"},Mc={logoutRoute:t,loginType:"walletconnectv2",callbackRoute:e!=null?e:window.location.href};l(xr(Mc)),Be&&d.setTokenLoginInfo({signature:Be,address:de}),l(oe(on)),It({callbackRoute:e,onLoginRedirect:i,options:{address:de,signature:Be}})}catch(j){f("Invalid address"),console.error(j)}})}function B(W=!0){return T(this,null,function*(){if(!ne||!V){f("Invalid WalletConnect setup");return}let j={onClientLogin:Xe,onClientLogout:zt,onClientEvent:L},K=new Ba.WalletConnectV2Provider(j,Ye,V,ne,Q);yield K.init(),Ze.current=!0,Se(K),O(K.pairings),U.current=K,W&&z()})}function H(W){return T(this,null,function*(){var j,K,de;if(!V||!ne){f("Invalid WalletConnect setup");return}if(!W||!W.topic){f("Expired connection");return}try{let{approval:Be}=yield(j=U.current)==null?void 0:j.connect({topic:W.topic,methods:Je});if(p&&!u&&(u=yield d.getNativeAuthLoginToken(),!u)){console.warn("Fetching block failed. Login cancelled.");return}u&&d.setLoginToken(u);try{yield(K=U.current)==null?void 0:K.login({approval:Be,token:u})}catch(on){f("User rejected existing connection proposal"),k(!0),yield B()}}catch(Be){console.error("Unable to connect to existing session",Be),f("Unable to connect to existing session")}finally{O((de=U.current)==null?void 0:de.pairings)}})}function we(W){return T(this,null,function*(){var j,K;try{W&&(yield(j=U.current)==null?void 0:j.logout({topic:W}))}catch(de){console.error("Unable to remove existing pairing",de),f("Unable to remove existing pairing")}finally{O((K=U.current)==null?void 0:K.pairings)}})}function z(){return T(this,null,function*(){var W,j;if(!V||!ne){f("Invalid WalletConnect setup");return}try{let{uri:K,approval:de}=yield(W=U.current)==null?void 0:W.connect({methods:Je});if(!Boolean(K))return;if(I(K),p&&!u&&(u=yield d.getNativeAuthLoginToken(),!u)){console.warn("Fetching block failed. Login cancelled.");return}u&&d.setLoginToken(u);try{yield(j=U.current)==null?void 0:j.login({approval:de,token:u})}catch(on){f("User rejected connection proposal"),k(!0),yield B()}}catch(K){console.error("Unable to connect",K)}})}let ee=Boolean(g),gt=me();return[B,{error:g,loginFailed:ee,isLoading:P&&!ee,isLoggedIn:gt&&!ee},{uriDeepLink:Ht,walletConnectUri:h,cancelLogin:F,connectExisting:H,removeExistingPairing:we,wcPairings:b}]};Y();C();R();n();n();var Wa=e=>{let t=new URLSearchParams(e).toString(),{pathname:r}=window.location,o=t?`?${t}`:"",i=r?`${r}${o}`:"./";setTimeout(()=>{window.history.replaceState({},document==null?void 0:document.title,i)})};var $a=e=>{var o;let t={};if((o=window==null?void 0:window.location)!=null&&o.search){let i=new URLSearchParams(window.location.search);t=Object.fromEntries(i)}let r={};return e.forEach(i=>{r[i]=t[i],delete t[i]}),{remainingParams:r,clearNavigationHistory:()=>Wa(t)}};function Ha(){let e=S(pe),t=S(Ns),r=S(Ds),o=S(Nt),i=S(Pe),l=S(Kn),p=S(Rs),d=S(Ce),u=S(Rt),[g,f]=(0,Fe.useState)(),h=S(Ur),I=h==null?void 0:h.nativeAuthConfig,P=Oe(I||!1),k=(0,Fe.useRef)(!1),b=M(),{callbackRoute:O,logoutRoute:N}=t||{callbackRoute:"",logoutRoute:""},[V]=yo({callbackRoute:O,logoutRoute:N}),[ne]=ho({callbackRoute:O,logoutRoute:N});(0,Fe.useEffect)(()=>{Q()},[e]),(0,Fe.useEffect)(()=>{zt()},[r]),(0,Fe.useEffect)(()=>{Ue()},[i,e]),(0,Fe.useEffect)(()=>{Ye()},[l,d,g]);function Q(){return T(this,null,function*(){try{let L=yield ha();L&&b($i(L.erd_chain_id))}catch(L){console.error("failed refreshing chainId ",L)}})}function Ye(){l==null&&p!=null&&g&&b(En({index:p.index,address:i,hasContractDataEnabled:g.dataEnabled,version:g.version}))}function Ue(){return T(this,null,function*(){if(b(At(!0)),k.current){k.current=!1,b(At(!1));return}if(i)try{let L=yield je(i);L&&b(st(E(y({},L),{address:i,nonce:L.nonce.valueOf()})))}catch(L){b(xi("Failed getting account")),console.error("Failed getting account ",L)}b(At(!1))})}function U(){return T(this,null,function*(){let L=so(e.walletAddress);if(Se(L),o!=null){try{let F=yield ze(),{clearNavigationHistory:Xe,remainingParams:{signature:B}}=$a(["signature","loginToken","address"]);if(!F)return Xe();B&&P.setTokenLoginInfo({signature:B,address:F});let H=yield je(F);H&&(k.current=!0,b(At(!0)),b(oe({address:F,loginMethod:"wallet"})),b(st(E(y({},H),{nonce:Ft(H)}))),b(At(!1))),Xe()}catch(F){console.error("Failed authenticating wallet user ",F)}b(Cn(null))}})}function Ze(){return T(this,null,function*(){let L=new Va.HWProvider,F=L.isInitialized();if(F||(F=yield L.init()),!F&&d){console.warn("Could not initialise ledger app"),X(u);return}return(p==null?void 0:p.index)!=null&&(L.addressIndex=p.index),L})}function Je(){return T(this,null,function*(){try{let L=yield Ze();if(!L)return;let F=yield ao(L);Se(L),f(F)}catch(L){console.error("Could not initialise ledger app",L),X(u)}})}function Ht(){return T(this,null,function*(){try{let L=yield ze(),F=Ga.ExtensionProvider.getInstance().setAddress(L);(yield F.init())?Se(F):console.error("Could not initialise extension, make sure MultiversX wallet extension is installed.")}catch(L){console.error("Unable to login to ExtensionProvider",L)}})}function zt(){if(r!=null)switch(r){case"ledger":{Je();break}case"walletconnect":{V(!1);break}case"walletconnectv2":{ne(!1);break}case"extension":{Ht();break}case"extra":{Ia();break}case"wallet":case"":{U();break}default:return}}return null}n();var Gt=A(require("react"));n();n();n();n();var Tc=require("react");n();n();var So=()=>S(he);n();C();n();n();n();var xu=require("react"),wu=require("@multiversx/sdk-web-wallet-provider"),vu=A(require("qs"));D();C();R();n();var qa=require("react"),Pu=require("@multiversx/sdk-extension-provider");D();C();R();n();n();n();n();var ja=require("react"),bu=require("@multiversx/sdk-extension-provider");D();C();n();n();var Cu=A(require("axios")),Du=A(require("swr"));n();n();var Ya=require("react");n();var Ka=require("react");Rn();C();J();at();n();ht();C();n();n();n();n();n();function Za(){let e=S(ro),t=Object.entries(e),r=(t==null?void 0:t.length)>0;return{pendingTransactions:e,pendingTransactionsArray:t,hasPendingTransactions:r}}Et();n();C();R();n();Et();function Ja(e,t){return e.reduce((o,{status:i,hash:l})=>(l!=null&&!t.includes(l)&&Ee(i)&&o.push({hash:l,previousStatus:i}),o),[])}n();C();R();function Xa({results:e,hash:t,sessionId:r}){let o=e==null?void 0:e.find(i=>(i==null?void 0:i.returnMessage)!=="");w.dispatch(Xt({transactionHash:t,sessionId:r,status:"fail",errorMessage:o==null?void 0:o.returnMessage})),w.dispatch(pt({sessionId:r,status:"fail",errorMessage:o==null?void 0:o.returnMessage}))}n();C();J();function xo(e){w.dispatch(pt({sessionId:e,status:"timedOut"}))}var en={},wo=[];function Ru({serverTransaction:e,sessionId:t,customTransactionInformation:r,shouldRefreshBalance:o}){let{hash:i,status:l,results:p,invalidTransaction:d,hasStatusChanged:u}=e;try{if(wo.includes(i))return;if(en[i]>30){xo(t);return}if(d||Ee(l)){en[i]=en[i]?en[i]+1:1;return}u&&(ct(l)&&(r==null?void 0:r.completedTransactionsDelay)!=null?(wo.push(i),setTimeout(()=>w.dispatch(Xt({sessionId:t,status:"success",transactionHash:i})),r==null?void 0:r.completedTransactionsDelay)):w.dispatch(Xt({sessionId:t,status:l,transactionHash:i}))),o||Zr(),lt(l)&&Xa({sessionId:t,hash:i,results:p})}catch(g){console.error(g),xo(t)}}function Qa(l){return T(this,arguments,function*({sessionId:e,transactionBatch:{transactions:t,customTransactionInformation:r},getTransactionsByHash:o=qr,shouldRefreshBalance:i}){try{if(t==null)return;let p=Ja(t,wo),d=yield o(p);for(let u of d)Ru({serverTransaction:u,sessionId:e,customTransactionInformation:r,shouldRefreshBalance:i})}catch(p){console.error(p)}})}function ec(){let{pendingTransactionsArray:e}=Za();function t(r){return T(this,null,function*(){let o=e.filter(([i,l])=>i!=null&&Ee(l.status));if(o.length>0)for(let[i,l]of o)yield Qa(y({sessionId:i,transactionBatch:l},r));r.shouldRefreshBalance&&Zr()})}return t}n();var Bu=require("react");n();n();n();C();n();n();var Fu=A(require("bignumber.js"));D();C();J();n();var Ou=A(require("bignumber.js"));D();n();var _u=require("@multiversx/sdk-core"),Uu=A(require("bignumber.js"));D();R();Et();n();n();n();n();var tc=require("react");n();n();var Wu=require("react"),$u=require("@multiversx/sdk-extension-provider");ht();Y();R();bt();n();var Hu=require("react");ht();C();n();n();xn();n();n();var Gu=A(require("platform"));n();n();n();n();n();at();n();n();n();function nc(e){return new Promise(t=>{setTimeout(()=>t(),e)})}n();var oc=(e,t,r,o=0)=>T(void 0,null,function*(){try{return yield e(...r)}catch(i){return o<t.retries?((t==null?void 0:t.delay)!=null&&(yield nc(t.delay)),oc(e,t,r,o+1)):null}}),ic=(e,t={retries:5,delay:500})=>(...r)=>T(void 0,null,function*(){return oc(e,t,r)});vt();n();n();n();C();var Vu={};var sc=e=>{if(e.component!=null){let t=e,{component:r}=t,o=Qe(t,["component"]),{payload:i}=w.dispatch(_n(E(y({},o),{component:null})));return Vu[i.toastId]=r,i}return w.dispatch(_n(e)).payload};n();n();var ac=A(require("axios"));function vo(e){return T(this,null,function*(){try{let{data:t}=yield ac.default.get(`${e}/websocket/config`);return`wss://${t.url}`}catch(t){throw console.error(t),new Error("Can not get websocket url")}})}n();var cc=require("react"),zu=require("@multiversx/sdk-hw-provider");ht();Y();C();R();bt();n();n();var lc=require("react");n();var dc=require("react");n();var mt=require("react"),pc=require("socket.io-client");C();n();var _e={current:null,status:"not_initialized"};var ju=3e3,qu=3,Ku=500,Yu=1e3;function uc(){let e=(0,mt.useRef)(null),{address:t}=dt(),r=M(),{network:o}=So(),i=p=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r(wi(p))},Yu)},l=(0,mt.useCallback)(ic(()=>T(this,null,function*(){_e.status="pending";let p=yield vo(o.apiAddress);if(p==null){console.warn("Can not get websocket url");return}_e.current=(0,pc.io)(p,{forceNew:!0,reconnectionAttempts:qu,timeout:ju,query:{address:t}}),_e.status="completed",_e.current.onAny(d=>{i(d)})}),{retries:2,delay:Ku}),[t]);(0,mt.useEffect)(()=>{t&&_e.status==="not_initialized"&&!_e.current&&l()},[t,_e.current]),(0,mt.useEffect)(()=>()=>{var p;(p=_e.current)==null||p.close(),e.current&&clearTimeout(e.current)},[])}function mc(e){uc();let t=S(Yn);(0,dc.useEffect)(()=>{let r=t==null?void 0:t.message;r&&e(r)},[e,t])}n();n();n();var gc=e=>e.dappModal,Zu=x(gc,e=>e.visible),tn=x(gc,e=>e.modal),$N=x(tn,e=>e.showHeader),GN=x(tn,e=>e.showFooter),VN=x(tn,e=>e.headerText),HN=x(tn,e=>e.footerText);it();var{logoutEvent:Ju}=ce,fc="storage",yc=()=>{let{address:e}=De(),t=S(Rt);(0,Tc.useEffect)(()=>{let r=o=>{if(!(o.key!==Ju||!o.newValue))try{let{data:i}=JSON.parse(o.newValue);i===e&&X(t)}catch(i){return}};return window.addEventListener(fc,r),()=>{window.removeEventListener(fc,r)}},[e,t])};n();n();var rn=require("react"),Ao=A(require("bignumber.js"));var Sc=require("@fortawesome/free-solid-svg-icons");n();n();var ar=A(require("bignumber.js")),hc=e=>{let t=new ar.default(e).dividedBy(1e3).integerValue(ar.default.ROUND_FLOOR),r=new ar.default(t).dividedBy(60).integerValue(ar.default.ROUND_FLOOR),o=r.modulo(60).isGreaterThan(1),i=r.modulo(60).isLessThan(1);return o?`${r} minutes`:i?"less than 1 minute":`${r} minute`};var xc=()=>{let{address:e}=De(),{tokenLogin:t}=S(q),{secondsUntilExpires:r,expiresAt:o}=Bt(t==null?void 0:t.nativeAuthToken),i=(0,rn.useRef)();return(0,rn.useEffect)(()=>{var d;let l=new Ao.default(String(r)),p=l.times(1e3);if(!(!r||l.isLessThanOrEqualTo(0))){if((d=t==null?void 0:t.nativeAuthConfig)!=null&&d.tokenExpirationToastWarningSeconds){clearTimeout(i.current);let g=new Ao.default(t.nativeAuthConfig.tokenExpirationToastWarningSeconds).times(1e3),f=l.times(1e3).minus(g),h=hc(p),I=f.isLessThanOrEqualTo(0)?0:f.toNumber();i.current=setTimeout(()=>{sc({toastId:"nativeAuthTokenExpiration",type:"custom",title:"Session Expiration Warning",icon:Sc.faRefresh,message:`Your token will expire in ${h}!`})},I)}return()=>{clearTimeout(i.current)}}},[o,e,t==null?void 0:t.nativeAuthConfig]),null};n();var $t=require("react"),wc=A(require("bignumber.js"));var vc=()=>{let{address:e}=De(),{tokenLogin:t}=S(q),r=S(Rt),{isExpired:o,secondsUntilExpires:i,expiresAt:l}=Bt(t==null?void 0:t.nativeAuthToken),p=(0,$t.useRef)(""),d=(0,$t.useRef)();return(0,$t.useEffect)(()=>{e&&o&&X(r)},[o,e,r]),(0,$t.useEffect)(()=>{let u=new wc.default(String(i)),g=`${e}_${l}`,f=p.current===g;if(!(i&&u.isGreaterThan(0))||f)return;p.current=g,clearTimeout(d.current);let I=u.times(1e3);return d.current=setTimeout(()=>{X(r)},I.toNumber()),()=>{clearTimeout(d.current)}},[l,e,r]),null};var Ac=()=>(xc(),yc(),vc(),null);n();n();var nn=require("react"),bc=require("@multiversx/sdk-core"),kc=require("@multiversx/sdk-core/out/signature");C();R();at();var Ic=e=>{let t=e.redirectRoute;t&&ke(t)},Ec=({sendSignedTransactionsAsync:e=ua})=>{let t=S(Ge),r=S(He),o=(0,nn.useRef)(!1),i=M(),l=()=>{i(Lt()),o.current=!1};function p(){return T(this,null,function*(){var u;let d=Object.keys(r);for(let g of d){let f=r==null?void 0:r[g],h=(u=f==null?void 0:f.customTransactionInformation)==null?void 0:u.signWithoutSending;if(!g||h){Ic(f);continue}try{if(!(r[g].status==="signed"&&!o.current))continue;let{transactions:k}=r[g];if(!k)continue;o.current=!0;let b=k.map(Q=>{let Ye=new bc.Address(Q.sender),Ue=Ot(Q),U=new kc.Signature(Q.signature);return Ue.applySignature(U,Ye),Ue}),O=yield e(b),N="pending",V=k.map(Q=>O.includes(Q.hash)?E(y({},Q),{status:N}):Q);i(Ni({sessionId:g,submittedMessage:"submitted"})),i(pt({sessionId:g,status:"sent",transactions:V})),l(),ka(t.nonce+k.length),Ic(f),history.pushState({},document==null?void 0:document.title,"?")}catch(I){console.error("Unable to send transactions",I),i(pt({sessionId:g,status:"fail",errorMessage:I.message})),l()}finally{o.current=!1}}})}return(0,nn.useEffect)(()=>{p()},[r,t]),null};n();n();n();var Lc=require("react");function Pc(e){var i;let t=ec(),r=(i=e==null?void 0:e.getTransactionsByHash)!=null?i:qr,o=()=>{t({shouldRefreshBalance:!0,getTransactionsByHash:r})};mc(o),(0,Lc.useEffect)(()=>{let l=setInterval(o,3e4);return()=>{clearInterval(l)}},[o])}function Cc({getTransactionsByHash:e}){return Pc({getTransactionsByHash:e}),null}function Dc({customComponents:e}){var l,p;let t=e==null?void 0:e.transactionSender,r=e==null?void 0:e.transactionTracker,o=(l=t==null?void 0:t.component)!=null?l:Ec,i=(p=r==null?void 0:r.component)!=null?p:Cc;return Gt.default.createElement(Gt.default.Fragment,null,Gt.default.createElement(o,y({},t==null?void 0:t.props)),Gt.default.createElement(i,y({},r==null?void 0:r.props)),Gt.default.createElement(Ac,null))}var Xu=({children:e,customNetworkConfig:t={},externalProvider:r,environment:o,customComponents:i,dappConfig:l})=>{if(!o)throw new Error("missing environment flag");return r!=null&&Aa(r),Vt.default.createElement(Nc.Provider,{context:Qt,store:w},Vt.default.createElement(Rc.PersistGate,{persistor:ks,loading:null},Vt.default.createElement(mo,{environment:o,customNetworkConfig:t,logoutRoute:l==null?void 0:l.logoutRoute},Vt.default.createElement(Ha,null),Vt.default.createElement(Dc,{customComponents:i}),e)))};0&&(module.exports={AppInitializer,AuthenticatedRoutesWrapper,AxiosInterceptor,AxiosInterceptorContext,AxiosInterceptorContextProvider,DappProvider,LoginInfoListener,useAxiosInterceptorContext});
|
|
1
|
+
"use strict";var Oc=Object.create;var jt=Object.defineProperty,Fc=Object.defineProperties,_c=Object.getOwnPropertyDescriptor,Uc=Object.getOwnPropertyDescriptors,Bc=Object.getOwnPropertyNames,lr=Object.getOwnPropertySymbols,Wc=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable;var Io=(e,t,r)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))cn.call(t,r)&&Io(e,r,t[r]);if(lr)for(var r of lr(t))bo.call(t,r)&&Io(e,r,t[r]);return e},E=(e,t)=>Fc(e,Uc(t));var ko=e=>typeof e=="symbol"?e:e+"",Qe=(e,t)=>{var r={};for(var o in e)cn.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&lr)for(var o of lr(e))t.indexOf(o)<0&&bo.call(e,o)&&(r[o]=e[o]);return r};var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var pr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=(e,t)=>{for(var r in t)jt(e,r,{get:t[r],enumerable:!0})},Eo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bc(t))!cn.call(e,i)&&i!==r&&jt(e,i,{get:()=>t[i],enumerable:!(o=_c(t,i))||o.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Oc(Wc(e)):{},Eo(t||!e||!e.__esModule?jt(r,"default",{value:e,enumerable:!0}):r,e)),qt=e=>Eo(jt({},"__esModule",{value:!0}),e);var T=(e,t,r)=>new Promise((o,i)=>{var l=u=>{try{d(r.next(u))}catch(g){i(g)}},p=u=>{try{d(r.throw(u))}catch(g){i(g)}},d=u=>u.done?o(u.value):Promise.resolve(u.value).then(l,p);d((r=r.apply(e,t)).next())});var Co=pr(ur=>{"use strict";n();ur.byteLength=Gc;ur.toByteArray=Hc;ur.fromByteArray=qc;var fe=[],ae=[],$c=typeof Uint8Array!="undefined"?Uint8Array:Array,ln="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(tt=0,Lo=ln.length;tt<Lo;++tt)fe[tt]=ln[tt],ae[ln.charCodeAt(tt)]=tt;var tt,Lo;ae["-".charCodeAt(0)]=62;ae["_".charCodeAt(0)]=63;function Po(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("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return[r,o]}function Gc(e){var t=Po(e),r=t[0],o=t[1];return(r+o)*3/4-o}function Vc(e,t,r){return(t+r)*3/4-r}function Hc(e){var t,r=Po(e),o=r[0],i=r[1],l=new $c(Vc(e,o,i)),p=0,d=i>0?o-4:o,u;for(u=0;u<d;u+=4)t=ae[e.charCodeAt(u)]<<18|ae[e.charCodeAt(u+1)]<<12|ae[e.charCodeAt(u+2)]<<6|ae[e.charCodeAt(u+3)],l[p++]=t>>16&255,l[p++]=t>>8&255,l[p++]=t&255;return i===2&&(t=ae[e.charCodeAt(u)]<<2|ae[e.charCodeAt(u+1)]>>4,l[p++]=t&255),i===1&&(t=ae[e.charCodeAt(u)]<<10|ae[e.charCodeAt(u+1)]<<4|ae[e.charCodeAt(u+2)]>>2,l[p++]=t>>8&255,l[p++]=t&255),l}function zc(e){return fe[e>>18&63]+fe[e>>12&63]+fe[e>>6&63]+fe[e&63]}function jc(e,t,r){for(var o,i=[],l=t;l<r;l+=3)o=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),i.push(zc(o));return i.join("")}function qc(e){for(var t,r=e.length,o=r%3,i=[],l=16383,p=0,d=r-o;p<d;p+=l)i.push(jc(e,p,p+l>d?d:p+l));return o===1?(t=e[r-1],i.push(fe[t>>2]+fe[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],i.push(fe[t>>10]+fe[t>>4&63]+fe[t<<2&63]+"=")),i.join("")}});var Do=pr(pn=>{n();pn.read=function(e,t,r,o,i){var l,p,d=i*8-o-1,u=(1<<d)-1,g=u>>1,f=-7,h=r?i-1:0,I=r?-1:1,P=e[t+h];for(h+=I,l=P&(1<<-f)-1,P>>=-f,f+=d;f>0;l=l*256+e[t+h],h+=I,f-=8);for(p=l&(1<<-f)-1,l>>=-f,f+=o;f>0;p=p*256+e[t+h],h+=I,f-=8);if(l===0)l=1-g;else{if(l===u)return p?NaN:(P?-1:1)*(1/0);p=p+Math.pow(2,o),l=l-g}return(P?-1:1)*p*Math.pow(2,l-o)};pn.write=function(e,t,r,o,i,l){var p,d,u,g=l*8-i-1,f=(1<<g)-1,h=f>>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=o?0:l-1,k=o?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,p=f):(p=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-p))<1&&(p--,u*=2),p+h>=1?t+=I/u:t+=I*Math.pow(2,1-h),t*u>=2&&(p++,u/=2),p+h>=f?(d=0,p=f):p+h>=1?(d=(t*u-1)*Math.pow(2,i),p=p+h):(d=t*Math.pow(2,h-1)*Math.pow(2,i),p=0));i>=8;e[r+P]=d&255,P+=k,d/=256,i-=8);for(p=p<<i|d,g+=i;g>0;e[r+P]=p&255,P+=k,p/=256,g-=8);e[r+P-k]|=b*128}});var Ho=pr(Tt=>{"use strict";n();var un=Co(),ft=Do(),No=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Tt.Buffer=m;Tt.SlowBuffer=Qc;Tt.INSPECT_MAX_BYTES=50;var dr=2147483647;Tt.kMaxLength=dr;m.TYPED_ARRAY_SUPPORT=Kc();!m.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&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.");function Kc(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(r){return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(!!m.isBuffer(this))return this.buffer}});Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(!!m.isBuffer(this))return this.byteOffset}});function ve(e){if(e>dr)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,m.prototype),t}function m(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return fn(e)}return Oo(e,t,r)}m.poolSize=8192;function Oo(e,t,r){if(typeof e=="string")return Zc(e,t);if(ArrayBuffer.isView(e))return Jc(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Te(e,ArrayBuffer)||e&&Te(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Te(e,SharedArrayBuffer)||e&&Te(e.buffer,SharedArrayBuffer)))return mn(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return m.from(o,t,r);var i=Xc(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return m.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)}m.from=function(e,t,r){return Oo(e,t,r)};Object.setPrototypeOf(m.prototype,Uint8Array.prototype);Object.setPrototypeOf(m,Uint8Array);function Fo(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Yc(e,t,r){return Fo(e),e<=0?ve(e):t!==void 0?typeof r=="string"?ve(e).fill(t,r):ve(e).fill(t):ve(e)}m.alloc=function(e,t,r){return Yc(e,t,r)};function fn(e){return Fo(e),ve(e<0?0:Tn(e)|0)}m.allocUnsafe=function(e){return fn(e)};m.allocUnsafeSlow=function(e){return fn(e)};function Zc(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!m.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=_o(e,t)|0,o=ve(r),i=o.write(e,t);return i!==r&&(o=o.slice(0,i)),o}function dn(e){for(var t=e.length<0?0:Tn(e.length)|0,r=ve(t),o=0;o<t;o+=1)r[o]=e[o]&255;return r}function Jc(e){if(Te(e,Uint8Array)){var t=new Uint8Array(e);return mn(t.buffer,t.byteOffset,t.byteLength)}return dn(e)}function mn(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,m.prototype),o}function Xc(e){if(m.isBuffer(e)){var t=Tn(e.length)|0,r=ve(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||yn(e.length)?ve(0):dn(e);if(e.type==="Buffer"&&Array.isArray(e.data))return dn(e.data)}function Tn(e){if(e>=dr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dr.toString(16)+" bytes");return e|0}function Qc(e){return+e!=e&&(e=0),m.alloc(+e)}m.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==m.prototype};m.compare=function(t,r){if(Te(t,Uint8Array)&&(t=m.from(t,t.offset,t.byteLength)),Te(r,Uint8Array)&&(r=m.from(r,r.offset,r.byteLength)),!m.isBuffer(t)||!m.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var o=t.length,i=r.length,l=0,p=Math.min(o,i);l<p;++l)if(t[l]!==r[l]){o=t[l],i=r[l];break}return o<i?-1:i<o?1:0};m.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}};m.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return m.alloc(0);var o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;var i=m.allocUnsafe(r),l=0;for(o=0;o<t.length;++o){var p=t[o];if(Te(p,Uint8Array))l+p.length>i.length?m.from(p).copy(i,l):Uint8Array.prototype.set.call(i,p,l);else if(m.isBuffer(p))p.copy(i,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length}return i};function _o(e,t){if(m.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Te(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&r===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return gn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Vo(e).length;default:if(i)return o?-1:gn(e).length;t=(""+t).toLowerCase(),i=!0}}m.byteLength=_o;function el(e,t,r){var o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return pl(this,t,r);case"utf8":case"utf-8":return Bo(this,t,r);case"ascii":return cl(this,t,r);case"latin1":case"binary":return ll(this,t,r);case"base64":return sl(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ul(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}m.prototype._isBuffer=!0;function rt(e,t,r){var o=e[t];e[t]=e[r],e[r]=o}m.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)rt(this,r,r+1);return this};m.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)rt(this,r,r+3),rt(this,r+1,r+2);return this};m.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)rt(this,r,r+7),rt(this,r+1,r+6),rt(this,r+2,r+5),rt(this,r+3,r+4);return this};m.prototype.toString=function(){var t=this.length;return t===0?"":arguments.length===0?Bo(this,0,t):el.apply(this,arguments)};m.prototype.toLocaleString=m.prototype.toString;m.prototype.equals=function(t){if(!m.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:m.compare(this,t)===0};m.prototype.inspect=function(){var t="",r=Tt.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};No&&(m.prototype[No]=m.prototype.inspect);m.prototype.compare=function(t,r,o,i,l){if(Te(t,Uint8Array)&&(t=m.from(t,t.offset,t.byteLength)),!m.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),i===void 0&&(i=0),l===void 0&&(l=this.length),r<0||o>t.length||i<0||l>this.length)throw new RangeError("out of range index");if(i>=l&&r>=o)return 0;if(i>=l)return-1;if(r>=o)return 1;if(r>>>=0,o>>>=0,i>>>=0,l>>>=0,this===t)return 0;for(var p=l-i,d=o-r,u=Math.min(p,d),g=this.slice(i,l),f=t.slice(r,o),h=0;h<u;++h)if(g[h]!==f[h]){p=g[h],d=f[h];break}return p<d?-1:d<p?1:0};function Uo(e,t,r,o,i){if(e.length===0)return-1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,yn(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=m.from(t,o)),m.isBuffer(t))return t.length===0?-1:Ro(e,t,r,o,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ro(e,[t],r,o,i);throw new TypeError("val must be string, number or Buffer")}function Ro(e,t,r,o,i){var l=1,p=e.length,d=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;l=2,p/=2,d/=2,r/=2}function u(P,k){return l===1?P[k]:P.readUInt16BE(k*l)}var g;if(i){var f=-1;for(g=r;g<p;g++)if(u(e,g)===u(t,f===-1?0:g-f)){if(f===-1&&(f=g),g-f+1===d)return f*l}else f!==-1&&(g-=g-f),f=-1}else for(r+d>p&&(r=p-d),g=r;g>=0;g--){for(var h=!0,I=0;I<d;I++)if(u(e,g+I)!==u(t,I)){h=!1;break}if(h)return g}return-1}m.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};m.prototype.indexOf=function(t,r,o){return Uo(this,t,r,o,!0)};m.prototype.lastIndexOf=function(t,r,o){return Uo(this,t,r,o,!1)};function tl(e,t,r,o){r=Number(r)||0;var i=e.length-r;o?(o=Number(o),o>i&&(o=i)):o=i;var l=t.length;o>l/2&&(o=l/2);for(var p=0;p<o;++p){var d=parseInt(t.substr(p*2,2),16);if(yn(d))return p;e[r+p]=d}return p}function rl(e,t,r,o){return mr(gn(t,e.length-r),e,r,o)}function nl(e,t,r,o){return mr(gl(t),e,r,o)}function ol(e,t,r,o){return mr(Vo(t),e,r,o)}function il(e,t,r,o){return mr(fl(t,e.length-r),e,r,o)}m.prototype.write=function(t,r,o,i){if(r===void 0)i="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")i=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,i===void 0&&(i="utf8")):(i=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-r;if((o===void 0||o>l)&&(o=l),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return tl(this,t,r,o);case"utf8":case"utf-8":return rl(this,t,r,o);case"ascii":case"latin1":case"binary":return nl(this,t,r,o);case"base64":return ol(this,t,r,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return il(this,t,r,o);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}};m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function sl(e,t,r){return t===0&&r===e.length?un.fromByteArray(e):un.fromByteArray(e.slice(t,r))}function Bo(e,t,r){r=Math.min(e.length,r);for(var o=[],i=t;i<r;){var l=e[i],p=null,d=l>239?4:l>223?3:l>191?2:1;if(i+d<=r){var u,g,f,h;switch(d){case 1:l<128&&(p=l);break;case 2:u=e[i+1],(u&192)===128&&(h=(l&31)<<6|u&63,h>127&&(p=h));break;case 3:u=e[i+1],g=e[i+2],(u&192)===128&&(g&192)===128&&(h=(l&15)<<12|(u&63)<<6|g&63,h>2047&&(h<55296||h>57343)&&(p=h));break;case 4:u=e[i+1],g=e[i+2],f=e[i+3],(u&192)===128&&(g&192)===128&&(f&192)===128&&(h=(l&15)<<18|(u&63)<<12|(g&63)<<6|f&63,h>65535&&h<1114112&&(p=h))}}p===null?(p=65533,d=1):p>65535&&(p-=65536,o.push(p>>>10&1023|55296),p=56320|p&1023),o.push(p),i+=d}return al(o)}var Mo=4096;function al(e){var t=e.length;if(t<=Mo)return String.fromCharCode.apply(String,e);for(var r="",o=0;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=Mo));return r}function cl(e,t,r){var o="";r=Math.min(e.length,r);for(var i=t;i<r;++i)o+=String.fromCharCode(e[i]&127);return o}function ll(e,t,r){var o="";r=Math.min(e.length,r);for(var i=t;i<r;++i)o+=String.fromCharCode(e[i]);return o}function pl(e,t,r){var o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);for(var i="",l=t;l<r;++l)i+=Tl[e[l]];return i}function ul(e,t,r){for(var o=e.slice(t,r),i="",l=0;l<o.length-1;l+=2)i+=String.fromCharCode(o[l]+o[l+1]*256);return i}m.prototype.slice=function(t,r){var o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);var i=this.subarray(t,r);return Object.setPrototypeOf(i,m.prototype),i};function $(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return i};m.prototype.readUintBE=m.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t+--r],l=1;r>0&&(l*=256);)i+=this[t+--r]*l;return i};m.prototype.readUint8=m.prototype.readUInt8=function(t,r){return t=t>>>0,r||$(t,1,this.length),this[t]};m.prototype.readUint16LE=m.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||$(t,2,this.length),this[t]|this[t+1]<<8};m.prototype.readUint16BE=m.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||$(t,2,this.length),this[t]<<8|this[t+1]};m.prototype.readUint32LE=m.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||$(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};m.prototype.readUint32BE=m.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};m.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=this[t],l=1,p=0;++p<r&&(l*=256);)i+=this[t+p]*l;return l*=128,i>=l&&(i-=Math.pow(2,8*r)),i};m.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||$(t,r,this.length);for(var i=r,l=1,p=this[t+--i];i>0&&(l*=256);)p+=this[t+--i]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*r)),p};m.prototype.readInt8=function(t,r){return t=t>>>0,r||$(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};m.prototype.readInt16LE=function(t,r){t=t>>>0,r||$(t,2,this.length);var o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};m.prototype.readInt16BE=function(t,r){t=t>>>0,r||$(t,2,this.length);var o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};m.prototype.readInt32LE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};m.prototype.readInt32BE=function(t,r){return t=t>>>0,r||$(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};m.prototype.readFloatLE=function(t,r){return t=t>>>0,r||$(t,4,this.length),ft.read(this,t,!0,23,4)};m.prototype.readFloatBE=function(t,r){return t=t>>>0,r||$(t,4,this.length),ft.read(this,t,!1,23,4)};m.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||$(t,8,this.length),ft.read(this,t,!0,52,8)};m.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||$(t,8,this.length),ft.read(this,t,!1,52,8)};function te(e,t,r,o,i,l){if(!m.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<l)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(t,r,o,i){if(t=+t,r=r>>>0,o=o>>>0,!i){var l=Math.pow(2,8*o)-1;te(this,t,r,o,l,0)}var p=1,d=0;for(this[r]=t&255;++d<o&&(p*=256);)this[r+d]=t/p&255;return r+o};m.prototype.writeUintBE=m.prototype.writeUIntBE=function(t,r,o,i){if(t=+t,r=r>>>0,o=o>>>0,!i){var l=Math.pow(2,8*o)-1;te(this,t,r,o,l,0)}var p=o-1,d=1;for(this[r+p]=t&255;--p>=0&&(d*=256);)this[r+p]=t/d&255;return r+o};m.prototype.writeUint8=m.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,1,255,0),this[r]=t&255,r+1};m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};m.prototype.writeIntLE=function(t,r,o,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*o-1);te(this,t,r,o,l-1,-l)}var p=0,d=1,u=0;for(this[r]=t&255;++p<o&&(d*=256);)t<0&&u===0&&this[r+p-1]!==0&&(u=1),this[r+p]=(t/d>>0)-u&255;return r+o};m.prototype.writeIntBE=function(t,r,o,i){if(t=+t,r=r>>>0,!i){var l=Math.pow(2,8*o-1);te(this,t,r,o,l-1,-l)}var p=o-1,d=1,u=0;for(this[r+p]=t&255;--p>=0&&(d*=256);)t<0&&u===0&&this[r+p+1]!==0&&(u=1),this[r+p]=(t/d>>0)-u&255;return r+o};m.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};m.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};m.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};m.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};m.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||te(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Wo(e,t,r,o,i,l){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $o(e,t,r,o,i){return t=+t,r=r>>>0,i||Wo(e,t,r,4,34028234663852886e22,-34028234663852886e22),ft.write(e,t,r,o,23,4),r+4}m.prototype.writeFloatLE=function(t,r,o){return $o(this,t,r,!0,o)};m.prototype.writeFloatBE=function(t,r,o){return $o(this,t,r,!1,o)};function Go(e,t,r,o,i){return t=+t,r=r>>>0,i||Wo(e,t,r,8,17976931348623157e292,-17976931348623157e292),ft.write(e,t,r,o,52,8),r+8}m.prototype.writeDoubleLE=function(t,r,o){return Go(this,t,r,!0,o)};m.prototype.writeDoubleBE=function(t,r,o){return Go(this,t,r,!1,o)};m.prototype.copy=function(t,r,o,i){if(!m.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<o&&(i=o),i===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-o&&(i=t.length-r+o);var l=i-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,i):Uint8Array.prototype.set.call(t,this.subarray(o,i),r),l};m.prototype.fill=function(t,r,o,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,o=this.length):typeof o=="string"&&(i=o,o=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!m.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){var l=t.charCodeAt(0);(i==="utf8"&&l<128||i==="latin1")&&(t=l)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);var p;if(typeof t=="number")for(p=r;p<o;++p)this[p]=t;else{var d=m.isBuffer(t)?t:m.from(t,i),u=d.length;if(u===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(p=0;p<o-r;++p)this[p+r]=d[p%u]}return this};var dl=/[^+/0-9A-Za-z-_]/g;function ml(e){if(e=e.split("=")[0],e=e.trim().replace(dl,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function gn(e,t){t=t||1/0;for(var r,o=e.length,i=null,l=[],p=0;p<o;++p){if(r=e.charCodeAt(p),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&l.push(239,191,189);continue}else if(p+1===o){(t-=3)>-1&&l.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&l.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&l.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;l.push(r)}else if(r<2048){if((t-=2)<0)break;l.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;l.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;l.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return l}function gl(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function fl(e,t){for(var r,o,i,l=[],p=0;p<e.length&&!((t-=2)<0);++p)r=e.charCodeAt(p),o=r>>8,i=r%256,l.push(i),l.push(o);return l}function Vo(e){return un.toByteArray(ml(e))}function mr(e,t,r,o){for(var i=0;i<o&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Te(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function yn(e){return e!==e}var Tl=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var o=r*16,i=0;i<16;++i)t[o+i]=e[r]+e[i];return t}()});var Yo=pr((id,Ko)=>{n();var _=Ko.exports={},ye,he;function hn(){throw new Error("setTimeout has not been defined")}function xn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ye=setTimeout:ye=hn}catch(e){ye=hn}try{typeof clearTimeout=="function"?he=clearTimeout:he=xn}catch(e){he=xn}})();function zo(e){if(ye===setTimeout)return setTimeout(e,0);if((ye===hn||!ye)&&setTimeout)return ye=setTimeout,setTimeout(e,0);try{return ye(e,0)}catch(t){try{return ye.call(null,e,0)}catch(r){return ye.call(this,e,0)}}}function yl(e){if(he===clearTimeout)return clearTimeout(e);if((he===xn||!he)&&clearTimeout)return he=clearTimeout,clearTimeout(e);try{return he(e)}catch(t){try{return he.call(null,e)}catch(r){return he.call(this,e)}}}var Ae=[],yt=!1,nt,gr=-1;function hl(){!yt||!nt||(yt=!1,nt.length?Ae=nt.concat(Ae):gr=-1,Ae.length&&jo())}function jo(){if(!yt){var e=zo(hl);yt=!0;for(var t=Ae.length;t;){for(nt=Ae,Ae=[];++gr<t;)nt&&nt[gr].run();gr=-1,t=Ae.length}nt=null,yt=!1,yl(e)}}_.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ae.push(new qo(e,t)),Ae.length===1&&!yt&&zo(jo)};function qo(e,t){this.fun=e,this.array=t}qo.prototype.run=function(){this.fun.apply(null,this.array)};_.title="browser";_.browser=!0;_.env={};_.argv=[];_.version="";_.versions={};function Ie(){}_.on=Ie;_.addListener=Ie;_.once=Ie;_.off=Ie;_.removeListener=Ie;_.removeAllListeners=Ie;_.emit=Ie;_.prependListener=Ie;_.prependOnceListener=Ie;_.listeners=function(e){return[]};_.binding=function(e){throw new Error("process.binding is not supported")};_.cwd=function(){return"/"};_.chdir=function(e){throw new Error("process.chdir is not supported")};_.umask=function(){return 0}});var s,a,sd,n=v(()=>{s=A(Ho()),a=A(Yo()),sd=function(e){function t(){var o=this||self;return delete e.prototype.__magic__,o}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var r=__magic__;return r}(Object)});var ht=v(()=>{"use strict";n()});var Zo=v(()=>{"use strict";n()});var Jo=v(()=>{"use strict";n()});var Xo=v(()=>{"use strict";n()});var R=v(()=>{"use strict";n()});var Qo=v(()=>{"use strict";n()});var ei=v(()=>{"use strict";n()});var Z=v(()=>{"use strict";n()});var ti=v(()=>{"use strict";n()});var ri=v(()=>{"use strict";n()});var J=v(()=>{"use strict";n();Zo();Jo();Xo();R();Qo();ei();Z();ti();ri()});var ot,ni,bd,oi,kd,ii,Ed,Ld,xl,xt=v(()=>{"use strict";n();J();ot={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://devnet-wallet.multiversx.com",apiAddress:"https://devnet-api.multiversx.com",explorerAddress:"http://devnet-explorer.multiversx.com",apiTimeout:"4000"},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://testnet-wallet.multiversx.com",apiAddress:"https://testnet-api.multiversx.com",explorerAddress:"http://testnet-explorer.multiversx.com",apiTimeout:"4000"},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"https://maiar.page.link/?apn=com.elrond.maiar.wallet&isi=1519405832&ibi=com.elrond.maiar.wallet&link=https://xportal.com/",walletConnectBridgeAddresses:["https://bridge.walletconnect.org"],walletConnectV2RelayAddresses:["wss://relay.walletconnect.com"],walletAddress:"https://wallet.multiversx.com",apiAddress:"https://api.multiversx.com",explorerAddress:"https://explorer.multiversx.com",apiTimeout:"4000"}},{chainId:ni,egldLabel:bd}=ot["devnet"],{chainId:oi,egldLabel:kd}=ot["testnet"],{chainId:ii,egldLabel:Ed}=ot["mainnet"],Ld={["devnet"]:ni,["testnet"]:oi,["mainnet"]:ii},xl={[ni]:"devnet",[oi]:"testnet",[ii]:"mainnet"}});var Sn=v(()=>{"use strict";n()});var si=v(()=>{"use strict";n()});var fr,wn=v(()=>{"use strict";n();fr="transaction-status-toast-id"});var Kt,Tr,ai,ci,yr,li,St,D=v(()=>{"use strict";n();ht();xt();Sn();si();wn();Kt=5e4,Tr=1e9,ai=1,ci=1,yr="logout",li="login",St="0"});var wt,hr=v(()=>{"use strict";n();wt=()=>Date.now()/1e3});var pi=v(()=>{"use strict";n()});var ui=v(()=>{"use strict";n()});var vn=v(()=>{"use strict";n();hr();pi();ui()});var In={};et(In,{getItem:()=>wl,localStorageKeys:()=>ce,removeItem:()=>vl,setItem:()=>Sl});var ce,An,Sl,wl,vl,it=v(()=>{"use strict";n();vn();ce={loginExpiresAt:"sdk-dapp-login-expires-at",logoutEvent:"sdk-dapp-logout-event"},An=typeof localStorage!="undefined",Sl=({key:e,data:t,expires:r})=>{!An||localStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},wl=e=>{if(!An)return;let t=localStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:wt()>=r.expires?(localStorage.removeItem(String(e)),null):r.data},vl=e=>{!An||localStorage.removeItem(String(e))}});var bn={};et(bn,{clear:()=>fi,getItem:()=>mi,removeItem:()=>gi,setItem:()=>di,storage:()=>Al});var di,mi,gi,fi,Al,Ti=v(()=>{"use strict";n();di=({key:e,data:t,expires:r})=>{sessionStorage.setItem(String(e),JSON.stringify({expires:r,data:t}))},mi=e=>{let t=sessionStorage.getItem(String(e));if(!t)return null;let r=JSON.parse(t);return!r||!r.hasOwnProperty("expires")||!r.hasOwnProperty("data")?null:Date.now()>=r.expires?(sessionStorage.removeItem(String(e)),null):r.data},gi=e=>sessionStorage.removeItem(String(e)),fi=()=>sessionStorage.clear(),Al={setItem:di,getItem:mi,removeItem:gi,clear:fi}});var be,vt=v(()=>{"use strict";n();it();Ti();be={session:bn,local:In}});var kn,G,oe,Y=v(()=>{"use strict";n();kn=require("@reduxjs/toolkit");D();G=(0,kn.createAction)(yr),oe=(0,kn.createAction)(li,e=>({payload:e}))});var Ln,yi,hi,xr,En,xi,st,rm,Sr,nm,Pn,Il,om,At,Si,wi,vi,Cn=v(()=>{"use strict";n();Ln=require("@multiversx/sdk-core"),yi=require("@reduxjs/toolkit"),hi=require("redux-persist");D();vt();it();Y();xr={balance:"...",address:"",nonce:0,txCount:0,scrCount:0,claimableRewards:St},En={address:"",websocketEvent:null,accounts:{"":xr},ledgerAccount:null,publicKey:"",walletConnectAccount:null,isAccountLoading:!0,accountLoadingError:null},xi=(0,yi.createSlice)({name:"accountInfoSlice",initialState:En,reducers:{setAddress:(e,t)=>{let r=t.payload;e.address=r,e.publicKey=new Ln.Address(r).hex()},setAccount:(e,t)=>{let r=e.address===t.payload.address;e.accounts={[e.address]:r?t.payload:xr},e.shard=t.payload.shard,e.isAccountLoading=!1,e.accountLoadingError=null},setAccountNonce:(e,t)=>{let{address:r}=e;e.accounts[r].nonce=t.payload},setAccountShard:(e,t)=>{e.shard=t.payload},setLedgerAccount:(e,t)=>{e.ledgerAccount=t.payload},updateLedgerAccount:(e,t)=>{e.ledgerAccount!=null&&(e.ledgerAccount.index=t.payload.index,e.ledgerAccount.address=t.payload.address)},setWalletConnectAccount:(e,t)=>{e.walletConnectAccount=t.payload},setIsAccountLoading:(e,t)=>{e.isAccountLoading=t.payload,e.accountLoadingError=null},setAccountLoadingError:(e,t)=>{e.accountLoadingError=t.payload,e.isAccountLoading=!1},setWebsocketEvent:(e,t)=>{e.websocketEvent={timestamp:Date.now(),message:t.payload}}},extraReducers:e=>{e.addCase(G,()=>(be.local.removeItem(ce.loginExpiresAt),En)),e.addCase(oe,(t,r)=>{let{address:o}=r.payload;t.address=o,t.publicKey=new Ln.Address(o).hex()}),e.addCase(hi.REHYDRATE,(t,r)=>{var g;if(!((g=r.payload)!=null&&g.account))return;let{account:o}=r.payload,{address:i,shard:l,accounts:p,publicKey:d}=o;t.address=i,t.shard=l;let u=p&&i in p;t.accounts=u?p:En.accounts,t.publicKey=d})}}),{setAccount:st,setAddress:rm,setAccountNonce:Sr,setAccountShard:nm,setLedgerAccount:Pn,updateLedgerAccount:Il,setWalletConnectAccount:om,setIsAccountLoading:At,setAccountLoadingError:Si,setWebsocketEvent:wi}=xi.actions,vi=xi.reducer});function Yt(){return new Date().setHours(new Date().getHours()+24)}function Zt(e){be.local.setItem({key:ce.loginExpiresAt,data:e,expires:e})}var Dn=v(()=>{"use strict";n();vt();it()});var Ii,Ai,bi,gm,wr,bl,vr,fm,Ar,ki,Ei,Li,Ir=v(()=>{"use strict";n();Ii=require("@reduxjs/toolkit");Dn();R();Y();Ai={loginMethod:"",walletConnectLogin:null,ledgerLogin:null,tokenLogin:null,walletLogin:null,extensionLogin:null,isLoginSessionInvalid:!1},bi=(0,Ii.createSlice)({name:"loginInfoSlice",initialState:Ai,reducers:{setLoginMethod:(e,t)=>{e.loginMethod=t.payload},setTokenLogin:(e,t)=>{e.tokenLogin=t.payload},setTokenLoginSignature:(e,t)=>{(e==null?void 0:e.tokenLogin)!=null&&(e.tokenLogin.signature=t.payload)},setWalletLogin:(e,t)=>{e.walletLogin=t.payload},setWalletConnectLogin:(e,t)=>{e.walletConnectLogin=t.payload},setLedgerLogin:(e,t)=>{e.ledgerLogin=t.payload},invalidateLoginSession:e=>{e.isLoginSessionInvalid=!0},setLogoutRoute:(e,t)=>{e.logoutRoute=t.payload}},extraReducers:e=>{e.addCase(G,()=>Ai),e.addCase(oe,(t,r)=>{t.loginMethod=r.payload.loginMethod,Zt(Yt())})}}),{setLoginMethod:gm,setWalletConnectLogin:wr,setLedgerLogin:bl,setTokenLogin:vr,setTokenLoginSignature:fm,setWalletLogin:Ar,invalidateLoginSession:ki,setLogoutRoute:Ei}=bi.actions,Li=bi.reducer});var Ci,Pi,Di,Ni,kl,xm,El,Ri,Nn=v(()=>{"use strict";n();Ci=require("@reduxjs/toolkit");Y();Pi={},Di=(0,Ci.createSlice)({name:"modalsSlice",initialState:Pi,reducers:{setTxSubmittedModal:(e,t)=>{e.txSubmittedModal=t.payload},setNotificationModal:(e,t)=>{e.notificationModal=t.payload},clearTxSubmittedModal:e=>{e.txSubmittedModal=void 0},clearNotificationModal:e=>{e.notificationModal=void 0}},extraReducers:e=>{e.addCase(G,()=>Pi)}}),{setTxSubmittedModal:Ni,setNotificationModal:kl,clearTxSubmittedModal:xm,clearNotificationModal:El}=Di.actions,Ri=Di.reducer});var Mi,Oi,ke,at=v(()=>{"use strict";n();Mi=!1,Oi=(e=!0)=>{Mi=e},ke=(e,t=0)=>{Mi||setTimeout(()=>{window.location.href=e,window.location.assign(e)},t)}});function It({callbackRoute:e,onLoginRedirect:t,options:r}){let o=Boolean(e),i=typeof t=="function",l=i?0:Ll;o&&e!=null&&setTimeout(()=>{if(i)return t(e,r);window.location.pathname.includes(e)||ke(e)},l)}var Ll,Fi=v(()=>{"use strict";n();at();Ll=200});function Rn(e){return e[Math.floor(Math.random()*e.length)]}var _i=v(()=>{"use strict";n()});var Mn=v(()=>{"use strict";n();Sn()});var bt=v(()=>{"use strict";n();Fi();_i();Mn()});var Ui,Bi,On,Pl,Wi,Fn,$i,Gi,br=v(()=>{"use strict";n();Ui=require("@reduxjs/toolkit"),Bi=A(require("lodash.omit"));bt();On={id:"not-configured",chainId:"",name:"NOT CONFIGURED",egldLabel:"",decimals:"18",digits:"4",gasPerDataByte:"1500",walletConnectDeepLink:"",walletConnectBridgeAddress:"",walletConnectV2RelayAddress:"",walletConnectV2ProjectId:"",walletConnectV2Options:{},walletAddress:"",apiAddress:"",explorerAddress:"",apiTimeout:"4000"},Pl={network:On,chainID:"-1"},Wi=(0,Ui.createSlice)({name:"appConfig",initialState:Pl,reducers:{initializeNetworkConfig:(e,t)=>{let r=Rn(t.payload.walletConnectBridgeAddresses),o=Rn(t.payload.walletConnectV2RelayAddresses),i=(0,Bi.default)(t.payload,"walletConnectBridgeAddresses","walletConnectV2RelayAddresses");e.network=E(y(y({},e.network),i),{walletConnectBridgeAddress:r,walletConnectV2RelayAddress:o})},setChainID:(e,t)=>{e.chainID=t.payload}}}),{initializeNetworkConfig:Fn,setChainID:$i}=Wi.actions,Gi=Wi.reducer});var Vi,_n,Hi,Bm,Wm,$m,kr,Er=v(()=>{"use strict";n();Vi=require("@reduxjs/toolkit");J();Y();_n={isSigning:!1,signedSessions:{}},Hi=(0,Vi.createSlice)({name:"signedMessageInfoSliceState",initialState:_n,reducers:{setSignSession:(e,t)=>{let{sessionId:r,signedSession:o,errorMessage:i}=t.payload;return E(y({},e),{errorMessage:i!=null?i:e.errorMessage,isSigning:o.status==="pending",signedSessions:E(y({},e.signedSessions),{[r]:o})})},setSignSessionState:(e,t)=>y(y({},e),t.payload),clearSignedMessageInfo:()=>_n},extraReducers:e=>{e.addCase(G,()=>_n)}}),{setSignSession:Bm,clearSignedMessageInfo:Wm,setSignSessionState:$m}=Hi.actions,kr=Hi.reducer});var ji,qi,zi,Ki,Un,Bn,Ym,Zm,Jm,Xm,Lr,Pr=v(()=>{"use strict";n();ji=require("@reduxjs/toolkit"),qi=require("redux-persist");wn();J();hr();Y();zi={customToasts:[],transactionToasts:[],failTransactionToast:null},Ki=(0,ji.createSlice)({name:"toastsSlice",initialState:zi,reducers:{addCustomToast:(e,t)=>{e.customToasts.push(E(y({},t.payload),{type:"custom",toastId:t.payload.toastId||`custom-toast-${e.customToasts.length+1}`}))},removeCustomToast:(e,t)=>{e.customToasts=e.customToasts.filter(r=>r.toastId!==t.payload)},addTransactionToast:(e,t)=>{e.transactionToasts.push({type:"transaction",startTimestamp:wt(),toastId:t.payload||`custom-toast-${e.transactionToasts.length+1}`})},removeTransactionToast:(e,t)=>{e.transactionToasts=e.transactionToasts.filter(r=>r.toastId!==t.payload)},addFailTransactionToast:(e,t)=>{e.failTransactionToast=E(y({},t.payload),{toastId:fr})},removeFailTransactionToast:e=>{e.failTransactionToast=null}},extraReducers:e=>{e.addCase(G,()=>zi),e.addCase(qi.REHYDRATE,(t,r)=>{var i,l;let o=(l=(i=r.customToasts)==null?void 0:i.filter(p=>!("component"in p)))!=null?l:[];t.customToasts=o})}}),{addCustomToast:Un,removeCustomToast:Bn,addTransactionToast:Ym,removeTransactionToast:Zm,addFailTransactionToast:Jm,removeFailTransactionToast:Xm}=Ki.actions,Lr=Ki.reducer});var Yi,$n,Gn,Vn,Cl,Wn,Zi,rg,Dl,Hn,Cr,Dr=v(()=>{"use strict";n();Yi=require("@reduxjs/toolkit");Y();$n="Transaction failed",Gn="Transaction successful",Vn="Processing transaction",Cl="Transaction submitted",Wn={},Zi=(0,Yi.createSlice)({name:"transactionsInfo",initialState:Wn,reducers:{setTransactionsDisplayInfo(e,t){let{sessionId:r,transactionsDisplayInfo:o}=t.payload;r!=null&&(e[r]={errorMessage:(o==null?void 0:o.errorMessage)||$n,successMessage:(o==null?void 0:o.successMessage)||Gn,processingMessage:(o==null?void 0:o.processingMessage)||Vn,submittedMessage:(o==null?void 0:o.submittedMessage)||Cl,transactionDuration:o==null?void 0:o.transactionDuration})},clearTransactionsInfoForSessionId(e,t){t.payload!=null&&delete e[t.payload]},clearTransactionsInfo:()=>Wn},extraReducers:e=>{e.addCase(G,()=>Wn)}}),{clearTransactionsInfo:rg,setTransactionsDisplayInfo:Dl,clearTransactionsInfoForSessionId:Hn}=Zi.actions,Cr=Zi.reducer});function Ee(e){return e!=null&&(Bl(e)||Vl(e))}function ct(e){return e!=null&&(Wl(e)||Hl(e))}function lt(e){return e!=null&&($l(e)||zl(e))}function zn(e){return e!=null&&Gl(e)}function Bl(e){return e!=null&&Nl.includes(e)}function Wl(e){return e!=null&&Rl.includes(e)}function $l(e){return e!=null&&Ml.includes(e)}function Gl(e){return e!=null&&Ol.includes(e)}function Vl(e){return e!=null&&Fl.includes(e)}function Hl(e){return e!=null&&_l.includes(e)}function zl(e){return e!=null&&Ul.includes(e)}var Nl,Rl,Ml,Ol,Fl,_l,Ul,Et=v(()=>{"use strict";n();R();Nl=["sent"],Rl=["success"],Ml=["fail","cancelled","timedOut"],Ol=["timedOut"],Fl=["pending"],_l=["success"],Ul=["fail","invalid"]});var Ji,Xi,Jt,jl,Qi,Xt,pt,ql,Lt,Kl,Yl,ug,Zl,Nr,jn,Rr,Mr=v(()=>{"use strict";n();Ji=require("@reduxjs/toolkit"),Xi=require("redux-persist");R();Et();Y();Jt={signedTransactions:{},transactionsToSign:null,signTransactionsError:null,signTransactionsCancelMessage:null,customTransactionInformationForSessionId:{}},jl={signWithoutSending:!1,sessionInformation:null,redirectAfterSign:!1},Qi=(0,Ji.createSlice)({name:"transactionsSlice",initialState:Jt,reducers:{moveTransactionsToSignedState:(e,t)=>{var u,g;let{sessionId:r,transactions:o,errorMessage:i,status:l,redirectRoute:p}=t.payload,d=((u=e.customTransactionInformationForSessionId)==null?void 0:u[r])||jl;e.signedTransactions[r]={transactions:o,status:l,errorMessage:i,redirectRoute:p,customTransactionInformation:d},((g=e==null?void 0:e.transactionsToSign)==null?void 0:g.sessionId)===r&&(e.transactionsToSign=Jt.transactionsToSign)},clearSignedTransaction:(e,t)=>{e.signedTransactions[t.payload]&&delete e.signedTransactions[t.payload]},clearTransactionToSign:e=>{e!=null&&e.transactionsToSign&&(e.transactionsToSign=null)},updateSignedTransaction:(e,t)=>{e.signedTransactions=y(y({},e.signedTransactions),t.payload)},updateSignedTransactions:(e,t)=>{let{sessionId:r,status:o,errorMessage:i,transactions:l}=t.payload;e.signedTransactions[r]!=null&&(e.signedTransactions[r].status=o,i!=null&&(e.signedTransactions[r].errorMessage=i),l!=null&&(e.signedTransactions[r].transactions=l))},updateSignedTransactionStatus:(e,t)=>{var d,u,g,f,h,I;let{sessionId:r,status:o,errorMessage:i,transactionHash:l}=t.payload,p=(u=(d=e.signedTransactions)==null?void 0:d[r])==null?void 0:u.transactions;if(p!=null){e.signedTransactions[r].transactions=p.map(b=>b.hash===l?E(y({},b),{status:o,errorMessage:i}):b);let P=(f=(g=e.signedTransactions[r])==null?void 0:g.transactions)==null?void 0:f.every(b=>ct(b.status)),k=(I=(h=e.signedTransactions[r])==null?void 0:h.transactions)==null?void 0:I.every(b=>lt(b.status));P&&(e.signedTransactions[r].status="success"),k&&(e.signedTransactions[r].status="fail")}},setTransactionsToSign:(e,t)=>{e.transactionsToSign=t.payload;let{sessionId:r,customTransactionInformation:o}=t.payload;e.customTransactionInformationForSessionId[r]=o,e.signTransactionsError=null},clearAllTransactionsToSign:e=>{e.transactionsToSign=Jt.transactionsToSign,e.signTransactionsError=null},clearAllSignedTransactions:e=>{e.signedTransactions=Jt.signedTransactions},setSignTransactionsError:(e,t)=>{e.signTransactionsError=t.payload},setSignTransactionsCancelMessage:(e,t)=>{e.signTransactionsCancelMessage=t.payload}},extraReducers:e=>{e.addCase(G,()=>Jt),e.addCase(Xi.REHYDRATE,(t,r)=>{var p;if(t.signTransactionsCancelMessage=null,!((p=r.payload)!=null&&p.transactions))return;let{signedTransactions:o,customTransactionInformationForSessionId:i}=r.payload.transactions,l=Object.entries(o).reduce((d,[u,g])=>{let f=new Date(u),h=new Date;return h.setHours(h.getHours()+5),h-f>0||(d[u]=g),d},{});i!=null&&(t.customTransactionInformationForSessionId=i),o!=null&&(t.signedTransactions=l)})}}),{updateSignedTransactionStatus:Xt,updateSignedTransactions:pt,setTransactionsToSign:ql,clearAllTransactionsToSign:Lt,clearAllSignedTransactions:Kl,clearSignedTransaction:Yl,clearTransactionToSign:ug,setSignTransactionsError:Zl,setSignTransactionsCancelMessage:Nr,moveTransactionsToSignedState:jn}=Qi.actions,Rr=Qi.reducer});var C=v(()=>{"use strict";n();Cn();Ir();Nn();br();Er();Pr();Dr();Mr()});var qn=v(()=>{"use strict";n()});var os,ns,is,Og,Fg,_g,Ug,Bg,Wg,ss,as=v(()=>{"use strict";n();os=require("@reduxjs/toolkit");Y();ns={visible:!1,modal:{showHeader:!0,showFooter:!1,headerText:"",footerText:""}},is=(0,os.createSlice)({name:"dappModalsSlice",initialState:ns,reducers:{setDappModalVisibility:(e,t)=>{e.visible=t.payload},setDappModalHeaderVisibility:(e,t)=>{e.modal.showHeader=t.payload},setDappModalFooterVisibility:(e,t)=>{e.modal.showFooter=t.payload},setDappModalHeaderText:(e,t)=>{e.modal.headerText=t.payload},setDappModalFooterText:(e,t)=>{e.modal.footerText=t.payload},setDappModalConfig:(e,t)=>{e.modal=y({},t.payload)}},extraReducers:e=>{e.addCase(G,()=>ns)}}),{setDappModalVisibility:Og,setDappModalHeaderVisibility:Fg,setDappModalFooterVisibility:_g,setDappModalHeaderText:Ug,setDappModalFooterText:Bg,setDappModalConfig:Wg}=is.actions,ss=is.reducer});var cs,ep,tp,Ct,Ur=v(()=>{"use strict";n();cs=require("@reduxjs/toolkit");qn();Cn();as();Ir();Nn();br();Er();Pr();Dr();Mr();ep={["account"]:vi,["dappModal"]:ss,["loginInfo"]:Li,["modals"]:Ri,["networkConfig"]:Gi,["signedMessageInfo"]:kr,["toasts"]:Lr,["transactionsInfo"]:Cr,["transactions"]:Rr},tp=(e={})=>(0,cs.combineReducers)(y(y({},ep),e)),Ct=tp});var us={};et(us,{default:()=>lp});function Br(e,t=[]){return{key:e,version:1,storage:ps.default,blacklist:t}}var $e,ls,ps,rp,np,op,ip,sp,ap,cp,lp,ds=v(()=>{"use strict";n();$e=require("redux-persist"),ls=A(require("redux-persist/lib/storage")),ps=A(require("redux-persist/lib/storage/session"));Ur();C();Er();Pr();Dr();Mr();qn();rp={2:e=>E(y({},e),{networkConfig:On})};np=Br("sdk-dapp-transactionsInfo"),op=Br("sdk-dapp-transactions",["transactionsToSign"]),ip=Br("sdk-dapp-toasts"),sp=Br("sdk-dapp-signedMessageInfo"),ap={key:"sdk-dapp-store",version:2,storage:ls.default,whitelist:["account","loginInfo","modals","networkConfig"],migrate:(0,$e.createMigrate)(rp,{debug:!1})},cp={["toasts"]:(0,$e.persistReducer)(ip,Lr),["transactions"]:(0,$e.persistReducer)(op,Rr),["transactionsInfo"]:(0,$e.persistReducer)(np,Cr),["signedMessageInfo"]:(0,$e.persistReducer)(sp,kr)},lp=(0,$e.persistReducer)(ap,Ct(cp))});var ms={};et(ms,{default:()=>pp});var pp,gs=v(()=>{"use strict";n();Ur();pp=Ct()});var fs={};et(fs,{default:()=>dp});var le,up,dp,Ts=v(()=>{"use strict";n();le=require("redux-persist"),up=[le.FLUSH,le.REHYDRATE,le.PAUSE,le.PERSIST,le.PURGE,le.REGISTER],dp=up});var xs={};et(xs,{default:()=>hs});function hs(e){return(0,ys.persistStore)(e)}var ys,Ss=v(()=>{"use strict";n();ys=require("redux-persist")});var Qu={};et(Qu,{AppInitializer:()=>mo,AuthenticatedRoutesWrapper:()=>la,AxiosInterceptor:()=>To,AxiosInterceptorContext:()=>fu,AxiosInterceptorContextProvider:()=>go,DappProvider:()=>Xu,LoginInfoListener:()=>fo,useAxiosInterceptorContext:()=>_t});module.exports=qt(Qu);n();n();var oo=A(require("react"));n();var Es=require("react"),Dt=require("react-redux");n();var Kn=require("@reduxjs/toolkit"),Is=require("react-redux/lib/utils/Subscription");C();n();var ts=A(require("lodash.throttle"));D();n();var es=A(require("lodash.isequal")),Or=require("reselect");J();var S=(0,Or.createSelectorCreator)(Or.defaultMemoize,es.default),Pt=(e,t)=>e!=""&&Boolean(t);C();Dn();vt();it();var Jl=[yr],Fr=!1,Xl=(0,ts.default)(()=>{Zt(Yt())},5e3),rs=e=>t=>r=>{var u;if(Jl.includes(r.type))return t(r);let o=e.getState(),i=be.local.getItem(ce.loginExpiresAt);if(!Pt((u=o==null?void 0:o.loginInfo)==null?void 0:u.loginMethod,o==null?void 0:o.account.address))return t(r);if(i==null)return Zt(Yt());let p=Date.now();return i-p<0&&!Fr?setTimeout(()=>{Fr=!0,e.dispatch(ki())},1e3):(Fr&&(Fr=!1),Xl()),t(r)};n();n();function _r(){return typeof sessionStorage!="undefined"}var ws=_r()?(ds(),qt(us)).default:(gs(),qt(ms)).default,vs=_r()?(Ts(),qt(fs)).default:[],As=_r()?(Ss(),qt(xs)).default:e=>e;Ur();var w=(0,Kn.configureStore)({reducer:ws,middleware:e=>e({serializableCheck:{ignoredActions:[...vs,Sr.type,st.type],ignoredPaths:["payload.nonce","account.account.nonce","providers.accountProvider"]}}).concat(rs)}),bs=(0,Is.createSubscription)(w),ks=As(w),gf=(0,Kn.configureStore)({reducer:Ct});var mp={store:w,subscription:bs},Qt=(0,Es.createContext)(mp),hf=(0,Dt.createStoreHook)(Qt),M=(0,Dt.createDispatchHook)(Qt),x=(0,Dt.createSelectorHook)(Qt);n();n();C();var Le=e=>e.account,Pe=S(Le,e=>e.address),Ge=S(Le,Pe,(e,t)=>t in e.accounts?e.accounts[t]:xr),Ls=S(Le,Ge,(e,t)=>{let i=e,{accounts:r}=i,o=Qe(i,["accounts"]);return E(y({},o),{account:t})}),gp=S(Ge,e=>e.balance),Ps=S(Ge,e=>{var t;return((t=e==null?void 0:e.nonce)==null?void 0:t.valueOf())||0}),vf=S(Le,e=>e.shard),Yn=S(Le,e=>e.ledgerAccount),Af=S(Le,e=>e.walletConnectAccount),Cs=S(Le,e=>e.isAccountLoading),If=S(Le,e=>e.accountLoadingError),Zn=S(Le,e=>e.websocketEvent);n();var q=e=>e.loginInfo,Ds=S(q,e=>e.loginMethod),Ce=S(q,Pe,(e,t)=>Pt(e.loginMethod,t)),Ns=S(q,e=>e.walletConnectLogin),Rs=S(q,e=>e.ledgerLogin),Nt=S(q,e=>e.walletLogin),Ms=S(q,e=>e.isLoginSessionInvalid),Wr=S(q,e=>e.tokenLogin),Rt=S(q,e=>e.logoutRoute);n();var Os=e=>e.modals,Cf=S(Os,e=>e.txSubmittedModal),fp=S(Os,e=>e.notificationModal);n();var xe=e=>e.networkConfig,er=S(xe,e=>e.chainID),Fs=S(xe,e=>e.network.walletConnectBridgeAddress),_s=S(xe,e=>e.network.walletConnectV2RelayAddress),Us=S(xe,e=>e.network.walletConnectV2ProjectId),Bs=S(xe,e=>e.network.walletConnectV2Options),$r=S(xe,e=>e.network.walletConnectDeepLink),pe=S(xe,e=>e.network),Gr=S(pe,e=>e.apiAddress),Ws=S(pe,e=>e.explorerAddress),$s=S(pe,e=>e.egldLabel);n();var Jn=e=>e.signedMessageInfo,Of=S(Jn,e=>e.isSigning),Ff=S(Jn,e=>e.errorMessage),_f=S(Jn,e=>{let t=Object.keys(e.signedSessions),r=t.length;return e.signedSessions[t[r-1]]});n();var Xn=e=>e.toasts,Wf=S(Xn,e=>e.customToasts),$f=S(Xn,e=>e.transactionToasts),Gf=S(Xn,e=>e.failTransactionToast);n();C();var Gs={errorMessage:$n,successMessage:Gn,processingMessage:Vn},Tp=e=>e.transactionsInfo,yp=S(Tp,(e,t)=>t,(e,t)=>t!=null&&(e==null?void 0:e[Number(t)])||Gs);n();n();var se=require("@multiversx/sdk-core");D();n();function Qn(e){try{return s.Buffer.from(e,"base64").toString()===atob(e)}catch(t){return!1}}function Mt(e){return atob(e)}function Ot(e){var i,l,p;let{data:t}=e,r=Qn(t!=null?t:"")?se.TransactionPayload.fromEncoded(t):new se.TransactionPayload(t),o=new se.Transaction(y({value:e.value.valueOf(),data:r,nonce:e.nonce.valueOf(),receiver:new se.Address(e.receiver),sender:new se.Address(e.sender),gasLimit:(i=e.gasLimit.valueOf())!=null?i:Kt,gasPrice:(l=e.gasPrice.valueOf())!=null?l:Tr,chainID:e.chainID.valueOf(),version:new se.TransactionVersion((p=e.version)!=null?p:ai)},e.options?{options:new se.TransactionOptions(e.options)}:{}));return o.applySignature({hex:()=>e.signature||""},new se.Address(e.sender)),o}n();Et();n();var xp=A(require("bignumber.js"));J();n();n();n();n();var wp=require("@multiversx/sdk-core"),vp=A(require("bignumber.js"));R();n();var zs=require("@multiversx/sdk-core");function Sp(e){try{let t=new zs.Address(e);return Boolean(t.bech32())}catch(t){return!1}}function tr(e){return(e==null?void 0:e.startsWith("erd"))&&e.length===62&&/^\w+$/.test(e)&&Sp(e)}n();n();n();var Ip=require("@multiversx/sdk-core/out");n();D();n();var js=require("@multiversx/sdk-core");J();n();n();n();n();R();n();n();n();n();n();n();n();var qs="dapp/config",Ks="network/config";var Vr="accounts";var eo="blocks";n();n();n();n();Z();n();n();Z();n();n();n();var Np=A(require("bignumber.js"));D();n();var Dp=require("@multiversx/sdk-core"),to=A(require("bignumber.js"));D();n();var Pp=A(require("bignumber.js"));n();to.default.config({ROUNDING_MODE:to.default.ROUND_FLOOR});n();n();n();D();n();n();n();n();D();n();D();n();var Rp=require("@multiversx/sdk-core");D();n();var rr=require("@multiversx/sdk-core"),Fp=require("@multiversx/sdk-network-providers");D();n();n();var Mp=A(require("bignumber.js"));D();n();D();n();n();n();n();n();D();n();Z();var Up=["reDelegateRewards","claimRewards","unBond"],Bp=["wrapEgld","unwrapEgld"],Wp=["unStake"],$p=["unDelegate"];n();n();n();D();n();var zp=A(require("bignumber.js"));n();n();n();Z();n();var jp=A(require("bignumber.js"));n();n();n();n();Z();n();n();n();var Yp=A(require("linkifyjs"));n();D();n();var Zp=A(require("bignumber.js"));n();J();n();n();R();n();R();n();n();n();Z();n();Z();n();var Jp=A(require("bignumber.js"));D();Z();n();Z();n();var ea=require("react");J();n();n();Z();n();var Xp=require("@multiversx/sdk-core/out"),Qp=A(require("bignumber.js"));Z();n();Z();n();n();R();var dw=[{label:"Raw",value:"raw"},{label:"Text",value:"text"},{label:"Decimal",value:"decimal"},{label:"Smart",value:"smart"}];n();var ta=require("react");J();n();var tu=require("react");Z();var xw=["create","localMint","ESDTLocalMint","addQuantity","burn","localBurn","ESDTLocalBurn","wipe","writeLog","signalError"];var qr=e=>e.transactions,He=S(qr,e=>e.signedTransactions),ru=S(qr,e=>e.signTransactionsError),ra=S(qr,e=>e.signTransactionsCancelMessage),Kr=e=>t=>Object.entries(t).reduce((r,[o,i])=>(e(i.status)&&(r[o]=i),r),{}),no=S(He,Kr(Ee)),na=S(He,Kr(ct)),oa=S(He,Kr(lt)),nu=S(He,Kr(zn)),ia=S(qr,e=>{var t;return(e==null?void 0:e.transactionsToSign)==null?null:E(y({},e.transactionsToSign),{transactions:((t=e==null?void 0:e.transactionsToSign)==null?void 0:t.transactions.map(r=>Ot(r)))||[]})}),ou=S(He,(e,t)=>t,(e,t)=>t!=null?(e==null?void 0:e[t])||{}:{});at();n();n();function sa(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(r){}}}function aa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=iu(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let l=i[0],p=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((g,f,h)=>{if(f==="*"){let I=d[h]||"";p=l.slice(0,l.length-I.length).replace(/(.)\/+$/,"$1")}return g[f]=su(d[h]||"",f),g},{}),pathname:l,pathnameBase:p,pattern:e}}function iu(e,t=!1,r=!0){sa(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(p,d)=>(o.push(d),"([^\\/]+)"));return e.endsWith("*")?(o.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=r?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(i,t?void 0:"i"),o]}function su(e,t){try{return decodeURIComponent(e)}catch(r){return sa(!1,`The value for the URL param "${t}" will not be decoded because the string "${e}" is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}var ca=(e,t)=>e.filter(({authenticatedRoute:i})=>Boolean(i)).some(({path:i})=>aa(i,t)!==null);var la=({children:e,routes:t,unlockRoute:r,onRedirect:o})=>{let i=x(Ce),l=x(Cs),p=x(Nt),u=ca(t,window.location.pathname)&&!i&&p==null;return l||p?null:u?(o?o(r):ke(r),null):oo.default.createElement(oo.default.Fragment,null,e)};n();var Re=A(require("react")),Pa=require("@multiversx/sdk-core/out");n();n();n();var pa=A(require("axios"));function ua(e){return T(this,null,function*(){let{apiAddress:t,apiTimeout:r}=pe(w.getState()),o=e.map(l=>pa.default.post(`${t}/transactions`,l.toPlainObject(),{timeout:parseInt(r)}));return(yield Promise.all(o)).map(({data:l})=>l.txHash)})}n();var da=A(require("axios"));function Yr(e){return T(this,null,function*(){let t=Gr(w.getState()),r=e.map(i=>i.hash),{data:o}=yield da.default.get(`${t}/transactions`,{params:{hashes:r.join(","),withScResults:!0}});return e.map(({hash:i,previousStatus:l})=>{let p=o.find(d=>(d==null?void 0:d.txHash)===i);return{hash:i,data:p==null?void 0:p.data,invalidTransaction:p==null,status:p==null?void 0:p.status,results:p==null?void 0:p.results,sender:p==null?void 0:p.sender,receiver:p==null?void 0:p.receiver,previousStatus:l,hasStatusChanged:p&&p.status!==l}})})}n();var cu=A(require("axios"));n();n();var lu=A(require("axios"));n();var pu=A(require("axios"));n();n();n();var ga=A(require("axios"));n();n();var Zr=e=>{let t=e!=null?e:Gr(w.getState());return t.endsWith("/")?t.slice(0,-1):t};function fa(e){return T(this,null,function*(){if(!e)return null;let r=`${Zr()}/${Vr}/${e}`;try{let{data:o}=yield ga.default.get(r);return o}catch(o){console.error("error fetching configuration for ",r)}return null})}n();n();xt();n();var Ta=A(require("axios"));function io(e){return T(this,null,function*(){let t=`${e}/${qs}`;try{let{data:o}=yield Ta.default.get(t);if(o!=null){let i="egldDenomination";if(i in o){let r=o,{[i]:l,decimals:p}=r,d=Qe(r,[ko(i),"decimals"]);return E(y({},d),{decimals:l,digits:p})}return o}}catch(o){console.error("error fetching configuration for ",t)}return null})}n();var ya=A(require("axios"));function ha(){return T(this,null,function*(){var r;let t=`${Zr()}/${Ks}`;try{let{data:o}=yield ya.default.get(t);if(o!=null)return(r=o==null?void 0:o.data)==null?void 0:r.config}catch(o){console.error("error fetching configuration for ",t)}return null})}n();xt();n();xt();n();var uu=A(require("axios"));xt();n();var De=()=>x(Ls);br();n();n();n();n();var xa=require("@multiversx/sdk-extension-provider"),Sa=require("@multiversx/sdk-hw-provider"),wa=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectProvider"),va=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectV2Provider"),so=require("@multiversx/sdk-web-wallet-provider");D();R();var du="/dapp/init",ut=e=>{switch(e==null?void 0:e.constructor){case so.WalletProvider:return"wallet";case wa.WalletConnectProvider:return"walletconnect";case va.WalletConnectV2Provider:return"walletconnectv2";case Sa.HWProvider:return"ledger";case xa.ExtensionProvider:return"extension";case Jr:return"";default:return"extra"}},ao=e=>new so.WalletProvider(`${e}${du}`),co=e=>T(void 0,null,function*(){if(!e.isInitialized())throw new Error("Unable to get version. Provider not initialized");let t=e.hwApp,{contractData:r,version:o}=yield t.getAppConfiguration();return{version:o,dataEnabled:r===ci}}),Ne=e=>`Unable to perform ${e}, Provider not initialized`,Jr=class{init(){return Promise.resolve(!1)}login(t){throw new Error(Ne(`login with options: ${t}`))}logout(t){throw new Error(Ne(`logout with options: ${t}`))}getAddress(){throw new Error(Ne("getAddress"))}isInitialized(){return!1}isConnected(){return Promise.resolve(!1)}sendTransaction(t,r){throw new Error(Ne(`sendTransaction with transactions: ${t} options: ${r}`))}signTransaction(t,r){throw new Error(Ne(`signTransaction with transactions: ${t} options: ${r}`))}signTransactions(t,r){throw new Error(Ne(`signTransactions with transactions: ${t} options: ${r}`))}signMessage(t,r){throw new Error(Ne(`signTransactions with ${t} and options ${r}`))}sendCustomMessage({method:t,params:r}){throw new Error(Ne(`sendCustomMessage with method: ${t} params: ${r}`))}sendCustomRequest(t){throw new Error(Ne(`sendSessionEvent with options: ${t}`))}ping(){return Promise.resolve(!1)}},nr=new Jr;var po=nr,lo=null;function me(e){po=e}function Aa(e){lo=e}function Ia(){lo!=null&&(po=lo)}function re(){return po||nr}Y();J();n();function ge(){return Ce(w.getState())}n();n();R();n();n();function ba(){let e=re();return ut(e)}function ue(e){return ba()===e}function ze(){let{search:e}=window.location,t=w.getState(),r=re(),o=Pe(t),i=Ce(t),l=Nt(t);if(!r)throw"provider not initialized";return ue("ledger")&&i?new Promise(p=>{p(o)}):!ue("")&&!ue("wallet")&&!ue("extra")?r.getAddress():new Promise(p=>{if(l!=null){let d=new URLSearchParams(e),u=Object.fromEntries(d);tr(u.address)&&p(u.address)}i&&p(o),p("")})}n();function je(e){return T(this,null,function*(){return yield fa(e)})}n();C();function ka(e){w.dispatch(Sr(e))}n();function Ft(e){let t=w.getState(),r=Ps(t);return e?r&&!isNaN(r)?Math.max(r,e.nonce):e.nonce:r}n();n();C();var Ea=()=>T(void 0,null,function*(){try{let e=yield ze();try{let t=yield je(e);if(t!=null){let r=E(y({},t),{nonce:Ft(t)});return w.dispatch(st(r)),r}}catch(t){console.error("Failed getting account ",t)}}catch(e){console.error("Failed getting address ",e)}return null});function Xr(){return T(this,null,function*(){let e=re();if(e==null)throw"Provider not initialized";if(!e.isInitialized||e.isInitialized())return Ea();try{if(!e.init)throw"Current provider does not have init() function";return(yield e.init())?Ea():void 0}catch(t){console.error("Failed initializing provider ",t)}})}n();var La=require("@multiversx/sdk-core");n();Y();J();at();vt();it();var mu=e=>{be.local.setItem({key:ce.logoutEvent,data:e,expires:0}),be.local.removeItem(ce.logoutEvent)};function X(e,t){return T(this,null,function*(){let r=re(),o=ut(r),i=ge(),l=o==="wallet";if(!i||!r){uo(e,t,!1);return}try{let p=yield ze();mu(p)}catch(p){uo(e,t,!1),console.error("error fetching logout address",p)}l&&Oi(),w.dispatch(G());try{let d=l&&!e?window.location.origin:e;l?setTimeout(()=>{r.logout({callbackUrl:d})}):(yield r.logout({callbackUrl:d}),uo(e,t,l))}catch(p){console.error("error logging out",p)}})}function uo(e,t,r){e&&!r&&(typeof t=="function"?t(e):ke(e))}Ir();function mo({customNetworkConfig:e={},children:t,environment:r,logoutRoute:o}){let[i,l]=(0,Re.useState)(!1),p=De(),d=x(Ms),{address:u,publicKey:g}=p,f=M();function h(){return T(this,null,function*(){let P=!(e!=null&&e.skipFetchFromServer),k=e==null?void 0:e.apiAddress,b=ot[r]||{},O=y(y({},b),e);if(P){let N=b==null?void 0:b.apiAddress,V=yield io(k||N);if(V!=null){let ne=y(y(y({},b),V),e);f(Fn(ne));return}}f(Fn(O))})}function I(){return T(this,null,function*(){f(Ei(o)),yield h(),l(!0)})}return(0,Re.useEffect)(()=>{u&&new Pa.Address(u).hex()!==g&&X(o)},[u,g,o]),(0,Re.useEffect)(()=>{I()},[e,r,o]),(0,Re.useEffect)(()=>{p.address&&d&&X(o)},[d,p.address,o]),i?Re.default.createElement(Re.default.Fragment,null,t):null}n();var Vt=A(require("react")),Nc=require("react-redux"),Rc=require("redux-persist/integration/react");n();var Fe=require("react"),Ga=require("@multiversx/sdk-extension-provider"),Va=require("@multiversx/sdk-hw-provider");n();var _a=require("react"),en=require("@multiversx/sdk-core");n();n();var dt=()=>x(Ge);n();n();n();n();n();var Me=A(require("react"));var Ca=(0,Me.createContext)({}),gu=w.getState();function go({children:e}){let[t,r]=(0,Me.useState)(),[o,i]=(0,Me.useState)(q(gu)),l={address:t,setAddress:r,isLoggedIn:Pt(o.loginMethod,t),loginInfo:o,setLoginInfo:p=>i(p)};return Me.default.createElement(Ca.Provider,{value:l},e)}function _t(){let e=(0,Me.useContext)(Ca);if(e===void 0||Object.values(e).length===0)throw new Error("useAxiosInterceptorContext must be used within an AxiosInterceptorContextProvider");return e}n();var or=A(require("react"));var fo=({children:e=null})=>{var l;let{address:t}=dt(),r=x(q),{setLoginInfo:o,setAddress:i}=_t();return(0,or.useEffect)(()=>{i(t),o(r)},[(l=r.tokenLogin)==null?void 0:l.loginToken,t]),or.default.createElement(or.default.Fragment,null,e)};n();var qe=A(require("react")),Qr=A(require("axios"));var To=({children:e,authenticatedDomanis:t})=>{var d;let{loginInfo:r}=_t(),o=(d=r==null?void 0:r.tokenLogin)==null?void 0:d.nativeAuthToken,i=(0,qe.useRef)(-1),l=()=>{Qr.default.interceptors.response.use(u=>u,u=>{var f,h;let g=(f=u.config)==null?void 0:f.url;return(h=u.config)!=null&&h.params&&(g+=`?${new URLSearchParams(u.config.params).toString()}`),console.error("Axios error for: ",g),Promise.reject(u)})},p=()=>{Qr.default.interceptors.request.eject(i.current),i.current=Qr.default.interceptors.request.use(u=>T(void 0,null,function*(){return t.includes(String(u==null?void 0:u.baseURL))&&(u.headers={Authorization:`Bearer ${o}`}),u}),u=>{Promise.reject(u)})};return(0,qe.useEffect)(l,[]),(0,qe.useEffect)(()=>{o&&p()},[o]),qe.default.createElement(qe.default.Fragment,null,e)};var fu={Interceptor:To,Listener:fo,Provider:go};n();n();var ir=()=>{let e=re(),t=ut(e);return{provider:e,providerType:t}};n();C();n();n();n();var Da,sr={hostname:typeof window!="undefined"?(Da=window==null?void 0:window.location)==null?void 0:Da.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},ar=e=>{var r,o,i,l;return e===!0?sr:{hostname:(r=e==null?void 0:e.hostname)!=null?r:sr.hostname,expirySeconds:(o=e==null?void 0:e.expirySeconds)!=null?o:sr.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:sr.apiAddress,tokenExpirationToastWarningSeconds:(l=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?l:sr.tokenExpirationToastWarningSeconds}};n();var Tu=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),Ut=e=>Tu(s.Buffer.from(e,"utf8").toString("base64"));n();var Na=A(require("axios"));function Ra(e){return T(this,null,function*(){let{data:t}=yield Na.default.get(`${e}/${eo}?size=1&fields=hash,timestamp`),[r]=t;return r})}n();n();n();function yu(e){return Object.prototype.toString.call(e)==="[object String]"}var Ma=e=>{if(!e||!yu(e))return null;try{let[t,r,o]=e.split("."),i=Mt(t),l=Mt(r),[p,d,u,g]=l.split("."),f=JSON.parse(Mt(g)),h=Mt(p),I={ttl:Number(u),address:i,extraInfo:f,host:h,signature:o,blockHash:d,body:l};return g==="e30"&&delete I.extraInfo,I}catch(t){return null}};var Oa=({address:e,token:t,signature:r})=>{let o=Ut(e),i=Ut(t);return`${o}.${i}.${r}`};n();hr();var Bt=e=>{let t=Ma(e);if(!t)return{isExpired:!1};let r=wt(),{ttl:o,extraInfo:i}=t,l=i.timestamp;if(!l)return{isExpired:!1};let p=l+o,d=r>p,u=p-r;return{isExpired:d,expiresAt:p,secondsUntilExpires:u}};var Fa=e=>{let{hostname:t,apiAddress:r,expirySeconds:o}=ar(e);return{getNativeAuthConfig:ar,initialize:(...p)=>T(void 0,[...p],function*(l={}){let{hash:d,timestamp:u}=yield Ra(r),g=Ut(JSON.stringify(y(y({},l),u?{timestamp:u}:{})));return`${Ut(t)}.${d}.${o}.${g}`}),getToken:Oa,getTokenExpiration:Bt}};n();var hu=(e,t)=>{var r;return t?t===!0?e:(r=t.apiAddress)!=null?r:e:null},Oe=e=>{let t=x(pe),r=x(Wr),o=(0,_a.useRef)(r==null?void 0:r.loginToken),i=hu(t.apiAddress,e),l=ar(y(y({},e===!0?{}:e),i?{apiAddress:i}:{})),p=Boolean(e),d=Fa(l),{address:u}=dt(),g=M(),f=k=>{o.current=k,g(vr(y({loginToken:k},i?{nativeAuthConfig:l}:{})))},h=()=>T(void 0,null,function*(){try{return yield d.initialize()}catch(k){console.error("Unable to get block. Login failed.",k);return}}),I=({address:k,signature:b})=>{let O=o.current;if(!O)throw"Token not found. Call `setLoginToken` first.";if(!p){g(vr({loginToken:O,signature:b}));return}let N=d.getToken({address:k,token:O,signature:b});g(vr(y({loginToken:O,signature:b,nativeAuthToken:N},i?{nativeAuthConfig:l}:{})))};return{configuration:l,setLoginToken:f,getNativeAuthLoginToken:h,setTokenLoginInfo:I,refreshNativeAuthTokenLogin:b=>T(void 0,[b],function*({signMessageCallback:k}){let O=yield h();if(o.current=O,!O)return;let N=new en.SignableMessage({address:new en.Address(u),message:s.Buffer.from(O)}),V=yield k(N,{});I({address:u,signature:V.toJSON().signature})})}};n();var Ke=require("react"),Ua=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectProvider");n();var tn=require("react");function Wt(e,t=[]){let r=(0,tn.useRef)(!0);(0,tn.useEffect)(()=>{r.current?r.current=!1:e()},t)}Y();C();R();bt();var yo=({logoutRoute:e,callbackRoute:t,nativeAuth:r,token:o,onLoginRedirect:i})=>{let l=M(),p=15e3,d=r!=null,u=Oe(r),g=o,[f,h]=(0,Ke.useState)(""),[I,P]=(0,Ke.useState)(""),{provider:k}=ir(),b=x(Fs),O=x($r),N=(0,Ke.useRef)(k),V=(0,Ke.useRef)(!0),ne,Q=Boolean(I),Ye=!Q,Ue=Q?`${O}?wallet-connect=${encodeURIComponent(I)}`:"";(0,Ke.useEffect)(()=>{Je();let B=setInterval(()=>{Je()},p);return()=>clearInterval(B)},[k]),Wt(()=>{!o||L()},[o]),Wt(()=>{N.current=k},[k]);let U=()=>{X(e)},Ze=()=>{V.current=!1};function Je(){return T(this,null,function*(){var we,z;if(k==null||!ue("walletconnect")||!Boolean((z=(we=N.current)==null?void 0:we.walletConnector)==null?void 0:z.connected))return;let H={method:"heartbeat",params:{}};try{yield N.current.sendCustomMessage(H)}catch(ee){console.error("Connection lost",ee),U()}})}function Ht(){return T(this,null,function*(){var B;try{let H=N.current;if(ge()||H==null||!ue("walletconnect"))return;if(!V.current){try{yield(B=N.current)==null?void 0:B.logout()}catch(j){console.warn("Unable to logout")}return}let z=yield H.getAddress();if(!z){console.warn("Login cancelled.");return}let ee=yield H.getSignature(),gt={address:z,loginMethod:"walletconnect"},W={logoutRoute:e,loginType:"walletConnect",callbackRoute:t!=null?t:window.location.href};l(wr(W)),ee&&u.setTokenLoginInfo({signature:ee,address:z}),l(oe(gt)),H.walletConnector.on("heartbeat",()=>{clearInterval(ne),ne=setInterval(()=>{console.log("Maiar Wallet Connection Lost"),U(),clearInterval(ne)},15e4)}),It({callbackRoute:t,onLoginRedirect:i,options:{address:z,signature:ee}})}catch(H){h("Invalid address"),console.error(H)}})}function zt(B=!0){return T(this,null,function*(){var ee,gt;let H=B&&!I;if(!b||((gt=(ee=N==null?void 0:N.current)==null?void 0:ee.isInitialized)==null?void 0:gt.call(ee))&&!H)return;let we={onClientLogin:Ht,onClientLogout:U},z=new Ua.WalletConnectProvider(b,we);yield z.init(),V.current=!0,me(z),N.current=z,B&&L()})}function L(){return T(this,null,function*(){var z;if(!b)return;let B=yield(z=N.current)==null?void 0:z.login();if(!Boolean(B))return;if(d&&!g&&(g=yield u.getNativeAuthLoginToken(),!g)){console.warn("Fetching block failed. Login cancelled.");return}if(!g){P(B);return}u.setLoginToken(g);let we=`${B}&token=${g}`;P(we)})}let F=Boolean(f),Xe=ge();return[zt,{error:f,loginFailed:F,isLoading:Ye&&!F,isLoggedIn:Xe&&!F},{uriDeepLink:Ue,walletConnectUri:I,cancelLogin:Ze}]};n();var Se=require("react"),Ba=require("@multiversx/sdk-wallet-connect-provider/out/walletConnectV2Provider");Y();C();R();bt();var ho=({callbackRoute:e,logoutRoute:t,token:r,nativeAuth:o,onLoginRedirect:i})=>{let l=M(),p=o!=null,d=Oe(o),u=r,[g,f]=(0,Se.useState)(""),[h,I]=(0,Se.useState)(""),[P,k]=(0,Se.useState)(!0),[b,O]=(0,Se.useState)([]),N=re(),V=x(_s),ne=x(Us),Q=x(Bs),Ye=x(er),Ue=x($r),U=(0,Se.useRef)(N),Ze=(0,Se.useRef)(!0),Je=["erd_cancelAction"],Ht=P?"":`${Ue}?wallet-connect=${encodeURIComponent(h)}`;Wt(()=>{!r||z()},[r]),Wt(()=>{U.current=N},[N]),(0,Se.useEffect)(()=>{k(!Boolean(h))},[h]);let zt=()=>{X(t)},L=W=>{console.log("wc2 session event: ",W)},F=()=>{Ze.current=!1};function Xe(){return T(this,null,function*(){var W;try{let j=U.current;if(ge()||j==null||!ue("walletconnectv2"))return;if(!Ze.current){try{yield(W=U.current)==null?void 0:W.logout()}catch(ed){console.warn("Unable to logout")}return}let de=yield j.getAddress();if(!de){console.warn("Login cancelled.");return}let Be=yield j.getSignature(),an={address:de,loginMethod:"walletconnectv2"},Mc={logoutRoute:t,loginType:"walletconnectv2",callbackRoute:e!=null?e:window.location.href};l(wr(Mc)),Be&&d.setTokenLoginInfo({signature:Be,address:de}),l(oe(an)),It({callbackRoute:e,onLoginRedirect:i,options:{address:de,signature:Be}})}catch(j){f("Invalid address"),console.error(j)}})}function B(W=!0){return T(this,null,function*(){if(!ne||!V){f("Invalid WalletConnect setup");return}let j={onClientLogin:Xe,onClientLogout:zt,onClientEvent:L},K=new Ba.WalletConnectV2Provider(j,Ye,V,ne,Q);yield K.init(),Ze.current=!0,me(K),O(K.pairings),U.current=K,W&&z()})}function H(W){return T(this,null,function*(){var j,K,de;if(!V||!ne){f("Invalid WalletConnect setup");return}if(!W||!W.topic){f("Expired connection");return}try{let{approval:Be}=yield(j=U.current)==null?void 0:j.connect({topic:W.topic,methods:Je});if(p&&!u&&(u=yield d.getNativeAuthLoginToken(),!u)){console.warn("Fetching block failed. Login cancelled.");return}u&&d.setLoginToken(u);try{yield(K=U.current)==null?void 0:K.login({approval:Be,token:u})}catch(an){f("User rejected existing connection proposal"),k(!0),yield B()}}catch(Be){console.error("Unable to connect to existing session",Be),f("Unable to connect to existing session")}finally{O((de=U.current)==null?void 0:de.pairings)}})}function we(W){return T(this,null,function*(){var j,K;try{W&&(yield(j=U.current)==null?void 0:j.logout({topic:W}))}catch(de){console.error("Unable to remove existing pairing",de),f("Unable to remove existing pairing")}finally{O((K=U.current)==null?void 0:K.pairings)}})}function z(){return T(this,null,function*(){var W,j;if(!V||!ne){f("Invalid WalletConnect setup");return}try{let{uri:K,approval:de}=yield(W=U.current)==null?void 0:W.connect({methods:Je});if(!Boolean(K))return;if(I(K),p&&!u&&(u=yield d.getNativeAuthLoginToken(),!u)){console.warn("Fetching block failed. Login cancelled.");return}u&&d.setLoginToken(u);try{yield(j=U.current)==null?void 0:j.login({approval:de,token:u})}catch(an){f("User rejected connection proposal"),k(!0),yield B()}}catch(K){console.error("Unable to connect",K)}})}let ee=Boolean(g),gt=ge();return[B,{error:g,loginFailed:ee,isLoading:P&&!ee,isLoggedIn:gt&&!ee},{uriDeepLink:Ht,walletConnectUri:h,cancelLogin:F,connectExisting:H,removeExistingPairing:we,wcPairings:b}]};Y();C();R();n();n();var Wa=e=>{let t=new URLSearchParams(e).toString(),{pathname:r}=window.location,o=t?`?${t}`:"",i=r?`${r}${o}`:"./";setTimeout(()=>{window.history.replaceState({},document==null?void 0:document.title,i)})};var $a=e=>{var o;let t={};if((o=window==null?void 0:window.location)!=null&&o.search){let i=new URLSearchParams(window.location.search);t=Object.fromEntries(i)}let r={};return e.forEach(i=>{r[i]=t[i],delete t[i]}),{remainingParams:r,clearNavigationHistory:()=>Wa(t)}};function Ha(){let e=x(pe),t=x(Ns),r=x(Ds),o=x(Nt),i=x(Pe),l=x(Yn),p=x(Rs),d=x(Ce),u=x(Rt),[g,f]=(0,Fe.useState)(),h=x(Wr),I=h==null?void 0:h.nativeAuthConfig,P=Oe(I||!1),k=(0,Fe.useRef)(!1),b=M(),{callbackRoute:O,logoutRoute:N}=t||{callbackRoute:"",logoutRoute:""},[V]=yo({callbackRoute:O,logoutRoute:N}),[ne]=ho({callbackRoute:O,logoutRoute:N});(0,Fe.useEffect)(()=>{Q()},[e]),(0,Fe.useEffect)(()=>{zt()},[r]),(0,Fe.useEffect)(()=>{Ue()},[i,e]),(0,Fe.useEffect)(()=>{Ye()},[l,d,g]);function Q(){return T(this,null,function*(){try{let L=yield ha();L&&b($i(L.erd_chain_id))}catch(L){console.error("failed refreshing chainId ",L)}})}function Ye(){l==null&&p!=null&&g&&b(Pn({index:p.index,address:i,hasContractDataEnabled:g.dataEnabled,version:g.version}))}function Ue(){return T(this,null,function*(){if(b(At(!0)),k.current){k.current=!1,b(At(!1));return}if(i)try{let L=yield je(i);L&&b(st(E(y({},L),{address:i,nonce:L.nonce.valueOf()})))}catch(L){b(Si("Failed getting account")),console.error("Failed getting account ",L)}b(At(!1))})}function U(){return T(this,null,function*(){let L=ao(e.walletAddress);if(me(L),o!=null){try{let F=yield ze(),{clearNavigationHistory:Xe,remainingParams:{signature:B}}=$a(["signature","loginToken","address"]);if(!F)return me(nr),b(Ar(null)),Xe();B&&P.setTokenLoginInfo({signature:B,address:F});let H=yield je(F);H&&(k.current=!0,b(At(!0)),b(oe({address:F,loginMethod:"wallet"})),b(st(E(y({},H),{nonce:Ft(H)}))),b(At(!1))),Xe()}catch(F){console.error("Failed authenticating wallet user ",F)}b(Ar(null))}})}function Ze(){return T(this,null,function*(){let L=new Va.HWProvider,F=L.isInitialized();if(F||(F=yield L.init()),!F&&d){console.warn("Could not initialise ledger app"),X(u);return}return(p==null?void 0:p.index)!=null&&(L.addressIndex=p.index),L})}function Je(){return T(this,null,function*(){try{let L=yield Ze();if(!L)return;let F=yield co(L);me(L),f(F)}catch(L){console.error("Could not initialise ledger app",L),X(u)}})}function Ht(){return T(this,null,function*(){try{let L=yield ze(),F=Ga.ExtensionProvider.getInstance().setAddress(L);(yield F.init())?me(F):console.error("Could not initialise extension, make sure MultiversX wallet extension is installed.")}catch(L){console.error("Unable to login to ExtensionProvider",L)}})}function zt(){if(r!=null)switch(r){case"ledger":{Je();break}case"walletconnect":{V(!1);break}case"walletconnectv2":{ne(!1);break}case"extension":{Ht();break}case"extra":{Ia();break}case"wallet":case"":{U();break}default:return}}return null}n();var Gt=A(require("react"));n();n();n();n();var Tc=require("react");n();n();var xo=()=>x(xe);n();C();n();n();n();var Su=require("react"),wu=require("@multiversx/sdk-web-wallet-provider"),vu=A(require("qs"));D();C();R();n();var qa=require("react"),Pu=require("@multiversx/sdk-extension-provider");D();C();R();n();n();n();n();var ja=require("react"),bu=require("@multiversx/sdk-extension-provider");D();C();n();n();var Cu=A(require("axios")),Du=A(require("swr"));n();n();var Ya=require("react");n();var Ka=require("react");Mn();C();J();at();n();ht();C();n();n();n();n();n();function Za(){let e=x(no),t=Object.entries(e),r=(t==null?void 0:t.length)>0;return{pendingTransactions:e,pendingTransactionsArray:t,hasPendingTransactions:r}}Et();n();C();R();n();Et();function Ja(e,t){return e.reduce((o,{status:i,hash:l})=>(l!=null&&!t.includes(l)&&Ee(i)&&o.push({hash:l,previousStatus:i}),o),[])}n();C();R();function Xa({results:e,hash:t,sessionId:r}){let o=e==null?void 0:e.find(i=>(i==null?void 0:i.returnMessage)!=="");w.dispatch(Xt({transactionHash:t,sessionId:r,status:"fail",errorMessage:o==null?void 0:o.returnMessage})),w.dispatch(pt({sessionId:r,status:"fail",errorMessage:o==null?void 0:o.returnMessage}))}n();C();J();function So(e){w.dispatch(pt({sessionId:e,status:"timedOut"}))}var rn={},wo=[];function Ru({serverTransaction:e,sessionId:t,customTransactionInformation:r,shouldRefreshBalance:o}){let{hash:i,status:l,results:p,invalidTransaction:d,hasStatusChanged:u}=e;try{if(wo.includes(i))return;if(rn[i]>30){So(t);return}if(d||Ee(l)){rn[i]=rn[i]?rn[i]+1:1;return}u&&(ct(l)&&(r==null?void 0:r.completedTransactionsDelay)!=null?(wo.push(i),setTimeout(()=>w.dispatch(Xt({sessionId:t,status:"success",transactionHash:i})),r==null?void 0:r.completedTransactionsDelay)):w.dispatch(Xt({sessionId:t,status:l,transactionHash:i}))),o||Xr(),lt(l)&&Xa({sessionId:t,hash:i,results:p})}catch(g){console.error(g),So(t)}}function Qa(l){return T(this,arguments,function*({sessionId:e,transactionBatch:{transactions:t,customTransactionInformation:r},getTransactionsByHash:o=Yr,shouldRefreshBalance:i}){try{if(t==null)return;let p=Ja(t,wo),d=yield o(p);for(let u of d)Ru({serverTransaction:u,sessionId:e,customTransactionInformation:r,shouldRefreshBalance:i})}catch(p){console.error(p)}})}function ec(){let{pendingTransactionsArray:e}=Za();function t(r){return T(this,null,function*(){let o=e.filter(([i,l])=>i!=null&&Ee(l.status));if(o.length>0)for(let[i,l]of o)yield Qa(y({sessionId:i,transactionBatch:l},r));r.shouldRefreshBalance&&Xr()})}return t}n();var Bu=require("react");n();n();n();C();n();n();var Fu=A(require("bignumber.js"));D();C();J();n();var Ou=A(require("bignumber.js"));D();n();var _u=require("@multiversx/sdk-core"),Uu=A(require("bignumber.js"));D();R();Et();n();n();n();n();var tc=require("react");n();n();var Wu=require("react"),$u=require("@multiversx/sdk-extension-provider");ht();Y();R();bt();n();var Hu=require("react");ht();C();n();n();vn();n();n();var Gu=A(require("platform"));n();n();n();n();n();at();n();n();n();function nc(e){return new Promise(t=>{setTimeout(()=>t(),e)})}n();var oc=(e,t,r,o=0)=>T(void 0,null,function*(){try{return yield e(...r)}catch(i){return o<t.retries?((t==null?void 0:t.delay)!=null&&(yield nc(t.delay)),oc(e,t,r,o+1)):null}}),ic=(e,t={retries:5,delay:500})=>(...r)=>T(void 0,null,function*(){return oc(e,t,r)});vt();n();n();n();C();var Vu={};var sc=e=>{if(e.component!=null){let t=e,{component:r}=t,o=Qe(t,["component"]),{payload:i}=w.dispatch(Un(E(y({},o),{component:null})));return Vu[i.toastId]=r,i}return w.dispatch(Un(e)).payload};n();n();var ac=A(require("axios"));function vo(e){return T(this,null,function*(){try{let{data:t}=yield ac.default.get(`${e}/websocket/config`);return`wss://${t.url}`}catch(t){throw console.error(t),new Error("Can not get websocket url")}})}n();var cc=require("react"),zu=require("@multiversx/sdk-hw-provider");ht();Y();C();R();bt();n();n();var lc=require("react");n();var dc=require("react");n();var mt=require("react"),pc=require("socket.io-client");C();n();var _e={current:null,status:"not_initialized"};var ju=3e3,qu=3,Ku=500,Yu=1e3;function uc(){let e=(0,mt.useRef)(null),{address:t}=dt(),r=M(),{network:o}=xo(),i=p=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r(wi(p))},Yu)},l=(0,mt.useCallback)(ic(()=>T(this,null,function*(){_e.status="pending";let p=yield vo(o.apiAddress);if(p==null){console.warn("Can not get websocket url");return}_e.current=(0,pc.io)(p,{forceNew:!0,reconnectionAttempts:qu,timeout:ju,query:{address:t}}),_e.status="completed",_e.current.onAny(d=>{i(d)})}),{retries:2,delay:Ku}),[t]);(0,mt.useEffect)(()=>{t&&_e.status==="not_initialized"&&!_e.current&&l()},[t,_e.current]),(0,mt.useEffect)(()=>()=>{var p;(p=_e.current)==null||p.close(),e.current&&clearTimeout(e.current)},[])}function mc(e){uc();let t=x(Zn);(0,dc.useEffect)(()=>{let r=t==null?void 0:t.message;r&&e(r)},[e,t])}n();n();n();var gc=e=>e.dappModal,Zu=S(gc,e=>e.visible),nn=S(gc,e=>e.modal),$N=S(nn,e=>e.showHeader),GN=S(nn,e=>e.showFooter),VN=S(nn,e=>e.headerText),HN=S(nn,e=>e.footerText);it();var{logoutEvent:Ju}=ce,fc="storage",yc=()=>{let{address:e}=De(),t=x(Rt);(0,Tc.useEffect)(()=>{let r=o=>{if(!(o.key!==Ju||!o.newValue))try{let{data:i}=JSON.parse(o.newValue);i===e&&X(t)}catch(i){return}};return window.addEventListener(fc,r),()=>{window.removeEventListener(fc,r)}},[e,t])};n();n();var on=require("react"),Ao=A(require("bignumber.js"));var xc=require("@fortawesome/free-solid-svg-icons");n();n();var cr=A(require("bignumber.js")),hc=e=>{let t=new cr.default(e).dividedBy(1e3).integerValue(cr.default.ROUND_FLOOR),r=new cr.default(t).dividedBy(60).integerValue(cr.default.ROUND_FLOOR),o=r.modulo(60).isGreaterThan(1),i=r.modulo(60).isLessThan(1);return o?`${r} minutes`:i?"less than 1 minute":`${r} minute`};var Sc=()=>{let{address:e}=De(),{tokenLogin:t}=x(q),{secondsUntilExpires:r,expiresAt:o}=Bt(t==null?void 0:t.nativeAuthToken),i=(0,on.useRef)();return(0,on.useEffect)(()=>{var d;let l=new Ao.default(String(r)),p=l.times(1e3);if(!(!r||l.isLessThanOrEqualTo(0))){if((d=t==null?void 0:t.nativeAuthConfig)!=null&&d.tokenExpirationToastWarningSeconds){clearTimeout(i.current);let g=new Ao.default(t.nativeAuthConfig.tokenExpirationToastWarningSeconds).times(1e3),f=l.times(1e3).minus(g),h=hc(p),I=f.isLessThanOrEqualTo(0)?0:f.toNumber();i.current=setTimeout(()=>{sc({toastId:"nativeAuthTokenExpiration",type:"custom",title:"Session Expiration Warning",icon:xc.faRefresh,message:`Your token will expire in ${h}!`})},I)}return()=>{clearTimeout(i.current)}}},[o,e,t==null?void 0:t.nativeAuthConfig]),null};n();var $t=require("react"),wc=A(require("bignumber.js"));var vc=()=>{let{address:e}=De(),{tokenLogin:t}=x(q),r=x(Rt),{isExpired:o,secondsUntilExpires:i,expiresAt:l}=Bt(t==null?void 0:t.nativeAuthToken),p=(0,$t.useRef)(""),d=(0,$t.useRef)();return(0,$t.useEffect)(()=>{e&&o&&X(r)},[o,e,r]),(0,$t.useEffect)(()=>{let u=new wc.default(String(i)),g=`${e}_${l}`,f=p.current===g;if(!(i&&u.isGreaterThan(0))||f)return;p.current=g,clearTimeout(d.current);let I=u.times(1e3);return d.current=setTimeout(()=>{X(r)},I.toNumber()),()=>{clearTimeout(d.current)}},[l,e,r]),null};var Ac=()=>(Sc(),yc(),vc(),null);n();n();var sn=require("react"),bc=require("@multiversx/sdk-core"),kc=require("@multiversx/sdk-core/out/signature");C();R();at();var Ic=e=>{let t=e.redirectRoute;t&&ke(t)},Ec=({sendSignedTransactionsAsync:e=ua})=>{let t=x(Ge),r=x(He),o=(0,sn.useRef)(!1),i=M(),l=()=>{i(Lt()),o.current=!1};function p(){return T(this,null,function*(){var u;let d=Object.keys(r);for(let g of d){let f=r==null?void 0:r[g],h=(u=f==null?void 0:f.customTransactionInformation)==null?void 0:u.signWithoutSending;if(!g||h){Ic(f);continue}try{if(!(r[g].status==="signed"&&!o.current))continue;let{transactions:k}=r[g];if(!k)continue;o.current=!0;let b=k.map(Q=>{let Ye=new bc.Address(Q.sender),Ue=Ot(Q),U=new kc.Signature(Q.signature);return Ue.applySignature(U,Ye),Ue}),O=yield e(b),N="pending",V=k.map(Q=>O.includes(Q.hash)?E(y({},Q),{status:N}):Q);i(Ni({sessionId:g,submittedMessage:"submitted"})),i(pt({sessionId:g,status:"sent",transactions:V})),l(),ka(t.nonce+k.length),Ic(f),history.pushState({},document==null?void 0:document.title,"?")}catch(I){console.error("Unable to send transactions",I),i(pt({sessionId:g,status:"fail",errorMessage:I.message})),l()}finally{o.current=!1}}})}return(0,sn.useEffect)(()=>{p()},[r,t]),null};n();n();n();var Lc=require("react");function Pc(e){var i;let t=ec(),r=(i=e==null?void 0:e.getTransactionsByHash)!=null?i:Yr,o=()=>{t({shouldRefreshBalance:!0,getTransactionsByHash:r})};mc(o),(0,Lc.useEffect)(()=>{let l=setInterval(o,3e4);return()=>{clearInterval(l)}},[o])}function Cc({getTransactionsByHash:e}){return Pc({getTransactionsByHash:e}),null}function Dc({customComponents:e}){var l,p;let t=e==null?void 0:e.transactionSender,r=e==null?void 0:e.transactionTracker,o=(l=t==null?void 0:t.component)!=null?l:Ec,i=(p=r==null?void 0:r.component)!=null?p:Cc;return Gt.default.createElement(Gt.default.Fragment,null,Gt.default.createElement(o,y({},t==null?void 0:t.props)),Gt.default.createElement(i,y({},r==null?void 0:r.props)),Gt.default.createElement(Ac,null))}var Xu=({children:e,customNetworkConfig:t={},externalProvider:r,environment:o,customComponents:i,dappConfig:l})=>{if(!o)throw new Error("missing environment flag");return r!=null&&Aa(r),Vt.default.createElement(Nc.Provider,{context:Qt,store:w},Vt.default.createElement(Rc.PersistGate,{persistor:ks,loading:null},Vt.default.createElement(mo,{environment:o,customNetworkConfig:t,logoutRoute:l==null?void 0:l.logoutRoute},Vt.default.createElement(Ha,null),Vt.default.createElement(Dc,{customComponents:i}),e)))};0&&(module.exports={AppInitializer,AuthenticatedRoutesWrapper,AxiosInterceptor,AxiosInterceptorContext,AxiosInterceptorContextProvider,DappProvider,LoginInfoListener,useAxiosInterceptorContext});
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
package/__mocks__/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import"../__chunks__/chunk-OQMQWZG7.js";import{a as m}from"../__chunks__/chunk-WTAIM7XI.js";import{a as x,b as a,c as b}from"../__chunks__/chunk-F2LZPJWY.js";import"../__chunks__/chunk-G6V3RROQ.js";import{a as t}from"../__chunks__/chunk-ZD4T5RDE.js";import{a as p}from"../__chunks__/chunk-6XBUOELQ.js";import"../__chunks__/chunk-6BKASPUT.js";import"../__chunks__/chunk-SHUPRDY6.js";import"../__chunks__/chunk-6NRXAYB3.js";import"../__chunks__/chunk-GKOGOKEY.js";import"../__chunks__/chunk-2Y6LPWGF.js";import"../__chunks__/chunk-MXUG42SB.js";import"../__chunks__/chunk-UCBDWIIG.js";import"../__chunks__/chunk-3WWRIEF2.js";import"../__chunks__/chunk-ZPDZ3RNC.js";import"../__chunks__/chunk-GVU7CFIB.js";import"../__chunks__/chunk-UBTVRU3E.js";import"../__chunks__/chunk-SQJYWVIF.js";import"../__chunks__/chunk-SJJB4IAR.js";import"../__chunks__/chunk-QD6GEHG4.js";import"../__chunks__/chunk-L5ZELHXF.js";import"../__chunks__/chunk-HFBCN33X.js";import"../__chunks__/chunk-O7YR4YPR.js";import"../__chunks__/chunk-D5HQSQ5Y.js";import"../__chunks__/chunk-MDIJXESM.js";import"../__chunks__/chunk-7NCGSE7V.js";import"../__chunks__/chunk-WGA56F56.js";import"../__chunks__/chunk-HZSM6ODA.js";import"../__chunks__/chunk-OLYIRMPJ.js";import"../__chunks__/chunk-RRF2ZJRY.js";import"../__chunks__/chunk-FCUXC6CI.js";import"../__chunks__/chunk-3SGZP5CP.js";import"../__chunks__/chunk-VPGECZPA.js";import"../__chunks__/chunk-FVPFOC6I.js";import"../__chunks__/chunk-H5SGYLT2.js";import"../__chunks__/chunk-UGJQJLC2.js";import"../__chunks__/chunk-26QI5SIJ.js";import"../__chunks__/chunk-RA3LR6FK.js";import"../__chunks__/chunk-PWNNHBIM.js";import"../__chunks__/chunk-2YB4NPFQ.js";import"../__chunks__/chunk-QCGS2BTF.js";import"../__chunks__/chunk-MVJUBH74.js";import"../__chunks__/chunk-HSLY632F.js";import"../__chunks__/chunk-F7ESS2A6.js";import"../__chunks__/chunk-XTSTYNP6.js";import"../__chunks__/chunk-54MVJDAH.js";import"../__chunks__/chunk-4VJCQIET.js";import"../__chunks__/chunk-EFI4BH63.js";import"../__chunks__/chunk-IHXP3ILK.js";import"../__chunks__/chunk-7WMZEP7Q.js";import"../__chunks__/chunk-FIN7KCFT.js";import"../__chunks__/chunk-UOBE4FLX.js";import"../__chunks__/chunk-W63MMDH6.js";import"../__chunks__/chunk-VJYSHORZ.js";import"../__chunks__/chunk-S2ZXQSDD.js";import"../__chunks__/chunk-2OYAMC2Z.js";import"../__chunks__/chunk-J56ZMEK7.js";import"../__chunks__/chunk-2NH2FQEH.js";import"../__chunks__/chunk-R54KN7DA.js";import"../__chunks__/chunk-LJUKWZBH.js";import"../__chunks__/chunk-F2JINB56.js";import"../__chunks__/chunk-KQAVVFT7.js";import"../__chunks__/chunk-HOMCNURE.js";import"../__chunks__/chunk-NIXVRMA2.js";import"../__chunks__/chunk-PNY4HLJR.js";import"../__chunks__/chunk-7CKJVDPG.js";import"../__chunks__/chunk-TEDBWAYV.js";import"../__chunks__/chunk-NUIOY7UN.js";import"../__chunks__/chunk-BGFGNAC4.js";import"../__chunks__/chunk-AFUFEEUN.js";import"../__chunks__/chunk-DZ7DF3PB.js";import"../__chunks__/chunk-PC65DQCO.js";import"../__chunks__/chunk-QWGX5US3.js";import"../__chunks__/chunk-YTYNUTPN.js";import"../__chunks__/chunk-THI5XMU4.js";import"../__chunks__/chunk-WME7JUV7.js";import"../__chunks__/chunk-FZMRVALH.js";import"../__chunks__/chunk-5HNME5OQ.js";import"../__chunks__/chunk-GNJAE3HJ.js";import"../__chunks__/chunk-OX5CQN4Z.js";import"../__chunks__/chunk-FR4JYMVH.js";import"../__chunks__/chunk-FJTOBBI5.js";import"../__chunks__/chunk-XZ2PVEHF.js";import"../__chunks__/chunk-C5LKGARX.js";import"../__chunks__/chunk-Z5PKPJRS.js";import"../__chunks__/chunk-47JMQSE2.js";import"../__chunks__/chunk-NHIPCB5H.js";import"../__chunks__/chunk-JBVENEHE.js";import"../__chunks__/chunk-4VLJCJJM.js";import"../__chunks__/chunk-HH5S5FOE.js";import"../__chunks__/chunk-ZFNBOBDY.js";import"../__chunks__/chunk-22UA5SNR.js";import"../__chunks__/chunk-4DBTMUPJ.js";import"../__chunks__/chunk-KHO4IVX5.js";import"../__chunks__/chunk-PWSKY37E.js";import"../__chunks__/chunk-4L5GQQ5V.js";import"../__chunks__/chunk-GFHZOO2D.js";import"../__chunks__/chunk-DJ257IT6.js";import"../__chunks__/chunk-GAZKVMFE.js";import"../__chunks__/chunk-WJGL6LVA.js";import"../__chunks__/chunk-LK5TR7MI.js";import"../__chunks__/chunk-OCMDIV3Q.js";import"../__chunks__/chunk-KOH3SXG4.js";import"../__chunks__/chunk-UJBZWEAJ.js";import"../__chunks__/chunk-RLFQERPJ.js";import"../__chunks__/chunk-DGPHTEKD.js";import"../__chunks__/chunk-TXAITGIS.js";import"../__chunks__/chunk-JFXVZGSY.js";import"../__chunks__/chunk-3C5NB3VI.js";import"../__chunks__/chunk-3UTO3IYR.js";import"../__chunks__/chunk-4VDFQTIQ.js";import"../__chunks__/chunk-MRGB5FAN.js";import"../__chunks__/chunk-XOZ662VA.js";import"../__chunks__/chunk-NJVX7KSK.js";import"../__chunks__/chunk-LO5NNAIV.js";import"../__chunks__/chunk-YAR2KJ42.js";import"../__chunks__/chunk-37FKTAKZ.js";import"../__chunks__/chunk-FP3YMQL6.js";import"../__chunks__/chunk-VMM6JAZG.js";import"../__chunks__/chunk-EZP3TLKU.js";import"../__chunks__/chunk-2M4AKJPN.js";import"../__chunks__/chunk-3NPI7JA7.js";import"../__chunks__/chunk-AHYWEF7B.js";import"../__chunks__/chunk-SZGCAC7X.js";import"../__chunks__/chunk-MV5K23LN.js";import"../__chunks__/chunk-DD2JCDY2.js";import"../__chunks__/chunk-EHS4K6KJ.js";import"../__chunks__/chunk-QIRM4QUA.js";import"../__chunks__/chunk-5C6CC3E4.js";import"../__chunks__/chunk-5R3FZCYE.js";import"../__chunks__/chunk-KEQTNP4F.js";import"../__chunks__/chunk-SNAHUZB3.js";import"../__chunks__/chunk-2N2RUSRA.js";import"../__chunks__/chunk-BGCOFQOB.js";import"../__chunks__/chunk-KO6WAT63.js";import"../__chunks__/chunk-SCNZXL7L.js";import"../__chunks__/chunk-3U7QBETU.js";import"../__chunks__/chunk-QDL73CLR.js";import"../__chunks__/chunk-BZAS5UWX.js";import"../__chunks__/chunk-CSNNQII4.js";import"../__chunks__/chunk-2BUDQEWE.js";import"../__chunks__/chunk-GCWTST6A.js";import"../__chunks__/chunk-FKHUTJ2C.js";import"../__chunks__/chunk-Q4ODFQVM.js";import"../__chunks__/chunk-SKMXMVKW.js";import"../__chunks__/chunk-2IBLGO2A.js";import"../__chunks__/chunk-OBF5YWS6.js";import"../__chunks__/chunk-IHEQMC3B.js";import"../__chunks__/chunk-ONNEZDFU.js";import"../__chunks__/chunk-LPQY7BQ4.js";import"../__chunks__/chunk-5PN5T5IV.js";import"../__chunks__/chunk-44VPSU5H.js";import"../__chunks__/chunk-6H74GIU6.js";import"../__chunks__/chunk-TMDHTPOA.js";import"../__chunks__/chunk-XOSPBGLI.js";import"../__chunks__/chunk-ZFCLX5JU.js";import"../__chunks__/chunk-OXSLKC3X.js";import"../__chunks__/chunk-NP7WBEQK.js";import"../__chunks__/chunk-OIG4YF2R.js";import"../__chunks__/chunk-RGJ34TDB.js";import"../__chunks__/chunk-TPDR3Y6L.js";import"../__chunks__/chunk-X5TGO2UY.js";import"../__chunks__/chunk-C62XCHTF.js";import"../__chunks__/chunk-I5BVF6UR.js";import"../__chunks__/chunk-NGVYQHDX.js";import"../__chunks__/chunk-BP7X5FRP.js";import"../__chunks__/chunk-FMIRA7YL.js";import"../__chunks__/chunk-J5HFBYM7.js";import"../__chunks__/chunk-7PPUDZ2T.js";import"../__chunks__/chunk-A32WHRLH.js";import"../__chunks__/chunk-4XBUGAEB.js";import"../__chunks__/chunk-WVJETRW5.js";import"../__chunks__/chunk-NRXK4FQF.js";import"../__chunks__/chunk-RM4DR5YH.js";import"../__chunks__/chunk-LUOKYKOZ.js";import"../__chunks__/chunk-YNEWKYKQ.js";import"../__chunks__/chunk-NCHDT5N7.js";import"../__chunks__/chunk-RQ3IOPRD.js";import"../__chunks__/chunk-QGFR3GHY.js";import"../__chunks__/chunk-6FNBC33X.js";import"../__chunks__/chunk-FMECPQRZ.js";import"../__chunks__/chunk-W2FL4F7Y.js";import"../__chunks__/chunk-5MHH6T2T.js";import"../__chunks__/chunk-JRRGPQYM.js";import"../__chunks__/chunk-PV2VJ5SF.js";import"../__chunks__/chunk-ZFCXKCF6.js";import"../__chunks__/chunk-7F3MKQYJ.js";import"../__chunks__/chunk-BDHSNCDL.js";import"../__chunks__/chunk-VP7XSTRT.js";import"../__chunks__/chunk-FQET2LHU.js";import"../__chunks__/chunk-S267QGNY.js";import"../__chunks__/chunk-WOC5FZU4.js";import"../__chunks__/chunk-7LG3PXXW.js";import"../__chunks__/chunk-J75YWYPN.js";import"../__chunks__/chunk-UOJHMSFY.js";import"../__chunks__/chunk-EEJ5EEAY.js";import"../__chunks__/chunk-UB3HZ7Y3.js";import"../__chunks__/chunk-DLXVJ5WN.js";import"../__chunks__/chunk-2NV5YJWT.js";import"../__chunks__/chunk-AQHHAZ3S.js";import"../__chunks__/chunk-2PGGQXUN.js";import"../__chunks__/chunk-Q663T6WV.js";import"../__chunks__/chunk-DEY75ILF.js";import"../__chunks__/chunk-T6N6SLAD.js";import"../__chunks__/chunk-5NJW53EW.js";import"../__chunks__/chunk-DGVX77VC.js";import"../__chunks__/chunk-VXSWMT64.js";import"../__chunks__/chunk-VULSG7BJ.js";import"../__chunks__/chunk-D5NVSL2S.js";import"../__chunks__/chunk-LNE2U5E7.js";import"../__chunks__/chunk-FOHOVMG2.js";import"../__chunks__/chunk-ALWA4LTP.js";import"../__chunks__/chunk-PEANG3NC.js";import"../__chunks__/chunk-HWKJ6RY7.js";import"../__chunks__/chunk-5SJ24Q3V.js";import"../__chunks__/chunk-4I33RXZI.js";import"../__chunks__/chunk-EXJ5ZTBR.js";import"../__chunks__/chunk-EIG7LFFL.js";import"../__chunks__/chunk-4ZHZJTYB.js";import"../__chunks__/chunk-IIU6OKSW.js";import"../__chunks__/chunk-ID2JOC6Q.js";import"../__chunks__/chunk-GARX3UC3.js";import"../__chunks__/chunk-ZH6KW5HC.js";import"../__chunks__/chunk-XDEUCIC3.js";import"../__chunks__/chunk-NAIMWCQ7.js";import"../__chunks__/chunk-6YEBPDTC.js";import"../__chunks__/chunk-6OZDAYJV.js";import"../__chunks__/chunk-BDFHA3DI.js";import"../__chunks__/chunk-SQW2F44A.js";import"../__chunks__/chunk-KRCUIXB4.js";import"../__chunks__/chunk-A3JT4J5G.js";import"../__chunks__/chunk-XBLU7KZJ.js";import"../__chunks__/chunk-AGE76CJS.js";import"../__chunks__/chunk-JBJD3IUJ.js";import"../__chunks__/chunk-QFTWB3KE.js";import"../__chunks__/chunk-5JVA7MJI.js";import"../__chunks__/chunk-V4YZWAJU.js";import"../__chunks__/chunk-JRWYH6C3.js";import"../__chunks__/chunk-3JGCHKN2.js";import"../__chunks__/chunk-V4NH4KGH.js";import"../__chunks__/chunk-I3PTBNIV.js";import"../__chunks__/chunk-I4E7WYSQ.js";import"../__chunks__/chunk-QMQUN5M3.js";import"../__chunks__/chunk-LNYINVMN.js";import"../__chunks__/chunk-EZAD4OKT.js";import"../__chunks__/chunk-35N6HQAC.js";import"../__chunks__/chunk-DVCP2A6O.js";import"../__chunks__/chunk-7I7NVYZT.js";import"../__chunks__/chunk-3SYQDA3A.js";import"../__chunks__/chunk-QJIB5BMU.js";import"../__chunks__/chunk-GYB57BD3.js";import"../__chunks__/chunk-AP2OU4L5.js";import"../__chunks__/chunk-ZFXP4YRF.js";import"../__chunks__/chunk-TA6HP4LD.js";import"../__chunks__/chunk-CKDAMVQL.js";import"../__chunks__/chunk-YFGMHVY3.js";import"../__chunks__/chunk-25IPTBK3.js";import"../__chunks__/chunk-PPQR6O44.js";import"../__chunks__/chunk-NM43ACPN.js";import"../__chunks__/chunk-DJHPFGX6.js";import"../__chunks__/chunk-HNBKDGB4.js";import"../__chunks__/chunk-6WZ7DVP7.js";import"../__chunks__/chunk-GGMEVY45.js";import"../__chunks__/chunk-6FEMGV3G.js";import"../__chunks__/chunk-JKIKLHKN.js";import"../__chunks__/chunk-KKMXLCWS.js";import"../__chunks__/chunk-D7SFMPZV.js";import"../__chunks__/chunk-OXIGVI7S.js";import"../__chunks__/chunk-VB4M63XQ.js";import"../__chunks__/chunk-LGKB7JTU.js";import"../__chunks__/chunk-DZ5IJ4N3.js";import"../__chunks__/chunk-6ZGFYJ6T.js";import"../__chunks__/chunk-HI5RCCIL.js";import"../__chunks__/chunk-ZT4O7WWY.js";import"../__chunks__/chunk-BQSKQ7XQ.js";import"../__chunks__/chunk-C7ZNGCKJ.js";import"../__chunks__/chunk-ZUR56TCY.js";import"../__chunks__/chunk-YZGKKPP5.js";import"../__chunks__/chunk-FYSR5U3I.js";import"../__chunks__/chunk-DUSZZPF5.js";import"../__chunks__/chunk-OXBZSHOZ.js";import"../__chunks__/chunk-PXHBOM4A.js";import"../__chunks__/chunk-ZU6LXEUO.js";import"../__chunks__/chunk-5KGDRZSV.js";import"../__chunks__/chunk-VTMJ7INI.js";import"../__chunks__/chunk-WTIKHG7D.js";import"../__chunks__/chunk-N5STTJJR.js";import"../__chunks__/chunk-LJPH3Z4L.js";import"../__chunks__/chunk-YLLIHJY3.js";import"../__chunks__/chunk-DKXAWU2I.js";import"../__chunks__/chunk-ITDGZCSS.js";import"../__chunks__/chunk-27DX5WIQ.js";import"../__chunks__/chunk-X2JZA2ND.js";import"../__chunks__/chunk-MV7THB7B.js";import"../__chunks__/chunk-QR72MI4M.js";import"../__chunks__/chunk-FC3CZOOQ.js";import{a as r,b as e,c as f}from"../__chunks__/chunk-GDPQQIJM.js";import"../__chunks__/chunk-Y4LHGIZO.js";import"../__chunks__/chunk-X53TXOIC.js";import"../__chunks__/chunk-YDQULLMK.js";import"../__chunks__/chunk-OGKM4YOJ.js";import"../__chunks__/chunk-YUGUMBTX.js";import"../__chunks__/chunk-UMTCMSCG.js";import"../__chunks__/chunk-CLAJ4EPW.js";import"../__chunks__/chunk-H2JYGVBI.js";import"../__chunks__/chunk-FGT3C4FE.js";import"../__chunks__/chunk-DCI4LUDC.js";import"../__chunks__/chunk-HOX227TC.js";import"../__chunks__/chunk-GNCSMYRN.js";import"../__chunks__/chunk-Y4RXLAEX.js";import"../__chunks__/chunk-UIDXWJ2D.js";import"../__chunks__/chunk-FTQGHIGG.js";import"../__chunks__/chunk-NHHDQ53S.js";import"../__chunks__/chunk-XXP2T2NS.js";import"../__chunks__/chunk-AHX4GHIC.js";import{m as o}from"../__chunks__/chunk-HBP5N4FR.js";o();export{m as createSubscription,a as mockResponse,t as mockWindowLocation,p as renderWithProvider,x as rest,b as server,r as testAddress,e as testNetwork,f as testReceiver};
|
|
1
|
+
"use strict";import"../__chunks__/chunk-OQMQWZG7.js";import{a as m}from"../__chunks__/chunk-WTAIM7XI.js";import{a as x,b as a,c as b}from"../__chunks__/chunk-F2LZPJWY.js";import"../__chunks__/chunk-G6V3RROQ.js";import{a as t}from"../__chunks__/chunk-ZD4T5RDE.js";import{a as p}from"../__chunks__/chunk-U2L6FONJ.js";import"../__chunks__/chunk-7NFQGQ5Q.js";import"../__chunks__/chunk-SHUPRDY6.js";import"../__chunks__/chunk-6NRXAYB3.js";import"../__chunks__/chunk-GKOGOKEY.js";import"../__chunks__/chunk-2Y6LPWGF.js";import"../__chunks__/chunk-MXUG42SB.js";import"../__chunks__/chunk-UCBDWIIG.js";import"../__chunks__/chunk-3WWRIEF2.js";import"../__chunks__/chunk-Q3JOZ2CP.js";import"../__chunks__/chunk-GVU7CFIB.js";import"../__chunks__/chunk-UBTVRU3E.js";import"../__chunks__/chunk-SQJYWVIF.js";import"../__chunks__/chunk-SJJB4IAR.js";import"../__chunks__/chunk-QD6GEHG4.js";import"../__chunks__/chunk-L5ZELHXF.js";import"../__chunks__/chunk-HFBCN33X.js";import"../__chunks__/chunk-O7YR4YPR.js";import"../__chunks__/chunk-D5HQSQ5Y.js";import"../__chunks__/chunk-MDIJXESM.js";import"../__chunks__/chunk-7NCGSE7V.js";import"../__chunks__/chunk-WGA56F56.js";import"../__chunks__/chunk-HZSM6ODA.js";import"../__chunks__/chunk-OLYIRMPJ.js";import"../__chunks__/chunk-RRF2ZJRY.js";import"../__chunks__/chunk-FCUXC6CI.js";import"../__chunks__/chunk-3SGZP5CP.js";import"../__chunks__/chunk-VPGECZPA.js";import"../__chunks__/chunk-FVPFOC6I.js";import"../__chunks__/chunk-H5SGYLT2.js";import"../__chunks__/chunk-UGJQJLC2.js";import"../__chunks__/chunk-26QI5SIJ.js";import"../__chunks__/chunk-RA3LR6FK.js";import"../__chunks__/chunk-PWNNHBIM.js";import"../__chunks__/chunk-2YB4NPFQ.js";import"../__chunks__/chunk-QCGS2BTF.js";import"../__chunks__/chunk-MVJUBH74.js";import"../__chunks__/chunk-HSLY632F.js";import"../__chunks__/chunk-F7ESS2A6.js";import"../__chunks__/chunk-XTSTYNP6.js";import"../__chunks__/chunk-54MVJDAH.js";import"../__chunks__/chunk-4VJCQIET.js";import"../__chunks__/chunk-EFI4BH63.js";import"../__chunks__/chunk-IHXP3ILK.js";import"../__chunks__/chunk-7WMZEP7Q.js";import"../__chunks__/chunk-FIN7KCFT.js";import"../__chunks__/chunk-UOBE4FLX.js";import"../__chunks__/chunk-W63MMDH6.js";import"../__chunks__/chunk-VJYSHORZ.js";import"../__chunks__/chunk-S2ZXQSDD.js";import"../__chunks__/chunk-2OYAMC2Z.js";import"../__chunks__/chunk-J56ZMEK7.js";import"../__chunks__/chunk-2NH2FQEH.js";import"../__chunks__/chunk-R54KN7DA.js";import"../__chunks__/chunk-LJUKWZBH.js";import"../__chunks__/chunk-F2JINB56.js";import"../__chunks__/chunk-KQAVVFT7.js";import"../__chunks__/chunk-HOMCNURE.js";import"../__chunks__/chunk-NIXVRMA2.js";import"../__chunks__/chunk-PNY4HLJR.js";import"../__chunks__/chunk-7CKJVDPG.js";import"../__chunks__/chunk-TEDBWAYV.js";import"../__chunks__/chunk-NUIOY7UN.js";import"../__chunks__/chunk-BGFGNAC4.js";import"../__chunks__/chunk-AFUFEEUN.js";import"../__chunks__/chunk-DZ7DF3PB.js";import"../__chunks__/chunk-PC65DQCO.js";import"../__chunks__/chunk-QWGX5US3.js";import"../__chunks__/chunk-YTYNUTPN.js";import"../__chunks__/chunk-THI5XMU4.js";import"../__chunks__/chunk-WME7JUV7.js";import"../__chunks__/chunk-FZMRVALH.js";import"../__chunks__/chunk-5HNME5OQ.js";import"../__chunks__/chunk-GNJAE3HJ.js";import"../__chunks__/chunk-OX5CQN4Z.js";import"../__chunks__/chunk-FR4JYMVH.js";import"../__chunks__/chunk-FJTOBBI5.js";import"../__chunks__/chunk-XZ2PVEHF.js";import"../__chunks__/chunk-C5LKGARX.js";import"../__chunks__/chunk-Z5PKPJRS.js";import"../__chunks__/chunk-47JMQSE2.js";import"../__chunks__/chunk-NHIPCB5H.js";import"../__chunks__/chunk-JBVENEHE.js";import"../__chunks__/chunk-4VLJCJJM.js";import"../__chunks__/chunk-HH5S5FOE.js";import"../__chunks__/chunk-ZFNBOBDY.js";import"../__chunks__/chunk-22UA5SNR.js";import"../__chunks__/chunk-4DBTMUPJ.js";import"../__chunks__/chunk-KHO4IVX5.js";import"../__chunks__/chunk-PWSKY37E.js";import"../__chunks__/chunk-4L5GQQ5V.js";import"../__chunks__/chunk-GFHZOO2D.js";import"../__chunks__/chunk-DJ257IT6.js";import"../__chunks__/chunk-GAZKVMFE.js";import"../__chunks__/chunk-WJGL6LVA.js";import"../__chunks__/chunk-LK5TR7MI.js";import"../__chunks__/chunk-OCMDIV3Q.js";import"../__chunks__/chunk-KOH3SXG4.js";import"../__chunks__/chunk-UJBZWEAJ.js";import"../__chunks__/chunk-RLFQERPJ.js";import"../__chunks__/chunk-DGPHTEKD.js";import"../__chunks__/chunk-TXAITGIS.js";import"../__chunks__/chunk-JFXVZGSY.js";import"../__chunks__/chunk-3C5NB3VI.js";import"../__chunks__/chunk-3UTO3IYR.js";import"../__chunks__/chunk-4VDFQTIQ.js";import"../__chunks__/chunk-MRGB5FAN.js";import"../__chunks__/chunk-XOZ662VA.js";import"../__chunks__/chunk-NJVX7KSK.js";import"../__chunks__/chunk-LO5NNAIV.js";import"../__chunks__/chunk-YAR2KJ42.js";import"../__chunks__/chunk-37FKTAKZ.js";import"../__chunks__/chunk-FP3YMQL6.js";import"../__chunks__/chunk-VMM6JAZG.js";import"../__chunks__/chunk-EZP3TLKU.js";import"../__chunks__/chunk-2M4AKJPN.js";import"../__chunks__/chunk-3NPI7JA7.js";import"../__chunks__/chunk-AHYWEF7B.js";import"../__chunks__/chunk-SZGCAC7X.js";import"../__chunks__/chunk-MV5K23LN.js";import"../__chunks__/chunk-DD2JCDY2.js";import"../__chunks__/chunk-EHS4K6KJ.js";import"../__chunks__/chunk-QIRM4QUA.js";import"../__chunks__/chunk-5C6CC3E4.js";import"../__chunks__/chunk-5R3FZCYE.js";import"../__chunks__/chunk-KEQTNP4F.js";import"../__chunks__/chunk-SNAHUZB3.js";import"../__chunks__/chunk-2N2RUSRA.js";import"../__chunks__/chunk-BGCOFQOB.js";import"../__chunks__/chunk-KO6WAT63.js";import"../__chunks__/chunk-SCNZXL7L.js";import"../__chunks__/chunk-3U7QBETU.js";import"../__chunks__/chunk-QDL73CLR.js";import"../__chunks__/chunk-BZAS5UWX.js";import"../__chunks__/chunk-CSNNQII4.js";import"../__chunks__/chunk-2BUDQEWE.js";import"../__chunks__/chunk-GCWTST6A.js";import"../__chunks__/chunk-FKHUTJ2C.js";import"../__chunks__/chunk-Q4ODFQVM.js";import"../__chunks__/chunk-SKMXMVKW.js";import"../__chunks__/chunk-2IBLGO2A.js";import"../__chunks__/chunk-OBF5YWS6.js";import"../__chunks__/chunk-IHEQMC3B.js";import"../__chunks__/chunk-ONNEZDFU.js";import"../__chunks__/chunk-LPQY7BQ4.js";import"../__chunks__/chunk-5PN5T5IV.js";import"../__chunks__/chunk-44VPSU5H.js";import"../__chunks__/chunk-6H74GIU6.js";import"../__chunks__/chunk-TMDHTPOA.js";import"../__chunks__/chunk-XOSPBGLI.js";import"../__chunks__/chunk-ZFCLX5JU.js";import"../__chunks__/chunk-OXSLKC3X.js";import"../__chunks__/chunk-NP7WBEQK.js";import"../__chunks__/chunk-OIG4YF2R.js";import"../__chunks__/chunk-RGJ34TDB.js";import"../__chunks__/chunk-TPDR3Y6L.js";import"../__chunks__/chunk-X5TGO2UY.js";import"../__chunks__/chunk-C62XCHTF.js";import"../__chunks__/chunk-I5BVF6UR.js";import"../__chunks__/chunk-NGVYQHDX.js";import"../__chunks__/chunk-BP7X5FRP.js";import"../__chunks__/chunk-FMIRA7YL.js";import"../__chunks__/chunk-J5HFBYM7.js";import"../__chunks__/chunk-7PPUDZ2T.js";import"../__chunks__/chunk-A32WHRLH.js";import"../__chunks__/chunk-4XBUGAEB.js";import"../__chunks__/chunk-WVJETRW5.js";import"../__chunks__/chunk-NRXK4FQF.js";import"../__chunks__/chunk-RM4DR5YH.js";import"../__chunks__/chunk-LUOKYKOZ.js";import"../__chunks__/chunk-YNEWKYKQ.js";import"../__chunks__/chunk-NCHDT5N7.js";import"../__chunks__/chunk-RQ3IOPRD.js";import"../__chunks__/chunk-QGFR3GHY.js";import"../__chunks__/chunk-6FNBC33X.js";import"../__chunks__/chunk-FMECPQRZ.js";import"../__chunks__/chunk-W2FL4F7Y.js";import"../__chunks__/chunk-5MHH6T2T.js";import"../__chunks__/chunk-JRRGPQYM.js";import"../__chunks__/chunk-PV2VJ5SF.js";import"../__chunks__/chunk-ZFCXKCF6.js";import"../__chunks__/chunk-7F3MKQYJ.js";import"../__chunks__/chunk-BDHSNCDL.js";import"../__chunks__/chunk-VP7XSTRT.js";import"../__chunks__/chunk-FQET2LHU.js";import"../__chunks__/chunk-S267QGNY.js";import"../__chunks__/chunk-WOC5FZU4.js";import"../__chunks__/chunk-7LG3PXXW.js";import"../__chunks__/chunk-J75YWYPN.js";import"../__chunks__/chunk-UOJHMSFY.js";import"../__chunks__/chunk-EEJ5EEAY.js";import"../__chunks__/chunk-UB3HZ7Y3.js";import"../__chunks__/chunk-DLXVJ5WN.js";import"../__chunks__/chunk-2NV5YJWT.js";import"../__chunks__/chunk-AQHHAZ3S.js";import"../__chunks__/chunk-2PGGQXUN.js";import"../__chunks__/chunk-Q663T6WV.js";import"../__chunks__/chunk-DEY75ILF.js";import"../__chunks__/chunk-T6N6SLAD.js";import"../__chunks__/chunk-5NJW53EW.js";import"../__chunks__/chunk-DGVX77VC.js";import"../__chunks__/chunk-VXSWMT64.js";import"../__chunks__/chunk-VULSG7BJ.js";import"../__chunks__/chunk-D5NVSL2S.js";import"../__chunks__/chunk-LNE2U5E7.js";import"../__chunks__/chunk-FOHOVMG2.js";import"../__chunks__/chunk-ALWA4LTP.js";import"../__chunks__/chunk-PEANG3NC.js";import"../__chunks__/chunk-HWKJ6RY7.js";import"../__chunks__/chunk-5SJ24Q3V.js";import"../__chunks__/chunk-4I33RXZI.js";import"../__chunks__/chunk-T7D7BT5X.js";import"../__chunks__/chunk-EIG7LFFL.js";import"../__chunks__/chunk-4ZHZJTYB.js";import"../__chunks__/chunk-IIU6OKSW.js";import"../__chunks__/chunk-ID2JOC6Q.js";import"../__chunks__/chunk-GARX3UC3.js";import"../__chunks__/chunk-ZH6KW5HC.js";import"../__chunks__/chunk-XDEUCIC3.js";import"../__chunks__/chunk-NAIMWCQ7.js";import"../__chunks__/chunk-6YEBPDTC.js";import"../__chunks__/chunk-6OZDAYJV.js";import"../__chunks__/chunk-BDFHA3DI.js";import"../__chunks__/chunk-SQW2F44A.js";import"../__chunks__/chunk-KRCUIXB4.js";import"../__chunks__/chunk-A3JT4J5G.js";import"../__chunks__/chunk-XBLU7KZJ.js";import"../__chunks__/chunk-AGE76CJS.js";import"../__chunks__/chunk-JBJD3IUJ.js";import"../__chunks__/chunk-QFTWB3KE.js";import"../__chunks__/chunk-5JVA7MJI.js";import"../__chunks__/chunk-V4YZWAJU.js";import"../__chunks__/chunk-JRWYH6C3.js";import"../__chunks__/chunk-3JGCHKN2.js";import"../__chunks__/chunk-V4NH4KGH.js";import"../__chunks__/chunk-I3PTBNIV.js";import"../__chunks__/chunk-I4E7WYSQ.js";import"../__chunks__/chunk-QMQUN5M3.js";import"../__chunks__/chunk-LNYINVMN.js";import"../__chunks__/chunk-EZAD4OKT.js";import"../__chunks__/chunk-35N6HQAC.js";import"../__chunks__/chunk-DVCP2A6O.js";import"../__chunks__/chunk-7I7NVYZT.js";import"../__chunks__/chunk-3SYQDA3A.js";import"../__chunks__/chunk-QJIB5BMU.js";import"../__chunks__/chunk-GYB57BD3.js";import"../__chunks__/chunk-AP2OU4L5.js";import"../__chunks__/chunk-ZFXP4YRF.js";import"../__chunks__/chunk-TA6HP4LD.js";import"../__chunks__/chunk-CKDAMVQL.js";import"../__chunks__/chunk-YFGMHVY3.js";import"../__chunks__/chunk-25IPTBK3.js";import"../__chunks__/chunk-PPQR6O44.js";import"../__chunks__/chunk-NM43ACPN.js";import"../__chunks__/chunk-DJHPFGX6.js";import"../__chunks__/chunk-HNBKDGB4.js";import"../__chunks__/chunk-6WZ7DVP7.js";import"../__chunks__/chunk-GGMEVY45.js";import"../__chunks__/chunk-6FEMGV3G.js";import"../__chunks__/chunk-JKIKLHKN.js";import"../__chunks__/chunk-KKMXLCWS.js";import"../__chunks__/chunk-D7SFMPZV.js";import"../__chunks__/chunk-OXIGVI7S.js";import"../__chunks__/chunk-VB4M63XQ.js";import"../__chunks__/chunk-LGKB7JTU.js";import"../__chunks__/chunk-DZ5IJ4N3.js";import"../__chunks__/chunk-6ZGFYJ6T.js";import"../__chunks__/chunk-HI5RCCIL.js";import"../__chunks__/chunk-ZT4O7WWY.js";import"../__chunks__/chunk-BQSKQ7XQ.js";import"../__chunks__/chunk-C7ZNGCKJ.js";import"../__chunks__/chunk-ZUR56TCY.js";import"../__chunks__/chunk-YZGKKPP5.js";import"../__chunks__/chunk-FYSR5U3I.js";import"../__chunks__/chunk-DUSZZPF5.js";import"../__chunks__/chunk-OXBZSHOZ.js";import"../__chunks__/chunk-PXHBOM4A.js";import"../__chunks__/chunk-ZU6LXEUO.js";import"../__chunks__/chunk-5KGDRZSV.js";import"../__chunks__/chunk-VTMJ7INI.js";import"../__chunks__/chunk-WTIKHG7D.js";import"../__chunks__/chunk-N5STTJJR.js";import"../__chunks__/chunk-LJPH3Z4L.js";import"../__chunks__/chunk-YLLIHJY3.js";import"../__chunks__/chunk-DKXAWU2I.js";import"../__chunks__/chunk-ITDGZCSS.js";import"../__chunks__/chunk-27DX5WIQ.js";import"../__chunks__/chunk-X2JZA2ND.js";import"../__chunks__/chunk-MV7THB7B.js";import"../__chunks__/chunk-QR72MI4M.js";import"../__chunks__/chunk-FC3CZOOQ.js";import{a as r,b as e,c as f}from"../__chunks__/chunk-GDPQQIJM.js";import"../__chunks__/chunk-Y4LHGIZO.js";import"../__chunks__/chunk-X53TXOIC.js";import"../__chunks__/chunk-YDQULLMK.js";import"../__chunks__/chunk-OGKM4YOJ.js";import"../__chunks__/chunk-YUGUMBTX.js";import"../__chunks__/chunk-UMTCMSCG.js";import"../__chunks__/chunk-CLAJ4EPW.js";import"../__chunks__/chunk-H2JYGVBI.js";import"../__chunks__/chunk-FGT3C4FE.js";import"../__chunks__/chunk-DCI4LUDC.js";import"../__chunks__/chunk-HOX227TC.js";import"../__chunks__/chunk-GNCSMYRN.js";import"../__chunks__/chunk-Y4RXLAEX.js";import"../__chunks__/chunk-UIDXWJ2D.js";import"../__chunks__/chunk-FTQGHIGG.js";import"../__chunks__/chunk-NHHDQ53S.js";import"../__chunks__/chunk-XXP2T2NS.js";import"../__chunks__/chunk-AHX4GHIC.js";import{m as o}from"../__chunks__/chunk-HBP5N4FR.js";o();export{m as createSubscription,a as mockResponse,t as mockWindowLocation,p as renderWithProvider,x as rest,b as server,r as testAddress,e as testNetwork,f as testReceiver};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|