@aurora-is-near/intents-swap-widget 3.15.3 → 3.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/components/TokenIcon.d.ts +5 -12
  2. package/dist/components/TokenIcon.js +34 -32
  3. package/dist/components/TokenIcon.js.map +1 -1
  4. package/dist/{config-DKdwFIJc.js → config-DJ258QoC.js} +752 -757
  5. package/dist/config-DJ258QoC.js.map +1 -0
  6. package/dist/config.d.ts +1 -1
  7. package/dist/config.js +1 -1
  8. package/dist/constants/chains.d.ts +0 -1
  9. package/dist/constants/chains.js +44 -65
  10. package/dist/constants/chains.js.map +1 -1
  11. package/dist/constants/tokens.d.ts +1 -1
  12. package/dist/constants/tokens.js +3 -50
  13. package/dist/constants/tokens.js.map +1 -1
  14. package/dist/errors.js +1 -1
  15. package/dist/ext/alchemy/index.js +1 -1
  16. package/dist/ext/index.js +1 -1
  17. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  18. package/dist/features/BalanceRpcLoader/index.js +1 -1
  19. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  20. package/dist/features/ChainsDropdown/index.js +32 -32
  21. package/dist/features/ChainsDropdown/index.js.map +1 -1
  22. package/dist/features/DepositMethodSwitcher.js +1 -1
  23. package/dist/features/ErrorBoundary.js +1 -1
  24. package/dist/features/ExternalDeposit.js +1 -1
  25. package/dist/features/SendAddress/index.js +1 -1
  26. package/dist/features/SendAddress/useNotification.js +1 -1
  27. package/dist/features/SubmitButton/index.js +1 -1
  28. package/dist/features/SuccessScreen/index.js +1 -1
  29. package/dist/features/SwapDirectionSwitcher.js +1 -1
  30. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  31. package/dist/features/SwapQuote/index.js +1 -1
  32. package/dist/features/TokenInput/TokenInput.js +1 -1
  33. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  34. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  35. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  36. package/dist/features/TokenInput/WalletBalance.js +1 -1
  37. package/dist/features/TokenInput/hooks/index.js +1 -1
  38. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  39. package/dist/features/TokenInput/index.js +1 -1
  40. package/dist/features/TokensList/TokenItem.js +1 -1
  41. package/dist/features/TokensList/TokensList.js +1 -1
  42. package/dist/features/TokensList/index.js +1 -1
  43. package/dist/features/TokensModal.js +1 -1
  44. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  45. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  46. package/dist/features/index.js +1 -1
  47. package/dist/hooks/index.js +1 -1
  48. package/dist/hooks/useAllTokens.js +1 -1
  49. package/dist/hooks/useChains.js +1 -1
  50. package/dist/hooks/useCompatibilityCheck.js +1 -1
  51. package/dist/hooks/useDefaultToken.js +1 -1
  52. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  53. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  54. package/dist/hooks/useIntentsBalance.js +1 -1
  55. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  56. package/dist/hooks/useMakeDepositAddress.js +1 -1
  57. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  58. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  59. package/dist/hooks/useMakeQuote.js +1 -1
  60. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  61. package/dist/hooks/useMakeTransfer.js +1 -1
  62. package/dist/hooks/useMergedBalance.js +1 -1
  63. package/dist/hooks/useSwitchChain.js +1 -1
  64. package/dist/hooks/useTheme.js +1 -1
  65. package/dist/hooks/useToggleTheme.js +19 -21
  66. package/dist/hooks/useToggleTheme.js.map +1 -1
  67. package/dist/hooks/useTokenInputPair.js +1 -1
  68. package/dist/hooks/useTokens.js +2 -2
  69. package/dist/hooks/useTokensFiltered.js +1 -1
  70. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  71. package/dist/icons/index.d.ts +4 -0
  72. package/dist/icons/index.js +392 -0
  73. package/dist/icons/index.js.map +1 -0
  74. package/dist/index.js +1 -1
  75. package/dist/machine/effects/index.js +1 -1
  76. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  77. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  78. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  79. package/dist/machine/effects/useSelectedTokensEffect.d.ts +0 -2
  80. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  81. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  82. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  83. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  84. package/dist/machine/events/index.js +1 -1
  85. package/dist/machine/events/tokenSelect.js +1 -1
  86. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  87. package/dist/machine/events/validateInputs.js +1 -1
  88. package/dist/machine/index.js +1 -1
  89. package/dist/machine/snap.d.ts +0 -18
  90. package/dist/machine/snap.js +1 -1
  91. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  92. package/dist/machine/subscriptions/index.js +1 -1
  93. package/dist/theme/ThemeProvider.js +3 -4
  94. package/dist/theme/ThemeProvider.js.map +1 -1
  95. package/dist/types/chain.d.ts +0 -1
  96. package/dist/types/config.d.ts +1 -1
  97. package/dist/types/token.d.ts +0 -1
  98. package/dist/utils/intents/signers/near.js +1 -1
  99. package/dist/utils/intents/signers/privy.js +1 -1
  100. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  101. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  102. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  103. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  104. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  105. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  106. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  107. package/package.json +1 -1
  108. package/src/components/TokenIcon.tsx +35 -38
  109. package/src/config.tsx +0 -2
  110. package/src/constants/chains.ts +0 -23
  111. package/src/constants/tokens.ts +1 -48
  112. package/src/features/ChainsDropdown/index.tsx +5 -5
  113. package/src/features/TokenInput/TokenInput.tsx +1 -1
  114. package/src/features/TokensList/TokenItem.tsx +1 -1
  115. package/src/hooks/useToggleTheme.ts +23 -27
  116. package/src/hooks/useTokens.ts +1 -8
  117. package/src/icons/abg.svg +11 -0
  118. package/src/icons/arb.svg +22 -0
  119. package/src/icons/aster.svg +1 -0
  120. package/src/icons/aurora.svg +14 -0
  121. package/src/icons/avax.svg +12 -0
  122. package/src/icons/base.svg +11 -0
  123. package/src/icons/bera.svg +20 -0
  124. package/src/icons/bsc.svg +14 -0
  125. package/src/icons/btc.svg +11 -0
  126. package/src/icons/cardano.svg +40 -0
  127. package/src/icons/doge.svg +15 -0
  128. package/src/icons/eth.svg +16 -0
  129. package/src/icons/frax.svg +26 -0
  130. package/src/icons/gnear.svg +1 -0
  131. package/src/icons/gnosis.svg +16 -0
  132. package/src/icons/index.tsx +111 -0
  133. package/src/icons/itlx.svg +12 -0
  134. package/src/icons/jambo.svg +10 -0
  135. package/src/icons/knc.svg +1 -0
  136. package/src/icons/loud.svg +7 -0
  137. package/src/icons/ltc.svg +1 -0
  138. package/src/icons/mon.svg +1 -0
  139. package/src/icons/mpdao.svg +1 -0
  140. package/src/icons/near.svg +16 -0
  141. package/src/icons/noear.svg +10 -0
  142. package/src/icons/op.svg +12 -0
  143. package/src/icons/pol.svg +11 -0
  144. package/src/icons/public.svg +1 -0
  145. package/src/icons/purge.svg +10 -0
  146. package/src/icons/rhea.svg +10 -0
  147. package/src/icons/sol.svg +21 -0
  148. package/src/icons/sui.svg +16 -0
  149. package/src/icons/ton.svg +11 -0
  150. package/src/icons/tron.svg +11 -0
  151. package/src/icons/unknown.svg +4 -0
  152. package/src/icons/usd1.svg +10 -0
  153. package/src/icons/usdf.svg +10 -0
  154. package/src/icons/wif.svg +10 -0
  155. package/src/icons/xdai.svg +22 -0
  156. package/src/icons/xrp.svg +17 -0
  157. package/src/icons/zec.svg +16 -0
  158. package/src/theme/ThemeProvider.tsx +8 -11
  159. package/src/types/chain.ts +0 -1
  160. package/src/types/config.ts +1 -1
  161. package/src/types/token.ts +0 -1
  162. package/dist/config-DKdwFIJc.js.map +0 -1
@@ -1,262 +1,260 @@
1
- import { p as st } from "./index-xuotMAFm.js";
2
- import { jsx as o, jsxs as T, Fragment as Bt } from "react/jsx-runtime";
3
- import qt from "i18next";
1
+ import { p as tt } from "./index-xuotMAFm.js";
2
+ import { jsx as o, jsxs as h, Fragment as Ft } from "react/jsx-runtime";
3
+ import Lt from "i18next";
4
4
  import { deepClone as pe } from "valtio/utils";
5
- import { snapshot as Se, useSnapshot as oe, proxy as rt } from "valtio";
6
- import { HelmetProvider as Ut, Helmet as Pt } from "react-helmet-async";
7
- import { memo as Wt, useEffect as C, useMemo as v, useRef as Y, useCallback as he, useState as re, useId as Mt, Fragment as Vt, createContext as at, useContext as Qt } from "react";
8
- import { useQuery as _e, useInfiniteQuery as $t, useQueryClient as Kt, QueryClient as Ht, QueryClientProvider as Gt } from "@tanstack/react-query";
9
- import { Trans as jt, I18nextProvider as zt } from "react-i18next";
10
- import { useTypedTranslation as V, initLocalisation as Yt } from "./localisation.js";
5
+ import { snapshot as Ne, useSnapshot as oe, proxy as nt } from "valtio";
6
+ import { HelmetProvider as Bt, Helmet as qt } from "react-helmet-async";
7
+ import { memo as Ut, useEffect as R, useMemo as v, useRef as Y, useCallback as Te, useState as re, useId as Pt, Fragment as Wt, createContext as st, useContext as Mt } from "react";
8
+ import { useQuery as _e, useInfiniteQuery as Vt, useQueryClient as Qt, QueryClient as $t, QueryClientProvider as Kt } from "@tanstack/react-query";
9
+ import { Trans as Ht, I18nextProvider as Gt } from "react-i18next";
10
+ import { useTypedTranslation as V, initLocalisation as jt } from "./localisation.js";
11
11
  import { logger as b } from "./logger.js";
12
- import { getTonTokenBalance as Zt } from "./utils/ton/getTonTokenBalance.js";
13
- import { getSolanaTokenBalance as Xt } from "./utils/solana/getSolanaTokenBalance.js";
14
- import { useWalletAddressForToken as ot } from "./hooks/useWalletAddressForToken.js";
12
+ import { getTonTokenBalance as zt } from "./utils/ton/getTonTokenBalance.js";
13
+ import { getSolanaTokenBalance as Yt } from "./utils/solana/getSolanaTokenBalance.js";
14
+ import { useWalletAddressForToken as rt } from "./hooks/useWalletAddressForToken.js";
15
15
  import "@headlessui/react";
16
16
  import "framer-motion";
17
17
  import "lucide-react";
18
18
  import "./features/ChainsDropdown/ChainItem.js";
19
19
  import { cn as H } from "./utils/cn.js";
20
- import { OneClickService as Jt, QuoteRequest as U, GetExecutionStatusResponse as ee } from "@defuse-protocol/one-click-sdk-typescript";
21
- import { CHAINS_LIST as ye, DEFAULT_CHAIN_ICON as en, DEFAULT_CHAINS_ORDER as it, CHAIN_POA_MAP as ct, POA_EVM_CHAIN_ID as lt, CHAIN_BASE_TOKENS as tn, EVM_CHAIN_IDS_MAP as Te, CHAIN_IDS_MAP as nn, EVM_CHAINS as sn } from "./constants/chains.js";
20
+ import { OneClickService as Zt, QuoteRequest as U, GetExecutionStatusResponse as ee } from "@defuse-protocol/one-click-sdk-typescript";
21
+ import { CHAINS_LIST as at, DEFAULT_CHAINS_ORDER as ot, CHAIN_POA_MAP as it, POA_EVM_CHAIN_ID as lt, CHAIN_BASE_TOKENS as Xt, EVM_CHAIN_IDS_MAP as he, CHAIN_IDS_MAP as Jt, EVM_CHAINS as en } from "./constants/chains.js";
22
22
  import "use-debounce";
23
- import { derive as rn } from "derive-valtio";
24
- import { getIsNativeNearDeposit as an } from "./machine/computed/getIsNativeNearDeposit.js";
25
- import { getIsDirectTokenOnNearDeposit as on } from "./machine/computed/getIsDirectTokenOnNearDeposit.js";
23
+ import { derive as tn } from "derive-valtio";
24
+ import { getIsNativeNearDeposit as nn } from "./machine/computed/getIsNativeNearDeposit.js";
25
+ import { getIsDirectTokenOnNearDeposit as sn } from "./machine/computed/getIsDirectTokenOnNearDeposit.js";
26
26
  import "ethers";
27
27
  import { moveTo as O, machine as Z } from "./machine/machine.js";
28
- import cn from "lodash.once";
28
+ import rn from "lodash.once";
29
29
  import { guardStates as D } from "./machine/guards/index.js";
30
- import { parse as ln } from "./ext/alchemy/parse.js";
31
- import { createLoader as dn } from "./ext/alchemy/load.js";
32
- import { isAlchemySupportedChain as un } from "./ext/alchemy/types.js";
30
+ import { parse as an } from "./ext/alchemy/parse.js";
31
+ import { createLoader as on } from "./ext/alchemy/load.js";
32
+ import { isAlchemySupportedChain as ln } from "./ext/alchemy/types.js";
33
33
  import { fireEvent as p } from "./machine/events/utils/fireEvent.js";
34
- import { NATIVE_NEAR_DUMB_ASSET_ID as $, TOKENS_DATA as be, WNEAR_ASSET_ID as ge } from "./constants/tokens.js";
35
- import { isValidChain as mn } from "./utils/checkers/isValidChain.js";
36
- import { useWalletBalance as Ee } from "./hooks/useWalletBalance.js";
34
+ import { NATIVE_NEAR_DUMB_ASSET_ID as $, TOKENS_DATA as ye, WNEAR_ASSET_ID as ge } from "./constants/tokens.js";
35
+ import { isValidChain as cn } from "./utils/checkers/isValidChain.js";
36
+ import { useWalletBalance as be } from "./hooks/useWalletBalance.js";
37
37
  import { getIntentsAccountId as te } from "./utils/intents/getIntentsAccountId.js";
38
- import { getIntentsBalances as fn } from "./utils/intents/getIntentsBalance.js";
39
- import { notReachable as Ce } from "./utils/notReachable.js";
38
+ import { getIntentsBalances as dn } from "./utils/intents/getIntentsBalance.js";
39
+ import { notReachable as Ee } from "./utils/notReachable.js";
40
40
  import { getTokenBalanceKey as G } from "./utils/intents/getTokenBalanceKey.js";
41
41
  import { isDryQuote as Re } from "./machine/guards/checks/isDryQuote.js";
42
- import { snakeCase as dt } from "change-case";
43
- import pn, { CanceledError as ut, AxiosError as mt } from "axios";
44
- import { oneClickApi as Ie, bridgeApi as ft } from "./network.js";
42
+ import { snakeCase as ct } from "change-case";
43
+ import un, { CanceledError as dt, AxiosError as ut } from "axios";
44
+ import { oneClickApi as Ie, bridgeApi as mt } from "./network.js";
45
45
  import { formatBigToHuman as j } from "./utils/formatters/formatBigToHuman.js";
46
- import { getDryQuoteAddress as Pe } from "./utils/getDryQuoteAddress.js";
46
+ import { getDryQuoteAddress as Ue } from "./utils/getDryQuoteAddress.js";
47
47
  import { isEvmChain as Q } from "./utils/evm/isEvmChain.js";
48
- import { checkNearAccountExists as hn } from "./utils/near/checkNearAccountExists.js";
48
+ import { checkNearAccountExists as mn } from "./utils/near/checkNearAccountExists.js";
49
49
  import { isNotEmptyAmount as ne } from "./utils/checkers/isNotEmptyAmount.js";
50
- import { isValidBigint as pt } from "./utils/checkers/isValidBigint.js";
51
- import { isNearAddress as ht } from "./utils/near/isNearAddress.js";
52
- import { isBalanceSufficient as ve } from "./machine/guards/checks/isBalanceSufficient.js";
53
- import { isQuoteError as De, isTransferError as xe, isAsyncSendAddressValidationError as Tn } from "./machine/errors.js";
50
+ import { isValidBigint as ft } from "./utils/checkers/isValidBigint.js";
51
+ import { isNearAddress as pt } from "./utils/near/isNearAddress.js";
52
+ import { isBalanceSufficient as Ce } from "./machine/guards/checks/isBalanceSufficient.js";
53
+ import { isQuoteError as ve, isTransferError as De, isAsyncSendAddressValidationError as fn } from "./machine/errors.js";
54
54
  import { isSolanaAddress as Tt } from "./utils/solana/isSolanaAddress.js";
55
- import { isEvmAddress as gt } from "./utils/evm/isEvmAddress.js";
56
- import { getMainTokenByChain as gn } from "./utils/tokens/getMainTokenByChain.js";
57
- import { getDefaultIntentsToken as In } from "./utils/tokens/getDefaultIntentsToken.js";
58
- import { getTokenWithHighBalance as wn } from "./utils/tokens/getTokenWithHighBalance.js";
59
- import { isQuoteIdle as kn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
60
- import { isInputChanged as An } from "./machine/subscriptions/checkers/isInputChanged.js";
61
- import { isErrorChanged as Nn } from "./machine/subscriptions/checkers/isErrorChanged.js";
62
- import { isOnlyErrorChanged as Sn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
63
- import { isValidInitialState as _n } from "./machine/subscriptions/checkers/isValidInitialState.js";
64
- import { isWalletDisconnected as yn } from "./machine/subscriptions/checkers/isWalletDisconnected.js";
65
- import { isSendAddressForbidden as bn } from "./machine/subscriptions/checkers/isSendAddressForbidden.js";
66
- import { isAmountChangedFromQuote as En } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
67
- import { reset as Cn } from "./machine/events/reset.js";
55
+ import { isEvmAddress as ht } from "./utils/evm/isEvmAddress.js";
56
+ import { getMainTokenByChain as pn } from "./utils/tokens/getMainTokenByChain.js";
57
+ import { getDefaultIntentsToken as Tn } from "./utils/tokens/getDefaultIntentsToken.js";
58
+ import { getTokenWithHighBalance as hn } from "./utils/tokens/getTokenWithHighBalance.js";
59
+ import { isQuoteIdle as gn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
60
+ import { isInputChanged as In } from "./machine/subscriptions/checkers/isInputChanged.js";
61
+ import { isErrorChanged as wn } from "./machine/subscriptions/checkers/isErrorChanged.js";
62
+ import { isOnlyErrorChanged as kn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
63
+ import { isValidInitialState as An } from "./machine/subscriptions/checkers/isValidInitialState.js";
64
+ import { isWalletDisconnected as Sn } from "./machine/subscriptions/checkers/isWalletDisconnected.js";
65
+ import { isSendAddressForbidden as Nn } from "./machine/subscriptions/checkers/isSendAddressForbidden.js";
66
+ import { isAmountChangedFromQuote as _n } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
67
+ import { reset as yn } from "./machine/events/reset.js";
68
68
  import { tokenSelectRotate as we } from "./machine/events/tokenSelectRotate.js";
69
- import { errorSet as Rn } from "./machine/events/errorSet.js";
70
- import { quoteSet as vn } from "./machine/events/quoteSet.js";
71
- import { addressSet as Dn } from "./machine/events/addressSet.js";
72
- import { tokenSetAmount as xn } from "./machine/events/tokenSetAmount.js";
73
- import { quoteSetStatus as On } from "./machine/events/quoteSetStatus.js";
74
- import { depositTypeSet as Fn } from "./machine/events/depositTypeSet.js";
75
- import { externalDepositTxSet as Ln } from "./machine/events/externalDepositTxSet.js";
76
- import { setInputsValidating as Bn } from "./machine/events/setInputsValidating.js";
77
- import { walletAddressSet as qn } from "./machine/events/walletAddressSet.js";
78
- import { tokenSetBalance as Un } from "./machine/events/tokenSetBalance.js";
79
- import { transferSetStatus as Pn } from "./machine/events/transferSetStatus.js";
80
- import { getUsdTradeDelta as Wn } from "./machine/computed/getUsdTradeDelta.js";
81
- import { getIsDirectNonNearWithdrawal as Mn } from "./machine/computed/getIsDirectNonNearWithdrawal.js";
82
- import { getIsDirectTokenOnNearTransfer as Vn } from "./machine/computed/getIsDirectTokenOnNearTransfer.js";
83
- import { getIsDirectNearTokenWithdrawal as Qn } from "./machine/computed/getIsDirectNearTokenWithdrawal.js";
84
- import { getIsSameAssetDiffChainWithdrawal as $n } from "./machine/computed/getIsSameAssetDiffChainWithdrawal.js";
69
+ import { errorSet as bn } from "./machine/events/errorSet.js";
70
+ import { quoteSet as En } from "./machine/events/quoteSet.js";
71
+ import { addressSet as Rn } from "./machine/events/addressSet.js";
72
+ import { tokenSetAmount as Cn } from "./machine/events/tokenSetAmount.js";
73
+ import { quoteSetStatus as vn } from "./machine/events/quoteSetStatus.js";
74
+ import { depositTypeSet as Dn } from "./machine/events/depositTypeSet.js";
75
+ import { externalDepositTxSet as xn } from "./machine/events/externalDepositTxSet.js";
76
+ import { setInputsValidating as On } from "./machine/events/setInputsValidating.js";
77
+ import { walletAddressSet as Fn } from "./machine/events/walletAddressSet.js";
78
+ import { tokenSetBalance as Ln } from "./machine/events/tokenSetBalance.js";
79
+ import { transferSetStatus as Bn } from "./machine/events/transferSetStatus.js";
80
+ import { getUsdTradeDelta as qn } from "./machine/computed/getUsdTradeDelta.js";
81
+ import { getIsDirectNonNearWithdrawal as Un } from "./machine/computed/getIsDirectNonNearWithdrawal.js";
82
+ import { getIsDirectTokenOnNearTransfer as Pn } from "./machine/computed/getIsDirectTokenOnNearTransfer.js";
83
+ import { getIsDirectNearTokenWithdrawal as Wn } from "./machine/computed/getIsDirectNearTokenWithdrawal.js";
84
+ import { getIsSameAssetDiffChainWithdrawal as Mn } from "./machine/computed/getIsSameAssetDiffChainWithdrawal.js";
85
85
  import "viem";
86
86
  import { Button as A } from "./components/Button.js";
87
- import { TinyNumber as Oe } from "./components/TinyNumber.js";
87
+ import { TinyNumber as xe } from "./components/TinyNumber.js";
88
88
  import { ErrorMessage as K } from "./components/ErrorMessage.js";
89
- import { FT_DEPOSIT_GAS as We, FT_TRANSFER_GAS as Me } from "./utils/near/config.js";
90
- import { a as Fe } from "./index-DEq3oXQF.js";
89
+ import { FT_DEPOSIT_GAS as Pe, FT_TRANSFER_GAS as We } from "./utils/near/config.js";
90
+ import { a as Oe } from "./index-DEq3oXQF.js";
91
91
  import { z as se } from "zod";
92
- import { decodeQueryResult as Kn } from "./utils/near/decodeQueryResult.js";
93
- import { nearRpcClient as Hn } from "./utils/near/rpc.js";
94
- import { getNearNep141MinStorageBalance as Gn } from "./utils/near/getNearNep141MinStorageBalance.js";
92
+ import { decodeQueryResult as Vn } from "./utils/near/decodeQueryResult.js";
93
+ import { nearRpcClient as Qn } from "./utils/near/rpc.js";
94
+ import { getNearNep141MinStorageBalance as $n } from "./utils/near/getNearNep141MinStorageBalance.js";
95
95
  import { INTENTS_CONTRACT as ke } from "./constants/intents.js";
96
- import { isEvmBaseToken as It } from "./utils/evm/isEvmBaseToken.js";
97
- import { useMakeEvmTransfer as jn } from "./hooks/useMakeEvmTransfer.js";
98
- import { useMakeSolanaTransfer as zn } from "./hooks/useMakeSolanaTransfer.js";
96
+ import { isEvmBaseToken as gt } from "./utils/evm/isEvmBaseToken.js";
97
+ import { useMakeEvmTransfer as Kn } from "./hooks/useMakeEvmTransfer.js";
98
+ import { useMakeSolanaTransfer as Hn } from "./hooks/useMakeSolanaTransfer.js";
99
99
  import { isUserDeniedSigning as Ae } from "./utils/checkers/isUserDeniedSigning.js";
100
- import { createIntentSignerNEP413 as Yn, BridgeSDK as Zn, createNearWithdrawalRoute as Xn, createInternalTransferRoute as Jn, MinWithdrawalAmountError as es, FeeExceedsAmountError as ts } from "@defuse-protocol/bridge-sdk";
101
- import { generateRandomBytes as ns } from "./utils/near/getRandomBytes.js";
102
- import { IntentSignerSolana as ss } from "./utils/intents/signers/solana.js";
103
- import { localStorageTyped as Ve } from "./utils/localstorage.js";
104
- import { queryContract as rs } from "./utils/near/queryContract.js";
105
- import { utils as Qe } from "@defuse-protocol/internal-utils";
106
- import { getTransactionLink as as } from "./utils/formatters/getTransactionLink.js";
107
- import { switchEthereumChain as os } from "./utils/evm/switchEthereumChain.js";
100
+ import { createIntentSignerNEP413 as Gn, BridgeSDK as jn, createNearWithdrawalRoute as zn, createInternalTransferRoute as Yn, MinWithdrawalAmountError as Zn, FeeExceedsAmountError as Xn } from "@defuse-protocol/bridge-sdk";
101
+ import { generateRandomBytes as Jn } from "./utils/near/getRandomBytes.js";
102
+ import { IntentSignerSolana as es } from "./utils/intents/signers/solana.js";
103
+ import { localStorageTyped as Me } from "./utils/localstorage.js";
104
+ import { queryContract as ts } from "./utils/near/queryContract.js";
105
+ import { utils as Ve } from "@defuse-protocol/internal-utils";
106
+ import { getTransactionLink as ns } from "./utils/formatters/getTransactionLink.js";
107
+ import { switchEthereumChain as ss } from "./utils/evm/switchEthereumChain.js";
108
108
  import "copy-text-to-clipboard";
109
- import { SwapQuoteSkeleton as wt } from "./features/SwapQuote/SwapQuoteSkeleton.js";
109
+ import { SwapQuoteSkeleton as It } from "./features/SwapQuote/SwapQuoteSkeleton.js";
110
110
  import { Notes as de } from "./components/Notes.js";
111
- import { Accordion as is } from "./components/Accordion.js";
112
- import { formatUsdAmount as $e } from "./utils/formatters/formatUsdAmount.js";
113
- import { formatTinyNumber as cs } from "./utils/formatters/formatTinyNumber.js";
114
- import ls from "clsx";
115
- import { Skeleton as ds } from "./components/Skeleton.js";
116
- import { getBalancePortion as us } from "./features/TokenInput/utils/getBalancePortion.js";
117
- import { getUsdDisplayAmount as ms } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
118
- import { TokenInputHeading as kt } from "./features/TokenInput/TokenInputHeading.js";
119
- import { noop as fs } from "./utils/noop.js";
111
+ import { Accordion as rs } from "./components/Accordion.js";
112
+ import { formatUsdAmount as Qe } from "./utils/formatters/formatUsdAmount.js";
113
+ import { formatTinyNumber as as } from "./utils/formatters/formatTinyNumber.js";
114
+ import os from "clsx";
115
+ import { Skeleton as is } from "./components/Skeleton.js";
116
+ import { getBalancePortion as ls } from "./features/TokenInput/utils/getBalancePortion.js";
117
+ import { getUsdDisplayAmount as cs } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
118
+ import { TokenInputHeading as wt } from "./features/TokenInput/TokenInputHeading.js";
119
+ import { noop as ds } from "./utils/noop.js";
120
120
  import { Card as ie } from "./components/Card.js";
121
- import { Badge as Ke } from "./components/Badge.js";
122
- import { TokenIcon as At } from "./components/TokenIcon.js";
123
- import { InputAmount as ps } from "./components/InputAmount.js";
124
- import { TokenInputSkeleton as hs } from "./features/TokenInput/TokenInputSkeleton.js";
125
- import { getUsdDisplayBalance as Ts } from "./utils/formatters/getUsdDisplayBalance.js";
126
- import { VList as gs } from "virtua";
127
- import { TokensListPlaceholder as Ne } from "./features/TokensList/TokensListPlaceholder.js";
128
- import { Hr as Is } from "./components/Hr.js";
129
- import { createTokenSorter as ws } from "./utils/tokens/sort.js";
130
- import { createFilterByIntents as He } from "./utils/tokens/filterByIntents.js";
131
- import { createFilterBySearch as ks } from "./utils/tokens/filterBySearchString.js";
132
- import { createFilterBySelectedChain as As } from "./utils/tokens/filterBySelectedChain.js";
121
+ import { Badge as $e } from "./components/Badge.js";
122
+ import { TokenIcon as kt } from "./components/TokenIcon.js";
123
+ import { InputAmount as us } from "./components/InputAmount.js";
124
+ import { TokenInputSkeleton as ms } from "./features/TokenInput/TokenInputSkeleton.js";
125
+ import { getUsdDisplayBalance as fs } from "./utils/formatters/getUsdDisplayBalance.js";
126
+ import { VList as ps } from "virtua";
127
+ import { TokensListPlaceholder as Se } from "./features/TokensList/TokensListPlaceholder.js";
128
+ import { Hr as Ts } from "./components/Hr.js";
129
+ import { createTokenSorter as hs } from "./utils/tokens/sort.js";
130
+ import { createFilterByIntents as Ke } from "./utils/tokens/filterByIntents.js";
131
+ import { createFilterBySearch as gs } from "./utils/tokens/filterBySearchString.js";
132
+ import { createFilterBySelectedChain as Is } from "./utils/tokens/filterBySelectedChain.js";
133
133
  import "bs58";
134
134
  import "viem/chains";
135
- import { isBrowser as Nt } from "browser-or-node";
135
+ import "browser-or-node";
136
136
  import "qrcode.react";
137
- import { createColorPalette as Ns } from "./theme/createColorPalette.js";
138
- import { ArmingCountdownFill as Ss, BeenhereFill as _s, EncryptedFill as ys, AccountBalanceWalletFill as bs, CheckCircleFill as Es, GppBadFill as Cs } from "@material-symbols-svg/react-rounded";
139
- import { useTimer as Rs } from "use-timer";
140
- import { useHandleKeyDown as St } from "./hooks/useHandleKeyDown.js";
141
- import { CloseButton as _t } from "./components/CloseButton.js";
142
- import { DEFAULT_RPCS as vs } from "./rpcs.js";
143
- import { useAddClassToPortal as Ds } from "./hooks/useAddClassToPortal.js";
144
- import { ErrorBoundary as xs } from "react-error-boundary";
145
- import { isEvmToken as Os } from "./utils/evm/isEvmToken.js";
146
- import { getEvmMainTokenBalance as Fs } from "./utils/evm/getEvmMainTokenBalance.js";
147
- import { getNativeNearBalance as Ls } from "./utils/near/getNativeNearBalance.js";
148
- import { getNearTokenBalance as Bs } from "./utils/near/getNearTokenBalance.js";
149
- import { getEvmTokenBalance as qs } from "./utils/evm/getEvmTokenBalance.js";
150
- function Us({ rpcs: e, token: t, connectedWallets: r }) {
151
- const { walletSupportedChains: s, tonCenterApiKey: n, alchemyApiKey: a } = y(), { walletAddress: l } = ot(r, t);
137
+ import { createColorPalette as ws } from "./theme/createColorPalette.js";
138
+ import { ArmingCountdownFill as ks, BeenhereFill as As, EncryptedFill as Ss, AccountBalanceWalletFill as Ns, CheckCircleFill as _s, GppBadFill as ys } from "@material-symbols-svg/react-rounded";
139
+ import { useTimer as bs } from "use-timer";
140
+ import { useHandleKeyDown as At } from "./hooks/useHandleKeyDown.js";
141
+ import { CloseButton as St } from "./components/CloseButton.js";
142
+ import { DEFAULT_RPCS as Es } from "./rpcs.js";
143
+ import { useAddClassToPortal as Rs } from "./hooks/useAddClassToPortal.js";
144
+ import { ErrorBoundary as Cs } from "react-error-boundary";
145
+ import { isEvmToken as vs } from "./utils/evm/isEvmToken.js";
146
+ import { getEvmMainTokenBalance as Ds } from "./utils/evm/getEvmMainTokenBalance.js";
147
+ import { getNativeNearBalance as xs } from "./utils/near/getNativeNearBalance.js";
148
+ import { getNearTokenBalance as Os } from "./utils/near/getNearTokenBalance.js";
149
+ import { getEvmTokenBalance as Fs } from "./utils/evm/getEvmTokenBalance.js";
150
+ function Ls({ rpcs: e, token: t, connectedWallets: r }) {
151
+ const { walletSupportedChains: s, tonCenterApiKey: n, alchemyApiKey: a } = y(), { walletAddress: c } = rt(r, t);
152
152
  return _e({
153
153
  retry: 2,
154
- enabled: !!l && Object.keys(e).includes(t.blockchain),
154
+ enabled: !!c && Object.keys(e).includes(t.blockchain),
155
155
  queryKey: ["tokenBalance", t.assetId, r],
156
156
  queryFn: async () => {
157
- if (!l)
157
+ if (!c)
158
158
  return null;
159
159
  if (t.blockchain === "near" && s.includes(t.blockchain))
160
- return !e.near || e.near.length === 0 ? null : t.assetId === $ ? Ls(l, e.near) : Bs(t, l, e.near);
160
+ return !e.near || e.near.length === 0 ? null : t.assetId === $ ? xs(c, e.near) : Os(t, c, e.near);
161
161
  if (!s.includes("eth") && Q(t.blockchain))
162
162
  return null;
163
- if (Q(t.blockchain) && It(t)) {
164
- const c = e[t.blockchain] ?? [];
165
- return c.length > 0 ? Fs(l, c[0]) : null;
163
+ if (Q(t.blockchain) && gt(t)) {
164
+ const l = e[t.blockchain] ?? [];
165
+ return l.length > 0 ? Ds(c, l[0]) : null;
166
166
  }
167
- if (Os(t) || Q(t.blockchain)) {
168
- const c = e[t.blockchain] ?? [];
169
- return c.length > 0 ? qs(t, l, c[0]) : null;
167
+ if (vs(t) || Q(t.blockchain)) {
168
+ const l = e[t.blockchain] ?? [];
169
+ return l.length > 0 ? Fs(t, c, l[0]) : null;
170
170
  }
171
- return t.blockchain === "ton" ? Zt(t, l, n) : t.blockchain === "sol" && s.includes(t.blockchain) ? Xt(t, l, a) : (b.warn(
171
+ return t.blockchain === "ton" ? zt(t, c, n) : t.blockchain === "sol" && s.includes(t.blockchain) ? Yt(t, c, a) : (b.warn(
172
172
  `Failed to fetch token balance for ${t.symbol} on ${t.blockchain}`
173
173
  ), null);
174
174
  }
175
175
  });
176
176
  }
177
- const Ps = ({
177
+ const Bs = ({
178
178
  rpcs: e,
179
179
  token: t,
180
180
  onBalancesLoaded: r
181
- }) => (C(() => {
181
+ }) => (R(() => {
182
182
  t.isIntent || !Object.keys(e).includes(t.blockchain) || r({ [t.assetId]: "0" });
183
- }, [t.assetId]), null), yt = Wt(
183
+ }, [t.assetId]), null), Nt = Ut(
184
184
  ({ rpcs: e, token: t, connectedWallets: r, onBalancesLoaded: s }) => {
185
- const { data: n } = Us({
185
+ const { data: n } = Ls({
186
186
  rpcs: e,
187
187
  token: t,
188
188
  connectedWallets: r
189
189
  });
190
- return C(() => {
190
+ return R(() => {
191
191
  !t.isIntent && n != null && s({ [t.assetId]: n });
192
192
  }, [t, n, s]), null;
193
193
  },
194
194
  (e, t) => e.token.assetId === t.token.assetId && e.connectedWallets === t.connectedWallets
195
195
  );
196
- yt.displayName = "TokenBalanceLoader";
197
- const Ge = Object.assign(yt, {
198
- Zero: Ps
199
- }), Ws = (e) => {
196
+ Nt.displayName = "TokenBalanceLoader";
197
+ const He = Object.assign(Nt, {
198
+ Zero: Bs
199
+ }), qs = (e) => {
200
200
  const t = e.toLowerCase();
201
- return be[t]?.icon ?? "";
202
- }, je = (e) => ye[e].icon ?? en, Ms = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, Vs = (e) => be[e]?.name ?? e, P = (e) => {
201
+ return ye[t]?.icon ?? "";
202
+ }, Us = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, Ps = (e) => ye[e]?.name ?? e, P = (e) => {
203
203
  const {
204
204
  showIntentTokens: t,
205
205
  allowedTokensList: r,
206
206
  allowedSourceTokensList: s,
207
207
  allowedTargetTokensList: n,
208
208
  filterTokens: a,
209
- fetchSourceTokens: l,
210
- fetchTargetTokens: c
209
+ fetchSourceTokens: c,
210
+ fetchTargetTokens: l
211
211
  } = y(), { data: d, ...u } = _e({
212
212
  queryKey: ["tokens", e].filter(Boolean),
213
- queryFn: async () => e === "source" && l ? l() : e === "target" && c ? c() : Jt.getTokens()
213
+ queryFn: async () => e === "source" && c ? c() : e === "target" && l ? l() : Zt.getTokens()
214
214
  }), i = v(() => {
215
215
  if (!d)
216
216
  return [];
217
217
  const f = d.map((m) => {
218
218
  const w = m.blockchain.toLowerCase();
219
- return !mn(w) || r && !r.includes(m.assetId) || e === "source" && s && !s.includes(m.assetId) || e === "target" && n && !n.includes(m.assetId) ? null : {
219
+ return !cn(w) || r && !r.includes(m.assetId) || e === "source" && s && !s.includes(m.assetId) || e === "target" && n && !n.includes(m.assetId) ? null : {
220
220
  assetId: m.assetId,
221
221
  symbol: m.symbol,
222
222
  decimals: m.decimals,
223
223
  price: m.price,
224
224
  blockchain: w,
225
225
  isIntent: !1,
226
- icon: m.icon ?? Ws(m.symbol),
227
- name: Vs(m.symbol),
228
- chainIcon: je(w),
229
- chainName: ye[m.blockchain]?.label ?? Ms(m.blockchain),
226
+ icon: m.icon ?? qs(m.symbol),
227
+ name: Ps(m.symbol),
228
+ chainName: at[m.blockchain]?.label ?? Us(m.blockchain),
230
229
  contractAddress: m.contractAddress
231
230
  };
232
- }).filter((m) => !!m).filter(a ?? (() => !0)), h = f.filter(
231
+ }).filter((m) => !!m).filter(a ?? (() => !0)), T = f.filter(
233
232
  (m) => m.symbol.toLowerCase() !== "wnear"
234
233
  ), I = f.find((m) => m.symbol.toLowerCase() === "wnear");
235
- return I && h.push({
234
+ return I && T.push({
236
235
  name: "NEAR",
237
236
  symbol: "NEAR",
238
237
  chainName: "Near",
239
238
  blockchain: "near",
240
239
  assetId: $,
241
- chainIcon: je("near"),
242
- icon: be.near?.icon ?? "",
240
+ icon: ye.near?.icon ?? "",
243
241
  price: I?.price ?? 0,
244
242
  contractAddress: I?.contractAddress,
245
243
  isIntent: !1,
246
244
  decimals: 24
247
245
  }), t ? [
248
- ...h,
246
+ ...T,
249
247
  // add intents tokens to the full list
250
248
  ...f.map(
251
249
  (m) => m.symbol.toLowerCase() === "wnear" ? { ...m, symbol: "NEAR", name: "NEAR", isIntent: !0 } : { ...m, isIntent: !0 }
252
250
  )
253
- ] : h;
251
+ ] : T;
254
252
  }, [d, t, a]);
255
253
  return {
256
254
  ...u,
257
255
  tokens: i
258
256
  };
259
- }, Qs = () => {
257
+ }, Ws = () => {
260
258
  const { tokens: e } = P(), { tokens: t } = P("source"), { tokens: r } = P("target");
261
259
  return { tokens: v(() => {
262
260
  const n = {};
@@ -265,8 +263,8 @@ const Ge = Object.assign(yt, {
265
263
  ...t || [],
266
264
  ...r || []
267
265
  ].forEach((a) => {
268
- const l = `${a.assetId}-${a.isIntent}`;
269
- n[l] = a;
266
+ const c = `${a.assetId}-${a.isIntent}`;
267
+ n[c] = a;
270
268
  }), Object.values(n);
271
269
  }, [e, t, r]) };
272
270
  }, ue = [
@@ -274,7 +272,7 @@ const Ge = Object.assign(yt, {
274
272
  { near: ["USDT", "USDC", "AURORA"] },
275
273
  { arb: ["ARB", "ETH", "USDT", "USDC"] },
276
274
  { btc: ["BTC"] }
277
- ], $s = (e) => [...e].sort((t, r) => {
275
+ ], Ms = (e) => [...e].sort((t, r) => {
278
276
  const s = ue.findIndex(
279
277
  (d) => Object.keys(d)[0] === t.blockchain
280
278
  ), n = ue.findIndex(
@@ -282,39 +280,39 @@ const Ge = Object.assign(yt, {
282
280
  );
283
281
  if (s !== n)
284
282
  return s === -1 ? 1 : n === -1 ? -1 : s - n;
285
- const a = ue[s]?.[t.blockchain] ?? [], l = a.indexOf(t.symbol), c = a.indexOf(r.symbol);
286
- return l === -1 && c === -1 ? 0 : l === -1 ? 1 : c === -1 ? -1 : l - c;
287
- }), Ks = ({ rpcs: e, connectedWallets: t }) => {
288
- const { tokens: r } = Qs(), { walletSupportedChains: s } = y(), { setWalletBalance: n } = Ee(t);
289
- return v(() => $s(r), [r]).map((l) => s.includes(l.blockchain) ? /* @__PURE__ */ o(
290
- Ge,
283
+ const a = ue[s]?.[t.blockchain] ?? [], c = a.indexOf(t.symbol), l = a.indexOf(r.symbol);
284
+ return c === -1 && l === -1 ? 0 : c === -1 ? 1 : l === -1 ? -1 : c - l;
285
+ }), Vs = ({ rpcs: e, connectedWallets: t }) => {
286
+ const { tokens: r } = Ws(), { walletSupportedChains: s } = y(), { setWalletBalance: n } = be(t);
287
+ return v(() => Ms(r), [r]).map((c) => s.includes(c.blockchain) ? /* @__PURE__ */ o(
288
+ He,
291
289
  {
292
290
  rpcs: e,
293
- token: l,
291
+ token: c,
294
292
  connectedWallets: t,
295
- onBalancesLoaded: (c) => n(t, c)
293
+ onBalancesLoaded: (l) => n(t, l)
296
294
  },
297
- G(l)
295
+ G(c)
298
296
  ) : /* @__PURE__ */ o(
299
- Ge.Zero,
297
+ He.Zero,
300
298
  {
301
299
  rpcs: e,
302
- token: l,
303
- onBalancesLoaded: (c) => n(t, c)
300
+ token: c,
301
+ onBalancesLoaded: (l) => n(t, l)
304
302
  },
305
- G(l)
303
+ G(c)
306
304
  ));
307
305
  };
308
- function Hs(e, t) {
306
+ function Qs(e, t) {
309
307
  const r = Array.from(
310
- /* @__PURE__ */ new Set([...t ?? [], ...it])
308
+ /* @__PURE__ */ new Set([...t ?? [], ...ot])
311
309
  ), s = new Map(r.map((n, a) => [n, a]));
312
310
  return [...e].sort((n, a) => {
313
- const l = s.has(n.id) ? s.get(n.id) : 1 / 0, c = s.has(a.id) ? s.get(a.id) : 1 / 0;
314
- return l !== c ? l - c : n.id.localeCompare(a.id, void 0, { sensitivity: "base" });
311
+ const c = s.has(n.id) ? s.get(n.id) : 1 / 0, l = s.has(a.id) ? s.get(a.id) : 1 / 0;
312
+ return c !== l ? c - l : n.id.localeCompare(a.id, void 0, { sensitivity: "base" });
315
313
  });
316
314
  }
317
- const Gs = (e) => {
315
+ const $s = (e) => {
318
316
  const {
319
317
  chainsOrder: t,
320
318
  allowedChainsList: r,
@@ -322,106 +320,106 @@ const Gs = (e) => {
322
320
  allowedTargetChainsList: n
323
321
  } = y(), { tokens: a } = P();
324
322
  return v(() => {
325
- const l = Array.from(
326
- new Set(a.map((c) => ye[c.blockchain]))
327
- ).filter((c) => !(r && !r.includes(c.id) || e === "source" && s && !s.includes(c.id) || e === "target" && n && !n.includes(c.id)));
328
- return Hs(l, t);
323
+ const c = Array.from(
324
+ new Set(a.map((l) => at[l.blockchain]))
325
+ ).filter((l) => !(r && !r.includes(l.id) || e === "source" && s && !s.includes(l.id) || e === "target" && n && !n.includes(l.id)));
326
+ return Qs(c, t);
329
327
  }, [a, t, r]);
330
- }, ze = 3, bt = ({
328
+ }, Ge = 3, _t = ({
331
329
  connectedWallets: e,
332
330
  alchemyApiKey: t,
333
331
  ...r
334
332
  }) => {
335
- const { ctx: s } = _(), { tokens: n } = P(), { walletSupportedChains: a } = y(), { setWalletBalance: l } = Ee(e), c = r.isEnabled && !!Object.values(e).length && a.length > 0, d = $t({
333
+ const { ctx: s } = _(), { tokens: n } = P(), { walletSupportedChains: a } = y(), { setWalletBalance: c } = be(e), l = r.isEnabled && !!Object.values(e).length && a.length > 0, d = Vt({
336
334
  initialPageParam: null,
337
- enabled: !!c && !!t,
335
+ enabled: !!l && !!t,
338
336
  queryKey: ["walletTokensBalance", e],
339
- queryFn: async ({ pageParam: i }) => dn({ alchemyApiKey: t })({
337
+ queryFn: async ({ pageParam: i }) => on({ alchemyApiKey: t })({
340
338
  pageParam: i ? `${i}` : null,
341
339
  connectedWallets: e,
342
340
  walletSupportedChains: a
343
341
  }),
344
342
  getNextPageParam: (i, f) => {
345
- if (i.pageKey && !(f.length >= ze))
343
+ if (i.pageKey && !(f.length >= Ge))
346
344
  return i.pageKey;
347
345
  }
348
346
  });
349
- C(() => {
350
- c && d.data && d.hasNextPage && d.data.pages.length < ze && !d.isFetchingNextPage && d.fetchNextPage();
351
- }, [c, d]);
347
+ R(() => {
348
+ l && d.data && d.hasNextPage && d.data.pages.length < Ge && !d.isFetchingNextPage && d.fetchNextPage();
349
+ }, [l, d]);
352
350
  const u = v(() => {
353
351
  if (!d.data?.pages)
354
352
  return {};
355
- const i = ln(
353
+ const i = an(
356
354
  n,
357
355
  d.data.pages.flatMap((f) => f.data)
358
356
  );
359
357
  return n.forEach((f) => {
360
- un(f.blockchain) && !(f.assetId in i) && (i[f.assetId] = "0");
358
+ ln(f.blockchain) && !(f.assetId in i) && (i[f.assetId] = "0");
361
359
  }), i;
362
360
  }, [d.data, n]);
363
- return C(() => {
364
- D(s, ["initial_wallet"]) && (l(e, u), s.sourceToken && Object.keys(u).includes(s.sourceToken.assetId) && p("tokenSetBalance", u[s.sourceToken.assetId]));
361
+ return R(() => {
362
+ D(s, ["initial_wallet"]) && (c(e, u), s.sourceToken && Object.keys(u).includes(s.sourceToken.assetId) && p("tokenSetBalance", u[s.sourceToken.assetId]));
365
363
  }, [u]), {
366
364
  status: d.status,
367
365
  refetch: d.refetch,
368
366
  balances: u
369
367
  };
370
- }, ce = () => {
368
+ }, le = () => {
371
369
  const { intentsAccountType: e } = y(), {
372
370
  ctx: { walletAddress: t }
373
- } = _(), { tokens: r } = P(), s = r.filter((c) => c.isIntent).map((c) => c.assetId), n = te({
371
+ } = _(), { tokens: r } = P(), s = r.filter((l) => l.isIntent).map((l) => l.assetId), n = te({
374
372
  walletAddress: t,
375
373
  addressType: e
376
374
  }), a = _e({
377
375
  enabled: !!t && !!n && r.length > 0,
378
376
  queryKey: ["intentsBalances", n],
379
- queryFn: async () => n ? await fn(n, s) : {}
380
- }), l = v(() => {
377
+ queryFn: async () => n ? await dn(n, s) : {}
378
+ }), c = v(() => {
381
379
  switch (a.status) {
382
380
  case "error":
383
381
  return b.error("Unable to load intents balances:", a.error), {};
384
382
  case "success":
385
383
  return Object.fromEntries(
386
- Object.entries(a.data).map(([c, d]) => [
387
- `intent-${c}`,
384
+ Object.entries(a.data).map(([l, d]) => [
385
+ `intent-${l}`,
388
386
  d
389
387
  ])
390
388
  );
391
389
  case "pending":
392
390
  return {};
393
391
  default:
394
- return Ce(a, { throwError: !1 }), {};
392
+ return Ee(a, { throwError: !1 }), {};
395
393
  }
396
394
  }, [a]) ?? {};
397
395
  return {
398
396
  ...a,
399
- intentBalances: l
397
+ intentBalances: c
400
398
  };
401
- }, js = ({
399
+ }, Ks = ({
402
400
  isEnabled: e,
403
401
  alchemyApiKey: t
404
402
  }) => {
405
- const { connectedWallets: r } = y(), { ctx: s } = _(), n = Kt(), { refetch: a } = ce(), { refetch: l } = bt({
403
+ const { connectedWallets: r } = y(), { ctx: s } = _(), n = Qt(), { refetch: a } = le(), { refetch: c } = _t({
406
404
  isEnabled: e,
407
405
  connectedWallets: r,
408
406
  alchemyApiKey: t ?? ""
409
407
  });
410
- C(() => {
411
- const c = D(s, ["transfer_success"]);
412
- !e || !c || (async () => (await a(), t && (await new Promise((d) => {
408
+ R(() => {
409
+ const l = D(s, ["transfer_success"]);
410
+ !e || !l || (async () => (await a(), t && (await new Promise((d) => {
413
411
  setTimeout(d, 1e4);
414
- }), await l()), await n.invalidateQueries({ queryKey: ["tokenBalance"] })))();
412
+ }), await c()), await n.invalidateQueries({ queryKey: ["tokenBalance"] })))();
415
413
  }, [s.state, e, t]);
416
- }, le = () => {
417
- const { connectedWallets: e } = y(), { intentBalances: t } = ce(), { walletBalance: r } = Ee(e);
414
+ }, ce = () => {
415
+ const { connectedWallets: e } = y(), { intentBalances: t } = le(), { walletBalance: r } = be(e);
418
416
  return { mergedBalance: v(
419
417
  () => ({ ...r, ...t }),
420
418
  [r, t]
421
419
  ) };
422
- }, zs = ({ isEnabled: e }) => {
423
- const { ctx: t } = _(), { mergedBalance: r } = le();
424
- C(() => {
420
+ }, Hs = ({ isEnabled: e }) => {
421
+ const { ctx: t } = _(), { mergedBalance: r } = ce();
422
+ R(() => {
425
423
  if (!e)
426
424
  return;
427
425
  if (!t.sourceToken || !t.walletAddress) {
@@ -431,7 +429,7 @@ const Gs = (e) => {
431
429
  const s = G(t.sourceToken);
432
430
  p("tokenSetBalance", r[s]);
433
431
  }, [r, t.sourceToken]);
434
- }, Ye = {
432
+ }, je = {
435
433
  // cbBTC (eth)
436
434
  "nep141:eth-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near": "nep141:nbtc.bridge.near",
437
435
  // cbBTC (base)
@@ -446,11 +444,11 @@ const Gs = (e) => {
446
444
  "nep245:v2_1.omni.hot.tg:56_SZzgw3HSudhZcTwPWUTi2RJB19t": "nep141:wrap.near",
447
445
  // BTC (near)
448
446
  "nep141:btc.omft.near": "nep141:nbtc.bridge.near"
449
- }, Ys = ({
447
+ }, Gs = ({
450
448
  isEnabled: e
451
449
  }) => {
452
450
  const { ctx: t } = _(), { tokens: r } = P();
453
- C(() => {
451
+ R(() => {
454
452
  if (!e)
455
453
  return;
456
454
  if (!t.sourceToken) {
@@ -458,68 +456,68 @@ const Gs = (e) => {
458
456
  return;
459
457
  }
460
458
  const { sourceToken: s } = t;
461
- if (t.sourceToken.assetId in Ye) {
462
- const c = r.find(
463
- (d) => d.isIntent && d.assetId === Ye[s.assetId]
459
+ if (t.sourceToken.assetId in je) {
460
+ const l = r.find(
461
+ (d) => d.isIntent && d.assetId === je[s.assetId]
464
462
  );
465
463
  p("tokenSelect", {
466
464
  variant: "target",
467
- token: c
465
+ token: l
468
466
  });
469
467
  return;
470
468
  }
471
469
  const n = r.find(
472
- (c) => c.isIntent && c.symbol === s.symbol && c.blockchain === "near"
470
+ (l) => l.isIntent && l.symbol === s.symbol && l.blockchain === "near"
473
471
  );
474
472
  if (n) {
475
473
  p("tokenSelect", { variant: "target", token: n });
476
474
  return;
477
475
  }
478
476
  const a = r.find(
479
- (c) => c.isIntent && c.assetId === s.assetId
480
- ), l = r.find(
481
- (c) => c.isIntent && c.symbol === "USDC" && c.blockchain === "near"
477
+ (l) => l.isIntent && l.assetId === s.assetId
478
+ ), c = r.find(
479
+ (l) => l.isIntent && l.symbol === "USDC" && l.blockchain === "near"
482
480
  );
483
481
  p("tokenSelect", {
484
482
  variant: "target",
485
- token: a ?? l
483
+ token: a ?? c
486
484
  });
487
485
  }, [r, t.sourceToken]);
488
- }, Zs = ({ isEnabled: e }) => {
489
- const { connectedWallets: t } = y(), { ctx: r, state: s } = _(), { walletAddress: n } = ot(
486
+ }, js = ({ isEnabled: e }) => {
487
+ const { connectedWallets: t } = y(), { ctx: r, state: s } = _(), { walletAddress: n } = rt(
490
488
  t,
491
489
  r.sourceToken
492
490
  );
493
- C(() => {
491
+ R(() => {
494
492
  if (!e)
495
493
  return;
496
494
  p("walletAddressSet", n), D(r, ["initial_dry", "initial_wallet"]) && (s === "initial_wallet" && !n ? O("initial_dry") : s === "initial_dry" && n && O("initial_wallet"));
497
495
  }, [e, n, r, s]);
498
- }, Xs = (e) => (["depositAddress"].forEach((t) => {
496
+ }, zs = (e) => (["depositAddress"].forEach((t) => {
499
497
  if (!(t in e))
500
498
  return b.error(`Missing ${t} in quote response`), !1;
501
- }), !0), Js = () => {
499
+ }), !0), Ys = () => {
502
500
  const { ctx: e } = _(), {
503
501
  walletSupportedChains: t,
504
502
  intentsAccountType: r,
505
503
  appName: s,
506
504
  appFees: n,
507
505
  fetchQuote: a,
508
- slippageTolerance: l
509
- } = y(), c = Re(e), d = Y(null), u = Y(new AbortController()), i = v(() => async (h, I) => {
506
+ slippageTolerance: c
507
+ } = y(), l = Re(e), d = Y(null), u = Y(new AbortController()), i = v(() => async (T, I) => {
510
508
  const { signal: m } = u.current;
511
- return a ? a(h, {
509
+ return a ? a(T, {
512
510
  ...I,
513
511
  signal: m
514
512
  }) : (await Ie.post(
515
513
  "https://1click.chaindefuser.com/v0/quote",
516
- h,
514
+ T,
517
515
  { signal: m }
518
516
  )).data.quote;
519
517
  }, [Ie]);
520
518
  return {
521
519
  make: async ({
522
- message: h,
520
+ message: T,
523
521
  quoteType: I = "exact_in",
524
522
  options: m = {}
525
523
  } = {}) => {
@@ -533,32 +531,32 @@ const Gs = (e) => {
533
531
  const k = `Unable to run quote in current state ${e.state}`;
534
532
  throw b.error(`[WIDGET] ${k}`), new q({
535
533
  code: "QUOTE_INVALID_INITIAL",
536
- meta: { isDry: c, message: k }
534
+ meta: { isDry: l, message: k }
537
535
  });
538
536
  }
539
- const N = te({
537
+ const S = te({
540
538
  addressType: r,
541
- walletAddress: c ? (
539
+ walletAddress: l ? (
542
540
  // address on the target chain should be a dry quote recipient
543
- Pe(e.targetToken.blockchain)
541
+ Ue(e.targetToken.blockchain)
544
542
  ) : e.walletAddress ?? ""
545
- }), E = N && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), B = () => c ? Pe(
543
+ }), E = S && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), B = () => l ? Ue(
546
544
  e.sourceToken.blockchain,
547
545
  e.sourceToken.isIntent
548
- ) : E ? N : e.walletAddress ?? "";
549
- if (!N) {
546
+ ) : E ? S : e.walletAddress ?? "";
547
+ if (!S) {
550
548
  const k = "No corresponding intents account to run a quote";
551
549
  throw b.error(`[WIDGET] ${k}`), new q({
552
550
  code: "QUOTE_INVALID_INITIAL",
553
- meta: { isDry: c, message: k }
551
+ meta: { isDry: l, message: k }
554
552
  });
555
553
  }
556
554
  d.current && (u.current.abort("Abort previous quote (auto)"), u.current = new AbortController());
557
555
  let F;
558
556
  const L = {
559
557
  // Settings
560
- dry: c,
561
- slippageTolerance: l,
558
+ dry: l,
559
+ slippageTolerance: c,
562
560
  deadline: new Date(Date.now() + 3600 * 1e3).toISOString(),
563
561
  // 1 hour
564
562
  swapType: I === "exact_out" ? U.swapType.EXACT_OUTPUT : U.swapType.EXACT_INPUT,
@@ -570,23 +568,23 @@ const Gs = (e) => {
570
568
  // Experimental
571
569
  quoteWaitingTimeMs: 0
572
570
  };
573
- h && (L.customRecipientMsg = h), s && (L.referral = dt(s)), n && (L.appFees = [...n]);
571
+ T && (L.customRecipientMsg = T), s && (L.referral = ct(s)), n && (L.appFees = [...n]);
574
572
  try {
575
573
  e.sourceToken.isIntent && e.targetToken.isIntent && (d.current = i(
576
574
  {
577
575
  ...L,
578
- recipient: N,
576
+ recipient: S,
579
577
  recipientType: U.recipientType.INTENTS,
580
578
  depositType: U.depositType.INTENTS,
581
579
  // Refund
582
- refundTo: N,
580
+ refundTo: S,
583
581
  refundType: U.refundType.INTENTS
584
582
  },
585
583
  m
586
584
  ), F = await d.current), d.current = i(
587
585
  {
588
586
  ...L,
589
- recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : N,
587
+ recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : S,
590
588
  recipientType: e.targetToken.isIntent ? U.recipientType.INTENTS : U.recipientType.DESTINATION_CHAIN,
591
589
  depositType: e.sourceToken.isIntent ? U.depositType.INTENTS : U.depositType.ORIGIN_CHAIN,
592
590
  // Refund
@@ -596,11 +594,11 @@ const Gs = (e) => {
596
594
  m
597
595
  ), F = await d.current;
598
596
  } catch (k) {
599
- if (k instanceof ut)
597
+ if (k instanceof dt)
600
598
  return;
601
599
  b.error("Quote error: ", k);
602
600
  let x = k instanceof Error ? k.message : "";
603
- if (k instanceof mt) {
601
+ if (k instanceof ut) {
604
602
  if (x = k.response?.data.message || x, x.includes("Amount is too low")) {
605
603
  const X = x.match(/\d+/), J = X ? X[0] : void 0;
606
604
  throw new q({
@@ -623,12 +621,12 @@ const Gs = (e) => {
623
621
  }
624
622
  });
625
623
  }
626
- return c ? {
624
+ return l ? {
627
625
  dry: !0,
628
626
  ...F,
629
627
  deadline: void 0,
630
628
  depositAddress: void 0
631
- } : (Xs(F), {
629
+ } : (zs(F), {
632
630
  dry: !1,
633
631
  ...F,
634
632
  deadline: F.deadline,
@@ -639,11 +637,11 @@ const Gs = (e) => {
639
637
  u.current.abort("Abort quote manually"), u.current = new AbortController();
640
638
  }
641
639
  };
642
- }, er = () => {
640
+ }, Zs = () => {
643
641
  const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: r } = z(), s = te({
644
642
  addressType: t,
645
643
  walletAddress: e.walletAddress ?? ""
646
- }), n = Y(null), a = Y(new AbortController()), l = v(() => async (d) => ft.post(
644
+ }), n = Y(null), a = Y(new AbortController()), c = v(() => async (d) => mt.post(
647
645
  "",
648
646
  {
649
647
  id: 1,
@@ -707,7 +705,7 @@ const Gs = (e) => {
707
705
  });
708
706
  }
709
707
  n.current && (a.current.abort("Abort previous quote (auto)"), a.current = new AbortController());
710
- let u = ct[e.targetToken.blockchain];
708
+ let u = it[e.targetToken.blockchain];
711
709
  if (!u)
712
710
  if (Q(e.targetToken.blockchain))
713
711
  u = lt;
@@ -717,7 +715,7 @@ const Gs = (e) => {
717
715
  meta: { isDry: !1, message: "Chain is not supported by POA" }
718
716
  });
719
717
  try {
720
- return n.current = l({
718
+ return n.current = c({
721
719
  chain: u,
722
720
  accountId: s
723
721
  }), {
@@ -740,9 +738,9 @@ const Gs = (e) => {
740
738
  dry: !1
741
739
  };
742
740
  } catch (i) {
743
- if (i instanceof ut)
741
+ if (i instanceof dt)
744
742
  return;
745
- if (b.error(i), i instanceof mt) {
743
+ if (b.error(i), i instanceof ut) {
746
744
  const f = i.response?.data.message || i.message;
747
745
  throw new q({
748
746
  code: "QUOTE_FAILED",
@@ -757,60 +755,60 @@ const Gs = (e) => {
757
755
  a.current.abort("Abort quote manually"), a.current = new AbortController();
758
756
  }
759
757
  };
760
- }, Ze = (e) => {
758
+ }, ze = (e) => {
761
759
  p("errorSet", e), p("quoteSet", void 0), p("quoteSetStatus", "idle"), p("transferSetStatus", { status: "idle" });
762
- }, Xe = async (e) => {
760
+ }, Ye = async (e) => {
763
761
  if (!e.sendAddress)
764
762
  return;
765
763
  let t = !1;
766
764
  try {
767
- p("setInputsValidating", !0), t = await hn(e.sendAddress);
765
+ p("setInputsValidating", !0), t = await mn(e.sendAddress);
768
766
  } catch {
769
- Ze({
767
+ ze({
770
768
  code: "SEND_ADDRESS_IS_NOT_VERIFIED",
771
769
  meta: { address: e.sendAddress, chain: "near" }
772
770
  }), p("setInputsValidating", !1), O("initial_wallet");
773
771
  return;
774
772
  }
775
773
  if (p("setInputsValidating", !1), !t) {
776
- Ze({
774
+ ze({
777
775
  code: "SEND_ADDRESS_IS_NOT_FOUND",
778
776
  meta: { address: e.sendAddress, chain: "near" }
779
777
  }), O("initial_wallet");
780
778
  return;
781
779
  }
782
- e.error ? Tn(e.error) && (p("errorSet", null), O("input_valid_external")) : O("input_valid_external");
783
- }, Et = (e) => {
780
+ e.error ? fn(e.error) && (p("errorSet", null), O("input_valid_external")) : O("input_valid_external");
781
+ }, yt = (e) => {
784
782
  const t = D(e, ["initial_dry"]), r = D(e, ["input_valid_dry"]);
785
783
  if (!t && !r)
786
784
  return;
787
785
  let s;
788
- return t && (e.sourceToken ? e.targetToken ? ne(e.sourceTokenAmount) ? e.walletAddress && !ve(e) && (s = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : s = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : s = { code: "TARGET_TOKEN_IS_EMPTY" } : s = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && s ? p("errorSet", s) : e.error && !De(e.error) && !xe(e.error) && p("errorSet", null), r && s?.code === "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", s), r;
789
- }, Ct = (e) => {
786
+ return t && (e.sourceToken ? e.targetToken ? ne(e.sourceTokenAmount) ? e.walletAddress && !Ce(e) && (s = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : s = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : s = { code: "TARGET_TOKEN_IS_EMPTY" } : s = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && s ? p("errorSet", s) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r && s?.code === "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", s), r;
787
+ }, bt = (e) => {
790
788
  const t = D(e, ["initial_wallet"]), r = D(e, ["input_valid_external"]);
791
789
  if (!t && !r)
792
790
  return;
793
791
  const s = e.sourceTokenBalance;
794
792
  let n;
795
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : ne(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? ht(e.sendAddress) ? Xe(e) : n = {
793
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : ne(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? pt(e.sendAddress) ? Ye(e) : n = {
796
794
  code: "SEND_ADDRESS_IS_INVALID",
797
795
  meta: { address: e.sendAddress, chain: "near" }
798
- } : e.isDepositFromExternalWallet || (!s || !pt(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : ve(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SEND_ADDRESS_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), r && e.targetToken.blockchain === "near" && Xe(e), !r && n ? p("errorSet", n) : e.error && !De(e.error) && !xe(e.error) && p("errorSet", null), r;
799
- }, Rt = (e) => {
796
+ } : e.isDepositFromExternalWallet || (!s || !ft(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : Ce(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SEND_ADDRESS_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), r && e.targetToken.blockchain === "near" && Ye(e), !r && n ? p("errorSet", n) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r;
797
+ }, Et = (e) => {
800
798
  const t = D(e, ["initial_wallet"]), r = D(e, ["input_valid_internal"]);
801
799
  if (!t && !r)
802
800
  return;
803
801
  const s = e.sourceTokenBalance;
804
802
  let n;
805
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? ne(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!s || !pt(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : ve(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_NOT_INTENT" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && n ? p("errorSet", n) : e.error && !De(e.error) && !xe(e.error) && p("errorSet", null), r;
806
- }, vt = (e) => {
803
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? ne(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!s || !ft(s) ? n = { code: "INVALID_SOURCE_BALANCE" } : Ce(e) || (n = { code: "SOURCE_BALANCE_INSUFFICIENT" })) : n = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_NOT_INTENT" } : n = { code: "TARGET_TOKEN_IS_EMPTY" } : n = { code: "SOURCE_TOKEN_IS_EMPTY" }), !r && n ? p("errorSet", n) : e.error && !ve(e.error) && !De(e.error) && p("errorSet", null), r;
804
+ }, Rt = (e) => {
807
805
  const t = Re(e), r = !t && e.targetToken?.isIntent === !0, s = !t && e.targetToken?.isIntent === !1;
808
806
  if (t) {
809
- const n = Et(e);
807
+ const n = yt(e);
810
808
  return O(n ? "input_valid_dry" : "initial_dry");
811
809
  }
812
- s && Ct(e) ? O("input_valid_external") : r && Rt(e) ? O("input_valid_internal") : O("initial_wallet");
813
- }, tr = ({
810
+ s && bt(e) ? O("input_valid_external") : r && Et(e) ? O("input_valid_internal") : O("initial_wallet");
811
+ }, Xs = ({
814
812
  isEnabled: e,
815
813
  message: t,
816
814
  type: r = "exact_in",
@@ -818,19 +816,19 @@ const Gs = (e) => {
818
816
  }) => {
819
817
  const { ctx: n } = _(), {
820
818
  isNativeNearDeposit: a,
821
- isDirectNonNearWithdrawal: l,
822
- isDirectTokenOnNearDeposit: c,
819
+ isDirectNonNearWithdrawal: c,
820
+ isDirectTokenOnNearDeposit: l,
823
821
  isDirectNearTokenWithdrawal: d,
824
822
  isDirectTokenOnNearTransfer: u,
825
823
  isSameAssetDiffChainWithdrawal: i
826
- } = z(), f = Re(n), h = e && !n.areInputsValidating && (i || (c || a) && n.isDepositFromExternalWallet || !d && !l && !c && !u), { make: I, cancel: m } = Js(), { make: w, cancel: N } = er(), E = Y(null), B = () => {
827
- m(), N();
824
+ } = z(), f = Re(n), T = e && !n.areInputsValidating && (i || (l || a) && n.isDepositFromExternalWallet || !d && !c && !l && !u), { make: I, cancel: m } = Ys(), { make: w, cancel: S } = Zs(), E = Y(null), B = () => {
825
+ m(), S();
828
826
  };
829
- C(() => {
827
+ R(() => {
830
828
  const L = D(n, ["input_valid_dry"]), k = D(n, ["input_valid_external"]), x = D(n, ["input_valid_internal"]);
831
829
  (f && !L || !f && n.targetToken?.isIntent && !x || !f && !n.targetToken?.isIntent && !k || n.areInputsValidating) && B();
832
830
  }, [B, f, n]);
833
- const F = he(
831
+ const F = Te(
834
832
  async (L) => {
835
833
  try {
836
834
  let k;
@@ -856,7 +854,7 @@ const Gs = (e) => {
856
854
  p("quoteSetStatus", "idle"), p("quoteSet", void 0), p("errorSet", null);
857
855
  return;
858
856
  }
859
- p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", k.data), vt(n);
857
+ p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", k.data), Rt(n);
860
858
  return;
861
859
  }
862
860
  b.error("Unhandled error in useMakeQuoteEffect:", k), p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", {
@@ -865,34 +863,34 @@ const Gs = (e) => {
865
863
  });
866
864
  }
867
865
  },
868
- [n, f, w, I, t, r, h]
866
+ [n, f, w, I, t, r, T]
869
867
  );
870
- C(() => {
871
- !h || !(f ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent) || n.quoteStatus !== "error" && (a && !n.isDepositFromExternalWallet || F({ isRefetch: !1 }));
872
- }, [h, F, B, n.sourceToken, n.targetToken]), C(() => {
868
+ R(() => {
869
+ !T || !(f ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent) || n.quoteStatus !== "error" && (a && !n.isDepositFromExternalWallet || F({ isRefetch: !1 }));
870
+ }, [T, F, B, n.sourceToken, n.targetToken]), R(() => {
873
871
  const L = () => {
874
872
  E.current && (clearInterval(E.current), E.current = null);
875
873
  };
876
874
  return n.state !== "quote_success_internal" && n.state !== "quote_success_external" || !s || (E.current = setInterval(async () => {
877
875
  await F({ isRefetch: !0 });
878
876
  }, s)), L;
879
- }, [h, F, B, n.state]);
877
+ }, [T, F, B, n.state]);
880
878
  }, me = {
881
879
  sol: "sol",
882
880
  evm: "eth",
883
881
  near: "near"
884
- }, nr = ({
882
+ }, Js = ({
885
883
  isEnabled: e,
886
884
  skipIntents: t = !1,
887
885
  target: r = "none"
888
886
  }) => {
889
- const { tokens: s } = P(), { ctx: n, state: a } = _(), { intentBalances: l } = ce(), { walletSupportedChains: c, chainsFilter: d, intentsAccountType: u } = y(), i = wn({
887
+ const { tokens: s } = P(), { ctx: n, state: a } = _(), { intentBalances: c } = le(), { walletSupportedChains: l, chainsFilter: d, intentsAccountType: u } = y(), i = hn({
890
888
  tokens: s,
891
- walletSupportedChains: c,
892
- balances: l,
889
+ walletSupportedChains: l,
890
+ balances: c,
893
891
  across: "intents"
894
- }), [f, h] = v(() => !n.walletAddress && !t ? [
895
- { token: In({ tokens: s }), status: "loaded" },
892
+ }), [f, T] = v(() => !n.walletAddress && !t ? [
893
+ { token: Tn({ tokens: s }), status: "loaded" },
896
894
  { token: void 0, status: "loaded" }
897
895
  ] : d.source.intents !== "none" && !t ? i ? [
898
896
  { token: i, status: "loaded" },
@@ -901,9 +899,9 @@ const Gs = (e) => {
901
899
  { token: void 0, status: "loading" },
902
900
  { token: void 0, status: "loading" }
903
901
  ] : [
904
- { token: gn({
902
+ { token: pn({
905
903
  tokens: s,
906
- walletSupportedChains: c
904
+ walletSupportedChains: l
907
905
  }), status: "loaded" },
908
906
  { token: void 0, status: "loaded" }
909
907
  ], [
@@ -912,17 +910,17 @@ const Gs = (e) => {
912
910
  d,
913
911
  n.walletAddress,
914
912
  i,
915
- c,
913
+ l,
916
914
  a
917
915
  ]);
918
- C(() => {
916
+ R(() => {
919
917
  if (!e)
920
918
  return;
921
919
  if (D(n, ["initial_dry", "initial_wallet"]) && (f.status === "loaded" && !n.sourceToken && p("tokenSelect", {
922
920
  variant: "source",
923
921
  token: f.token
924
- }), h.status === "loaded" && f.status === "loaded" && !n.targetToken)) {
925
- let w = h.token;
922
+ }), T.status === "loaded" && f.status === "loaded" && !n.targetToken)) {
923
+ let w = T.token;
926
924
  if (r === "same-asset")
927
925
  if (f.token?.isIntent) {
928
926
  if (!u)
@@ -930,87 +928,87 @@ const Gs = (e) => {
930
928
  "Intents account type is required to select same-asset target token"
931
929
  );
932
930
  w = s.find(
933
- (N) => !N.isIntent && N.symbol === n.sourceToken?.symbol && N.blockchain === me[u]
931
+ (S) => !S.isIntent && S.symbol === n.sourceToken?.symbol && S.blockchain === me[u]
934
932
  );
935
933
  } else
936
934
  w = s.find(
937
- (N) => N.isIntent && N.symbol === n.sourceToken?.symbol
935
+ (S) => S.isIntent && S.symbol === n.sourceToken?.symbol
938
936
  );
939
937
  p("tokenSelect", {
940
938
  variant: "target",
941
939
  token: w
942
940
  });
943
941
  }
944
- }, [n, f, h, e]);
942
+ }, [n, f, T, e]);
945
943
  const I = (m, w) => {
946
- const N = s.find(
947
- (E) => !E.isIntent && E.blockchain === me[m] && E.symbol.toLowerCase() === tn[me[m]]?.toLowerCase()
944
+ const S = s.find(
945
+ (E) => !E.isIntent && E.blockchain === me[m] && E.symbol.toLowerCase() === Xt[me[m]]?.toLowerCase()
948
946
  ) ?? w;
949
947
  p("tokenSelect", {
950
948
  variant: "source",
951
- token: N
949
+ token: S
952
950
  });
953
951
  };
954
- return C(() => {
952
+ return R(() => {
955
953
  const m = D(n, ["initial_dry", "initial_wallet"]);
956
954
  if (!e || !m)
957
955
  return;
958
956
  const w = s.find(
959
957
  (E) => E.isIntent && E.symbol === "AURORA" && E.blockchain === "near"
960
- ), N = setTimeout(() => {
958
+ ), S = setTimeout(() => {
961
959
  f.token || (!t && i ? p("tokenSelect", {
962
960
  variant: "source",
963
961
  token: i
964
- }) : c.length && u ? I(u, w) : n.walletAddress && Tt(n.walletAddress) ? I("sol", w) : n.walletAddress && gt(n.walletAddress) ? I("evm", w) : n.walletAddress && ht(n.walletAddress) ? I("near", w) : p("tokenSelect", {
962
+ }) : l.length && u ? I(u, w) : n.walletAddress && Tt(n.walletAddress) ? I("sol", w) : n.walletAddress && ht(n.walletAddress) ? I("evm", w) : n.walletAddress && pt(n.walletAddress) ? I("near", w) : p("tokenSelect", {
965
963
  variant: "source",
966
964
  token: w
967
965
  }));
968
966
  }, 3e3);
969
- return () => clearTimeout(N);
967
+ return () => clearTimeout(S);
970
968
  }, [s, f, t]), { source: n.sourceToken, target: n.targetToken };
971
- }, sr = ({
969
+ }, er = ({
972
970
  isEnabled: e,
973
971
  alchemyApiKey: t
974
972
  }) => {
975
973
  const { connectedWallets: r } = y();
976
- bt({
974
+ _t({
977
975
  isEnabled: e,
978
976
  connectedWallets: r,
979
977
  alchemyApiKey: t ?? ""
980
978
  });
981
- }, rr = (e, t) => {
982
- const { config: r } = Se(Ue);
979
+ }, tr = (e, t) => {
980
+ const { config: r } = Ne(qe);
983
981
  return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((s) => s?.key === "sendAddress") && r.walletSupportedChains.includes(e.targetToken.blockchain);
984
- }, ar = ({ debug: e }) => {
982
+ }, nr = ({ debug: e }) => {
985
983
  Z.onContextChange((t, r) => {
986
984
  const s = r;
987
- if (e && b.debug("[WIDGET] Context changed", s), e && t.error && Nn(s) && b.debug(`[WIDGET] Error set to ${t.error.code}`), Sn(s) || En(t, s, e))
985
+ if (e && b.debug("[WIDGET] Context changed", s), e && t.error && wn(s) && b.debug(`[WIDGET] Error set to ${t.error.code}`), kn(s) || _n(t, s, e))
988
986
  return;
989
- if (yn(t, s)) {
987
+ if (Sn(t, s)) {
990
988
  p("reset", { clearWalletAddress: !0 }), O("initial_dry");
991
989
  return;
992
990
  }
993
- const { isChanged: n, isDry: a } = An(t, s);
991
+ const { isChanged: n, isDry: a } = In(t, s);
994
992
  if (n) {
995
- if (_n(t)) {
996
- const l = a ? "initial_dry" : "initial_wallet";
997
- O(l, {
993
+ if (An(t)) {
994
+ const c = a ? "initial_dry" : "initial_wallet";
995
+ O(c, {
998
996
  onMoved: () => {
999
997
  e && b.debug(
1000
- `[WIDGET] Inputs changed. State moved to ${l}`
998
+ `[WIDGET] Inputs changed. State moved to ${c}`
1001
999
  );
1002
1000
  }
1003
1001
  });
1004
1002
  }
1005
- kn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), bn(t) && (t.sendAddress = void 0), rr(t, s) && (t.sendAddress = t.walletAddress), vt(t);
1003
+ gn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), Nn(t) && (t.sendAddress = void 0), tr(t, s) && (t.sendAddress = t.walletAddress), Rt(t);
1006
1004
  }
1007
1005
  });
1008
- }, or = ({ debug: e }) => {
1006
+ }, sr = ({ debug: e }) => {
1009
1007
  Z.onTransition((t, r) => {
1010
1008
  e && b.debug(`===> [WIDGET] State moved from ${t} to ${r}`);
1011
1009
  });
1012
- }, ir = (e, t) => {
1013
- const { variant: r, token: s } = t, { config: n } = Se(Ue);
1010
+ }, rr = (e, t) => {
1011
+ const { variant: r, token: s } = t, { config: n } = Ne(qe);
1014
1012
  switch (r) {
1015
1013
  case "source":
1016
1014
  if (s && s.assetId === e.targetToken?.assetId && s.isIntent === e.targetToken.isIntent && n.enableAutoTokensSwitching) {
@@ -1033,20 +1031,20 @@ const Gs = (e) => {
1033
1031
  e.targetToken = s;
1034
1032
  break;
1035
1033
  default:
1036
- Ce(r, { throwError: !1 });
1034
+ Ee(r, { throwError: !1 });
1037
1035
  }
1038
- }, R = (e, t) => Z.on(
1036
+ }, C = (e, t) => Z.on(
1039
1037
  e,
1040
1038
  (r, s) => t(r, s, Z)
1041
- ), cr = () => {
1042
- R("quoteSetStatus", On), R("walletAddressSet", qn), R("transferSetStatus", Pn), R("tokenSelectRotate", we), R("tokenSetBalance", Un), R("tokenSetAmount", xn), R("depositTypeSet", Fn), R("setInputsValidating", Bn), R("externalDepositTxSet", Ln), R("tokenSelect", ir), R("addressSet", Dn), R("errorSet", Rn), R("quoteSet", vn), R("reset", Cn), R("validateDryInputs", Et), R("validateExternalInputs", Ct), R("validateInternalInputs", Rt);
1043
- }, lr = cn(({ debug: e }) => {
1039
+ ), ar = () => {
1040
+ C("quoteSetStatus", vn), C("walletAddressSet", Fn), C("transferSetStatus", Bn), C("tokenSelectRotate", we), C("tokenSetBalance", Ln), C("tokenSetAmount", Cn), C("depositTypeSet", Dn), C("setInputsValidating", On), C("externalDepositTxSet", xn), C("tokenSelect", rr), C("addressSet", Rn), C("errorSet", bn), C("quoteSet", En), C("reset", yn), C("validateDryInputs", yt), C("validateExternalInputs", bt), C("validateInternalInputs", Et);
1041
+ }, or = rn(({ debug: e }) => {
1044
1042
  e && b.debug(
1045
- "[WIDGET] Debug mode is enabled (package version: 3.15.3)"
1046
- ), cr(), or({ debug: e }), ar({ debug: e });
1047
- }), Pi = ({ listenTo: e, debug: t = !1 }) => {
1048
- C(() => {
1049
- lr({ debug: t });
1043
+ "[WIDGET] Debug mode is enabled (package version: 3.16.1)"
1044
+ ), ar(), sr({ debug: e }), nr({ debug: e });
1045
+ }), Bi = ({ listenTo: e, debug: t = !1 }) => {
1046
+ R(() => {
1047
+ or({ debug: t });
1050
1048
  }, [t]);
1051
1049
  const r = e.find(
1052
1050
  (a) => Array.isArray(a) && a[0] === "setBalancesUsingAlchemyExt"
@@ -1055,85 +1053,85 @@ const Gs = (e) => {
1055
1053
  ), n = e.find(
1056
1054
  (a) => Array.isArray(a) && a[0] === "makeQuote"
1057
1055
  );
1058
- sr({
1056
+ er({
1059
1057
  isEnabled: !!r,
1060
1058
  alchemyApiKey: r?.[1].alchemyApiKey
1061
- }), nr({
1059
+ }), Js({
1062
1060
  isEnabled: !!s,
1063
1061
  skipIntents: s?.[1].skipIntents,
1064
1062
  target: s?.[1].target
1065
- }), tr({
1063
+ }), Xs({
1066
1064
  isEnabled: !!n,
1067
1065
  message: n?.[1].message,
1068
1066
  type: n?.[1].type,
1069
1067
  refetchQuoteInterval: n?.[1].refetchQuoteInterval
1070
- }), Zs({
1068
+ }), js({
1071
1069
  isEnabled: e.includes("checkWalletConnection")
1072
- }), zs({
1070
+ }), Hs({
1073
1071
  isEnabled: e.includes("setSourceTokenBalance")
1074
- }), Ys({
1072
+ }), Gs({
1075
1073
  isEnabled: e.includes("setSourceTokenIntentsTarget")
1076
- }), js({
1074
+ }), Ks({
1077
1075
  isEnabled: e.includes("updateBalances"),
1078
1076
  alchemyApiKey: r?.[1].alchemyApiKey
1079
1077
  });
1080
- }, dr = Z.getStore();
1078
+ }, ir = Z.getStore();
1081
1079
  class W extends Error {
1082
1080
  context;
1083
1081
  _is_widget_error = !0;
1084
1082
  constructor(t, r) {
1085
- super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = Se(dr).context;
1083
+ super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = Ne(ir).context;
1086
1084
  }
1087
1085
  }
1088
- class Dt extends W {
1086
+ class Ct extends W {
1089
1087
  data;
1090
1088
  constructor(t) {
1091
1089
  super(t.code), this.data = t, this.name = "MachineError";
1092
1090
  }
1093
1091
  }
1094
- class q extends Dt {
1092
+ class q extends Ct {
1095
1093
  constructor(t) {
1096
1094
  super(t), this.name = "QuoteError";
1097
1095
  }
1098
1096
  }
1099
- class g extends Dt {
1097
+ class g extends Ct {
1100
1098
  constructor(t) {
1101
1099
  super(t), this.name = "TransferError";
1102
1100
  }
1103
1101
  }
1104
- const Wi = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, M = Z.getStore(), ur = rn({
1105
- usdTradeDelta: (e) => Wn(e(M.context)),
1106
- isDirectNearTokenWithdrawal: (e) => Qn(e(M.context)),
1107
- isDirectNonNearWithdrawal: (e) => Mn(e(M.context)),
1108
- isDirectTokenOnNearDeposit: (e) => on(e(M.context)),
1109
- isNativeNearDeposit: (e) => an(e(M.context)),
1110
- isSameAssetDiffChainWithdrawal: (e) => $n(e(M.context)),
1111
- isDirectTokenOnNearTransfer: (e) => Vn(e(M.context))
1112
- }), z = () => oe(ur), _ = () => {
1102
+ const qi = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, M = Z.getStore(), lr = tn({
1103
+ usdTradeDelta: (e) => qn(e(M.context)),
1104
+ isDirectNearTokenWithdrawal: (e) => Wn(e(M.context)),
1105
+ isDirectNonNearWithdrawal: (e) => Un(e(M.context)),
1106
+ isDirectTokenOnNearDeposit: (e) => sn(e(M.context)),
1107
+ isNativeNearDeposit: (e) => nn(e(M.context)),
1108
+ isSameAssetDiffChainWithdrawal: (e) => Mn(e(M.context)),
1109
+ isDirectTokenOnNearTransfer: (e) => Pn(e(M.context))
1110
+ }), z = () => oe(lr), _ = () => {
1113
1111
  const e = oe(M);
1114
1112
  return {
1115
1113
  state: e.state,
1116
1114
  ctx: e.context
1117
1115
  };
1118
- }, Mi = (e) => {
1116
+ }, Ui = (e) => {
1119
1117
  const t = oe(M);
1120
1118
  if (!D(t.context, [e]))
1121
1119
  throw new W(
1122
1120
  `[WIDGET] Attempt to access snapshot for ${e} state while context does not match`
1123
1121
  );
1124
1122
  return t.context;
1125
- }, mr = async ({
1123
+ }, cr = async ({
1126
1124
  contractId: e,
1127
1125
  accountId: t
1128
1126
  }) => {
1129
1127
  try {
1130
- const r = { account_id: t }, s = Fe.from(JSON.stringify(r)).toString("base64"), n = await Hn.query({
1128
+ const r = { account_id: t }, s = Oe.from(JSON.stringify(r)).toString("base64"), n = await Qn.query({
1131
1129
  request_type: "call_function",
1132
1130
  method_name: "storage_balance_of",
1133
1131
  account_id: e,
1134
1132
  args_base64: s,
1135
1133
  finality: "optimistic"
1136
- }), a = Kn(
1134
+ }), a = Vn(
1137
1135
  n,
1138
1136
  se.union([se.null(), se.object({ total: se.string() })])
1139
1137
  );
@@ -1142,10 +1140,10 @@ const Wi = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
1142
1140
  throw new W("Error fetching balance", { cause: r });
1143
1141
  }
1144
1142
  };
1145
- function fr(e) {
1143
+ function dr(e) {
1146
1144
  const { ctx: t } = _(), { isNativeNearDeposit: r } = z(), s = t.sourceToken?.contractAddress, n = t.quote?.amountIn ?? t.sourceTokenAmount;
1147
1145
  return {
1148
- make: async (l, c) => {
1146
+ make: async (c, l) => {
1149
1147
  if (!e)
1150
1148
  throw new g({
1151
1149
  code: "TRANSFER_INVALID_INITIAL",
@@ -1156,7 +1154,7 @@ function fr(e) {
1156
1154
  code: "TRANSFER_INVALID_INITIAL",
1157
1155
  meta: { message: "No token selected to transfer." }
1158
1156
  });
1159
- if (!l)
1157
+ if (!c)
1160
1158
  throw new g({
1161
1159
  code: "TRANSFER_INVALID_INITIAL",
1162
1160
  meta: { message: "No recipient address to transfer." }
@@ -1172,7 +1170,7 @@ function fr(e) {
1172
1170
  transactions: [
1173
1171
  {
1174
1172
  signerId: t.walletAddress,
1175
- receiverId: l,
1173
+ receiverId: c,
1176
1174
  actions: [
1177
1175
  {
1178
1176
  type: "Transfer",
@@ -1202,7 +1200,7 @@ function fr(e) {
1202
1200
  type: "FunctionCall",
1203
1201
  params: {
1204
1202
  methodName: "near_deposit",
1205
- gas: We,
1203
+ gas: Pe,
1206
1204
  deposit: n,
1207
1205
  args: {}
1208
1206
  }
@@ -1212,11 +1210,11 @@ function fr(e) {
1212
1210
  methodName: "ft_transfer_call",
1213
1211
  deposit: "1",
1214
1212
  // 1 yocto required by NEP-141
1215
- gas: Me,
1213
+ gas: We,
1216
1214
  args: {
1217
1215
  amount: n,
1218
- receiver_id: l,
1219
- msg: c ?? ""
1216
+ receiver_id: c,
1217
+ msg: l ?? ""
1220
1218
  }
1221
1219
  }
1222
1220
  });
@@ -1249,32 +1247,32 @@ function fr(e) {
1249
1247
  });
1250
1248
  try {
1251
1249
  const [i, f] = await Promise.all([
1252
- Gn({
1250
+ $n({
1253
1251
  contractId: s
1254
1252
  }),
1255
- mr({
1253
+ cr({
1256
1254
  contractId: s,
1257
- accountId: l
1255
+ accountId: c
1258
1256
  })
1259
- ]), h = i - f;
1260
- h > 0n && u.push({
1257
+ ]), T = i - f;
1258
+ T > 0n && u.push({
1261
1259
  type: "FunctionCall",
1262
1260
  params: {
1263
1261
  methodName: "storage_deposit",
1264
- args: { account_id: l },
1265
- gas: We,
1266
- deposit: h.toString()
1262
+ args: { account_id: c },
1263
+ gas: Pe,
1264
+ deposit: T.toString()
1267
1265
  }
1268
1266
  }), u.push({
1269
1267
  type: "FunctionCall",
1270
1268
  params: {
1271
1269
  methodName: "ft_transfer_call",
1272
1270
  args: {
1273
- receiver_id: l,
1271
+ receiver_id: c,
1274
1272
  amount: n,
1275
- msg: c ?? ""
1273
+ msg: l ?? ""
1276
1274
  },
1277
- gas: Me,
1275
+ gas: We,
1278
1276
  deposit: "1"
1279
1277
  }
1280
1278
  });
@@ -1303,19 +1301,19 @@ function fr(e) {
1303
1301
  }
1304
1302
  };
1305
1303
  }
1306
- const pr = ({
1304
+ const ur = ({
1307
1305
  makeTransfer: e,
1308
1306
  providers: t
1309
1307
  }) => {
1310
- const { ctx: r } = _(), { alchemyApiKey: s } = y(), { make: n } = jn({
1308
+ const { ctx: r } = _(), { alchemyApiKey: s } = y(), { make: n } = Kn({
1311
1309
  provider: t?.evm
1312
- }), { make: a } = zn({
1310
+ }), { make: a } = Hn({
1313
1311
  provider: t?.sol,
1314
1312
  alchemyApiKey: s
1315
- }), l = (d) => {
1313
+ }), c = (d) => {
1316
1314
  if (e)
1317
1315
  return e;
1318
- if (gt(d))
1316
+ if (ht(d))
1319
1317
  return n;
1320
1318
  if (Tt(d))
1321
1319
  return a;
@@ -1351,12 +1349,12 @@ const pr = ({
1351
1349
  decimals: r.sourceToken.decimals,
1352
1350
  address: r.quote.depositAddress,
1353
1351
  chain: r.sourceToken.blockchain,
1354
- evmChainId: Q(r.sourceToken.blockchain) ? Te[r.sourceToken.blockchain] : null,
1355
- isNativeEvmTokenTransfer: !!r.sourceToken && It(r.sourceToken),
1352
+ evmChainId: Q(r.sourceToken.blockchain) ? he[r.sourceToken.blockchain] : null,
1353
+ isNativeEvmTokenTransfer: !!r.sourceToken && gt(r.sourceToken),
1356
1354
  tokenAddress: r.sourceToken.assetId === $ ? $ : r.sourceToken.contractAddress,
1357
1355
  sourceAssetId: r.sourceToken.assetId,
1358
1356
  targetAssetId: r.targetToken.assetId
1359
- }, u = l(d.address);
1357
+ }, u = c(d.address);
1360
1358
  try {
1361
1359
  const i = await u(d);
1362
1360
  if (!i) {
@@ -1374,15 +1372,15 @@ const pr = ({
1374
1372
  } catch (i) {
1375
1373
  b.error("[TRANSFER ERROR]", i, { error: i });
1376
1374
  let f = "Failed to make a transfer. Please try again.";
1377
- const h = i instanceof Error && Ae(i.message);
1378
- if (h)
1375
+ const T = i instanceof Error && Ae(i.message);
1376
+ if (T)
1379
1377
  return;
1380
- throw pn.isAxiosError(i) ? (f = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new g({
1378
+ throw un.isAxiosError(i) ? (f = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new g({
1381
1379
  code: "QUOTE_ERROR",
1382
1380
  meta: { message: f }
1383
1381
  })) : f === "No quotes found" ? new g({
1384
1382
  code: "NO_QUOTE_FOUND"
1385
- }) : i instanceof Error && !h ? new g({
1383
+ }) : i instanceof Error && !T ? new g({
1386
1384
  code: "QUOTE_ERROR",
1387
1385
  meta: { message: i.message }
1388
1386
  }) : new g({
@@ -1392,7 +1390,7 @@ const pr = ({
1392
1390
  }
1393
1391
  } };
1394
1392
  };
1395
- class hr {
1393
+ class mr {
1396
1394
  constructor(t, r) {
1397
1395
  this.account = t, this.provider = r;
1398
1396
  }
@@ -1402,7 +1400,7 @@ class hr {
1402
1400
  deadline: t.deadline,
1403
1401
  nonce: t.nonce,
1404
1402
  intents: t.intents,
1405
- signer_id: t.signer_id ?? Qe.authHandleToIntentsUserId({
1403
+ signer_id: t.signer_id ?? Ve.authHandleToIntentsUserId({
1406
1404
  identifier: this.account.walletAddress,
1407
1405
  method: "evm"
1408
1406
  })
@@ -1417,14 +1415,14 @@ class hr {
1417
1415
  return {
1418
1416
  payload: r,
1419
1417
  standard: "erc191",
1420
- signature: Qe.transformERC191Signature(a)
1418
+ signature: Ve.transformERC191Signature(a)
1421
1419
  };
1422
1420
  }
1423
1421
  }
1424
- const Tr = ({
1422
+ const fr = ({
1425
1423
  walletAddress: e,
1426
1424
  getProvider: t
1427
- }) => Yn({
1425
+ }) => Gn({
1428
1426
  accountId: e,
1429
1427
  signMessage: async (r) => {
1430
1428
  const s = t();
@@ -1434,7 +1432,7 @@ const Tr = ({
1434
1432
  try {
1435
1433
  n = await s.signMessage({
1436
1434
  ...r,
1437
- nonce: Fe.from(r.nonce)
1435
+ nonce: Oe.from(r.nonce)
1438
1436
  });
1439
1437
  } catch (a) {
1440
1438
  throw new W("Near wallet failed to sign a message", {
@@ -1448,7 +1446,7 @@ const Tr = ({
1448
1446
  signature: n.signature
1449
1447
  };
1450
1448
  }
1451
- }), gr = (e, t) => {
1449
+ }), pr = (e, t) => {
1452
1450
  if (t) {
1453
1451
  if (e.sendAddress)
1454
1452
  return e.sendAddress;
@@ -1463,8 +1461,8 @@ const Tr = ({
1463
1461
  meta: { message: "Quote is required for intents non-direct transfer" }
1464
1462
  });
1465
1463
  return e.quote.depositAddress;
1466
- }, Ir = async (e, t) => {
1467
- let r = Ve.getItem("nearWalletsPk")[t];
1464
+ }, Tr = async (e, t) => {
1465
+ let r = Me.getItem("nearWalletsPk")[t];
1468
1466
  if (!e.signMessage)
1469
1467
  throw new g({
1470
1468
  code: "DIRECT_TRANSFER_ERROR",
@@ -1475,14 +1473,14 @@ const Tr = ({
1475
1473
  const a = await e.signMessage({
1476
1474
  message: "Authenticate",
1477
1475
  recipient: "intents.near",
1478
- nonce: Fe.from(ns(32))
1476
+ nonce: Oe.from(Jn(32))
1479
1477
  });
1480
1478
  if (!a)
1481
1479
  throw new g({
1482
1480
  code: "DIRECT_TRANSFER_ERROR",
1483
1481
  meta: { message: "Signing message failed" }
1484
1482
  });
1485
- r = a.publicKey, Ve.setItem("nearWalletsPk", {
1483
+ r = a.publicKey, Me.setItem("nearWalletsPk", {
1486
1484
  [t]: a.publicKey
1487
1485
  });
1488
1486
  } catch {
@@ -1495,7 +1493,7 @@ const Tr = ({
1495
1493
  walletAddress: t,
1496
1494
  addressType: "near"
1497
1495
  });
1498
- if (!await rs({
1496
+ if (!await ts({
1499
1497
  contractId: ke,
1500
1498
  methodName: "has_public_key",
1501
1499
  args: {
@@ -1529,11 +1527,11 @@ const Tr = ({
1529
1527
  meta: { message: "Unable to add public key to intents account" }
1530
1528
  });
1531
1529
  }
1532
- }, wr = ({ providers: e }) => {
1530
+ }, hr = ({ providers: e }) => {
1533
1531
  const { ctx: t } = _(), { appName: r, intentsAccountType: s } = y(), {
1534
1532
  isNativeNearDeposit: n,
1535
1533
  isDirectNearTokenWithdrawal: a,
1536
- isDirectNonNearWithdrawal: l
1534
+ isDirectNonNearWithdrawal: c
1537
1535
  } = z();
1538
1536
  return { make: async ({
1539
1537
  message: d,
@@ -1569,7 +1567,7 @@ const Tr = ({
1569
1567
  code: "TRANSFER_INVALID_INITIAL",
1570
1568
  meta: { message: "No EVM provider configured" }
1571
1569
  });
1572
- i = new hr(
1570
+ i = new mr(
1573
1571
  { walletAddress: t.walletAddress },
1574
1572
  e.evm
1575
1573
  );
@@ -1580,7 +1578,7 @@ const Tr = ({
1580
1578
  code: "TRANSFER_INVALID_INITIAL",
1581
1579
  meta: { message: "No SOL provider configured" }
1582
1580
  });
1583
- i = new ss(
1581
+ i = new es(
1584
1582
  { walletAddress: t.walletAddress },
1585
1583
  e.sol
1586
1584
  );
@@ -1591,30 +1589,30 @@ const Tr = ({
1591
1589
  code: "TRANSFER_INVALID_INITIAL",
1592
1590
  meta: { message: "No NEAR provider configured" }
1593
1591
  });
1594
- await Ir(e.near(), t.walletAddress), i = Tr({
1592
+ await Tr(e.near(), t.walletAddress), i = fr({
1595
1593
  walletAddress: t.walletAddress,
1596
1594
  getProvider: e.near
1597
1595
  });
1598
1596
  break;
1599
1597
  }
1600
1598
  default:
1601
- Ce(s);
1599
+ Ee(s);
1602
1600
  }
1603
- const f = new Zn({ referral: dt(r) });
1601
+ const f = new jn({ referral: ct(r) });
1604
1602
  f.setIntentSigner(i);
1605
- let h;
1606
- n ? h = void 0 : a ? h = Xn(d ?? void 0) : l ? h = void 0 : h = Jn();
1603
+ let T;
1604
+ n ? T = void 0 : a ? T = zn(d ?? void 0) : c ? T = void 0 : T = Yn();
1607
1605
  const I = f.createWithdrawal({
1608
1606
  withdrawalParams: {
1609
1607
  assetId: t.sourceToken.assetId,
1610
1608
  amount: BigInt(t.sourceTokenAmount),
1611
- destinationAddress: gr(
1609
+ destinationAddress: pr(
1612
1610
  t,
1613
- a || l
1611
+ a || c
1614
1612
  ),
1615
1613
  destinationMemo: void 0,
1616
1614
  feeInclusive: !1,
1617
- routeConfig: h
1615
+ routeConfig: T
1618
1616
  }
1619
1617
  });
1620
1618
  try {
@@ -1624,11 +1622,11 @@ const Tr = ({
1624
1622
  const w = await I.waitForIntentSettlement();
1625
1623
  return await I.waitForWithdrawalCompletion(), {
1626
1624
  hash: w.hash,
1627
- transactionLink: as(nn.near, w.hash),
1625
+ transactionLink: ns(Jt.near, w.hash),
1628
1626
  intent: m
1629
1627
  };
1630
1628
  } catch (m) {
1631
- if (b.error("[TRANSFER ERROR]", m), m instanceof es)
1629
+ if (b.error("[TRANSFER ERROR]", m), m instanceof Zn)
1632
1630
  throw new g({
1633
1631
  code: "MIN_WITHDRAWAL_AMOUNT_ERROR",
1634
1632
  meta: {
@@ -1638,7 +1636,7 @@ const Tr = ({
1638
1636
  )
1639
1637
  }
1640
1638
  });
1641
- if (m instanceof ts)
1639
+ if (m instanceof Xn)
1642
1640
  throw new g({
1643
1641
  code: "TRANSFER_INVALID_INITIAL",
1644
1642
  meta: { message: "Fee is above the maximum allowed" }
@@ -1656,7 +1654,7 @@ const Tr = ({
1656
1654
  });
1657
1655
  }
1658
1656
  } };
1659
- }, kr = ({
1657
+ }, gr = ({
1660
1658
  message: e,
1661
1659
  providers: t,
1662
1660
  makeTransfer: r
@@ -1664,11 +1662,11 @@ const Tr = ({
1664
1662
  const { ctx: s } = _(), {
1665
1663
  isDirectTokenOnNearDeposit: n,
1666
1664
  isDirectTokenOnNearTransfer: a,
1667
- isNativeNearDeposit: l
1668
- } = z(), { make: c } = wr({ providers: t }), { make: d } = pr({
1665
+ isNativeNearDeposit: c
1666
+ } = z(), { make: l } = hr({ providers: t }), { make: d } = ur({
1669
1667
  makeTransfer: r,
1670
1668
  providers: t
1671
- }), { make: u } = fr(
1669
+ }), { make: u } = dr(
1672
1670
  t?.near
1673
1671
  );
1674
1672
  return { make: async () => {
@@ -1680,16 +1678,16 @@ const Tr = ({
1680
1678
  status: "pending",
1681
1679
  reason: "WAITING_CONFIRMATION"
1682
1680
  }), s.sourceToken?.isIntent)
1683
- f = await c({
1681
+ f = await l({
1684
1682
  message: e,
1685
- onPending: (h) => {
1683
+ onPending: (T) => {
1686
1684
  p("transferSetStatus", {
1687
1685
  status: "pending",
1688
- reason: h
1686
+ reason: T
1689
1687
  });
1690
1688
  }
1691
1689
  });
1692
- else if ((l || n) && !s.isDepositFromExternalWallet)
1690
+ else if ((c || n) && !s.isDepositFromExternalWallet)
1693
1691
  f = await u(
1694
1692
  s.sendAddress ?? ke,
1695
1693
  e
@@ -1706,8 +1704,8 @@ const Tr = ({
1706
1704
  );
1707
1705
  } else
1708
1706
  f = await d();
1709
- } catch (h) {
1710
- h instanceof g && (b.error(h.data), p("transferSetStatus", { status: "error" }), p("errorSet", h.data));
1707
+ } catch (T) {
1708
+ T instanceof g && (b.error(T.data), p("transferSetStatus", { status: "error" }), p("errorSet", T.data));
1711
1709
  }
1712
1710
  if (!f) {
1713
1711
  p("transferSetStatus", { status: "idle" });
@@ -1715,73 +1713,73 @@ const Tr = ({
1715
1713
  }
1716
1714
  return p("transferSetStatus", { status: "success" }), O("transfer_success"), f;
1717
1715
  } };
1718
- }, Ar = async (e) => {
1716
+ }, Ir = async (e) => {
1719
1717
  if (!e)
1720
1718
  return;
1721
1719
  const t = await e.request({
1722
1720
  method: "eth_chainId"
1723
1721
  });
1724
1722
  return parseInt(t, 16);
1725
- }, Nr = ({ providers: e }) => {
1726
- const { ctx: t } = _(), [r, s] = re(!1), [n, a] = re(!1), l = he(async () => {
1723
+ }, wr = ({ providers: e }) => {
1724
+ const { ctx: t } = _(), [r, s] = re(!1), [n, a] = re(!1), c = Te(async () => {
1727
1725
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1728
1726
  if (!t.sourceToken || !d)
1729
1727
  return !1;
1730
- const u = await Ar(d);
1728
+ const u = await Ir(d);
1731
1729
  if (!Q(t.sourceToken.blockchain))
1732
1730
  return !1;
1733
- const i = Te[t.sourceToken.blockchain];
1731
+ const i = he[t.sourceToken.blockchain];
1734
1732
  return !i || !u ? !1 : u !== i;
1735
- }, [t.sourceToken, e]), c = he(async () => {
1733
+ }, [t.sourceToken, e]), l = Te(async () => {
1736
1734
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1737
1735
  if (!t.sourceToken || !d || !Q(t.sourceToken.blockchain))
1738
1736
  return !1;
1739
- const u = Te[t.sourceToken.blockchain];
1737
+ const u = he[t.sourceToken.blockchain];
1740
1738
  if (!u)
1741
1739
  return !1;
1742
1740
  try {
1743
- return s(!0), await os(u, d), !0;
1741
+ return s(!0), await ss(u, d), !0;
1744
1742
  } catch (i) {
1745
1743
  return b.error("Failed to switch chain:", i), !1;
1746
1744
  } finally {
1747
1745
  s(!1);
1748
1746
  }
1749
1747
  }, [t.sourceToken, e]);
1750
- return C(() => {
1751
- l().then(a);
1752
- }, [l]), {
1748
+ return R(() => {
1749
+ c().then(a);
1750
+ }, [c]), {
1753
1751
  isSwitchingChainRequired: n,
1754
- switchChain: c,
1752
+ switchChain: l,
1755
1753
  isSwitchingChain: r
1756
1754
  };
1757
- }, S = {
1755
+ }, N = {
1758
1756
  size: "lg",
1759
1757
  variant: "primary"
1760
- }, Le = (e) => {
1758
+ }, Fe = (e) => {
1761
1759
  const { t } = V();
1762
1760
  if (e.error?.code === "TOKEN_IS_NOT_SUPPORTED")
1763
- return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.invalidAddress", "Invalid address") });
1761
+ return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.invalidAddress", "Invalid address") });
1764
1762
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_EMPTY")
1765
- return /* @__PURE__ */ o(A, { state: "disabled", ...S, children: t("submit.disabled.enterRecipientAddress", "Enter recipient address") });
1763
+ return /* @__PURE__ */ o(A, { state: "disabled", ...N, children: t("submit.disabled.enterRecipientAddress", "Enter recipient address") });
1766
1764
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_NOT_FOUND")
1767
- return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.sendAddressNotFound", {
1765
+ return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.sendAddressNotFound", {
1768
1766
  defaultValue: "Address not found on {{chain}}",
1769
1767
  chain: e.error.meta.chain.toUpperCase()
1770
1768
  }) });
1771
1769
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_INVALID")
1772
- return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.sendAddressInvalid", {
1770
+ return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.sendAddressInvalid", {
1773
1771
  defaultValue: "Invalid {{chain}} address",
1774
1772
  chain: e.error.meta.chain.toUpperCase()
1775
1773
  }) });
1776
1774
  if (e.error?.code === "QUOTE_AMOUNT_IS_TOO_LOW" || e.error?.code === "MIN_WITHDRAWAL_AMOUNT_ERROR")
1777
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1778
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.amountTooLow.label", "Amount is too low") }),
1779
- /* @__PURE__ */ o(K, { children: /* @__PURE__ */ T(jt, { i18nKey: "submit.error.amountTooLow.message", children: [
1775
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1776
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.amountTooLow.label", "Amount is too low") }),
1777
+ /* @__PURE__ */ o(K, { children: /* @__PURE__ */ h(Ht, { i18nKey: "submit.error.amountTooLow.message", children: [
1780
1778
  "Amount you entered is very low. Please try increasing it",
1781
1779
  " ",
1782
- /* @__PURE__ */ T("span", { className: "text-nowrap", children: [
1780
+ /* @__PURE__ */ h("span", { className: "text-nowrap", children: [
1783
1781
  "above ",
1784
- /* @__PURE__ */ o(Oe, { value: e.error.meta.minAmount ?? "0" }),
1782
+ /* @__PURE__ */ o(xe, { value: e.error.meta.minAmount ?? "0" }),
1785
1783
  " ",
1786
1784
  e.sourceToken?.symbol ?? "",
1787
1785
  "."
@@ -1789,81 +1787,81 @@ const Tr = ({
1789
1787
  ] }) })
1790
1788
  ] });
1791
1789
  if (e.quoteStatus === "error")
1792
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1793
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.quoteFailed.label", "Quote failed") }),
1790
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1791
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.quoteFailed.label", "Quote failed") }),
1794
1792
  /* @__PURE__ */ o(K, { children: t(
1795
1793
  "submit.error.quoteFailed.message",
1796
1794
  "We couldn’t finalize your quote. Please try again or adjust your values."
1797
1795
  ) })
1798
1796
  ] });
1799
1797
  if (e.error?.code === "TRANSFER_INVALID_INITIAL")
1800
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1801
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.invalidTransferData.label", "Invalid transfer data") }),
1798
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1799
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.invalidTransferData.label", "Invalid transfer data") }),
1802
1800
  e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1803
1801
  ] });
1804
1802
  if (e.error?.code === "EXTERNAL_TRANSFER_FAILED")
1805
- return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") });
1803
+ return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") });
1806
1804
  if (e.error?.code === "EXTERNAL_TRANSFER_INCOMPLETE")
1807
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1808
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1805
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1806
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1809
1807
  /* @__PURE__ */ o(K, { children: t(
1810
1808
  "submit.error.externalTransferFailed.incompleteMessage",
1811
1809
  "Incomplete transfer. Deposited amount will be refunded."
1812
1810
  ) })
1813
1811
  ] });
1814
1812
  if (e.error?.code === "EXTERNAL_TRANSFER_REFUNDED")
1815
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1816
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1813
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1814
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1817
1815
  /* @__PURE__ */ o(K, { children: t(
1818
1816
  "submit.error.externalTransferFailed.refundedMessage",
1819
1817
  "Deposited amount will be refunded."
1820
1818
  ) })
1821
1819
  ] });
1822
1820
  if (e.error?.code === "DIRECT_TRANSFER_ERROR")
1823
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1824
- /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.transferFailed.label", "Transfer failed") }),
1821
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1822
+ /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.transferFailed.label", "Transfer failed") }),
1825
1823
  e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1826
1824
  ] });
1827
1825
  if (e.error?.code === "SOURCE_BALANCE_INSUFFICIENT")
1828
- return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.insufficientBalance", "Insufficient balance") });
1829
- }, Sr = ({ onClick: e }) => {
1826
+ return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.insufficientBalance", "Insufficient balance") });
1827
+ }, kr = ({ onClick: e }) => {
1830
1828
  const { t } = V();
1831
- return /* @__PURE__ */ o(A, { state: "disabled", ...S, onClick: e, children: t("submit.error.connectWallet", "Connect wallet") });
1832
- }, _r = () => {
1829
+ return /* @__PURE__ */ o(A, { state: "disabled", ...N, onClick: e, children: t("submit.error.connectWallet", "Connect wallet") });
1830
+ }, Ar = () => {
1833
1831
  const { ctx: e } = _();
1834
- return Le(e) ?? null;
1835
- }, yr = (e) => {
1832
+ return Fe(e) ?? null;
1833
+ }, Sr = (e) => {
1836
1834
  const { providers: t, makeTransfer: r, onSuccess: s } = e, { ctx: n } = _(), { t: a } = V(), {
1837
- isNativeNearDeposit: l,
1838
- isDirectNonNearWithdrawal: c,
1835
+ isNativeNearDeposit: c,
1836
+ isDirectNonNearWithdrawal: l,
1839
1837
  isDirectTokenOnNearDeposit: d,
1840
1838
  isDirectNearTokenWithdrawal: u
1841
- } = z(), { make: i } = kr({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: f, switchChain: h, isSwitchingChain: I } = Nr({ providers: t }), m = Le(n), w = async () => {
1842
- if (f && !await h())
1839
+ } = z(), { make: i } = gr({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: f, switchChain: T, isSwitchingChain: I } = wr({ providers: t }), m = Fe(n), w = async () => {
1840
+ if (f && !await T())
1843
1841
  return;
1844
- const N = await i();
1845
- N && s(N);
1842
+ const S = await i();
1843
+ S && s(S);
1846
1844
  };
1847
1845
  if (!n.targetToken)
1848
- return /* @__PURE__ */ o(A, { ...S, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1846
+ return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1849
1847
  if (!ne(n.sourceTokenAmount))
1850
- return /* @__PURE__ */ o(A, { ...S, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1848
+ return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1851
1849
  if (n.areInputsValidating)
1852
- return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.validating", "Validating...") });
1850
+ return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.validating", "Validating...") });
1853
1851
  if (I)
1854
- return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.switchingChain", "Switching network...") });
1852
+ return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.switchingChain", "Switching network...") });
1855
1853
  if (!f && m)
1856
1854
  return m;
1857
1855
  if (n.transferStatus.status === "pending")
1858
1856
  switch (n.transferStatus.reason) {
1859
1857
  case "WAITING_CONFIRMATION":
1860
- return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.transfer.confirmInWallet", "Confirm in wallet") });
1858
+ return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.transfer.confirmInWallet", "Confirm in wallet") });
1861
1859
  case "PROCESSING":
1862
1860
  default:
1863
- return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.transfer.finalizing", "Finalizing transfer") });
1861
+ return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.transfer.finalizing", "Finalizing transfer") });
1864
1862
  }
1865
- return n.transferStatus.status === "error" ? /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1866
- /* @__PURE__ */ o(A, { ...S, children: e.label }),
1863
+ return n.transferStatus.status === "error" ? /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1864
+ /* @__PURE__ */ o(A, { ...N, children: e.label }),
1867
1865
  /* @__PURE__ */ o(K, { children: (() => {
1868
1866
  switch (n.error?.code) {
1869
1867
  case "FEES_NOT_ESTIMATED":
@@ -1878,39 +1876,39 @@ const Tr = ({
1878
1876
  );
1879
1877
  }
1880
1878
  })() })
1881
- ] }) : n.quoteStatus === "pending" ? /* @__PURE__ */ o(A, { state: "loading", ...S, children: n.quote ? a("submit.pending.quote.refreshing", "Refreshing quote") : a("submit.pending.quote.finalizing", "Finalizing quote") }) : n.error ? /* @__PURE__ */ o(A, { state: "disabled", ...S, children: e.label }) : !n.quote && !c && !d && !u && !l ? /* @__PURE__ */ o(A, { state: "disabled", ...S, children: e.label }) : /* @__PURE__ */ o(A, { ...S, onClick: w, children: e.label });
1882
- }, br = (e) => {
1883
- const { t } = V(), { ctx: r } = _(), s = Le(r);
1884
- return r.isDepositFromExternalWallet ? ne(r.sourceTokenAmount) ? r.externalDepositTxReceived ? /* @__PURE__ */ o(A, { state: "loading", ...S, children: t("submit.pending.externalDeposit.processing", "Processing") }) : /* @__PURE__ */ o(A, { state: "loading", ...S, children: t("submit.pending.externalDeposit.waiting", "Waiting for transaction") }) : /* @__PURE__ */ o(A, { ...S, state: "disabled", children: t("submit.disabled.enterAmount", "Enter amount") }) : s || /* @__PURE__ */ o(yr, { ...e });
1885
- }, Er = (e) => {
1879
+ ] }) : n.quoteStatus === "pending" ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: n.quote ? a("submit.pending.quote.refreshing", "Refreshing quote") : a("submit.pending.quote.finalizing", "Finalizing quote") }) : n.error ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : !n.quote && !l && !d && !u && !c ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : /* @__PURE__ */ o(A, { ...N, onClick: w, children: e.label });
1880
+ }, Nr = (e) => {
1881
+ const { t } = V(), { ctx: r } = _(), s = Fe(r);
1882
+ return r.isDepositFromExternalWallet ? ne(r.sourceTokenAmount) ? r.externalDepositTxReceived ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.processing", "Processing") }) : /* @__PURE__ */ o(A, { state: "loading", ...N, children: t("submit.pending.externalDeposit.waiting", "Waiting for transaction") }) : /* @__PURE__ */ o(A, { ...N, state: "disabled", children: t("submit.disabled.enterAmount", "Enter amount") }) : s || /* @__PURE__ */ o(Sr, { ...e });
1883
+ }, _r = (e) => {
1886
1884
  const { ctx: t } = _(), r = y();
1887
- return t.walletAddress ? /* @__PURE__ */ o(br, { ...e }) : /* @__PURE__ */ o(Sr, { onClick: r.onWalletSignin });
1885
+ return t.walletAddress ? /* @__PURE__ */ o(Nr, { ...e }) : /* @__PURE__ */ o(kr, { onClick: r.onWalletSignin });
1888
1886
  };
1889
- Er.Error = _r;
1890
- const Cr = ({ className: e }) => {
1887
+ _r.Error = Ar;
1888
+ const yr = ({ className: e }) => {
1891
1889
  const { t } = V(), { slippageTolerance: r } = y(), { ctx: s } = _(), n = s.sourceToken && s.targetToken && s.sourceToken.price / s.targetToken.price;
1892
1890
  return s.sourceToken ? /* @__PURE__ */ o(
1893
- is,
1891
+ rs,
1894
1892
  {
1895
1893
  expandedByDefault: !1,
1896
1894
  expandedHeightPx: s.walletAddress ? 80 : 50,
1897
1895
  isBadgeLoading: s.quoteStatus === "pending",
1898
1896
  badge: s.quote ? `~ ${s.quote.timeEstimate} sec` : void 0,
1899
1897
  className: e,
1900
- title: s.sourceToken && s.targetToken ? /* @__PURE__ */ T("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1898
+ title: s.sourceToken && s.targetToken ? /* @__PURE__ */ h("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1901
1899
  `1 ${s.sourceToken.symbol} ≈ `,
1902
1900
  " ",
1903
- cs(n ?? 0),
1901
+ as(n ?? 0),
1904
1902
  " ",
1905
1903
  `${s.targetToken.symbol}`,
1906
- /* @__PURE__ */ o("span", { className: "text-sw-gray-50", children: ` (${$e(s.sourceToken.price)})` })
1907
- ] }) : /* @__PURE__ */ T("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1904
+ /* @__PURE__ */ o("span", { className: "text-sw-gray-50", children: ` (${Qe(s.sourceToken.price)})` })
1905
+ ] }) : /* @__PURE__ */ h("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1908
1906
  `1 ${s.sourceToken.symbol} ≈ `,
1909
1907
  " ",
1910
- $e(s.sourceToken.price),
1908
+ Qe(s.sourceToken.price),
1911
1909
  " USD"
1912
1910
  ] }),
1913
- children: /* @__PURE__ */ T(de, { children: [
1911
+ children: /* @__PURE__ */ h(de, { children: [
1914
1912
  /* @__PURE__ */ o(
1915
1913
  de.Item,
1916
1914
  {
@@ -1928,28 +1926,28 @@ const Cr = ({ className: e }) => {
1928
1926
  )
1929
1927
  ] })
1930
1928
  }
1931
- ) : /* @__PURE__ */ o(wt, {});
1932
- }, Vi = Object.assign(Cr, {
1933
- Skeleton: wt
1934
- }), Rr = ({
1929
+ ) : /* @__PURE__ */ o(It, {});
1930
+ }, Pi = Object.assign(yr, {
1931
+ Skeleton: It
1932
+ }), br = ({
1935
1933
  token: e,
1936
1934
  balance: t,
1937
1935
  isNotSufficient: r = !1,
1938
1936
  onClick: s
1939
1937
  }) => {
1940
1938
  const n = y();
1941
- return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(ds, { width: 100 }) : /* @__PURE__ */ o(
1939
+ return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(is, { width: 100 }) : /* @__PURE__ */ o(
1942
1940
  "span",
1943
1941
  {
1944
1942
  onClick: t ? s : void 0,
1945
1943
  style: t ? { borderBottomWidth: "2px", borderStyle: "dotted" } : void 0,
1946
- className: ls("text-sw-label-sm", {
1944
+ className: os("text-sw-label-sm", {
1947
1945
  "text-sw-status-error": r,
1948
1946
  "text-sw-gray-100": !r,
1949
1947
  "cursor-pointer": !!t && !!s
1950
1948
  }),
1951
1949
  children: /* @__PURE__ */ o(
1952
- Oe,
1950
+ xe,
1953
1951
  {
1954
1952
  decimals: e.decimals,
1955
1953
  value: t === void 0 ? "0" : `${t}`
@@ -1957,27 +1955,27 @@ const Cr = ({ className: e }) => {
1957
1955
  )
1958
1956
  }
1959
1957
  );
1960
- }, Be = ({
1958
+ }, Le = ({
1961
1959
  token: e,
1962
1960
  balance: t,
1963
1961
  value: r = "",
1964
1962
  quoteUsdDelta: s,
1965
1963
  quoteUsdValue: n,
1966
1964
  state: a = "default",
1967
- showBalance: l = !0,
1968
- showQuickBalanceActions: c = !0,
1965
+ showBalance: c = !0,
1966
+ showQuickBalanceActions: l = !0,
1969
1967
  heading: d,
1970
1968
  onMsg: u
1971
1969
  }) => {
1972
- const i = Mt(), { ctx: f } = _(), { t: h } = V(), { hideTokenInputHeadings: I } = y(), m = ms(e, r, n), w = (N) => {
1970
+ const i = Pt(), { ctx: f } = _(), { t: T } = V(), { hideTokenInputHeadings: I } = y(), m = cs(e, r, n), w = (S) => {
1973
1971
  u({
1974
1972
  type: "on_change_amount",
1975
- amount: us(t, e.decimals, N)
1973
+ amount: ls(t, e.decimals, S)
1976
1974
  });
1977
1975
  };
1978
- return /* @__PURE__ */ T(ie, { className: "flex flex-col", "aria-label": d, children: [
1979
- !I && /* @__PURE__ */ o(kt, { children: d }),
1980
- /* @__PURE__ */ T(
1976
+ return /* @__PURE__ */ h(ie, { className: "flex flex-col", "aria-label": d, children: [
1977
+ !I && /* @__PURE__ */ o(wt, { children: d }),
1978
+ /* @__PURE__ */ h(
1981
1979
  "div",
1982
1980
  {
1983
1981
  className: H(
@@ -1986,19 +1984,19 @@ const Cr = ({ className: e }) => {
1986
1984
  ),
1987
1985
  children: [
1988
1986
  /* @__PURE__ */ o(
1989
- ps,
1987
+ us,
1990
1988
  {
1991
1989
  value: r,
1992
1990
  name: i,
1993
- setValue: fs,
1991
+ setValue: ds,
1994
1992
  placeholder: "0",
1995
1993
  state: a === "default" || a === "disabled" ? a : "error",
1996
- onChange: (N) => {
1997
- u({ type: "on_change_amount", amount: N.target.value });
1994
+ onChange: (S) => {
1995
+ u({ type: "on_change_amount", amount: S.target.value });
1998
1996
  }
1999
1997
  }
2000
1998
  ),
2001
- /* @__PURE__ */ T(
1999
+ /* @__PURE__ */ h(
2002
2000
  "button",
2003
2001
  {
2004
2002
  type: "button",
@@ -2012,11 +2010,11 @@ const Cr = ({ className: e }) => {
2012
2010
  ),
2013
2011
  children: [
2014
2012
  /* @__PURE__ */ o(
2015
- At,
2013
+ kt,
2016
2014
  {
2015
+ token: e,
2017
2016
  chainShowIcon: !e.isIntent,
2018
- className: "border-sw-gray-800 group-hover:border-sw-gray-700 transition-colors top-[14px]",
2019
- ...e
2017
+ className: "border-sw-gray-800 group-hover:border-sw-gray-700 transition-colors top-[14px]"
2020
2018
  }
2021
2019
  ),
2022
2020
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e.symbol })
@@ -2026,8 +2024,8 @@ const Cr = ({ className: e }) => {
2026
2024
  ]
2027
2025
  }
2028
2026
  ),
2029
- /* @__PURE__ */ T("div", { className: "gap-sw-sm min-h-sw-2xl flex items-center justify-between mt-sw-lg", children: [
2030
- /* @__PURE__ */ T("div", { className: "gap-sw-md flex items-center", children: [
2027
+ /* @__PURE__ */ h("div", { className: "gap-sw-sm min-h-sw-2xl flex items-center justify-between mt-sw-lg", children: [
2028
+ /* @__PURE__ */ h("div", { className: "gap-sw-md flex items-center", children: [
2031
2029
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-100", children: m }),
2032
2030
  s ? /* @__PURE__ */ o(
2033
2031
  "span",
@@ -2042,9 +2040,9 @@ const Cr = ({ className: e }) => {
2042
2040
  }
2043
2041
  ) : null
2044
2042
  ] }),
2045
- /* @__PURE__ */ T("div", { className: "gap-sw-sm flex items-center", children: [
2046
- e && !!f.walletAddress && l && /* @__PURE__ */ o(
2047
- Rr,
2043
+ /* @__PURE__ */ h("div", { className: "gap-sw-sm flex items-center", children: [
2044
+ e && !!f.walletAddress && c && /* @__PURE__ */ o(
2045
+ br,
2048
2046
  {
2049
2047
  token: e,
2050
2048
  balance: t,
@@ -2052,39 +2050,39 @@ const Cr = ({ className: e }) => {
2052
2050
  onClick: () => w(1)
2053
2051
  }
2054
2052
  ),
2055
- !!t && l && c && /* @__PURE__ */ T(Bt, { children: [
2053
+ !!t && c && l && /* @__PURE__ */ h(Ft, { children: [
2056
2054
  /* @__PURE__ */ o(
2057
- Ke,
2055
+ $e,
2058
2056
  {
2059
2057
  isClickable: a !== "disabled",
2060
2058
  onClick: () => w(2),
2061
- children: h("tokens.input.half.label", "50%")
2059
+ children: T("tokens.input.half.label", "50%")
2062
2060
  }
2063
2061
  ),
2064
2062
  /* @__PURE__ */ o(
2065
- Ke,
2063
+ $e,
2066
2064
  {
2067
2065
  isClickable: a !== "disabled",
2068
2066
  onClick: () => w(1),
2069
- children: h("tokens.input.max.label", "Max")
2067
+ children: T("tokens.input.max.label", "Max")
2070
2068
  }
2071
2069
  )
2072
2070
  ] }),
2073
- !l && /* @__PURE__ */ o("div", { className: "rounded-full bg-sw-gray-700 py-sw-xs px-sw-sm flex items-center justify-center", children: /* @__PURE__ */ o("span", { className: "text-sw-gray-100 text-sw-label-sm", children: h("tokens.input.externalBalance.label", "External balance") }) })
2071
+ !c && /* @__PURE__ */ o("div", { className: "rounded-full bg-sw-gray-700 py-sw-xs px-sw-sm flex items-center justify-center", children: /* @__PURE__ */ o("span", { className: "text-sw-gray-100 text-sw-label-sm", children: T("tokens.input.externalBalance.label", "External balance") }) })
2074
2072
  ] })
2075
2073
  ] })
2076
2074
  ] });
2077
- }, qe = ({ onMsg: e, heading: t }) => {
2075
+ }, Be = ({ onMsg: e, heading: t }) => {
2078
2076
  const { hideTokenInputHeadings: r } = y();
2079
- return /* @__PURE__ */ T(
2077
+ return /* @__PURE__ */ h(
2080
2078
  ie,
2081
2079
  {
2082
2080
  isClickable: !0,
2083
2081
  className: "flex flex-col",
2084
2082
  onClick: () => e({ type: "on_click_select_token" }),
2085
2083
  children: [
2086
- !r && /* @__PURE__ */ o(kt, { children: t }),
2087
- /* @__PURE__ */ T(
2084
+ !r && /* @__PURE__ */ o(wt, { children: t }),
2085
+ /* @__PURE__ */ h(
2088
2086
  "div",
2089
2087
  {
2090
2088
  className: H(
@@ -2116,11 +2114,11 @@ const Cr = ({ className: e }) => {
2116
2114
  ]
2117
2115
  }
2118
2116
  );
2119
- }, xt = (e) => {
2120
- const { mergedBalance: t } = le(), [r, s] = re(
2117
+ }, vt = (e) => {
2118
+ const { mergedBalance: t } = ce(), [r, s] = re(
2121
2119
  e ? t[G(e)] : void 0
2122
2120
  );
2123
- return C(() => {
2121
+ return R(() => {
2124
2122
  let n;
2125
2123
  if (e) {
2126
2124
  const a = t[G(e)];
@@ -2136,23 +2134,23 @@ const Cr = ({ className: e }) => {
2136
2134
  n && clearTimeout(n);
2137
2135
  };
2138
2136
  }, [e, t]), r;
2139
- }, Ot = (e, t) => {
2137
+ }, Dt = (e, t) => {
2140
2138
  const { tokens: r } = P(e), s = Array.from(
2141
2139
  new Set(r.map((n) => n.assetId))
2142
2140
  );
2143
- C(() => {
2141
+ R(() => {
2144
2142
  const n = s.length === 1 ? r[0] : null;
2145
2143
  n && t({ type: "on_select_token", token: n });
2146
2144
  }, [r]);
2147
- }, vr = ({
2145
+ }, Er = ({
2148
2146
  onMsg: e,
2149
2147
  isChanging: t = !0,
2150
2148
  showBalance: r = !0,
2151
2149
  heading: s
2152
2150
  }) => {
2153
- const { ctx: n } = _(), a = xt(n.sourceToken);
2154
- Ot("source", e);
2155
- const l = v(() => {
2151
+ const { ctx: n } = _(), a = vt(n.sourceToken);
2152
+ Dt("source", e);
2153
+ const c = v(() => {
2156
2154
  if (!t && n.quoteStatus === "pending")
2157
2155
  return "disabled";
2158
2156
  if (!n.error)
@@ -2163,28 +2161,28 @@ const Cr = ({ className: e }) => {
2163
2161
  return "error-balance";
2164
2162
  }, [t, n.error, n.quoteStatus]);
2165
2163
  return n.sourceToken ? /* @__PURE__ */ o(
2166
- Be,
2164
+ Le,
2167
2165
  {
2168
2166
  heading: s,
2169
2167
  token: n.sourceToken,
2170
- state: l,
2168
+ state: c,
2171
2169
  balance: a,
2172
2170
  showBalance: r,
2173
2171
  showQuickBalanceActions: !0,
2174
2172
  value: j(n.sourceTokenAmount, n.sourceToken?.decimals),
2175
2173
  onMsg: e
2176
2174
  }
2177
- ) : /* @__PURE__ */ o(qe, { heading: s, onMsg: e });
2178
- }, Dr = ({
2175
+ ) : /* @__PURE__ */ o(Be, { heading: s, onMsg: e });
2176
+ }, Rr = ({
2179
2177
  isChanging: e = !1,
2180
2178
  onMsg: t,
2181
2179
  heading: r
2182
2180
  }) => {
2183
- const { ctx: s } = _(), { usdTradeDelta: n } = z(), a = xt(s.targetToken);
2184
- Ot("target", t);
2185
- const l = v(() => !e && s.quoteStatus === "pending" ? "disabled" : "default", [e, s.quoteStatus]);
2181
+ const { ctx: s } = _(), { usdTradeDelta: n } = z(), a = vt(s.targetToken);
2182
+ Dt("target", t);
2183
+ const c = v(() => !e && s.quoteStatus === "pending" ? "disabled" : "default", [e, s.quoteStatus]);
2186
2184
  return s.targetToken ? /* @__PURE__ */ o(
2187
- Be,
2185
+ Le,
2188
2186
  {
2189
2187
  heading: r,
2190
2188
  token: s.targetToken,
@@ -2192,17 +2190,17 @@ const Cr = ({ className: e }) => {
2192
2190
  quoteUsdDelta: n?.percentage,
2193
2191
  quoteUsdValue: s.quote && parseFloat(s.quote.amountOutUsd),
2194
2192
  value: j(s.targetTokenAmount, s.targetToken?.decimals),
2195
- state: l,
2193
+ state: c,
2196
2194
  showQuickBalanceActions: !1,
2197
2195
  showBalance: !0,
2198
2196
  onMsg: t
2199
2197
  }
2200
- ) : /* @__PURE__ */ o(qe, { heading: r, onMsg: t });
2201
- }, xr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Be, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(qe, { onMsg: r.onMsg, heading: t }), Qi = Object.assign(xr, {
2202
- Skeleton: hs,
2203
- Source: vr,
2204
- Target: Dr
2205
- }), Je = 58, Ft = ({
2198
+ ) : /* @__PURE__ */ o(Be, { heading: r, onMsg: t });
2199
+ }, Cr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Le, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(Be, { onMsg: r.onMsg, heading: t }), Wi = Object.assign(Cr, {
2200
+ Skeleton: ms,
2201
+ Source: Er,
2202
+ Target: Rr
2203
+ }), Ze = 58, xt = ({
2206
2204
  token: e,
2207
2205
  balance: t,
2208
2206
  showBalance: r = !0,
@@ -2210,8 +2208,8 @@ const Cr = ({ className: e }) => {
2210
2208
  className: n,
2211
2209
  onMsg: a
2212
2210
  }) => {
2213
- const { ctx: l } = _(), { walletSupportedChains: c, appName: d } = y(), u = Ts(t, e), i = c.includes(e.blockchain) || e.isIntent, f = t !== "0" && t !== 0 && t !== void 0;
2214
- return /* @__PURE__ */ o("li", { className: "list-none group", children: /* @__PURE__ */ T(
2211
+ const { ctx: c } = _(), { walletSupportedChains: l, appName: d } = y(), u = fs(t, e), i = l.includes(e.blockchain) || e.isIntent, f = t !== "0" && t !== 0 && t !== void 0;
2212
+ return /* @__PURE__ */ o("li", { className: "list-none group", children: /* @__PURE__ */ h(
2215
2213
  "div",
2216
2214
  {
2217
2215
  className: H(
@@ -2225,28 +2223,28 @@ const Cr = ({ className: e }) => {
2225
2223
  onClick: () => !s && a({ type: "on_select_token", token: e }),
2226
2224
  children: [
2227
2225
  /* @__PURE__ */ o(
2228
- At,
2226
+ kt,
2229
2227
  {
2228
+ token: e,
2230
2229
  chainShowIcon: !e.isIntent,
2231
- className: "border-sw-gray-900 group-hover:border-sw-gray-800 transition-colors",
2232
- ...e
2230
+ className: "border-sw-gray-900 group-hover:border-sw-gray-800 transition-colors"
2233
2231
  }
2234
2232
  ),
2235
- /* @__PURE__ */ T("div", { className: "gap-sw-xs mr-auto flex flex-col", children: [
2233
+ /* @__PURE__ */ h("div", { className: "gap-sw-xs mr-auto flex flex-col", children: [
2236
2234
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e.name }),
2237
- e.isIntent ? /* @__PURE__ */ T("div", { className: "flex items-center gap-sw-xs", children: [
2235
+ e.isIntent ? /* @__PURE__ */ h("div", { className: "flex items-center gap-sw-xs", children: [
2238
2236
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2239
2237
  " ",
2240
2238
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${d} ${e.chainName.toLowerCase() !== "near" && f ? `(${e.chainName})` : ""}` })
2241
- ] }) : /* @__PURE__ */ T("div", { className: "flex items-center gap-sw-xs", children: [
2239
+ ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-sw-xs", children: [
2242
2240
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2243
2241
  " ",
2244
2242
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${e.chainName}` })
2245
2243
  ] })
2246
2244
  ] }),
2247
- i && !!l.walletAddress && r && /* @__PURE__ */ T("div", { className: "gap-sw-xs flex flex-col items-end", children: [
2245
+ i && !!c.walletAddress && r && /* @__PURE__ */ h("div", { className: "gap-sw-xs flex flex-col items-end", children: [
2248
2246
  t === void 0 && !e.isIntent ? /* @__PURE__ */ o("span", { className: "h-[16px] w-[60px] animate-pulse rounded-full bg-sw-gray-700" }) : /* @__PURE__ */ o("span", { className: "h-[16px] text-sw-label-md text-sw-gray-50", children: f && /* @__PURE__ */ o(
2249
- Oe,
2247
+ xe,
2250
2248
  {
2251
2249
  decimals: e.decimals,
2252
2250
  value: t === void 0 ? "0" : `${t}`
@@ -2257,7 +2255,7 @@ const Cr = ({ className: e }) => {
2257
2255
  ]
2258
2256
  }
2259
2257
  ) });
2260
- }, et = [
2258
+ }, Xe = [
2261
2259
  "nep141:eth-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
2262
2260
  // cbBTC (eth)
2263
2261
  "nep141:base-0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf.omft.near",
@@ -2270,79 +2268,79 @@ const Cr = ({ className: e }) => {
2270
2268
  // NEAR (bsc)
2271
2269
  "nep141:eth-0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c.omft.near"
2272
2270
  // SPX (eth)
2273
- ], Or = () => {
2271
+ ], vr = () => {
2274
2272
  const { tokens: e } = P();
2275
2273
  return {
2276
2274
  uniqueIntentsTokens: v(() => {
2277
2275
  const t = e.filter(
2278
- (n) => n.isIntent && n.blockchain === "near" && !et.includes(n.assetId)
2279
- ), r = t.map((n) => n.isIntent && n.symbol), s = e.filter((n) => n.isIntent && n.blockchain !== "near" && !r.includes(n.symbol) && !et.includes(n.assetId));
2276
+ (n) => n.isIntent && n.blockchain === "near" && !Xe.includes(n.assetId)
2277
+ ), r = t.map((n) => n.isIntent && n.symbol), s = e.filter((n) => n.isIntent && n.blockchain !== "near" && !r.includes(n.symbol) && !Xe.includes(n.assetId));
2280
2278
  return [...t, ...s];
2281
2279
  }, [e])
2282
2280
  };
2283
- }, Fr = ({
2281
+ }, Dr = ({
2284
2282
  variant: e,
2285
2283
  search: t,
2286
2284
  selectedChain: r,
2287
2285
  chainsFilter: s,
2288
2286
  walletSupportedChains: n
2289
2287
  }) => {
2290
- Gs(e);
2291
- const { tokens: a } = P(e), { mergedBalance: l } = le(), { intentBalances: c } = ce(), { uniqueIntentsTokens: d } = Or(), u = ws(
2292
- l,
2288
+ $s(e);
2289
+ const { tokens: a } = P(e), { mergedBalance: c } = ce(), { intentBalances: l } = le(), { uniqueIntentsTokens: d } = vr(), u = hs(
2290
+ c,
2293
2291
  n,
2294
2292
  t
2295
- ), i = a.filter(ks({ search: t })).filter(
2296
- As({
2293
+ ), i = a.filter(gs({ search: t })).filter(
2294
+ Is({
2297
2295
  selectedChain: r,
2298
2296
  chainsFilter: s,
2299
2297
  walletSupportedChains: n,
2300
- intentBalances: c,
2298
+ intentBalances: l,
2301
2299
  uniqueIntentTokenIds: d.map((f) => f.assetId)
2302
2300
  })
2303
2301
  );
2304
2302
  return {
2305
2303
  all: i.sort(u),
2306
- intents: i.filter(He({ isIntent: !0 })).sort(u),
2307
- wallet: i.filter(He({ isIntent: !1 })).sort(u)
2304
+ intents: i.filter(Ke({ isIntent: !0 })).sort(u),
2305
+ wallet: i.filter(Ke({ isIntent: !1 })).sort(u)
2308
2306
  };
2309
- }, Lr = (e, t) => e.length === 0 && t ? "EMPTY_SEARCH" : e.length === 0 && !t ? "NO_TOKENS" : "HAS_TOKENS", Br = ({
2307
+ }, xr = (e, t) => e.length === 0 && t ? "EMPTY_SEARCH" : e.length === 0 && !t ? "NO_TOKENS" : "HAS_TOKENS", Or = ({
2310
2308
  variant: e,
2311
2309
  search: t,
2312
2310
  className: r,
2313
2311
  groupTokens: s,
2314
2312
  showBalances: n,
2315
2313
  chainsFilter: a,
2316
- selectedChain: l,
2317
- chainIsNotSupported: c,
2314
+ selectedChain: c,
2315
+ chainIsNotSupported: l,
2318
2316
  onMsg: d
2319
2317
  }) => {
2320
- const { t: u } = V(), { ctx: i } = _(), { walletSupportedChains: f, appName: h } = y(), { mergedBalance: I } = le(), m = Fr({
2318
+ const { t: u } = V(), { ctx: i } = _(), { walletSupportedChains: f, appName: T } = y(), { mergedBalance: I } = ce(), m = Dr({
2321
2319
  variant: e,
2322
2320
  search: t,
2323
2321
  chainsFilter: a,
2324
- selectedChain: l,
2322
+ selectedChain: c,
2325
2323
  walletSupportedChains: f
2326
- }), w = i.walletAddress ? s : !1, N = Lr(m.all, t), E = v(
2324
+ }), w = i.walletAddress ? s : !1, S = xr(m.all, t), E = v(
2327
2325
  () => [{ label: null, tokens: m.all }],
2328
2326
  [m.all]
2329
2327
  ), B = v(
2330
2328
  () => [
2331
- { label: h, tokens: m.intents },
2329
+ { label: T, tokens: m.intents },
2332
2330
  {
2333
- label: c ? null : "Connected wallet",
2331
+ label: l ? null : "Connected wallet",
2334
2332
  tokens: m.wallet
2335
2333
  }
2336
2334
  ],
2337
- [m.wallet, m.intents, c]
2335
+ [m.wallet, m.intents, l]
2338
2336
  ), F = v(() => (w ? B : E).reduce(
2339
2337
  (k, x) => k + x.tokens.length,
2340
2338
  0
2341
2339
  ), [B, E, w]), L = "450px";
2342
- switch (N) {
2340
+ switch (S) {
2343
2341
  case "EMPTY_SEARCH":
2344
2342
  return /* @__PURE__ */ o(
2345
- Ne,
2343
+ Se,
2346
2344
  {
2347
2345
  hasAction: !0,
2348
2346
  actionType: "outlined",
@@ -2358,29 +2356,29 @@ const Cr = ({ className: e }) => {
2358
2356
  );
2359
2357
  case "HAS_TOKENS":
2360
2358
  return /* @__PURE__ */ o("div", { className: H("gap-sw-lg flex flex-col", r), children: /* @__PURE__ */ o(
2361
- gs,
2359
+ ps,
2362
2360
  {
2363
2361
  className: "hide-scrollbar",
2364
2362
  style: {
2365
2363
  maxHeight: L,
2366
2364
  minHeight: 200,
2367
- height: F ? F * Je + (w ? B.length * 62 : 0) : Je * 2
2365
+ height: F ? F * Ze + (w ? B.length * 62 : 0) : Ze * 2
2368
2366
  },
2369
2367
  children: (w ? B : E).map(
2370
- ({ label: k, tokens: x }) => /* @__PURE__ */ T(Vt, { children: [
2371
- x.length && k ? /* @__PURE__ */ T("header", { className: "pb-sw-lg flex flex-col", children: [
2372
- /* @__PURE__ */ o(Is, {}),
2368
+ ({ label: k, tokens: x }) => /* @__PURE__ */ h(Wt, { children: [
2369
+ x.length && k ? /* @__PURE__ */ h("header", { className: "pb-sw-lg flex flex-col", children: [
2370
+ /* @__PURE__ */ o(Ts, {}),
2373
2371
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm pt-sw-xl text-sw-gray-100", children: `${k} — ${x.length}` })
2374
2372
  ] }) : null,
2375
2373
  x.map((X) => {
2376
2374
  const J = G(X);
2377
2375
  return /* @__PURE__ */ o(
2378
- Ft,
2376
+ xt,
2379
2377
  {
2380
2378
  token: X,
2381
2379
  showBalance: n,
2382
2380
  balance: I[J],
2383
- isNotSelectable: c && !!i.walletAddress,
2381
+ isNotSelectable: l && !!i.walletAddress,
2384
2382
  onMsg: d
2385
2383
  },
2386
2384
  J
@@ -2394,7 +2392,7 @@ const Cr = ({ className: e }) => {
2394
2392
  case "NO_TOKENS":
2395
2393
  default:
2396
2394
  return /* @__PURE__ */ o(
2397
- Ne,
2395
+ Se,
2398
2396
  {
2399
2397
  className: "pt-sw-5xl pb-sw-5xl",
2400
2398
  subHeading: u(
@@ -2403,55 +2401,55 @@ const Cr = ({ className: e }) => {
2403
2401
  ),
2404
2402
  heading: u("tokens.list.noBalanceOnApp.label", {
2405
2403
  defaultValue: "You have no balances on {{appName}}",
2406
- appName: h
2404
+ appName: T
2407
2405
  })
2408
2406
  }
2409
2407
  );
2410
2408
  }
2411
- }, $i = Object.assign(Br, {
2412
- Placeholder: Ne,
2413
- Item: Ft
2414
- }), qr = (e, t) => {
2409
+ }, Mi = Object.assign(Or, {
2410
+ Placeholder: Se,
2411
+ Item: xt
2412
+ }), Fr = (e, t) => {
2415
2413
  const r = t.assetId.substring(t.assetId.indexOf(":") + 1), s = (a) => {
2416
- const l = (u) => u.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, ""), c = l(t.amount), d = l(
2414
+ const c = (u) => u.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, ""), l = c(t.amount), d = c(
2417
2415
  a.amount.toLocaleString("en-US", {
2418
2416
  useGrouping: !1,
2419
2417
  maximumFractionDigits: 20
2420
2418
  })
2421
2419
  );
2422
- return c.startsWith(d) || d.startsWith(c);
2420
+ return l.startsWith(d) || d.startsWith(l);
2423
2421
  }, n = (a) => new Date(a.created_at) >= new Date(t.initiatedAtDate);
2424
2422
  return (e.result.deposits || []).find(
2425
2423
  (a) => a.chain === t.chainId && a.account_id === t.intentsAccountId && a.address === t.depositAddress && a.near_token_id === r && n(a) && s(a)
2426
2424
  );
2427
- }, Ur = {
2425
+ }, Lr = {
2428
2426
  CREDITED: ee.status.PROCESSING,
2429
2427
  PENDING: ee.status.PROCESSING,
2430
2428
  COMPLETED: ee.status.SUCCESS,
2431
2429
  FAILED: ee.status.FAILED
2432
- }, Ki = ({ depositAddress: e }) => {
2430
+ }, Vi = ({ depositAddress: e }) => {
2433
2431
  const { ctx: t } = _(), { intentsAccountType: r } = y(), [s, n] = re(null), a = te({
2434
2432
  addressType: r,
2435
2433
  walletAddress: t.walletAddress
2436
2434
  });
2437
2435
  return { pollDepositStatus: async ({
2438
- blockchain: c,
2436
+ blockchain: l,
2439
2437
  amount: d,
2440
2438
  assetId: u
2441
2439
  }) => {
2442
2440
  if (!a)
2443
2441
  throw new W("Unknown intents account for POA deposit check");
2444
- let i = ct[c];
2442
+ let i = it[l];
2445
2443
  if (!i)
2446
- if (Q(c))
2444
+ if (Q(l))
2447
2445
  i = lt;
2448
2446
  else
2449
2447
  throw new W(
2450
- `Unknown chain for POA deposit check ${c}`
2448
+ `Unknown chain for POA deposit check ${l}`
2451
2449
  );
2452
2450
  const f = s ?? (/* @__PURE__ */ new Date()).toUTCString();
2453
2451
  s || n(f);
2454
- const h = await ft.post("", {
2452
+ const T = await mt.post("", {
2455
2453
  id: 1,
2456
2454
  jsonrpc: "2.0",
2457
2455
  method: "recent_deposits",
@@ -2461,7 +2459,7 @@ const Cr = ({ className: e }) => {
2461
2459
  chain: i
2462
2460
  }
2463
2461
  ]
2464
- }), I = qr(h.data, {
2462
+ }), I = Fr(T.data, {
2465
2463
  intentsAccountId: a,
2466
2464
  initiatedAtDate: f,
2467
2465
  depositAddress: e,
@@ -2470,7 +2468,7 @@ const Cr = ({ className: e }) => {
2470
2468
  amount: d
2471
2469
  });
2472
2470
  return I ? {
2473
- status: Ur[I.status],
2471
+ status: Lr[I.status],
2474
2472
  swapDetails: {
2475
2473
  intentHashes: [""],
2476
2474
  destinationChainTxHashes: [{ hash: I.tx_hash ?? "" }]
@@ -2483,38 +2481,36 @@ const Cr = ({ className: e }) => {
2483
2481
  }
2484
2482
  };
2485
2483
  } };
2486
- }, Pr = (e, t, r) => {
2487
- if (Nt) {
2488
- let s = document.body;
2489
- r instanceof HTMLElement && (s = r), Object.entries(e).forEach(([n, a]) => {
2490
- s.style.setProperty(`--c-sw-${t}-${n}`, a);
2491
- });
2492
- }
2493
- }, tt = (e, t, r, s, n) => {
2494
- const a = Ns(s, n, t);
2495
- a && Pr(a, e, r);
2496
- }, Wr = (e, t) => {
2484
+ }, Br = (e, t, r) => {
2485
+ let s = document.body;
2486
+ r instanceof HTMLElement && (s = r), Object.entries(e).forEach(([n, a]) => {
2487
+ s.style.setProperty(`--c-sw-${t}-${n}`, a);
2488
+ });
2489
+ }, Je = (e, t, r, s, n) => {
2490
+ const a = ws(s, n, t);
2491
+ a && Br(a, e, r);
2492
+ }, qr = (e, t) => {
2497
2493
  const { primaryColor: r, surfaceColor: s, colorScheme: n = "dark" } = t;
2498
- r && tt("accent", 500, e, r, n), s && tt("gray", 950, e, s, n);
2499
- }, Mr = at(void 0), Vr = ({ children: e, theme: t }) => {
2494
+ r && Je("accent", 500, e, r, n), s && Je("gray", 950, e, s, n);
2495
+ }, Ur = st(void 0), Pr = ({ children: e, theme: t }) => {
2500
2496
  const { themeParentElementSelector: r } = y(), s = v(() => t, [t]);
2501
- return C(() => {
2502
- if (t && Nt) {
2497
+ return R(() => {
2498
+ if (t) {
2503
2499
  const n = r ? document.querySelector(r) : null;
2504
- Wr(n, t);
2500
+ qr(n, t);
2505
2501
  }
2506
- }, [t]), /* @__PURE__ */ o(Mr.Provider, { value: s, children: /* @__PURE__ */ o("div", { className: "sw", children: e }) });
2502
+ }, [t]), /* @__PURE__ */ o(Ur.Provider, { value: s, children: /* @__PURE__ */ o("div", { className: "sw", children: e }) });
2507
2503
  }, fe = ({
2508
2504
  text: e,
2509
2505
  icon: t
2510
- }) => /* @__PURE__ */ T("li", { className: "flex items-center gap-sw-md", children: [
2506
+ }) => /* @__PURE__ */ h("li", { className: "flex items-center gap-sw-md", children: [
2511
2507
  t && /* @__PURE__ */ o(t, { size: 20, className: "text-sw-gray-300" }),
2512
2508
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e })
2513
- ] }), nt = ({
2509
+ ] }), et = ({
2514
2510
  label: e,
2515
2511
  icon: t,
2516
2512
  className: r
2517
- }) => /* @__PURE__ */ T(
2513
+ }) => /* @__PURE__ */ h(
2518
2514
  "div",
2519
2515
  {
2520
2516
  className: H(
@@ -2526,28 +2522,28 @@ const Cr = ({ className: e }) => {
2526
2522
  /* @__PURE__ */ o("span", { className: "text-sw-label-md", children: e })
2527
2523
  ]
2528
2524
  }
2529
- ), Qr = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2525
+ ), Wr = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2530
2526
  const { t: s } = V(), n = () => r({ type: "on_close" });
2531
- St("Escape", n);
2532
- const a = Rs({
2527
+ At("Escape", n);
2528
+ const a = bs({
2533
2529
  endTime: 0,
2534
2530
  autostart: !1,
2535
2531
  timerType: "DECREMENTAL",
2536
2532
  initialTime: 7,
2537
2533
  onTimeOver: n
2538
2534
  });
2539
- return C(() => {
2535
+ return R(() => {
2540
2536
  e ? a.start() : a.reset();
2541
- }, [e]), /* @__PURE__ */ T(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2537
+ }, [e]), /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2542
2538
  /* @__PURE__ */ o(
2543
- _t,
2539
+ St,
2544
2540
  {
2545
2541
  onClick: n,
2546
2542
  className: "absolute top-sw-2xl right-sw-2xl"
2547
2543
  }
2548
2544
  ),
2549
- /* @__PURE__ */ o(Ss, { size: 48, className: "text-sw-status-warning" }),
2550
- /* @__PURE__ */ T("header", { className: "flex flex-col gap-sw-lg", children: [
2545
+ /* @__PURE__ */ o(ks, { size: 48, className: "text-sw-status-warning" }),
2546
+ /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2551
2547
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: s(
2552
2548
  "walletCompatibility.modal.title.initial",
2553
2549
  "Verify your wallet to continue"
@@ -2557,7 +2553,7 @@ const Cr = ({ className: e }) => {
2557
2553
  "Please sign a message to verify your wallet. This confirms your wallet is compatible and lets us securely read your public key."
2558
2554
  ) })
2559
2555
  ] }),
2560
- /* @__PURE__ */ T("ul", { className: "flex flex-col gap-sw-xl", children: [
2556
+ /* @__PURE__ */ h("ul", { className: "flex flex-col gap-sw-xl", children: [
2561
2557
  /* @__PURE__ */ o(
2562
2558
  fe,
2563
2559
  {
@@ -2565,7 +2561,7 @@ const Cr = ({ className: e }) => {
2565
2561
  "walletCompatibility.modal.feature.secureTransactions",
2566
2562
  "Read-only signature – no gas required."
2567
2563
  ),
2568
- icon: _s
2564
+ icon: As
2569
2565
  }
2570
2566
  ),
2571
2567
  /* @__PURE__ */ o(
@@ -2575,7 +2571,7 @@ const Cr = ({ className: e }) => {
2575
2571
  "walletCompatibility.modal.feature.fullAccess",
2576
2572
  "No access to your funds, no hidden permissions."
2577
2573
  ),
2578
- icon: ys
2574
+ icon: Ss
2579
2575
  }
2580
2576
  ),
2581
2577
  /* @__PURE__ */ o(
@@ -2585,24 +2581,24 @@ const Cr = ({ className: e }) => {
2585
2581
  "walletCompatibility.modal.feature.fundProtection",
2586
2582
  "Only checks whether your wallet is supported."
2587
2583
  ),
2588
- icon: bs
2584
+ icon: Ns
2589
2585
  }
2590
2586
  )
2591
2587
  ] }),
2592
- e ? /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
2588
+ e ? /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
2593
2589
  /* @__PURE__ */ o(
2594
- nt,
2590
+ et,
2595
2591
  {
2596
2592
  label: s(
2597
2593
  "walletCompatibility.modal.button.verified",
2598
2594
  "Wallet verified"
2599
2595
  ),
2600
2596
  className: "bg-sw-status-success text-sw-gray-950",
2601
- icon: Es
2597
+ icon: _s
2602
2598
  }
2603
2599
  ),
2604
2600
  a.status === "RUNNING" && /* @__PURE__ */ o(
2605
- nt,
2601
+ et,
2606
2602
  {
2607
2603
  className: "text-sw-gray-400",
2608
2604
  label: s("walletCompatibility.modal.button.closeTimer", {
@@ -2611,7 +2607,7 @@ const Cr = ({ className: e }) => {
2611
2607
  })
2612
2608
  }
2613
2609
  )
2614
- ] }) : /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2610
+ ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2615
2611
  /* @__PURE__ */ o(
2616
2612
  A,
2617
2613
  {
@@ -2636,18 +2632,18 @@ const Cr = ({ className: e }) => {
2636
2632
  )
2637
2633
  ] })
2638
2634
  ] });
2639
- }, $r = ({ onMsg: e }) => {
2635
+ }, Mr = ({ onMsg: e }) => {
2640
2636
  const { t } = V(), r = () => e({ type: "on_close" });
2641
- return St("Escape", r), /* @__PURE__ */ T(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2637
+ return At("Escape", r), /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2642
2638
  /* @__PURE__ */ o(
2643
- _t,
2639
+ St,
2644
2640
  {
2645
2641
  onClick: r,
2646
2642
  className: "absolute top-sw-2xl right-sw-2xl"
2647
2643
  }
2648
2644
  ),
2649
- /* @__PURE__ */ o(Cs, { size: 48, className: "text-sw-status-error" }),
2650
- /* @__PURE__ */ T("header", { className: "flex flex-col gap-sw-lg", children: [
2645
+ /* @__PURE__ */ o(ys, { size: 48, className: "text-sw-status-error" }),
2646
+ /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2651
2647
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: t(
2652
2648
  "walletCompatibility.modal.title.error",
2653
2649
  "Unable to verify wallet"
@@ -2661,7 +2657,7 @@ const Cr = ({ className: e }) => {
2661
2657
  "If the issue continues, please try another wallet."
2662
2658
  ) })
2663
2659
  ] }),
2664
- /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2660
+ /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2665
2661
  /* @__PURE__ */ o(
2666
2662
  A,
2667
2663
  {
@@ -2682,9 +2678,9 @@ const Cr = ({ className: e }) => {
2682
2678
  )
2683
2679
  ] })
2684
2680
  ] });
2685
- }, Hi = Object.assign(Qr, {
2686
- Error: $r
2687
- }), Kr = (e) => null, Hr = (e) => (t) => {
2681
+ }, Qi = Object.assign(Wr, {
2682
+ Error: Mr
2683
+ }), Vr = (e) => null, Qr = (e) => (t) => {
2688
2684
  if (t instanceof W)
2689
2685
  throw t;
2690
2686
  const r = new W(
@@ -2692,49 +2688,48 @@ const Cr = ({ className: e }) => {
2692
2688
  { cause: t }
2693
2689
  );
2694
2690
  throw r.context = e, r;
2695
- }, Gr = ({ children: e }) => {
2691
+ }, $r = ({ children: e }) => {
2696
2692
  const { ctx: t } = _();
2697
2693
  return /* @__PURE__ */ o(
2698
- xs,
2694
+ Cs,
2699
2695
  {
2700
- FallbackComponent: Kr,
2701
- onError: Hr(t),
2696
+ FallbackComponent: Vr,
2697
+ onError: Qr(t),
2702
2698
  children: e
2703
2699
  }
2704
2700
  );
2705
- }, jr = new Ht({
2701
+ }, Kr = new $t({
2706
2702
  defaultOptions: {
2707
2703
  queries: {
2708
2704
  staleTime: 2e3 * 60,
2709
- retry: st.env.NODE_ENV === "test" ? !1 : 3
2705
+ retry: tt.env.NODE_ENV === "test" ? !1 : 3
2710
2706
  }
2711
2707
  }
2712
- }), zr = ["fms", "abg", "stjack", "noear", "testnebula"], ae = {
2708
+ }), Hr = ["fms", "abg", "stjack", "noear", "testnebula"], ae = {
2713
2709
  appName: "Unknown",
2714
- appIcon: "https://wtmcxrwapthiogjpxwfr.supabase.co/storage/v1/object/public/swap-widget/unknown.svg",
2715
2710
  slippageTolerance: 100,
2716
2711
  // 1%
2717
2712
  intentsAccountType: "evm",
2718
- walletSupportedChains: sn,
2713
+ walletSupportedChains: en,
2719
2714
  connectedWallets: {},
2720
2715
  enableAutoTokensSwitching: !0,
2721
2716
  showIntentTokens: !0,
2722
- chainsOrder: it,
2723
- filterTokens: (e) => !zr.includes(e.symbol.toLocaleLowerCase()),
2717
+ chainsOrder: ot,
2718
+ filterTokens: (e) => !Hr.includes(e.symbol.toLocaleLowerCase()),
2724
2719
  chainsFilter: {
2725
2720
  source: { external: "wallet-supported", intents: "none" },
2726
2721
  target: { external: "all", intents: "none" }
2727
2722
  }
2728
- }, Lt = at({
2723
+ }, Ot = st({
2729
2724
  config: ae
2730
- }), Ue = rt({
2725
+ }), qe = nt({
2731
2726
  config: ae
2732
2727
  }), y = () => {
2733
- const e = Qt(Lt);
2728
+ const e = Mt(Ot);
2734
2729
  return oe(e).config;
2735
- }, Yr = (e) => {
2736
- Ue.config = pe(e);
2737
- }, Gi = ({
2730
+ }, Gr = (e) => {
2731
+ qe.config = pe(e);
2732
+ }, $i = ({
2738
2733
  children: e,
2739
2734
  config: t,
2740
2735
  balanceViaRpc: r = !0,
@@ -2743,110 +2738,110 @@ const Cr = ({ className: e }) => {
2743
2738
  rpcs: n,
2744
2739
  theme: a
2745
2740
  }) => {
2746
- const l = Y(
2747
- rt({
2741
+ const c = Y(
2742
+ nt({
2748
2743
  config: pe({
2749
2744
  ...ae,
2750
2745
  ...t
2751
2746
  })
2752
2747
  })
2753
2748
  );
2754
- return C(() => {
2755
- const c = pe({
2749
+ return R(() => {
2750
+ const l = pe({
2756
2751
  ...ae,
2757
2752
  ...t
2758
2753
  });
2759
- Object.assign(l.current.config, c), Yr(c);
2760
- }, [t]), Yt(s ?? {}), Ds("headlessui-portal-root", "sw"), /* @__PURE__ */ o(Gt, { client: jr, children: /* @__PURE__ */ o(zt, { i18n: qt, children: /* @__PURE__ */ T(Lt.Provider, { value: l.current, children: [
2761
- /* @__PURE__ */ T(Ut, { children: [
2762
- /* @__PURE__ */ T(Pt, { children: [
2754
+ Object.assign(c.current.config, l), Gr(l);
2755
+ }, [t]), jt(s ?? {}), Rs("headlessui-portal-root", "sw"), /* @__PURE__ */ o(Kt, { client: Kr, children: /* @__PURE__ */ o(Gt, { i18n: Lt, children: /* @__PURE__ */ h(Ot.Provider, { value: c.current, children: [
2756
+ /* @__PURE__ */ h(Bt, { children: [
2757
+ /* @__PURE__ */ h(qt, { children: [
2763
2758
  /* @__PURE__ */ o("link", { rel: "preconnect", href: "https://rsms.me/" }),
2764
2759
  /* @__PURE__ */ o("link", { rel: "stylesheet", href: "https://rsms.me/inter/inter.css" })
2765
2760
  ] }),
2766
- /* @__PURE__ */ o(Vr, { theme: a, children: st.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o(Gr, { children: e }) })
2761
+ /* @__PURE__ */ o(Pr, { theme: a, children: tt.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o($r, { children: e }) })
2767
2762
  ] }),
2768
2763
  r && /* @__PURE__ */ o(
2769
- Ks,
2764
+ Vs,
2770
2765
  {
2771
- rpcs: n ?? vs,
2766
+ rpcs: n ?? Es,
2772
2767
  connectedWallets: t.connectedWallets ?? {}
2773
2768
  }
2774
2769
  )
2775
2770
  ] }) }) });
2776
2771
  };
2777
2772
  export {
2778
- mr as $,
2779
- Ki as A,
2780
- Ks as B,
2781
- Mr as C,
2782
- Us as D,
2783
- Ge as E,
2784
- js as F,
2785
- zs as G,
2786
- Ys as H,
2787
- Zs as I,
2788
- er as J,
2789
- Et as K,
2790
- Ct as L,
2791
- Dt as M,
2792
- Rt as N,
2793
- vt as O,
2794
- tr as P,
2773
+ cr as $,
2774
+ Vi as A,
2775
+ Vs as B,
2776
+ Ur as C,
2777
+ Ls as D,
2778
+ He as E,
2779
+ Ks as F,
2780
+ Hs as G,
2781
+ Gs as H,
2782
+ js as I,
2783
+ Zs as J,
2784
+ yt as K,
2785
+ bt as L,
2786
+ Ct as M,
2787
+ Et as N,
2788
+ Rt as O,
2789
+ Xs as P,
2795
2790
  q as Q,
2796
- nr as R,
2797
- Er as S,
2798
- xr as T,
2799
- sr as U,
2800
- rr as V,
2801
- Gi as W,
2802
- ar as X,
2803
- or as Y,
2804
- ir as Z,
2805
- cr as _,
2806
- Mi as a,
2807
- fr as a0,
2808
- hr as a1,
2809
- Tr as a2,
2810
- Cr as a3,
2811
- Rr as a4,
2812
- Be as a5,
2813
- qe as a6,
2814
- Ot as a7,
2815
- vr as a8,
2816
- Dr as a9,
2817
- Je as aa,
2818
- Ft as ab,
2819
- Or as ac,
2820
- Br as ad,
2821
- Vr as ae,
2822
- Qr as af,
2823
- $r as ag,
2824
- Gr as ah,
2825
- Ue as ai,
2791
+ Js as R,
2792
+ _r as S,
2793
+ Cr as T,
2794
+ er as U,
2795
+ tr as V,
2796
+ $i as W,
2797
+ nr as X,
2798
+ sr as Y,
2799
+ rr as Z,
2800
+ ar as _,
2801
+ Ui as a,
2802
+ dr as a0,
2803
+ mr as a1,
2804
+ fr as a2,
2805
+ yr as a3,
2806
+ br as a4,
2807
+ Le as a5,
2808
+ Be as a6,
2809
+ Dt as a7,
2810
+ Er as a8,
2811
+ Rr as a9,
2812
+ Ze as aa,
2813
+ xt as ab,
2814
+ vr as ac,
2815
+ Or as ad,
2816
+ Pr as ae,
2817
+ Wr as af,
2818
+ Mr as ag,
2819
+ $r as ah,
2820
+ qe as ai,
2826
2821
  _ as b,
2827
- Pi as c,
2828
- Gs as d,
2829
- Qs as e,
2830
- ce as f,
2831
- wr as g,
2832
- Js as h,
2833
- kr as i,
2834
- pr as j,
2835
- le as k,
2836
- Nr as l,
2837
- Fr as m,
2822
+ Bi as c,
2823
+ $s as d,
2824
+ Ws as e,
2825
+ le as f,
2826
+ hr as g,
2827
+ Ys as h,
2828
+ gr as i,
2829
+ ur as j,
2830
+ ce as k,
2831
+ wr as l,
2832
+ Dr as m,
2838
2833
  P as n,
2839
- Vi as o,
2840
- Qi as p,
2841
- $i as q,
2842
- lr as r,
2843
- xt as s,
2844
- bt as t,
2834
+ Pi as o,
2835
+ Wi as p,
2836
+ Mi as q,
2837
+ or as r,
2838
+ vt as s,
2839
+ _t as t,
2845
2840
  z as u,
2846
2841
  W as v,
2847
2842
  g as w,
2848
- Wi as x,
2843
+ qi as x,
2849
2844
  y,
2850
- Hi as z
2845
+ Qi as z
2851
2846
  };
2852
- //# sourceMappingURL=config-DKdwFIJc.js.map
2847
+ //# sourceMappingURL=config-DJ258QoC.js.map