@multiversx/sdk-dapp 5.0.0-alpha.7 → 5.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/out/__chunks__/{chunk-I6Y5E7TB.mjs → chunk-2G6DWPQU.mjs} +2 -2
  2. package/out/__chunks__/{chunk-R7N7SVGB.mjs → chunk-2KAOFKX4.mjs} +2 -2
  3. package/out/__chunks__/{chunk-H3XPCFFD.mjs → chunk-2WB5WD5K.mjs} +2 -2
  4. package/out/__chunks__/{chunk-XZVMG6ZI.mjs → chunk-35YS2DV5.mjs} +2 -2
  5. package/out/__chunks__/{chunk-F2RJTQJP.mjs → chunk-3IMDPLG5.mjs} +2 -2
  6. package/out/__chunks__/{chunk-5X25X3ZU.mjs → chunk-3IXTYHAU.mjs} +2 -2
  7. package/out/__chunks__/{chunk-HW2MCEHM.mjs → chunk-3JNON2SM.mjs} +2 -2
  8. package/out/__chunks__/{chunk-B2RDSGON.mjs → chunk-3OKWBJFM.mjs} +2 -2
  9. package/out/__chunks__/{chunk-XGAMOGDQ.mjs → chunk-3Z3DQFG6.mjs} +2 -2
  10. package/out/__chunks__/{chunk-TLKMUVQJ.mjs → chunk-45WVS4H5.mjs} +2 -2
  11. package/out/__chunks__/{chunk-MNXYY4GE.mjs → chunk-4AOTLDWS.mjs} +2 -2
  12. package/out/__chunks__/{chunk-XPEAEEAP.mjs → chunk-4I2FE6NE.mjs} +2 -2
  13. package/out/__chunks__/{chunk-ZLREP3MA.mjs → chunk-4YETXBJD.mjs} +2 -2
  14. package/out/__chunks__/{chunk-QH23KEBZ.mjs → chunk-53BZNNVL.mjs} +2 -2
  15. package/out/__chunks__/{chunk-A7ZZJU5B.mjs → chunk-55RBZAD6.mjs} +2 -2
  16. package/out/__chunks__/{chunk-PRRE63HV.mjs → chunk-5L474T4X.mjs} +2 -2
  17. package/out/__chunks__/{chunk-OO2WCABO.mjs → chunk-6BGPH7MV.mjs} +2 -2
  18. package/out/__chunks__/{chunk-4QA5GQQH.mjs → chunk-6L56KRO6.mjs} +2 -2
  19. package/out/__chunks__/chunk-AC2L3PV3.mjs +2 -0
  20. package/out/__chunks__/{chunk-4TH4J4EE.mjs → chunk-AJJVMOJF.mjs} +2 -2
  21. package/out/__chunks__/{chunk-YZLY7QNI.mjs → chunk-BEUXUWCR.mjs} +2 -2
  22. package/out/__chunks__/{chunk-XRCG3U3J.mjs → chunk-BVKOA6WH.mjs} +2 -2
  23. package/out/__chunks__/chunk-CO3V5DOG.mjs +1 -0
  24. package/out/__chunks__/chunk-CT6RFJJM.mjs +2 -0
  25. package/out/__chunks__/{chunk-6HVXWGV7.mjs → chunk-CUSKOIRI.mjs} +2 -2
  26. package/out/__chunks__/{chunk-HEH5CYKF.mjs → chunk-EPMXW255.mjs} +2 -2
  27. package/out/__chunks__/chunk-EVL6UUJJ.mjs +2 -0
  28. package/out/__chunks__/{chunk-IXBRSEAD.mjs → chunk-F3AMNJ5K.mjs} +2 -2
  29. package/out/__chunks__/{chunk-ICVO7SST.mjs → chunk-G7XIDD62.mjs} +2 -2
  30. package/out/__chunks__/{chunk-PMA364GM.mjs → chunk-GVKHWWIS.mjs} +2 -2
  31. package/out/__chunks__/{chunk-G2NPJFHA.mjs → chunk-GZAY7BOI.mjs} +2 -2
  32. package/out/__chunks__/{chunk-R3WRJYVR.mjs → chunk-HR6GP43Q.mjs} +2 -2
  33. package/out/__chunks__/{chunk-SI4DMR7C.mjs → chunk-IJEPA3W2.mjs} +2 -2
  34. package/out/__chunks__/{chunk-CUMDGAVL.mjs → chunk-IYS5W63R.mjs} +2 -2
  35. package/out/__chunks__/{chunk-YVD46DFI.mjs → chunk-J4MZNYDR.mjs} +2 -2
  36. package/out/__chunks__/{chunk-FFFC4KOM.mjs → chunk-J7MZZ2X2.mjs} +2 -2
  37. package/out/__chunks__/{chunk-PEF2OHNN.mjs → chunk-JENO4O6P.mjs} +2 -2
  38. package/out/__chunks__/{chunk-G2DLIXFQ.mjs → chunk-K3WBBSXJ.mjs} +2 -2
  39. package/out/__chunks__/{chunk-N2SRHMUK.mjs → chunk-K7WAPWQA.mjs} +2 -2
  40. package/out/__chunks__/{chunk-264GC7EP.mjs → chunk-KUQH2ZBR.mjs} +2 -2
  41. package/out/__chunks__/{chunk-OWAQ72KE.mjs → chunk-KY7KOSJJ.mjs} +2 -2
  42. package/out/__chunks__/chunk-LJ5JGAYL.mjs +2 -0
  43. package/out/__chunks__/{chunk-V7JEC6M7.mjs → chunk-LKWCLZTU.mjs} +2 -2
  44. package/out/__chunks__/{chunk-XDSRFSN7.mjs → chunk-M6IVW6AN.mjs} +2 -2
  45. package/out/__chunks__/chunk-M7R5JSEH.mjs +2 -0
  46. package/out/__chunks__/chunk-MAT2WHLY.mjs +2 -0
  47. package/out/__chunks__/chunk-OH6SHSQZ.mjs +2 -0
  48. package/out/__chunks__/{chunk-QREEUQEX.mjs → chunk-OLYQNOEP.mjs} +2 -2
  49. package/out/__chunks__/{chunk-Y6A3NQHA.mjs → chunk-OOPHCYRC.mjs} +2 -2
  50. package/out/__chunks__/{chunk-GMMH7PLZ.mjs → chunk-OTQRFI3T.mjs} +2 -2
  51. package/out/__chunks__/chunk-P5YASUQH.mjs +2 -0
  52. package/out/__chunks__/{chunk-W4GE4ZDP.mjs → chunk-PRULMJH7.mjs} +2 -2
  53. package/out/__chunks__/{chunk-NK6AUWSP.mjs → chunk-QFWMIF3L.mjs} +2 -2
  54. package/out/__chunks__/{chunk-TAI3I5BS.mjs → chunk-QQNYMMUM.mjs} +2 -2
  55. package/out/__chunks__/{chunk-UF45HLIK.mjs → chunk-QYYNCJPD.mjs} +2 -2
  56. package/out/__chunks__/chunk-RIXZPR7R.mjs +2 -0
  57. package/out/__chunks__/{chunk-WFUJNJVG.mjs → chunk-SKEL25G3.mjs} +2 -2
  58. package/out/__chunks__/chunk-TRMQFQOQ.mjs +1 -0
  59. package/out/__chunks__/chunk-TRMQFQOQ.mjs.map +7 -0
  60. package/out/__chunks__/{chunk-5JZN3DEY.mjs → chunk-TWWYWBJH.mjs} +2 -2
  61. package/out/__chunks__/{chunk-XYRJIHLL.mjs → chunk-U52ITGAN.mjs} +2 -2
  62. package/out/__chunks__/{chunk-K2UOPHUJ.mjs → chunk-UQXXWVTL.mjs} +2 -2
  63. package/out/__chunks__/chunk-UWNXZP4Z.mjs +2 -0
  64. package/out/__chunks__/{chunk-YNQZ4KGU.mjs → chunk-V7QVBIYB.mjs} +2 -2
  65. package/out/__chunks__/chunk-V7ZVI2WS.mjs +2 -0
  66. package/out/__chunks__/chunk-VK47SZJ2.mjs +2 -0
  67. package/out/__chunks__/chunk-VPZ3QEMD.mjs +2 -0
  68. package/out/__chunks__/{chunk-T4QYEID4.mjs → chunk-VQIWENYE.mjs} +2 -2
  69. package/out/__chunks__/chunk-W5W6YGA5.mjs +2 -0
  70. package/out/__chunks__/chunk-WGH5AERA.mjs +2 -0
  71. package/out/__chunks__/{chunk-VOE6ZSTO.mjs → chunk-WVB4VPRI.mjs} +2 -2
  72. package/out/__chunks__/{chunk-2ETIU6VR.mjs → chunk-X5OSPJKQ.mjs} +2 -2
  73. package/out/__chunks__/{chunk-EM6LKIB7.mjs → chunk-XPX7PTGI.mjs} +2 -2
  74. package/out/__chunks__/{chunk-4KDUDO4R.mjs → chunk-Y574J2OK.mjs} +2 -2
  75. package/out/__chunks__/chunk-Y62KWXTT.mjs +2 -0
  76. package/out/__chunks__/{chunk-4HRKDTID.mjs → chunk-YMUUG42I.mjs} +2 -2
  77. package/out/__chunks__/{chunk-V45NSWVD.mjs → chunk-YWBC3WTI.mjs} +2 -2
  78. package/out/__chunks__/{chunk-JTQCNFCR.mjs → chunk-ZJOTHYI2.mjs} +2 -2
  79. package/out/__chunks__/{chunk-W5NBJSZI.mjs → chunk-ZOGJGVPP.mjs} +2 -2
  80. package/out/__chunks__/{chunk-S6RKVTOG.mjs → chunk-ZZOHAMTX.mjs} +2 -2
  81. package/out/__mocks__/accountConfig.mjs +1 -1
  82. package/out/__mocks__/data/index.mjs +1 -1
  83. package/out/__mocks__/index.mjs +1 -1
  84. package/out/__mocks__/server.mjs +1 -1
  85. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  86. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  87. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  88. package/out/apiCalls/index.mjs +1 -1
  89. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  90. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  91. package/out/apiCalls/tokens/index.mjs +1 -1
  92. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  93. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  94. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  95. package/out/constants/index.mjs +1 -1
  96. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  97. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  98. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  99. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  100. package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
  101. package/out/index.mjs +1 -1
  102. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  103. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  104. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  105. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  106. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  107. package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
  108. package/out/managers/TransactionManager/index.mjs +1 -1
  109. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  110. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  111. package/out/managers/index.mjs +1 -1
  112. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  113. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  114. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  115. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  116. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  117. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  118. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  119. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  120. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  121. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  122. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  123. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  124. package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
  125. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  126. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  127. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  128. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  129. package/out/managers/internal/index.mjs +1 -1
  130. package/out/methods/account/getAccount.mjs +1 -1
  131. package/out/methods/account/getAccountInfo.mjs +1 -1
  132. package/out/methods/account/getAddress.mjs +1 -1
  133. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  134. package/out/methods/account/getLatestNonce.mjs +1 -1
  135. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  136. package/out/methods/initApp/initApp.mjs +1 -1
  137. package/out/methods/initApp/initApp.mjs.map +1 -1
  138. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  139. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  140. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  141. package/out/methods/network/getEgldLabel.mjs +1 -1
  142. package/out/methods/network/getExplorerAddress.mjs +1 -1
  143. package/out/methods/network/getNetworkConfig.mjs +1 -1
  144. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  145. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  146. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  147. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  148. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  149. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  150. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  151. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  152. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  153. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  154. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  155. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  156. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  157. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  158. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  159. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  160. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  161. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  162. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  163. package/out/providers/DappProvider/index.mjs +1 -1
  164. package/out/providers/ProviderFactory.mjs +1 -1
  165. package/out/providers/helpers/accountProvider.mjs +1 -1
  166. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  167. package/out/providers/helpers/restoreProvider.mjs +1 -1
  168. package/out/providers/index.mjs +1 -1
  169. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  170. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  171. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  172. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  173. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  174. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  175. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  176. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  177. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  178. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  179. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  180. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  181. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  182. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  183. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  184. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  185. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  186. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  187. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  188. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  189. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  190. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  191. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  192. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  193. package/out/providers/strategies/helpers/index.mjs +1 -1
  194. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  195. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  196. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  197. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  198. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  199. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  200. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  201. package/out/providers/strategies/index.mjs +1 -1
  202. package/out/react/account/useGetAccount.mjs +1 -1
  203. package/out/react/account/useGetAccountInfo.mjs +1 -1
  204. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  205. package/out/react/account/useGetLatestNonce.mjs +1 -1
  206. package/out/react/index.mjs +1 -1
  207. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  208. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  209. package/out/react/store/getReactStore.mjs +1 -1
  210. package/out/react/store/useSelector.mjs +1 -1
  211. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  212. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  213. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  214. package/out/services/index.mjs +1 -1
  215. package/out/services/nativeAuth/index.mjs +1 -1
  216. package/out/services/nativeAuth/methods/index.mjs +1 -1
  217. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  218. package/out/store/actions/account/accountActions.mjs +1 -1
  219. package/out/store/actions/account/index.mjs +1 -1
  220. package/out/store/actions/cache/cacheActions.mjs +1 -1
  221. package/out/store/actions/cache/index.mjs +1 -1
  222. package/out/store/actions/config/configActions.mjs +1 -1
  223. package/out/store/actions/config/index.mjs +1 -1
  224. package/out/store/actions/index.mjs +1 -1
  225. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  226. package/out/store/actions/network/index.mjs +1 -1
  227. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  228. package/out/store/actions/network/networkActions.mjs +1 -1
  229. package/out/store/actions/sharedActions/index.mjs +1 -1
  230. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  231. package/out/store/actions/toasts/index.mjs +1 -1
  232. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  233. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  234. package/out/store/actions/ui/index.mjs +1 -1
  235. package/out/store/actions/ui/uiActions.mjs +1 -1
  236. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  237. package/out/store/middleware/index.mjs +1 -1
  238. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  239. package/out/store/selectors/index.mjs +1 -1
  240. package/out/store/slices/index.mjs +1 -1
  241. package/out/store/store.mjs +1 -1
  242. package/out/types/index.d.ts +1 -0
  243. package/out/types/index.js +1 -0
  244. package/out/types/index.js.map +1 -1
  245. package/out/types/index.mjs +1 -1
  246. package/out/types/suspiciousLink.types.d.ts +17 -0
  247. package/out/types/suspiciousLink.types.js +3 -0
  248. package/out/types/suspiciousLink.types.js.map +1 -0
  249. package/out/types/suspiciousLink.types.mjs +2 -0
  250. package/out/types/suspiciousLink.types.mjs.map +7 -0
  251. package/out/utils/account/index.mjs +1 -1
  252. package/out/utils/account/refreshAccount.mjs +1 -1
  253. package/out/utils/createUIElement.mjs +1 -1
  254. package/out/utils/index.mjs +1 -1
  255. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  256. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  257. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  258. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
  259. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTransactionActionNftText.mjs +1 -1
  260. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
  261. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  262. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  263. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  264. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  266. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  267. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  268. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  269. package/out/utils/transactions/getScamFlag.d.ts +8 -0
  270. package/out/utils/transactions/getScamFlag.js +78 -0
  271. package/out/utils/transactions/getScamFlag.js.map +1 -0
  272. package/out/utils/transactions/getScamFlag.mjs +2 -0
  273. package/out/utils/transactions/getScamFlag.mjs.map +7 -0
  274. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  275. package/out/utils/transactions/getTransactionsHistory/helpers/getAssetAmount.mjs +1 -1
  276. package/out/utils/transactions/getTransactionsHistory/helpers/getAssetPrice.mjs +1 -1
  277. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  278. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
  279. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionActionTransferLabel.mjs +1 -1
  280. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
  281. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAssets.mjs +1 -1
  282. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  283. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  284. package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
  285. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  286. package/out/utils/transactions/index.mjs +1 -1
  287. package/out/utils/validation/index.mjs +1 -1
  288. package/out/utils/validation/isContract.mjs +1 -1
  289. package/package.json +2 -1
  290. package/out/__chunks__/chunk-2BJ6OPYI.mjs +0 -2
  291. package/out/__chunks__/chunk-62PJZCUP.mjs +0 -2
  292. package/out/__chunks__/chunk-6USJJJKT.mjs +0 -2
  293. package/out/__chunks__/chunk-AKDRHJVP.mjs +0 -1
  294. package/out/__chunks__/chunk-BHUV7XPT.mjs +0 -2
  295. package/out/__chunks__/chunk-BXQVIW3W.mjs +0 -2
  296. package/out/__chunks__/chunk-DNI2WCEF.mjs +0 -2
  297. package/out/__chunks__/chunk-F7BK2C7W.mjs +0 -2
  298. package/out/__chunks__/chunk-FP5KY5UQ.mjs +0 -2
  299. package/out/__chunks__/chunk-FSVV6MTL.mjs +0 -2
  300. package/out/__chunks__/chunk-LDCOLXCM.mjs +0 -2
  301. package/out/__chunks__/chunk-LT3PAYQB.mjs +0 -2
  302. package/out/__chunks__/chunk-PHU7P27U.mjs +0 -2
  303. package/out/__chunks__/chunk-PMEBJV22.mjs +0 -2
  304. package/out/__chunks__/chunk-SNNND5RB.mjs +0 -2
  305. package/out/__chunks__/chunk-SUE7UB6N.mjs +0 -2
  306. package/out/__chunks__/chunk-YMKC64NV.mjs +0 -2
  307. /package/out/__chunks__/{chunk-I6Y5E7TB.mjs.map → chunk-2G6DWPQU.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-R7N7SVGB.mjs.map → chunk-2KAOFKX4.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-H3XPCFFD.mjs.map → chunk-2WB5WD5K.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-XZVMG6ZI.mjs.map → chunk-35YS2DV5.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-F2RJTQJP.mjs.map → chunk-3IMDPLG5.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-5X25X3ZU.mjs.map → chunk-3IXTYHAU.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-HW2MCEHM.mjs.map → chunk-3JNON2SM.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-B2RDSGON.mjs.map → chunk-3OKWBJFM.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-XGAMOGDQ.mjs.map → chunk-3Z3DQFG6.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-TLKMUVQJ.mjs.map → chunk-45WVS4H5.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-MNXYY4GE.mjs.map → chunk-4AOTLDWS.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-XPEAEEAP.mjs.map → chunk-4I2FE6NE.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-ZLREP3MA.mjs.map → chunk-4YETXBJD.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-QH23KEBZ.mjs.map → chunk-53BZNNVL.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-A7ZZJU5B.mjs.map → chunk-55RBZAD6.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-PRRE63HV.mjs.map → chunk-5L474T4X.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-OO2WCABO.mjs.map → chunk-6BGPH7MV.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-4QA5GQQH.mjs.map → chunk-6L56KRO6.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-YMKC64NV.mjs.map → chunk-AC2L3PV3.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-4TH4J4EE.mjs.map → chunk-AJJVMOJF.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-YZLY7QNI.mjs.map → chunk-BEUXUWCR.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-XRCG3U3J.mjs.map → chunk-BVKOA6WH.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-AKDRHJVP.mjs.map → chunk-CO3V5DOG.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-SUE7UB6N.mjs.map → chunk-CT6RFJJM.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-6HVXWGV7.mjs.map → chunk-CUSKOIRI.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-HEH5CYKF.mjs.map → chunk-EPMXW255.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-PMEBJV22.mjs.map → chunk-EVL6UUJJ.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-IXBRSEAD.mjs.map → chunk-F3AMNJ5K.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-ICVO7SST.mjs.map → chunk-G7XIDD62.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-PMA364GM.mjs.map → chunk-GVKHWWIS.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-G2NPJFHA.mjs.map → chunk-GZAY7BOI.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-R3WRJYVR.mjs.map → chunk-HR6GP43Q.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-SI4DMR7C.mjs.map → chunk-IJEPA3W2.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-CUMDGAVL.mjs.map → chunk-IYS5W63R.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-YVD46DFI.mjs.map → chunk-J4MZNYDR.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-FFFC4KOM.mjs.map → chunk-J7MZZ2X2.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-PEF2OHNN.mjs.map → chunk-JENO4O6P.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-G2DLIXFQ.mjs.map → chunk-K3WBBSXJ.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-N2SRHMUK.mjs.map → chunk-K7WAPWQA.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-264GC7EP.mjs.map → chunk-KUQH2ZBR.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-OWAQ72KE.mjs.map → chunk-KY7KOSJJ.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-62PJZCUP.mjs.map → chunk-LJ5JGAYL.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-V7JEC6M7.mjs.map → chunk-LKWCLZTU.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-XDSRFSN7.mjs.map → chunk-M6IVW6AN.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-2BJ6OPYI.mjs.map → chunk-M7R5JSEH.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-LDCOLXCM.mjs.map → chunk-MAT2WHLY.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-FP5KY5UQ.mjs.map → chunk-OH6SHSQZ.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-QREEUQEX.mjs.map → chunk-OLYQNOEP.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-Y6A3NQHA.mjs.map → chunk-OOPHCYRC.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-GMMH7PLZ.mjs.map → chunk-OTQRFI3T.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-FSVV6MTL.mjs.map → chunk-P5YASUQH.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-W4GE4ZDP.mjs.map → chunk-PRULMJH7.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-NK6AUWSP.mjs.map → chunk-QFWMIF3L.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-TAI3I5BS.mjs.map → chunk-QQNYMMUM.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-UF45HLIK.mjs.map → chunk-QYYNCJPD.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-DNI2WCEF.mjs.map → chunk-RIXZPR7R.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-WFUJNJVG.mjs.map → chunk-SKEL25G3.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-5JZN3DEY.mjs.map → chunk-TWWYWBJH.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-XYRJIHLL.mjs.map → chunk-U52ITGAN.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-K2UOPHUJ.mjs.map → chunk-UQXXWVTL.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-SNNND5RB.mjs.map → chunk-UWNXZP4Z.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-YNQZ4KGU.mjs.map → chunk-V7QVBIYB.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-F7BK2C7W.mjs.map → chunk-V7ZVI2WS.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-6USJJJKT.mjs.map → chunk-VK47SZJ2.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-BXQVIW3W.mjs.map → chunk-VPZ3QEMD.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-T4QYEID4.mjs.map → chunk-VQIWENYE.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-LT3PAYQB.mjs.map → chunk-W5W6YGA5.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-PHU7P27U.mjs.map → chunk-WGH5AERA.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-VOE6ZSTO.mjs.map → chunk-WVB4VPRI.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-2ETIU6VR.mjs.map → chunk-X5OSPJKQ.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-EM6LKIB7.mjs.map → chunk-XPX7PTGI.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-4KDUDO4R.mjs.map → chunk-Y574J2OK.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-BHUV7XPT.mjs.map → chunk-Y62KWXTT.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-4HRKDTID.mjs.map → chunk-YMUUG42I.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-V45NSWVD.mjs.map → chunk-YWBC3WTI.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-JTQCNFCR.mjs.map → chunk-ZJOTHYI2.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-W5NBJSZI.mjs.map → chunk-ZOGJGVPP.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-S6RKVTOG.mjs.map → chunk-ZZOHAMTX.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as U}from"./chunk-5JZN3DEY.mjs";import{a as v}from"./chunk-XYRJIHLL.mjs";import{a as D,b as R,g as F}from"./chunk-QD3CFFVT.mjs";import{a as _}from"./chunk-LT3PAYQB.mjs";import{a as j}from"./chunk-4ODPAHHA.mjs";import{a as $}from"./chunk-Z5CDCI3Y.mjs";import{a as G}from"./chunk-EM6LKIB7.mjs";import{a as z}from"./chunk-5X25X3ZU.mjs";import{b as f}from"./chunk-VOE6ZSTO.mjs";import{a as u}from"./chunk-BXQVIW3W.mjs";import{a as L}from"./chunk-FP5KY5UQ.mjs";import{a as V}from"./chunk-FSVV6MTL.mjs";import{a as T}from"./chunk-264GC7EP.mjs";import{a as M}from"./chunk-TLKMUVQJ.mjs";import{a as l,f as O}from"./chunk-T4QYEID4.mjs";import{b as W}from"./chunk-WFUJNJVG.mjs";import{a as g}from"./chunk-6FXEHNGW.mjs";import{a as K}from"./chunk-NJN53MJV.mjs";import{a as b}from"./chunk-YSCND2MX.mjs";import{a as h}from"./chunk-HORSXVIV.mjs";import{b as k,s as m,u as N}from"./chunk-ZLREP3MA.mjs";import{b as I}from"./chunk-IEJTMYFW.mjs";import{b as C,c as P,f as S}from"./chunk-R53MCZI6.mjs";import{b as B}from"./chunk-YEXBSKXL.mjs";import{a as E}from"./chunk-NHXPNROG.mjs";async function w({address:t,provider:o,apiAddress:r}){let e=await g({address:t,baseURL:r});if(!e)throw new Error("Account not found");W({address:t,providerType:o.getType()});let n={...e,username:h(e.username),nonce:T(e)};l(n),await f(t),v(),e.shard!=null&&await U({shard:Number(e.shard),apiAddress:r})}async function ot(t){let{network:{apiAddress:o}}=u();await t.login();let r=await t.getAddress();if(!r)throw new Error("Address not found");return await w({address:r,provider:t,apiAddress:o}),{address:r}}async function rt({provider:t,nativeAuthConfig:o,token:r}){let{network:{apiAddress:e}}=u(),n=M(o),s=r;s||(s=await n.initialize({noCache:!0}));let{address:i,signature:c,...a}=await t.login({token:s});if(!i)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let p=n.getToken({address:i,token:s,signature:c});k({loginToken:s,signature:c,nativeAuthToken:p});let d=await _({loginToken:s,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:i});return await w({address:d,provider:t,apiAddress:e}),{address:d,signature:c}}async function H(t,o){let r=I(N());if(r)return await rt({provider:t,nativeAuthConfig:r,token:o?.token});let{address:e}=await ot(t);return await f(e),v(),{address:e}}var y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${R}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${D}-${Date.now()}`}},et={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},nt=t=>{for(let[o,r]of Object.entries(et))if(t.includes(o))return r;return"Error when signing"};function A(t,o="error"){let r=t?.message,e=nt(r),s=e!=="Error when signing"?"warning":o,i=Object.keys(y).includes(s)?y[s]:y.error,{toastId:c,iconClassName:a,title:p}=i;return q({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:p}),e}async function J({provider:t,transactions:o,options:r={}}){await Q();let{isGuarded:e,activeGuardianAddress:n,nonce:s}=V(),i=t.getType()===E.ledger,c=j({latestNonce:s,transactions:o}),a=n&&e&&!r.skipGuardian?c?.map(d=>(d.version=C.withTxOptions().valueOf(),d.options=S.withOptions({guarded:!0,...i?{hashSign:!0}:{}}).valueOf(),d.guardian=P.newFromBech32(n),d)):c,p=await t.signTransactions(a)??[];return O(s+p.length),p}var x=class{constructor(o){this.provider=o}init(){return this.provider.init()}async login(o){return await H(this.provider,o)}isInitialized(){return this.provider.isInitialized()}async logout(o={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}){return await z({provider:this.provider,options:o})}setShouldShowConsentPopup(o){this.provider.setShouldShowConsentPopup?.(o)}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(o,r){try{return await J({provider:this.provider,transactions:o,options:r})}catch(e){let n=A(e);throw new Error(n)}}async signMessage(o,r){try{return await G({provider:this.provider,message:o,options:r})}catch(e){let n=A(e,"warning");throw new Error(n)}}async verifyMessage(o){return await $(o)}cancelLogin(){this.provider.cancelLogin?.()}};var X=null;function go(t){X=t}function Y(){return X||new x(B)}var st=async()=>{try{let t=L(),{network:o}=u();try{let r=await g({address:t,baseURL:o.apiAddress});if(r!=null){let e={...r,username:h(r.username),nonce:T(r)};return l(e),e}}catch(r){console.error("Failed getting account ",r)}}catch(t){console.error("Failed getting address ",t)}return null};async function Q(){let t=Y();if(t==null)throw"Provider not initialized";try{if(!t.init)throw"Current provider does not have init() function";return await t.init()?st():void 0}catch(o){console.error("Failed initializing provider ",o)}}var Z={},tt={},it=(t,o)=>{m().setState(({toasts:r})=>{let e=r.customToasts.length>0?Math.max(...r.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=o??`custom-toast-${e+1}`,s=r.customToasts.findIndex(a=>a.toastId===n),i={...t,toastId:n};if(s!==-1){r.customToasts[s]=i;return}r.customToasts.push({...i,toastId:n})},!1,"addCustomToast")},_o=t=>{m().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(r=>r.toastId!==t)},!1,"removeCustomToast")},zo=()=>{m().setState(({toasts:t})=>{t.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{m().setState(({toasts:t})=>{t.transactionToasts=[]})},$o=({toastId:t,totalDuration:o})=>{m().setState(({toasts:r})=>{let e=r.transactionToasts.length>0?Math.max(...r.transactionToasts.map(s=>parseInt(s.toastId.split("-").pop()??"0"))):0,n=t||`transaction-toast-${e+1}`;r.transactionToasts.push({startTime:b(),endTime:K(o),toastId:n})},!1,"addTransactionToast")},Vo=t=>{m().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(r=>r.toastId!==t)},!1,"removeTransactionToast"),delete tt[t],delete Z[t]},q=t=>{let{toasts:o}=m().getState(),r=o.customToasts.length>0?Math.max(...o.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=t.toastId||`custom-toast-${r+1}`;return t.onClose&&(tt[e]=t.onClose),t.instantiateToastElement?(Z[e]=t.instantiateToastElement,m().setState(({toasts:n})=>{let s=n.customToasts.findIndex(a=>a.toastId===e),i={...t,instantiateToastElement:null,toastId:e};s!==-1?n.customToasts[s]=i:n.customToasts.push(i)},!1,"createCustomToast"),e):(it(t,e),e)};export{Z as a,tt as b,it as c,_o as d,zo as e,Go as f,$o as g,Vo as h,q as i,w as j,H as k,A as l,J as m,x as n,go as o,Y as p,Q as q};
2
- //# sourceMappingURL=chunk-I6Y5E7TB.mjs.map
1
+ import{a as U}from"./chunk-TWWYWBJH.mjs";import{a as v}from"./chunk-U52ITGAN.mjs";import{a as D,b as R,g as F}from"./chunk-QD3CFFVT.mjs";import{a as z}from"./chunk-3IXTYHAU.mjs";import{b as f}from"./chunk-WVB4VPRI.mjs";import{a as _}from"./chunk-W5W6YGA5.mjs";import{a as j}from"./chunk-4ODPAHHA.mjs";import{a as $}from"./chunk-Z5CDCI3Y.mjs";import{a as G}from"./chunk-XPX7PTGI.mjs";import{a as u}from"./chunk-VPZ3QEMD.mjs";import{a as L}from"./chunk-OH6SHSQZ.mjs";import{a as V}from"./chunk-P5YASUQH.mjs";import{a as T}from"./chunk-KUQH2ZBR.mjs";import{a as l,f as O}from"./chunk-VQIWENYE.mjs";import{a as M}from"./chunk-45WVS4H5.mjs";import{b as W}from"./chunk-SKEL25G3.mjs";import{a as h}from"./chunk-HORSXVIV.mjs";import{a as g}from"./chunk-6FXEHNGW.mjs";import{a as K}from"./chunk-NJN53MJV.mjs";import{a as b}from"./chunk-YSCND2MX.mjs";import{b as k,s as m,u as N}from"./chunk-4YETXBJD.mjs";import{b as I}from"./chunk-IEJTMYFW.mjs";import{b as C,c as P,f as S}from"./chunk-R53MCZI6.mjs";import{b as B}from"./chunk-YEXBSKXL.mjs";import{a as E}from"./chunk-NHXPNROG.mjs";async function w({address:t,provider:o,apiAddress:r}){let e=await g({address:t,baseURL:r});if(!e)throw new Error("Account not found");W({address:t,providerType:o.getType()});let n={...e,username:h(e.username),nonce:T(e)};l(n),await f(t),v(),e.shard!=null&&await U({shard:Number(e.shard),apiAddress:r})}async function ot(t){let{network:{apiAddress:o}}=u();await t.login();let r=await t.getAddress();if(!r)throw new Error("Address not found");return await w({address:r,provider:t,apiAddress:o}),{address:r}}async function rt({provider:t,nativeAuthConfig:o,token:r}){let{network:{apiAddress:e}}=u(),n=M(o),s=r;s||(s=await n.initialize({noCache:!0}));let{address:i,signature:c,...a}=await t.login({token:s});if(!i)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let p=n.getToken({address:i,token:s,signature:c});k({loginToken:s,signature:c,nativeAuthToken:p});let d=await _({loginToken:s,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:i});return await w({address:d,provider:t,apiAddress:e}),{address:d,signature:c}}async function H(t,o){let r=I(N());if(r)return await rt({provider:t,nativeAuthConfig:r,token:o?.token});let{address:e}=await ot(t);return await f(e),v(),{address:e}}var y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${R}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${D}-${Date.now()}`}},et={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},nt=t=>{for(let[o,r]of Object.entries(et))if(t.includes(o))return r;return"Error when signing"};function A(t,o="error"){let r=t?.message,e=nt(r),s=e!=="Error when signing"?"warning":o,i=Object.keys(y).includes(s)?y[s]:y.error,{toastId:c,iconClassName:a,title:p}=i;return q({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:p}),e}async function J({provider:t,transactions:o,options:r={}}){await Q();let{isGuarded:e,activeGuardianAddress:n,nonce:s}=V(),i=t.getType()===E.ledger,c=j({latestNonce:s,transactions:o}),a=n&&e&&!r.skipGuardian?c?.map(d=>(d.version=C.withTxOptions().valueOf(),d.options=S.withOptions({guarded:!0,...i?{hashSign:!0}:{}}).valueOf(),d.guardian=P.newFromBech32(n),d)):c,p=await t.signTransactions(a)??[];return O(s+p.length),p}var x=class{constructor(o){this.provider=o}init(){return this.provider.init()}async login(o){return await H(this.provider,o)}isInitialized(){return this.provider.isInitialized()}async logout(o={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}){return await z({provider:this.provider,options:o})}setShouldShowConsentPopup(o){this.provider.setShouldShowConsentPopup?.(o)}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(o,r){try{return await J({provider:this.provider,transactions:o,options:r})}catch(e){let n=A(e);throw new Error(n)}}async signMessage(o,r){try{return await G({provider:this.provider,message:o,options:r})}catch(e){let n=A(e,"warning");throw new Error(n)}}async verifyMessage(o){return await $(o)}cancelLogin(){this.provider.cancelLogin?.()}};var X=null;function go(t){X=t}function Y(){return X||new x(B)}var st=async()=>{try{let t=L(),{network:o}=u();try{let r=await g({address:t,baseURL:o.apiAddress});if(r!=null){let e={...r,username:h(r.username),nonce:T(r)};return l(e),e}}catch(r){console.error("Failed getting account ",r)}}catch(t){console.error("Failed getting address ",t)}return null};async function Q(){let t=Y();if(t==null)throw"Provider not initialized";try{if(!t.init)throw"Current provider does not have init() function";return await t.init()?st():void 0}catch(o){console.error("Failed initializing provider ",o)}}var Z={},tt={},it=(t,o)=>{m().setState(({toasts:r})=>{let e=r.customToasts.length>0?Math.max(...r.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=o??`custom-toast-${e+1}`,s=r.customToasts.findIndex(a=>a.toastId===n),i={...t,toastId:n};if(s!==-1){r.customToasts[s]=i;return}r.customToasts.push({...i,toastId:n})},!1,"addCustomToast")},_o=t=>{m().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(r=>r.toastId!==t)},!1,"removeCustomToast")},zo=()=>{m().setState(({toasts:t})=>{t.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{m().setState(({toasts:t})=>{t.transactionToasts=[]})},$o=({toastId:t,totalDuration:o})=>{m().setState(({toasts:r})=>{let e=r.transactionToasts.length>0?Math.max(...r.transactionToasts.map(s=>parseInt(s.toastId.split("-").pop()??"0"))):0,n=t||`transaction-toast-${e+1}`;r.transactionToasts.push({startTime:b(),endTime:K(o),toastId:n})},!1,"addTransactionToast")},Vo=t=>{m().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(r=>r.toastId!==t)},!1,"removeTransactionToast"),delete tt[t],delete Z[t]},q=t=>{let{toasts:o}=m().getState(),r=o.customToasts.length>0?Math.max(...o.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=t.toastId||`custom-toast-${r+1}`;return t.onClose&&(tt[e]=t.onClose),t.instantiateToastElement?(Z[e]=t.instantiateToastElement,m().setState(({toasts:n})=>{let s=n.customToasts.findIndex(a=>a.toastId===e),i={...t,instantiateToastElement:null,toastId:e};s!==-1?n.customToasts[s]=i:n.customToasts.push(i)},!1,"createCustomToast"),e):(it(t,e),e)};export{Z as a,tt as b,it as c,_o as d,zo as e,Go as f,$o as g,Vo as h,q as i,w as j,H as k,A as l,J as m,x as n,go as o,Y as p,Q as q};
2
+ //# sourceMappingURL=chunk-2G6DWPQU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-V45NSWVD.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-R7N7SVGB.mjs.map
1
+ import{a as t}from"./chunk-YWBC3WTI.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-2KAOFKX4.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as a,c as n}from"./chunk-W5NBJSZI.mjs";function m({results:r,hash:e,sessionId:s}){let t=r?.find(i=>i?.returnMessage!=="");n({sessionId:s,transaction:{...t,hash:e,status:"fail",inTransit:!1}}),a({sessionId:s,status:"fail",errorMessage:t?.returnMessage})}export{m as a};
2
- //# sourceMappingURL=chunk-H3XPCFFD.mjs.map
1
+ import{b as a,c as n}from"./chunk-ZOGJGVPP.mjs";function m({results:r,hash:e,sessionId:s}){let t=r?.find(i=>i?.returnMessage!=="");n({sessionId:s,transaction:{...t,hash:e,status:"fail",inTransit:!1}}),a({sessionId:s,status:"fail",errorMessage:t?.returnMessage})}export{m as a};
2
+ //# sourceMappingURL=chunk-2WB5WD5K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-4TBVQD27.mjs";import{s as o}from"./chunk-ZLREP3MA.mjs";var l=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>o().setState(({config:e})=>{let s=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,i=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:i,walletConnectV2RelayAddress:s}},!1,"setWalletConnectConfig"),r=t=>o().setState(({config:e})=>{e.crossWindowConfig=t},!1,"setCrossWindowConfig");export{l as a,c as b,f as c,r as d};
2
- //# sourceMappingURL=chunk-XZVMG6ZI.mjs.map
1
+ import{a as n}from"./chunk-4TBVQD27.mjs";import{s as o}from"./chunk-4YETXBJD.mjs";var l=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>o().setState(({config:e})=>{let s=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,i=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:i,walletConnectV2RelayAddress:s}},!1,"setWalletConnectConfig"),r=t=>o().setState(({config:e})=>{e.crossWindowConfig=t},!1,"setCrossWindowConfig");export{l as a,c as b,f as c,r as d};
2
+ //# sourceMappingURL=chunk-35YS2DV5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-6HVXWGV7.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
- //# sourceMappingURL=chunk-F2RJTQJP.mjs.map
1
+ import{a as e}from"./chunk-CUSKOIRI.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
+ //# sourceMappingURL=chunk-3IMDPLG5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-VOE6ZSTO.mjs";import{a as u}from"./chunk-FP5KY5UQ.mjs";import{a as g}from"./chunk-WFUJNJVG.mjs";import{c as n}from"./chunk-PPA7AFVD.mjs";import{a}from"./chunk-NHXPNROG.mjs";import{a as s}from"./chunk-7QCBLUWB.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
- //# sourceMappingURL=chunk-5X25X3ZU.mjs.map
1
+ import{a as i}from"./chunk-WVB4VPRI.mjs";import{a as u}from"./chunk-OH6SHSQZ.mjs";import{a as g}from"./chunk-SKEL25G3.mjs";import{c as n}from"./chunk-PPA7AFVD.mjs";import{a}from"./chunk-NHXPNROG.mjs";import{a as s}from"./chunk-7QCBLUWB.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
+ //# sourceMappingURL=chunk-3IXTYHAU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-ZLREP3MA.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-HW2MCEHM.mjs.map
1
+ import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-4YETXBJD.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-3JNON2SM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-OA5BWGGO.mjs";import{b as s}from"./chunk-6UIF2KFV.mjs";import{a as i}from"./chunk-WE7YOBO7.mjs";var a=({loginToken:t,version:r})=>{if(!t||!r)return null;let{ledgerWithUsernames:u}=s(r),e=i(t);if(e==null)return null;let n="Confirm Ledger Address",o="Authorise Authentication Token";if(u){let m=d(e.ttl);return{data:`${e.origin} for ${m}.`,confirmAddressText:n,authText:o}}return{data:t,confirmAddressText:n,authText:o}};export{a};
2
- //# sourceMappingURL=chunk-B2RDSGON.mjs.map
1
+ import{b as s}from"./chunk-6UIF2KFV.mjs";import{a as d}from"./chunk-OA5BWGGO.mjs";import{a as i}from"./chunk-WE7YOBO7.mjs";var a=({loginToken:t,version:r})=>{if(!t||!r)return null;let{ledgerWithUsernames:u}=s(r),e=i(t);if(e==null)return null;let n="Confirm Ledger Address",o="Authorise Authentication Token";if(u){let m=d(e.ttl);return{data:`${e.origin} for ${m}.`,confirmAddressText:n,authText:o}}return{data:t,confirmAddressText:n,authText:o}};export{a};
2
+ //# sourceMappingURL=chunk-3OKWBJFM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-4QA5GQQH.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
- //# sourceMappingURL=chunk-XGAMOGDQ.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-6L56KRO6.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
+ //# sourceMappingURL=chunk-3Z3DQFG6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as f}from"./chunk-RIQNG4I7.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=f(h),n=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>n.getCurrentBlockHash(),e=t?.latestBlockInfo;e||(e=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache}));let{hash:p,timestamp:c}=e,m=n.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${n.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:e})=>n.getToken(t,a,e),getTokenExpiration:l}};export{H as a};
2
- //# sourceMappingURL=chunk-TLKMUVQJ.mjs.map
1
+ import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as f}from"./chunk-RIQNG4I7.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=f(h),n=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>n.getCurrentBlockHash(),e=t?.latestBlockInfo;e||(e=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache}));let{hash:p,timestamp:c}=e,m=n.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${n.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:e})=>n.getToken(t,a,e),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-45WVS4H5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-UF45HLIK.mjs";import{a as f}from"./chunk-ISPRIGOE.mjs";import{a as u}from"./chunk-VDDXFGB2.mjs";import{b as I}from"./chunk-LNABNVAO.mjs";import{a as p}from"./chunk-WZ2DNB3R.mjs";import{a as T}from"./chunk-BRJNX4JF.mjs";import{a as c}from"./chunk-DBIIY2TX.mjs";var E=({transaction:t,address:e,explorerAddress:v,egldLabel:o,isPending:a=!1})=>{let{receiver:r,receiverAssets:n}=p(t),s=e===r,S=I({transaction:t,currentUserAddress:e,egldLabel:o,isPending:a}),i=g({userIsReceiver:r===e,transaction:t,egldLabel:o}),m=t.originalTxHash??t.txHash;return{asset:f({...t,transactionAssets:i,showDefaultState:a,status:t.status}),interactor:s?t.sender:r,interactorAsset:s?t.senderAssets?.iconSvg??t.senderAssets?.iconPng:n?.iconSvg??n?.iconPng,directionLabel:s?"From":"To",action:S,amount:u({transactionAssets:i,isIncomingTransaction:s}),hash:m,status:t.status,timestamp:t.timestamp,link:T({explorerAddress:v,to:c.transactionDetails(m)})}};export{E as a};
2
- //# sourceMappingURL=chunk-MNXYY4GE.mjs.map
1
+ import{b as I}from"./chunk-LNABNVAO.mjs";import{a as g}from"./chunk-QYYNCJPD.mjs";import{a as f}from"./chunk-ISPRIGOE.mjs";import{a as u}from"./chunk-VDDXFGB2.mjs";import{a as p}from"./chunk-WZ2DNB3R.mjs";import{a as T}from"./chunk-BRJNX4JF.mjs";import{a as c}from"./chunk-DBIIY2TX.mjs";var E=({transaction:t,address:e,explorerAddress:v,egldLabel:o,isPending:a=!1})=>{let{receiver:r,receiverAssets:n}=p(t),s=e===r,S=I({transaction:t,currentUserAddress:e,egldLabel:o,isPending:a}),i=g({userIsReceiver:r===e,transaction:t,egldLabel:o}),m=t.originalTxHash??t.txHash;return{asset:f({...t,transactionAssets:i,showDefaultState:a,status:t.status}),interactor:s?t.sender:r,interactorAsset:s?t.senderAssets?.iconSvg??t.senderAssets?.iconPng:n?.iconSvg??n?.iconPng,directionLabel:s?"From":"To",action:S,amount:u({transactionAssets:i,isIncomingTransaction:s}),hash:m,status:t.status,timestamp:t.timestamp,link:T({explorerAddress:v,to:c.transactionDetails(m)})}};export{E as a};
2
+ //# sourceMappingURL=chunk-4AOTLDWS.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as p}from"./chunk-YVD46DFI.mjs";import{b as m}from"./chunk-XW2GCCBZ.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-BSWV5MEC.mjs";import{a}from"./chunk-B3IKUIRK.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
2
- //# sourceMappingURL=chunk-XPEAEEAP.mjs.map
1
+ import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as p}from"./chunk-J4MZNYDR.mjs";import{b as m}from"./chunk-XW2GCCBZ.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-BSWV5MEC.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
2
+ //# sourceMappingURL=chunk-4I2FE6NE.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,f as l}from"./chunk-LTF535HP.mjs";import{f as a}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-DTI4TQ2I.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as g,b as c}from"./chunk-TYYA6E7F.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
- //# sourceMappingURL=chunk-ZLREP3MA.mjs.map
1
+ import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-LTF535HP.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-DTI4TQ2I.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as g,b as c}from"./chunk-TYYA6E7F.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
+ //# sourceMappingURL=chunk-4YETXBJD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as O}from"./chunk-6USJJJKT.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-73EXR25L.mjs";import{a as _}from"./chunk-PDT22D2C.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-FMUDQBZE.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as w}from"./chunk-CTMAC553.mjs";import{a as x}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-N2SRHMUK.mjs";import{a as G}from"./chunk-RYIJWGFA.mjs";import{p as h}from"./chunk-I6Y5E7TB.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-K3G3SPRT.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-7QCBLUWB.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=x({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=h().getType(),at=G(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=O(),pt=L({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
- //# sourceMappingURL=chunk-QH23KEBZ.mjs.map
1
+ import{a as O}from"./chunk-VK47SZJ2.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-73EXR25L.mjs";import{a as _}from"./chunk-PDT22D2C.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-FMUDQBZE.mjs";import{a as w}from"./chunk-CTMAC553.mjs";import{a as x}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-K7WAPWQA.mjs";import{a as G}from"./chunk-RYIJWGFA.mjs";import{p as h}from"./chunk-2G6DWPQU.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-K3G3SPRT.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-7QCBLUWB.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=x({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=h().getType(),at=G(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=O(),pt=L({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
+ //# sourceMappingURL=chunk-53BZNNVL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-XZVMG6ZI.mjs";import{d as C,e as I}from"./chunk-T4QYEID4.mjs";import{s as p}from"./chunk-ZLREP3MA.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
- //# sourceMappingURL=chunk-A7ZZJU5B.mjs.map
1
+ import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{d as C,e as I}from"./chunk-VQIWENYE.mjs";import{b}from"./chunk-35YS2DV5.mjs";import{s as p}from"./chunk-4YETXBJD.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
+ //# sourceMappingURL=chunk-55RBZAD6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-X6MN67NW.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{u as m}from"./chunk-ZLREP3MA.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
- //# sourceMappingURL=chunk-PRRE63HV.mjs.map
1
+ import{a as s}from"./chunk-X6MN67NW.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{u as m}from"./chunk-4YETXBJD.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
+ //# sourceMappingURL=chunk-5L474T4X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-YMKC64NV.mjs";import{a as x}from"./chunk-CUMDGAVL.mjs";import{a as B}from"./chunk-F7BK2C7W.mjs";import{a as b}from"./chunk-XDSRFSN7.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-ZMEIT65B.mjs";import{a as D}from"./chunk-QH23KEBZ.mjs";import{a as I}from"./chunk-PDT22D2C.mjs";import{a as j}from"./chunk-CTMAC553.mjs";import{a as _}from"./chunk-OWAQ72KE.mjs";import{u as A}from"./chunk-ZLREP3MA.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-K3G3SPRT.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=k(),g=v(A()),h=B(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=x.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
- //# sourceMappingURL=chunk-OO2WCABO.mjs.map
1
+ import{a as x}from"./chunk-IYS5W63R.mjs";import{a as k}from"./chunk-AC2L3PV3.mjs";import{a as B}from"./chunk-V7ZVI2WS.mjs";import{a as b}from"./chunk-M6IVW6AN.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-ZMEIT65B.mjs";import{a as D}from"./chunk-53BZNNVL.mjs";import{a as I}from"./chunk-PDT22D2C.mjs";import{a as j}from"./chunk-CTMAC553.mjs";import{a as _}from"./chunk-KY7KOSJJ.mjs";import{u as A}from"./chunk-4YETXBJD.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-K3G3SPRT.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=k(),g=v(A()),h=B(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=x.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-6BGPH7MV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-6HVXWGV7.mjs";import{a as h}from"./chunk-4HRKDTID.mjs";import{a as d}from"./chunk-PMEBJV22.mjs";import{a as p}from"./chunk-MNXYY4GE.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await T(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=p({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&h({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
- //# sourceMappingURL=chunk-4QA5GQQH.mjs.map
1
+ import{a as T}from"./chunk-CUSKOIRI.mjs";import{a as h}from"./chunk-YMUUG42I.mjs";import{a as d}from"./chunk-EVL6UUJJ.mjs";import{a as p}from"./chunk-4AOTLDWS.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await T(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=p({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&h({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
+ //# sourceMappingURL=chunk-6L56KRO6.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-4YETXBJD.mjs";import{b as t}from"./chunk-LTF535HP.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-AC2L3PV3.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as n}from"./chunk-IXBRSEAD.mjs";import{o as i}from"./chunk-I6Y5E7TB.mjs";import{u as e}from"./chunk-ZLREP3MA.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";async function d(){let r=t(e());if(!r)return;let o=await n.create({type:r});if(!o)throw new Error("Provider not found");i(o)}export{d as a};
2
- //# sourceMappingURL=chunk-4TH4J4EE.mjs.map
1
+ import{d as n}from"./chunk-F3AMNJ5K.mjs";import{o as i}from"./chunk-2G6DWPQU.mjs";import{u as e}from"./chunk-4YETXBJD.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";async function d(){let r=t(e());if(!r)return;let o=await n.create({type:r});if(!o)throw new Error("Provider not found");i(o)}export{d as a};
2
+ //# sourceMappingURL=chunk-AJJVMOJF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as D}from"./chunk-O6VPG7AF.mjs";import{a as m,b as p,c as s,d as c}from"./chunk-I2YHVWIX.mjs";import{a as f}from"./chunk-2AAKENSP.mjs";import{a as d}from"./chunk-6ZDBHK76.mjs";import{a as A}from"./chunk-YAO67FPP.mjs";import{a as V}from"./chunk-SNKFFCSF.mjs";import{a as k}from"./chunk-IXJOO5U4.mjs";import{a as l}from"./chunk-BXUBAIBU.mjs";import{c as o,f as i}from"./chunk-K3G3SPRT.mjs";import{a as u}from"./chunk-DBIIY2TX.mjs";import{b as T}from"./chunk-UQU2VWPJ.mjs";var H=({transaction:t,hideMultipleBadge:g})=>{if(t.action){if(p.includes(t.action.name))return l(t.value);if(s.includes(t.action.name))return V(t);if(m.includes(t.action.name))return A(t);if(c.includes(t.action.name))return k(t);let a=D(t);if(a.length){let e=a[0],I=Object.values(T).includes(e.type),r=!g&&a.length>1?f(a):"";if(I){let{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y}=d({token:e});return{nftValueData:{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y,transactionTokens:a,token:e,value:n!=null?e.value:null,decimals:n!=null?e.decimals:null,titleText:r}}}let x=e.value?i({input:e.value,decimals:e.decimals??o,digits:2,addCommas:!0}):null;return{tokenValueData:{tokenExplorerLink:u.tokenDetails(String(e.token)),showFormattedAmount:!1,tokenFormattedAmount:x,tokenLinkText:e.ticker,transactionTokens:a,token:e,value:e.value,decimals:e.decimals??o,titleText:r}}}}return l(t.value)};export{H as a};
2
- //# sourceMappingURL=chunk-YZLY7QNI.mjs.map
1
+ import{a as D}from"./chunk-O6VPG7AF.mjs";import{a as m,b as p,c as s,d as c}from"./chunk-I2YHVWIX.mjs";import{a as k}from"./chunk-IXJOO5U4.mjs";import{a as f}from"./chunk-2AAKENSP.mjs";import{a as d}from"./chunk-6ZDBHK76.mjs";import{a as A}from"./chunk-YAO67FPP.mjs";import{a as V}from"./chunk-SNKFFCSF.mjs";import{a as l}from"./chunk-BXUBAIBU.mjs";import{b as T}from"./chunk-UQU2VWPJ.mjs";import{c as o,f as i}from"./chunk-K3G3SPRT.mjs";import{a as u}from"./chunk-DBIIY2TX.mjs";var H=({transaction:t,hideMultipleBadge:g})=>{if(t.action){if(p.includes(t.action.name))return l(t.value);if(s.includes(t.action.name))return V(t);if(m.includes(t.action.name))return A(t);if(c.includes(t.action.name))return k(t);let a=D(t);if(a.length){let e=a[0],I=Object.values(T).includes(e.type),r=!g&&a.length>1?f(a):"";if(I){let{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y}=d({token:e});return{nftValueData:{badgeText:E,tokenFormattedAmount:n,tokenExplorerLink:_,tokenLinkText:y,transactionTokens:a,token:e,value:n!=null?e.value:null,decimals:n!=null?e.decimals:null,titleText:r}}}let x=e.value?i({input:e.value,decimals:e.decimals??o,digits:2,addCommas:!0}):null;return{tokenValueData:{tokenExplorerLink:u.tokenDetails(String(e.token)),showFormattedAmount:!1,tokenFormattedAmount:x,tokenLinkText:e.ticker,transactionTokens:a,token:e,value:e.value,decimals:e.decimals??o,titleText:r}}}}return l(t.value)};export{H as a};
2
+ //# sourceMappingURL=chunk-BEUXUWCR.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s,d as i,h as o}from"./chunk-I6Y5E7TB.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
- //# sourceMappingURL=chunk-XRCG3U3J.mjs.map
1
+ import{b as s,d as i,h as o}from"./chunk-2G6DWPQU.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
+ //# sourceMappingURL=chunk-BVKOA6WH.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-CO3V5DOG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-RIXZPR7R.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-CT6RFJJM.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-ZLREP3MA.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
- //# sourceMappingURL=chunk-6HVXWGV7.mjs.map
1
+ import{u as e}from"./chunk-4YETXBJD.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
+ //# sourceMappingURL=chunk-CUSKOIRI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-5AR7YU5K.mjs";import{a as l}from"./chunk-F7BK2C7W.mjs";import{a as f}from"./chunk-6USJJJKT.mjs";import{j as T,k as m,l as d,n as p}from"./chunk-65L5EBBL.mjs";import{a as u}from"./chunk-4QA5GQQH.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=f(),F=l();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await u({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=p(s),E=d(s),L=m(s),i=A||E||L,v=T(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
- //# sourceMappingURL=chunk-HEH5CYKF.mjs.map
1
+ import{a as I}from"./chunk-5AR7YU5K.mjs";import{a as l}from"./chunk-V7ZVI2WS.mjs";import{a as f}from"./chunk-VK47SZJ2.mjs";import{j as T,k as m,l as d,n as p}from"./chunk-65L5EBBL.mjs";import{a as u}from"./chunk-6L56KRO6.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=f(),F=l();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await u({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=p(s),E=d(s),L=m(s),i=A||E||L,v=T(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
2
+ //# sourceMappingURL=chunk-EPMXW255.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as n}from"./chunk-4YETXBJD.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var c=a=>t(`transaction-${a}`)(n().getState())??null;export{c as a};
2
+ //# sourceMappingURL=chunk-EVL6UUJJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-YRHMGKLM.mjs";import{a as ce}from"./chunk-IEJARRBP.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-ICVO7SST.mjs";import{a as R}from"./chunk-MHCIV2K5.mjs";import{a as ne}from"./chunk-NK6AUWSP.mjs";import{a as ie}from"./chunk-Y6A3NQHA.mjs";import{a as T}from"./chunk-2BJ6OPYI.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-YNQZ4KGU.mjs";import{a as p}from"./chunk-4KDUDO4R.mjs";import{a as ae}from"./chunk-OO2WCABO.mjs";import{a as se}from"./chunk-OWAQ72KE.mjs";import{a as ee}from"./chunk-FFNSZC37.mjs";import{a as re}from"./chunk-R3WRJYVR.mjs";import{b as $}from"./chunk-4Z3DZ2A3.mjs";import{e as f,f as Z}from"./chunk-FFHVVGYW.mjs";import{i as P,n as b,o as C,p as I}from"./chunk-I6Y5E7TB.mjs";import{g as J}from"./chunk-QD3CFFVT.mjs";import{a as Y}from"./chunk-FP5KY5UQ.mjs";import{a as Q}from"./chunk-WFUJNJVG.mjs";import{a as U,s as K,u as d}from"./chunk-ZLREP3MA.mjs";import{b as q,c as F,d as j}from"./chunk-IEJTMYFW.mjs";import{a as B}from"./chunk-LTF535HP.mjs";import{b as L,c as H}from"./chunk-SAAOQW7P.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{a as z}from"./chunk-VMFJUT3G.mjs";import{b as X}from"./chunk-C4CJOZ4L.mjs";import{a as c}from"./chunk-I7ODJJY3.mjs";import{a as o}from"./chunk-NHXPNROG.mjs";import{a as S}from"./chunk-7QCBLUWB.mjs";import{IframeLoginTypes as me}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!T())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw P({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await z(S),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,W=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let{providerType:i}=G(this.store.getState()),e=B(this.store.getState()).address;return!!(i===o.ledger&&e)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=$(d());if(!(!this.shouldCheckConnection()||i))try{await I().getProvider().getAddress()}catch{if(P({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.getLedgerAddress=async()=>this.shouldCheckConnection()?await I().getProvider().getAddress():void 0;this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new w({shouldInitProvider:!0});await i.init();let e=new b(i);i.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,P({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var _=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();this.setPopupConsent();try{let n=await this.provider.signTransactions(e)??[];return await se(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return this.setPopupConsent(),await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.setPopupConsent=()=>{let e=j(d());if(!this.provider)throw new Error("Provider is not initialized.");(e?.isBrowserWithPopupConfirmation||X)&&this.provider.setShouldShowConsentPopup(!0)};this.walletAddress=e?.walletAddress,this.provider=ee.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=L(d()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.setPopupConsent(),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var x=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ye.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var Pe={passkey:o.passkey,metamask:o.metamask},E=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=L(d());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return Pe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ge}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[f.CANCEL_ACTION,f.SIGN_LOGIN_TOKEN],O=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await z(S),await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods});this._approval=n,A.getInstance().updateData({wcURI:t})}async initWalletConnectManager(){if(!!T())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=T(),t=H(d());if(q(d())&&ve.push(f.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:v=>{}};try{let{walletConnectV2ProjectId:v,walletConnectV2Options:N={},walletConnectV2RelayAddress:D=""}=e,y=new Z(h,t,D,v,N);return await y.init(),{walletConnectProvider:y,dappMethods:ve}}catch(v){throw console.error("Unable to connect",v),r&&await this.logout(),v}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=A.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods});t.updateData({wcURI:n});let l=await this.provider.login({approval:s,token:e?.token}),{address:m="",signature:h=""}=l??{};return t.handleClose({isLoginFinished:!!m}),{address:m,signature:h}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var M=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new x;break}case o.crossWindow:{r=new _;break}case o.ledger:{r=new w({anchor:e}),await W.getInstance().init();break}case o.metamask:{r=new E({type:me.metamask});break}case o.passkey:{r=new E({type:me.passkey});break}case o.walletConnect:{let s=F(d());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new O({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=Y();for(let l of this._customProviders)l.type===i&&(r=await l.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new b(r);C(t),U(i);let n=i in[o.crossWindow,o.metamask,o.passkey];return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){I().cancelLogin(),C(null),U(o.none)}};M._customProviders=[];var Ie=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:l,onClose:m}=await re({cancelAction:e}),h=Object.values(M.customProviders),v=h.reduce((u,V)=>(u[V.type]=V.name,u),{}),N={...c,...v},D=async()=>{await m({shouldCancelAction:!0}),s({message:"Signing canceled"})};l.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ie(h,r)?r:o.none;l.updateData({name:N[y],type:y});try{let u=await i(a);n(u)}catch(u){await m({shouldCancelAction:!0}),s(u)}finally{l.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,w as b,W as c,M as d,g as e,_ as f,x as g,E as h,O as i};
2
- //# sourceMappingURL=chunk-IXBRSEAD.mjs.map
1
+ import{a as A}from"./chunk-YRHMGKLM.mjs";import{a as ce}from"./chunk-IEJARRBP.mjs";import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as oe}from"./chunk-G7XIDD62.mjs";import{a as R}from"./chunk-MHCIV2K5.mjs";import{a as ne}from"./chunk-QFWMIF3L.mjs";import{a as ie}from"./chunk-OOPHCYRC.mjs";import{a as T}from"./chunk-M7R5JSEH.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as le}from"./chunk-V7QVBIYB.mjs";import{a as p}from"./chunk-Y574J2OK.mjs";import{a as re}from"./chunk-HR6GP43Q.mjs";import{a as ae}from"./chunk-6BGPH7MV.mjs";import{a as se}from"./chunk-KY7KOSJJ.mjs";import{a as ee}from"./chunk-FFNSZC37.mjs";import{b as $}from"./chunk-4Z3DZ2A3.mjs";import{e as f,f as Z}from"./chunk-FFHVVGYW.mjs";import{i as P,n as b,o as C,p as I}from"./chunk-2G6DWPQU.mjs";import{g as J}from"./chunk-QD3CFFVT.mjs";import{a as Y}from"./chunk-OH6SHSQZ.mjs";import{a as Q}from"./chunk-SKEL25G3.mjs";import{a as U,s as K,u as d}from"./chunk-4YETXBJD.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as q,c as F,d as j}from"./chunk-IEJTMYFW.mjs";import{a as B}from"./chunk-LTF535HP.mjs";import{b as L,c as H}from"./chunk-SAAOQW7P.mjs";import{a as z}from"./chunk-VMFJUT3G.mjs";import{a as c}from"./chunk-I7ODJJY3.mjs";import{b as X}from"./chunk-C4CJOZ4L.mjs";import{a as o}from"./chunk-NHXPNROG.mjs";import{a as S}from"./chunk-7QCBLUWB.mjs";import{IframeLoginTypes as me}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!T())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ae({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await pe({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw P({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await z(S),await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ne({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,W=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let{providerType:i}=G(this.store.getState()),e=B(this.store.getState()).address;return!!(i===o.ledger&&e)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=$(d());if(!(!this.shouldCheckConnection()||i))try{await I().getProvider().getAddress()}catch{if(P({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.getLedgerAddress=async()=>this.shouldCheckConnection()?await I().getProvider().getAddress():void 0;this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new w({shouldInitProvider:!0});await i.init();let e=new b(i);i.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,P({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var _=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();this.setPopupConsent();try{let n=await this.provider.signTransactions(e)??[];return await se(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return this.setPopupConsent(),await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.setPopupConsent=()=>{let e=j(d());if(!this.provider)throw new Error("Provider is not initialized.");(e?.isBrowserWithPopupConfirmation||X)&&this.provider.setShouldShowConsentPopup(!0)};this.walletAddress=e?.walletAddress,this.provider=ee.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=L(d()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.setPopupConsent(),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ye}from"@multiversx/sdk-extension-provider/out/extensionProvider";var x=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ye.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var Pe={passkey:o.passkey,metamask:o.metamask},E=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=L(d());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return Pe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ge}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[f.CANCEL_ACTION,f.SIGN_LOGIN_TOKEN],O=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION}),n}finally{r.closeUI()}};this.cancelAction=async()=>{await this.sendCustomRequest({method:f.CANCEL_ACTION,action:ge.CANCEL_ACTION})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await z(S),await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods});this._approval=n,A.getInstance().updateData({wcURI:t})}async initWalletConnectManager(){if(!!T())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=T(),t=H(d());if(q(d())&&ve.push(f.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:v=>{}};try{let{walletConnectV2ProjectId:v,walletConnectV2Options:N={},walletConnectV2RelayAddress:D=""}=e,y=new Z(h,t,D,v,N);return await y.init(),{walletConnectProvider:y,dappMethods:ve}}catch(v){throw console.error("Unable to connect",v),r&&await this.logout(),v}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=A.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods});t.updateData({wcURI:n});let l=await this.provider.login({approval:s,token:e?.token}),{address:m="",signature:h=""}=l??{};return t.handleClose({isLoginFinished:!!m}),{address:m,signature:h}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var M=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new x;break}case o.crossWindow:{r=new _;break}case o.ledger:{r=new w({anchor:e}),await W.getInstance().init();break}case o.metamask:{r=new E({type:me.metamask});break}case o.passkey:{r=new E({type:me.passkey});break}case o.walletConnect:{let s=F(d());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new O({anchor:e,...s});break}case o.webview:{r=new le;break}default:{let s=Y();for(let l of this._customProviders)l.type===i&&(r=await l.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new b(r);C(t),U(i);let n=i in[o.crossWindow,o.metamask,o.passkey];return ce(n?{skipLoginMethod:i}:null),t}static async destroy(){I().cancelLogin(),C(null),U(o.none)}};M._customProviders=[];var Ie=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:l,onClose:m}=await re({cancelAction:e}),h=Object.values(M.customProviders),v=h.reduce((u,V)=>(u[V.type]=V.name,u),{}),N={...c,...v},D=async()=>{await m({shouldCancelAction:!0}),s({message:"Signing canceled"})};l.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let y=Ie(h,r)?r:o.none;l.updateData({name:N[y],type:y});try{let u=await i(a);n(u)}catch(u){await m({shouldCancelAction:!0}),s(u)}finally{l.closeUI()}})}async function pe({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{pe as a,w as b,W as c,M as d,g as e,_ as f,x as g,E as h,O as i};
2
+ //# sourceMappingURL=chunk-F3AMNJ5K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-MHCIV2K5.mjs";import{a as s}from"./chunk-PMA364GM.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-6USJJJKT.mjs";import{b as I}from"./chunk-T4QYEID4.mjs";import{g as p}from"./chunk-ZLREP3MA.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-NHXPNROG.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:L({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),I({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-ICVO7SST.mjs.map
1
+ import{a as A}from"./chunk-MHCIV2K5.mjs";import{a as s}from"./chunk-GVKHWWIS.mjs";import{a as h}from"./chunk-3OKWBJFM.mjs";import{a as k}from"./chunk-VK47SZJ2.mjs";import{b as I}from"./chunk-VQIWENYE.mjs";import{g as p}from"./chunk-4YETXBJD.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-NHXPNROG.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:L({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),I({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-G7XIDD62.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-BXQVIW3W.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-K3G3SPRT.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
- //# sourceMappingURL=chunk-PMA364GM.mjs.map
1
+ import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-VPZ3QEMD.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-K3G3SPRT.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
+ //# sourceMappingURL=chunk-GVKHWWIS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PEF2OHNN.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
- //# sourceMappingURL=chunk-G2NPJFHA.mjs.map
1
+ import{a as e}from"./chunk-JENO4O6P.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
+ //# sourceMappingURL=chunk-GZAY7BOI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-R7N7SVGB.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
- //# sourceMappingURL=chunk-R3WRJYVR.mjs.map
1
+ import{a as e}from"./chunk-2KAOFKX4.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
+ //# sourceMappingURL=chunk-HR6GP43Q.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-IXBRSEAD.mjs";import{a as p}from"./chunk-V45NSWVD.mjs";import{u as c}from"./chunk-ZLREP3MA.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-I7ODJJY3.mjs";import{a}from"./chunk-NHXPNROG.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
- //# sourceMappingURL=chunk-SI4DMR7C.mjs.map
1
+ import{d as s}from"./chunk-F3AMNJ5K.mjs";import{a as p}from"./chunk-YWBC3WTI.mjs";import{u as c}from"./chunk-4YETXBJD.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-I7ODJJY3.mjs";import{a}from"./chunk-NHXPNROG.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
+ //# sourceMappingURL=chunk-IJEPA3W2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-V45NSWVD.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-CUMDGAVL.mjs.map
1
+ import{a as s}from"./chunk-YWBC3WTI.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-IYS5W63R.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-RYIJWGFA.mjs";import{a}from"./chunk-HWJQUOPL.mjs";import{a as i}from"./chunk-LETBBKOK.mjs";var u=t=>{let r=i(t),{failed:e,invalid:s,pending:c}=a(t),o="";e?o="faTimes":s?o="faBan":c&&(o="faHourglass");let f=(e||s)&&r.length>0?r.join(","):"",T=`${n(t.status)} ${f}`;return{icon:o,tooltip:T}};export{u as a};
2
- //# sourceMappingURL=chunk-YVD46DFI.mjs.map
1
+ import{a as n}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-LETBBKOK.mjs";import{a}from"./chunk-HWJQUOPL.mjs";var u=t=>{let r=i(t),{failed:e,invalid:s,pending:c}=a(t),o="";e?o="faTimes":s?o="faBan":c&&(o="faHourglass");let f=(e||s)&&r.length>0?r.join(","):"",T=`${n(t.status)} ${f}`;return{icon:o,tooltip:T}};export{u as a};
2
+ //# sourceMappingURL=chunk-J4MZNYDR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-N2SRHMUK.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
- //# sourceMappingURL=chunk-FFFC4KOM.mjs.map
1
+ import{a as l}from"./chunk-K7WAPWQA.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var f=async({receiver:n,sender:i,tokenId:s})=>{let t=null,r=null;if(!s)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await l({tokenId:s}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(i===e&&(t=e),n===e&&(r=e)),c(o[e])&&(i===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{f as a};
2
+ //# sourceMappingURL=chunk-J7MZZ2X2.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as r}from"./chunk-ZLREP3MA.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-PEF2OHNN.mjs.map
1
+ import{u as r}from"./chunk-4YETXBJD.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-JENO4O6P.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-W4GE4ZDP.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
- //# sourceMappingURL=chunk-G2DLIXFQ.mjs.map
1
+ import{a as t}from"./chunk-PRULMJH7.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
+ //# sourceMappingURL=chunk-K3WBBSXJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-HBQQS6GA.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{u as m}from"./chunk-ZLREP3MA.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-N2SRHMUK.mjs.map
1
+ import{a as g}from"./chunk-HBQQS6GA.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";import{u as m}from"./chunk-4YETXBJD.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-K7WAPWQA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-JR3FBBRR.mjs";import{u as s}from"./chunk-ZLREP3MA.mjs";import{e as a}from"./chunk-LTF535HP.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
2
- //# sourceMappingURL=chunk-264GC7EP.mjs.map
1
+ import{a as u}from"./chunk-JR3FBBRR.mjs";import{u as s}from"./chunk-4YETXBJD.mjs";import{e as a}from"./chunk-LTF535HP.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
2
+ //# sourceMappingURL=chunk-KUQH2ZBR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-FKBLKOLI.mjs";import{a as s}from"./chunk-SPSO2A53.mjs";import{a as t}from"./chunk-FSVV6MTL.mjs";import{u as n}from"./chunk-ZLREP3MA.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
- //# sourceMappingURL=chunk-OWAQ72KE.mjs.map
1
+ import{a}from"./chunk-FKBLKOLI.mjs";import{a as s}from"./chunk-SPSO2A53.mjs";import{a as t}from"./chunk-P5YASUQH.mjs";import{u as n}from"./chunk-4YETXBJD.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
+ //# sourceMappingURL=chunk-KY7KOSJJ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as g}from"./chunk-PSJI2G34.mjs";import{a as i}from"./chunk-2CG6PNPJ.mjs";import{a as c}from"./chunk-FROSOADM.mjs";import{a as d}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as p,b as e}from"./chunk-HDRB2QL6.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(c)),t.get(`${e.apiAddress}/network/config`,s(i)),t.get(`https://${o.url}/socket.io/`,s(g)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(d))],P=u(...k);export{t as a,s as b,P as c};
2
+ //# sourceMappingURL=chunk-LJ5JGAYL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-YZLY7QNI.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as k}from"./chunk-FFFC4KOM.mjs";import{a as m}from"./chunk-XPEAEEAP.mjs";import{a as l}from"./chunk-QQ4OPT5A.mjs";import{c as d}from"./chunk-K3G3SPRT.mjs";import{a as o}from"./chunk-BSWV5MEC.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
- //# sourceMappingURL=chunk-V7JEC6M7.mjs.map
1
+ import{a as T}from"./chunk-BEUXUWCR.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as k}from"./chunk-J7MZZ2X2.mjs";import{a as m}from"./chunk-4I2FE6NE.mjs";import{a as l}from"./chunk-QQ4OPT5A.mjs";import{c as d}from"./chunk-K3G3SPRT.mjs";import{a as o}from"./chunk-BSWV5MEC.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
+ //# sourceMappingURL=chunk-LKWCLZTU.mjs.map
@@ -1,2 +1,2 @@
1
- import{p as n}from"./chunk-I6Y5E7TB.mjs";import{a as i}from"./chunk-NHXPNROG.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-XDSRFSN7.mjs.map
1
+ import{p as n}from"./chunk-2G6DWPQU.mjs";import{a as i}from"./chunk-NHXPNROG.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-M6IVW6AN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-4YETXBJD.mjs";import{f as t}from"./chunk-LTF535HP.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-M7R5JSEH.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-X5OSPJKQ.mjs";import{b as s}from"./chunk-JR3FBBRR.mjs";import{u as n}from"./chunk-4YETXBJD.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
2
+ //# sourceMappingURL=chunk-MAT2WHLY.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./chunk-4YETXBJD.mjs";import{c as r}from"./chunk-LTF535HP.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-OH6SHSQZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-QD3CFFVT.mjs";import{u as e}from"./chunk-ZLREP3MA.mjs";import{a as n}from"./chunk-LTF535HP.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
- //# sourceMappingURL=chunk-QREEUQEX.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-QD3CFFVT.mjs";import{u as e}from"./chunk-4YETXBJD.mjs";import{a as n}from"./chunk-LTF535HP.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
+ //# sourceMappingURL=chunk-OLYQNOEP.mjs.map