@aurora-is-near/intents-swap-widget 3.14.0 → 3.14.2

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 (96) hide show
  1. package/dist/{config-CeOg2QLU.js → config-r-k8Mo4x.js} +584 -569
  2. package/dist/config-r-k8Mo4x.js.map +1 -0
  3. package/dist/config.js +1 -1
  4. package/dist/errors.js +1 -1
  5. package/dist/ext/alchemy/index.js +1 -1
  6. package/dist/ext/index.js +1 -1
  7. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  8. package/dist/features/BalanceRpcLoader/index.js +1 -1
  9. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  10. package/dist/features/ChainsDropdown/index.js +30 -37
  11. package/dist/features/ChainsDropdown/index.js.map +1 -1
  12. package/dist/features/DepositMethodSwitcher.js +1 -1
  13. package/dist/features/ErrorBoundary.js +1 -1
  14. package/dist/features/ExternalDeposit.js +1 -1
  15. package/dist/features/SendAddress/index.js +1 -1
  16. package/dist/features/SendAddress/useNotification.js +1 -1
  17. package/dist/features/SubmitButton/index.js +1 -1
  18. package/dist/features/SuccessScreen/index.js +1 -1
  19. package/dist/features/SwapDirectionSwitcher.js +1 -1
  20. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  21. package/dist/features/SwapQuote/index.js +1 -1
  22. package/dist/features/TokenInput/TokenInput.js +1 -1
  23. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  24. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  25. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  26. package/dist/features/TokenInput/WalletBalance.js +1 -1
  27. package/dist/features/TokenInput/hooks/index.js +1 -1
  28. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  29. package/dist/features/TokenInput/index.js +1 -1
  30. package/dist/features/TokensList/TokenItem.js +1 -1
  31. package/dist/features/TokensList/TokensList.js +1 -1
  32. package/dist/features/TokensList/index.js +1 -1
  33. package/dist/features/TokensModal.js +1 -1
  34. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  35. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  36. package/dist/features/index.js +1 -1
  37. package/dist/hooks/index.js +1 -1
  38. package/dist/hooks/useAllTokens.js +1 -1
  39. package/dist/hooks/useChains.js +1 -1
  40. package/dist/hooks/useCompatibilityCheck.js +1 -1
  41. package/dist/hooks/useDefaultToken.js +1 -1
  42. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  43. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  44. package/dist/hooks/useIntentsBalance.js +1 -1
  45. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  46. package/dist/hooks/useMakeDepositAddress.js +1 -1
  47. package/dist/hooks/useMakeIntentsTransfer.js +3 -2
  48. package/dist/hooks/useMakeIntentsTransfer.js.map +1 -1
  49. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  50. package/dist/hooks/useMakeQuote.js +1 -1
  51. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  52. package/dist/hooks/useMakeTransfer.js +1 -1
  53. package/dist/hooks/useMergedBalance.js +1 -1
  54. package/dist/hooks/useSwitchChain.js +1 -1
  55. package/dist/hooks/useTheme.js +1 -1
  56. package/dist/hooks/useTokenInputPair.js +1 -1
  57. package/dist/hooks/useTokens.js +1 -1
  58. package/dist/hooks/useTokensFiltered.js +1 -1
  59. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/machine/effects/index.js +1 -1
  62. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  63. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  64. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  65. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  66. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  67. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  68. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  69. package/dist/machine/errors.d.ts +5 -0
  70. package/dist/machine/errors.js.map +1 -1
  71. package/dist/machine/events/index.js +1 -1
  72. package/dist/machine/events/tokenSelect.js +1 -1
  73. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  74. package/dist/machine/events/validateInputs.js +1 -1
  75. package/dist/machine/index.js +1 -1
  76. package/dist/machine/snap.d.ts +15 -0
  77. package/dist/machine/snap.js +1 -1
  78. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  79. package/dist/machine/subscriptions/index.js +1 -1
  80. package/dist/theme/ThemeProvider.js +1 -1
  81. package/dist/utils/intents/signers/near.js +1 -1
  82. package/dist/utils/intents/signers/privy.js +1 -1
  83. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  84. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  85. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  86. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  87. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  88. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  89. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  90. package/package.json +1 -1
  91. package/src/features/ChainsDropdown/index.tsx +1 -5
  92. package/src/features/SubmitButton/index.tsx +4 -1
  93. package/src/features/TokensList/TokensList.tsx +1 -1
  94. package/src/hooks/useMakeIntentsTransfer.ts +22 -0
  95. package/src/machine/errors.ts +1 -0
  96. package/dist/config-CeOg2QLU.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { p as st } from "./index-xuotMAFm.js";
2
- import { jsx as o, jsxs as T, Fragment as Lt } from "react/jsx-runtime";
2
+ import { jsx as o, jsxs as h, Fragment as Lt } from "react/jsx-runtime";
3
3
  import Bt from "i18next";
4
4
  import { deepClone as pe } from "valtio/utils";
5
- import { snapshot as Ne, useSnapshot as oe, proxy as rt } from "valtio";
5
+ import { snapshot as Se, useSnapshot as oe, proxy as rt } from "valtio";
6
6
  import { HelmetProvider as qt, Helmet as Ut } from "react-helmet-async";
7
- import { memo as Pt, useEffect as C, useMemo as v, useRef as Y, useCallback as he, useState as re, useId as Wt, Fragment as Vt, createContext as at, useContext as Mt } from "react";
7
+ import { memo as Pt, useEffect as R, useMemo as v, useRef as Y, useCallback as Te, useState as re, useId as Wt, Fragment as Vt, createContext as at, useContext as Mt } from "react";
8
8
  import { useQuery as _e, useInfiniteQuery as Qt, useQueryClient as $t, QueryClient as Kt, QueryClientProvider as Ht } from "@tanstack/react-query";
9
9
  import { Trans as Gt, I18nextProvider as jt } from "react-i18next";
10
10
  import { useTypedTranslation as M, initLocalisation as zt } from "./localisation.js";
@@ -17,7 +17,7 @@ import "framer-motion";
17
17
  import "lucide-react";
18
18
  import { cn as H } from "./utils/cn.js";
19
19
  import { OneClickService as Xt, QuoteRequest as U, GetExecutionStatusResponse as ee } from "@defuse-protocol/one-click-sdk-typescript";
20
- import { CHAINS_LIST as ye, DEFAULT_CHAIN_ICON as Jt, DEFAULT_CHAINS_ORDER as it, CHAIN_POA_MAP as ct, POA_EVM_CHAIN_ID as lt, CHAIN_BASE_TOKENS as en, EVM_CHAIN_IDS_MAP as Te, CHAIN_IDS_MAP as tn, EVM_CHAINS as nn } from "./constants/chains.js";
20
+ import { CHAINS_LIST as ye, DEFAULT_CHAIN_ICON as Jt, DEFAULT_CHAINS_ORDER as it, CHAIN_POA_MAP as ct, POA_EVM_CHAIN_ID as lt, CHAIN_BASE_TOKENS as en, EVM_CHAIN_IDS_MAP as he, CHAIN_IDS_MAP as tn, EVM_CHAINS as nn } from "./constants/chains.js";
21
21
  import "use-debounce";
22
22
  import { derive as sn } from "derive-valtio";
23
23
  import { getIsNativeNearDeposit as rn } from "./machine/computed/getIsNativeNearDeposit.js";
@@ -35,38 +35,38 @@ import { isValidChain as un } from "./utils/checkers/isValidChain.js";
35
35
  import { useWalletBalance as Ee } from "./hooks/useWalletBalance.js";
36
36
  import { getIntentsAccountId as te } from "./utils/intents/getIntentsAccountId.js";
37
37
  import { getIntentsBalances as mn } from "./utils/intents/getIntentsBalance.js";
38
- import { notReachable as Ce } from "./utils/notReachable.js";
38
+ import { notReachable as Re } from "./utils/notReachable.js";
39
39
  import { getTokenBalanceKey as G } from "./utils/intents/getTokenBalanceKey.js";
40
- import { isDryQuote as Re } from "./machine/guards/checks/isDryQuote.js";
40
+ import { isDryQuote as Ce } from "./machine/guards/checks/isDryQuote.js";
41
41
  import { snakeCase as dt } from "change-case";
42
42
  import fn, { CanceledError as ut, AxiosError as mt } from "axios";
43
43
  import { oneClickApi as Ie, bridgeApi as ft } from "./network.js";
44
- import { formatBigToHuman as z } from "./utils/formatters/formatBigToHuman.js";
44
+ import { formatBigToHuman as j } from "./utils/formatters/formatBigToHuman.js";
45
45
  import { getDryQuoteAddress as Pe } from "./utils/getDryQuoteAddress.js";
46
46
  import { isEvmChain as Q } from "./utils/evm/isEvmChain.js";
47
47
  import { checkNearAccountExists as pn } from "./utils/near/checkNearAccountExists.js";
48
48
  import { isNotEmptyAmount as ne } from "./utils/checkers/isNotEmptyAmount.js";
49
49
  import { isValidBigint as pt } from "./utils/checkers/isValidBigint.js";
50
- import { isNearAddress as ht } from "./utils/near/isNearAddress.js";
50
+ import { isNearAddress as Tt } from "./utils/near/isNearAddress.js";
51
51
  import { isBalanceSufficient as ve } from "./machine/guards/checks/isBalanceSufficient.js";
52
- import { isQuoteError as De, isTransferError as xe, isAsyncSendAddressValidationError as hn } from "./machine/errors.js";
53
- import { isSolanaAddress as Tt } from "./utils/solana/isSolanaAddress.js";
52
+ import { isQuoteError as De, isTransferError as xe, isAsyncSendAddressValidationError as Tn } from "./machine/errors.js";
53
+ import { isSolanaAddress as ht } from "./utils/solana/isSolanaAddress.js";
54
54
  import { isEvmAddress as gt } from "./utils/evm/isEvmAddress.js";
55
- import { getMainTokenByChain as Tn } from "./utils/tokens/getMainTokenByChain.js";
55
+ import { getMainTokenByChain as hn } from "./utils/tokens/getMainTokenByChain.js";
56
56
  import { getDefaultIntentsToken as gn } from "./utils/tokens/getDefaultIntentsToken.js";
57
57
  import { getTokenWithHighBalance as In } from "./utils/tokens/getTokenWithHighBalance.js";
58
58
  import { isQuoteIdle as wn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
59
59
  import { isInputChanged as kn } from "./machine/subscriptions/checkers/isInputChanged.js";
60
60
  import { isErrorChanged as An } from "./machine/subscriptions/checkers/isErrorChanged.js";
61
- import { isOnlyErrorChanged as Sn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
62
- import { isValidInitialState as Nn } from "./machine/subscriptions/checkers/isValidInitialState.js";
61
+ import { isOnlyErrorChanged as Nn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
62
+ import { isValidInitialState as Sn } from "./machine/subscriptions/checkers/isValidInitialState.js";
63
63
  import { isWalletDisconnected as _n } from "./machine/subscriptions/checkers/isWalletDisconnected.js";
64
64
  import { isSendAddressForbidden as yn } from "./machine/subscriptions/checkers/isSendAddressForbidden.js";
65
65
  import { isAmountChangedFromQuote as bn } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
66
66
  import { reset as En } from "./machine/events/reset.js";
67
67
  import { tokenSelectRotate as we } from "./machine/events/tokenSelectRotate.js";
68
- import { errorSet as Cn } from "./machine/events/errorSet.js";
69
- import { quoteSet as Rn } from "./machine/events/quoteSet.js";
68
+ import { errorSet as Rn } from "./machine/events/errorSet.js";
69
+ import { quoteSet as Cn } from "./machine/events/quoteSet.js";
70
70
  import { addressSet as vn } from "./machine/events/addressSet.js";
71
71
  import { tokenSetAmount as Dn } from "./machine/events/tokenSetAmount.js";
72
72
  import { quoteSetStatus as xn } from "./machine/events/quoteSetStatus.js";
@@ -96,56 +96,56 @@ import { isEvmBaseToken as It } from "./utils/evm/isEvmBaseToken.js";
96
96
  import { useMakeEvmTransfer as Gn } from "./hooks/useMakeEvmTransfer.js";
97
97
  import { useMakeSolanaTransfer as jn } from "./hooks/useMakeSolanaTransfer.js";
98
98
  import { isUserDeniedSigning as Ae } from "./utils/checkers/isUserDeniedSigning.js";
99
- import { createIntentSignerNEP413 as zn, BridgeSDK as Yn, createNearWithdrawalRoute as Zn, createInternalTransferRoute as Xn } from "@defuse-protocol/bridge-sdk";
100
- import { generateRandomBytes as Jn } from "./utils/near/getRandomBytes.js";
101
- import { IntentSignerSolana as es } from "./utils/intents/signers/solana.js";
99
+ import { createIntentSignerNEP413 as zn, BridgeSDK as Yn, createNearWithdrawalRoute as Zn, createInternalTransferRoute as Xn, MinWithdrawalAmountError as Jn, FeeExceedsAmountError as es } from "@defuse-protocol/bridge-sdk";
100
+ import { generateRandomBytes as ts } from "./utils/near/getRandomBytes.js";
101
+ import { IntentSignerSolana as ns } from "./utils/intents/signers/solana.js";
102
102
  import { localStorageTyped as Me } from "./utils/localstorage.js";
103
- import { queryContract as ts } from "./utils/near/queryContract.js";
103
+ import { queryContract as ss } from "./utils/near/queryContract.js";
104
104
  import { utils as Qe } from "@defuse-protocol/internal-utils";
105
- import { getTransactionLink as ns } from "./utils/formatters/getTransactionLink.js";
106
- import { switchEthereumChain as ss } from "./utils/evm/switchEthereumChain.js";
105
+ import { getTransactionLink as rs } from "./utils/formatters/getTransactionLink.js";
106
+ import { switchEthereumChain as as } from "./utils/evm/switchEthereumChain.js";
107
107
  import "copy-text-to-clipboard";
108
108
  import { SwapQuoteSkeleton as wt } from "./features/SwapQuote/SwapQuoteSkeleton.js";
109
109
  import { Notes as de } from "./components/Notes.js";
110
- import { Accordion as rs } from "./components/Accordion.js";
110
+ import { Accordion as os } from "./components/Accordion.js";
111
111
  import { formatUsdAmount as $e } from "./utils/formatters/formatUsdAmount.js";
112
- import { formatTinyNumber as as } from "./utils/formatters/formatTinyNumber.js";
113
- import os from "clsx";
114
- import { Skeleton as is } from "./components/Skeleton.js";
115
- import { getBalancePortion as cs } from "./features/TokenInput/utils/getBalancePortion.js";
116
- import { getUsdDisplayAmount as ls } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
112
+ import { formatTinyNumber as is } from "./utils/formatters/formatTinyNumber.js";
113
+ import cs from "clsx";
114
+ import { Skeleton as ls } from "./components/Skeleton.js";
115
+ import { getBalancePortion as ds } from "./features/TokenInput/utils/getBalancePortion.js";
116
+ import { getUsdDisplayAmount as us } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
117
117
  import { TokenInputHeading as kt } from "./features/TokenInput/TokenInputHeading.js";
118
- import { noop as ds } from "./utils/noop.js";
118
+ import { noop as ms } from "./utils/noop.js";
119
119
  import { Card as ie } from "./components/Card.js";
120
120
  import { Badge as Ke } from "./components/Badge.js";
121
121
  import { TokenIcon as At } from "./components/TokenIcon.js";
122
- import { InputAmount as us } from "./components/InputAmount.js";
123
- import { TokenInputSkeleton as ms } from "./features/TokenInput/TokenInputSkeleton.js";
124
- import { getUsdDisplayBalance as fs } from "./utils/formatters/getUsdDisplayBalance.js";
125
- import { VList as ps } from "virtua";
126
- import { TokensListPlaceholder as Se } from "./features/TokensList/TokensListPlaceholder.js";
127
- import { Hr as hs } from "./components/Hr.js";
128
- import { createTokenSorter as Ts } from "./utils/tokens/sort.js";
122
+ import { InputAmount as fs } from "./components/InputAmount.js";
123
+ import { TokenInputSkeleton as ps } from "./features/TokenInput/TokenInputSkeleton.js";
124
+ import { getUsdDisplayBalance as Ts } from "./utils/formatters/getUsdDisplayBalance.js";
125
+ import { VList as hs } from "virtua";
126
+ import { TokensListPlaceholder as Ne } from "./features/TokensList/TokensListPlaceholder.js";
127
+ import { Hr as gs } from "./components/Hr.js";
128
+ import { createTokenSorter as Is } from "./utils/tokens/sort.js";
129
129
  import { createFilterByIntents as He } from "./utils/tokens/filterByIntents.js";
130
- import { createFilterBySearch as gs } from "./utils/tokens/filterBySearchString.js";
131
- import { createFilterBySelectedChain as Is } from "./utils/tokens/filterBySelectedChain.js";
130
+ import { createFilterBySearch as ws } from "./utils/tokens/filterBySearchString.js";
131
+ import { createFilterBySelectedChain as ks } from "./utils/tokens/filterBySelectedChain.js";
132
132
  import "bs58";
133
133
  import "viem/chains";
134
- import { isBrowser as St } from "browser-or-node";
134
+ import { isBrowser as Nt } from "browser-or-node";
135
135
  import "qrcode.react";
136
- import { createColorPalette as ws } from "./theme/createColorPalette.js";
137
- 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";
138
- import { useTimer as bs } from "use-timer";
139
- import { CloseButton as Nt } from "./components/CloseButton.js";
140
- import { DEFAULT_RPCS as Es } from "./rpcs.js";
141
- import { useAddClassToPortal as Cs } from "./hooks/useAddClassToPortal.js";
142
- import { ErrorBoundary as Rs } from "react-error-boundary";
143
- import { isEvmToken as vs } from "./utils/evm/isEvmToken.js";
144
- import { getEvmMainTokenBalance as Ds } from "./utils/evm/getEvmMainTokenBalance.js";
145
- import { getNativeNearBalance as xs } from "./utils/near/getNativeNearBalance.js";
146
- import { getNearTokenBalance as Os } from "./utils/near/getNearTokenBalance.js";
147
- import { getEvmTokenBalance as Fs } from "./utils/evm/getEvmTokenBalance.js";
148
- function Ls({ rpcs: e, token: t, connectedWallets: r }) {
136
+ import { createColorPalette as As } from "./theme/createColorPalette.js";
137
+ import { ArmingCountdownFill as Ns, BeenhereFill as Ss, EncryptedFill as _s, AccountBalanceWalletFill as ys, CheckCircleFill as bs, GppBadFill as Es } from "@material-symbols-svg/react-rounded";
138
+ import { useTimer as Rs } from "use-timer";
139
+ import { CloseButton as St } from "./components/CloseButton.js";
140
+ import { DEFAULT_RPCS as Cs } from "./rpcs.js";
141
+ import { useAddClassToPortal as vs } from "./hooks/useAddClassToPortal.js";
142
+ import { ErrorBoundary as Ds } from "react-error-boundary";
143
+ import { isEvmToken as xs } from "./utils/evm/isEvmToken.js";
144
+ import { getEvmMainTokenBalance as Os } from "./utils/evm/getEvmMainTokenBalance.js";
145
+ import { getNativeNearBalance as Fs } from "./utils/near/getNativeNearBalance.js";
146
+ import { getNearTokenBalance as Ls } from "./utils/near/getNearTokenBalance.js";
147
+ import { getEvmTokenBalance as Bs } from "./utils/evm/getEvmTokenBalance.js";
148
+ function qs({ rpcs: e, token: t, connectedWallets: r }) {
149
149
  const { walletSupportedChains: s, tonCenterApiKey: n, alchemyApiKey: a } = y(), { walletAddress: l } = ot(r, t);
150
150
  return _e({
151
151
  retry: 2,
@@ -155,16 +155,16 @@ function Ls({ rpcs: e, token: t, connectedWallets: r }) {
155
155
  if (!l)
156
156
  return null;
157
157
  if (t.blockchain === "near" && s.includes(t.blockchain))
158
- return !e.near || e.near.length === 0 ? null : t.assetId === $ ? xs(l, e.near) : Os(t, l, e.near);
158
+ return !e.near || e.near.length === 0 ? null : t.assetId === $ ? Fs(l, e.near) : Ls(t, l, e.near);
159
159
  if (!s.includes("eth") && Q(t.blockchain))
160
160
  return null;
161
161
  if (Q(t.blockchain) && It(t)) {
162
162
  const c = e[t.blockchain] ?? [];
163
- return c.length > 0 ? Ds(l, c[0]) : null;
163
+ return c.length > 0 ? Os(l, c[0]) : null;
164
164
  }
165
- if (vs(t) || Q(t.blockchain)) {
165
+ if (xs(t) || Q(t.blockchain)) {
166
166
  const c = e[t.blockchain] ?? [];
167
- return c.length > 0 ? Fs(t, l, c[0]) : null;
167
+ return c.length > 0 ? Bs(t, l, c[0]) : null;
168
168
  }
169
169
  return t.blockchain === "ton" ? Yt(t, l, n) : t.blockchain === "sol" && s.includes(t.blockchain) ? Zt(t, l, a) : (b.warn(
170
170
  `Failed to fetch token balance for ${t.symbol} on ${t.blockchain}`
@@ -172,20 +172,20 @@ function Ls({ rpcs: e, token: t, connectedWallets: r }) {
172
172
  }
173
173
  });
174
174
  }
175
- const Bs = ({
175
+ const Us = ({
176
176
  rpcs: e,
177
177
  token: t,
178
178
  onBalancesLoaded: r
179
- }) => (C(() => {
179
+ }) => (R(() => {
180
180
  t.isIntent || !Object.keys(e).includes(t.blockchain) || r({ [t.assetId]: "0" });
181
181
  }, [t.assetId]), null), _t = Pt(
182
182
  ({ rpcs: e, token: t, connectedWallets: r, onBalancesLoaded: s }) => {
183
- const { data: n } = Ls({
183
+ const { data: n } = qs({
184
184
  rpcs: e,
185
185
  token: t,
186
186
  connectedWallets: r
187
187
  });
188
- return C(() => {
188
+ return R(() => {
189
189
  !t.isIntent && n != null && s({ [t.assetId]: n });
190
190
  }, [t, n, s]), null;
191
191
  },
@@ -193,11 +193,11 @@ const Bs = ({
193
193
  );
194
194
  _t.displayName = "TokenBalanceLoader";
195
195
  const Ge = Object.assign(_t, {
196
- Zero: Bs
197
- }), qs = (e) => {
196
+ Zero: Us
197
+ }), Ps = (e) => {
198
198
  const t = e.toLowerCase();
199
199
  return be[t]?.icon ?? "";
200
- }, je = (e) => ye[e].icon ?? Jt, Us = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, Ps = (e) => be[e]?.name ?? e, P = (e) => {
200
+ }, je = (e) => ye[e].icon ?? Jt, Ws = (e) => `${e?.charAt(0).toUpperCase()}${e?.slice(1)}`, Vs = (e) => be[e]?.name ?? e, P = (e) => {
201
201
  const {
202
202
  showIntentTokens: t,
203
203
  allowedTokensList: r,
@@ -212,25 +212,25 @@ const Ge = Object.assign(_t, {
212
212
  }), i = v(() => {
213
213
  if (!d)
214
214
  return [];
215
- const m = d.map((f) => {
216
- const w = f.blockchain.toLowerCase();
217
- return !un(w) || r && !r.includes(f.assetId) || e === "source" && s && !s.includes(f.assetId) || e === "target" && n && !n.includes(f.assetId) ? null : {
218
- assetId: f.assetId,
219
- symbol: f.symbol,
220
- decimals: f.decimals,
221
- price: f.price,
215
+ const f = d.map((m) => {
216
+ const w = m.blockchain.toLowerCase();
217
+ return !un(w) || r && !r.includes(m.assetId) || e === "source" && s && !s.includes(m.assetId) || e === "target" && n && !n.includes(m.assetId) ? null : {
218
+ assetId: m.assetId,
219
+ symbol: m.symbol,
220
+ decimals: m.decimals,
221
+ price: m.price,
222
222
  blockchain: w,
223
223
  isIntent: !1,
224
- icon: f.icon ?? qs(f.symbol),
225
- name: Ps(f.symbol),
224
+ icon: m.icon ?? Ps(m.symbol),
225
+ name: Vs(m.symbol),
226
226
  chainIcon: je(w),
227
- chainName: ye[f.blockchain]?.label ?? Us(f.blockchain),
228
- contractAddress: f.contractAddress
227
+ chainName: ye[m.blockchain]?.label ?? Ws(m.blockchain),
228
+ contractAddress: m.contractAddress
229
229
  };
230
- }).filter((f) => !!f).filter(a ?? (() => !0)), h = m.filter(
231
- (f) => f.symbol.toLowerCase() !== "wnear"
232
- ), g = m.find((f) => f.symbol.toLowerCase() === "wnear");
233
- return g && h.push({
230
+ }).filter((m) => !!m).filter(a ?? (() => !0)), T = f.filter(
231
+ (m) => m.symbol.toLowerCase() !== "wnear"
232
+ ), I = f.find((m) => m.symbol.toLowerCase() === "wnear");
233
+ return I && T.push({
234
234
  name: "NEAR",
235
235
  symbol: "NEAR",
236
236
  chainName: "Near",
@@ -238,23 +238,23 @@ const Ge = Object.assign(_t, {
238
238
  assetId: $,
239
239
  chainIcon: je("near"),
240
240
  icon: be.near?.icon ?? "",
241
- price: g?.price ?? 0,
242
- contractAddress: g?.contractAddress,
241
+ price: I?.price ?? 0,
242
+ contractAddress: I?.contractAddress,
243
243
  isIntent: !1,
244
244
  decimals: 24
245
245
  }), t ? [
246
- ...h,
246
+ ...T,
247
247
  // add intents tokens to the full list
248
- ...m.map(
249
- (f) => f.symbol.toLowerCase() === "wnear" ? { ...f, symbol: "NEAR", name: "NEAR", isIntent: !0 } : { ...f, isIntent: !0 }
248
+ ...f.map(
249
+ (m) => m.symbol.toLowerCase() === "wnear" ? { ...m, symbol: "NEAR", name: "NEAR", isIntent: !0 } : { ...m, isIntent: !0 }
250
250
  )
251
- ] : h;
251
+ ] : T;
252
252
  }, [d, t, a]);
253
253
  return {
254
254
  ...u,
255
255
  tokens: i
256
256
  };
257
- }, Ws = () => {
257
+ }, Ms = () => {
258
258
  const { tokens: e } = P(), { tokens: t } = P("source"), { tokens: r } = P("target");
259
259
  return { tokens: v(() => {
260
260
  const n = {};
@@ -272,7 +272,7 @@ const Ge = Object.assign(_t, {
272
272
  { near: ["USDT", "USDC", "AURORA"] },
273
273
  { arb: ["ARB", "ETH", "USDT", "USDC"] },
274
274
  { btc: ["BTC"] }
275
- ], Vs = (e) => [...e].sort((t, r) => {
275
+ ], Qs = (e) => [...e].sort((t, r) => {
276
276
  const s = ue.findIndex(
277
277
  (d) => Object.keys(d)[0] === t.blockchain
278
278
  ), n = ue.findIndex(
@@ -282,9 +282,9 @@ const Ge = Object.assign(_t, {
282
282
  return s === -1 ? 1 : n === -1 ? -1 : s - n;
283
283
  const a = ue[s]?.[t.blockchain] ?? [], l = a.indexOf(t.symbol), c = a.indexOf(r.symbol);
284
284
  return l === -1 && c === -1 ? 0 : l === -1 ? 1 : c === -1 ? -1 : l - c;
285
- }), Ms = ({ rpcs: e, connectedWallets: t }) => {
286
- const { tokens: r } = Ws(), { walletSupportedChains: s } = y(), { setWalletBalance: n } = Ee(t);
287
- return v(() => Vs(r), [r]).map((l) => s.includes(l.blockchain) ? /* @__PURE__ */ o(
285
+ }), $s = ({ rpcs: e, connectedWallets: t }) => {
286
+ const { tokens: r } = Ms(), { walletSupportedChains: s } = y(), { setWalletBalance: n } = Ee(t);
287
+ return v(() => Qs(r), [r]).map((l) => s.includes(l.blockchain) ? /* @__PURE__ */ o(
288
288
  Ge,
289
289
  {
290
290
  rpcs: e,
@@ -303,7 +303,7 @@ const Ge = Object.assign(_t, {
303
303
  G(l)
304
304
  ));
305
305
  };
306
- function Qs(e, t) {
306
+ function Ks(e, t) {
307
307
  const r = Array.from(
308
308
  /* @__PURE__ */ new Set([...t ?? [], ...it])
309
309
  ), s = new Map(r.map((n, a) => [n, a]));
@@ -312,7 +312,7 @@ function Qs(e, t) {
312
312
  return l !== c ? l - c : n.id.localeCompare(a.id, void 0, { sensitivity: "base" });
313
313
  });
314
314
  }
315
- const $s = (e) => {
315
+ const Hs = (e) => {
316
316
  const {
317
317
  chainsOrder: t,
318
318
  allowedChainsList: r,
@@ -323,7 +323,7 @@ const $s = (e) => {
323
323
  const l = Array.from(
324
324
  new Set(a.map((c) => ye[c.blockchain]))
325
325
  ).filter((c) => !(r && !r.includes(c.id) || e === "source" && s && !s.includes(c.id) || e === "target" && n && !n.includes(c.id)));
326
- return Qs(l, t);
326
+ return Ks(l, t);
327
327
  }, [a, t, r]);
328
328
  }, ze = 3, yt = ({
329
329
  connectedWallets: e,
@@ -339,12 +339,12 @@ const $s = (e) => {
339
339
  connectedWallets: e,
340
340
  walletSupportedChains: a
341
341
  }),
342
- getNextPageParam: (i, m) => {
343
- if (i.pageKey && !(m.length >= ze))
342
+ getNextPageParam: (i, f) => {
343
+ if (i.pageKey && !(f.length >= ze))
344
344
  return i.pageKey;
345
345
  }
346
346
  });
347
- C(() => {
347
+ R(() => {
348
348
  c && d.data && d.hasNextPage && d.data.pages.length < ze && !d.isFetchingNextPage && d.fetchNextPage();
349
349
  }, [c, d]);
350
350
  const u = v(() => {
@@ -352,13 +352,13 @@ const $s = (e) => {
352
352
  return {};
353
353
  const i = cn(
354
354
  n,
355
- d.data.pages.flatMap((m) => m.data)
355
+ d.data.pages.flatMap((f) => f.data)
356
356
  );
357
- return n.forEach((m) => {
358
- dn(m.blockchain) && !(m.assetId in i) && (i[m.assetId] = "0");
357
+ return n.forEach((f) => {
358
+ dn(f.blockchain) && !(f.assetId in i) && (i[f.assetId] = "0");
359
359
  }), i;
360
360
  }, [d.data, n]);
361
- return C(() => {
361
+ return R(() => {
362
362
  D(s, ["initial_wallet"]) && (l(e, u), s.sourceToken && Object.keys(u).includes(s.sourceToken.assetId) && p("tokenSetBalance", u[s.sourceToken.assetId]));
363
363
  }, [u]), {
364
364
  status: d.status,
@@ -389,14 +389,14 @@ const $s = (e) => {
389
389
  case "pending":
390
390
  return {};
391
391
  default:
392
- return Ce(a, { throwError: !1 }), {};
392
+ return Re(a, { throwError: !1 }), {};
393
393
  }
394
394
  }, [a]) ?? {};
395
395
  return {
396
396
  ...a,
397
397
  intentBalances: l
398
398
  };
399
- }, Ks = ({
399
+ }, Gs = ({
400
400
  isEnabled: e,
401
401
  alchemyApiKey: t
402
402
  }) => {
@@ -405,7 +405,7 @@ const $s = (e) => {
405
405
  connectedWallets: r,
406
406
  alchemyApiKey: t ?? ""
407
407
  });
408
- C(() => {
408
+ R(() => {
409
409
  const c = D(s, ["transfer_success"]);
410
410
  !e || !c || (async () => (await a(), t && (await new Promise((d) => {
411
411
  setTimeout(d, 1e4);
@@ -417,9 +417,9 @@ const $s = (e) => {
417
417
  () => ({ ...r, ...t }),
418
418
  [r, t]
419
419
  ) };
420
- }, Hs = ({ isEnabled: e }) => {
420
+ }, js = ({ isEnabled: e }) => {
421
421
  const { ctx: t } = _(), { mergedBalance: r } = le();
422
- C(() => {
422
+ R(() => {
423
423
  if (!e)
424
424
  return;
425
425
  if (!t.sourceToken || !t.walletAddress) {
@@ -444,11 +444,11 @@ const $s = (e) => {
444
444
  "nep245:v2_1.omni.hot.tg:56_SZzgw3HSudhZcTwPWUTi2RJB19t": "nep141:wrap.near",
445
445
  // BTC (near)
446
446
  "nep141:btc.omft.near": "nep141:nbtc.bridge.near"
447
- }, Gs = ({
447
+ }, zs = ({
448
448
  isEnabled: e
449
449
  }) => {
450
450
  const { ctx: t } = _(), { tokens: r } = P();
451
- C(() => {
451
+ R(() => {
452
452
  if (!e)
453
453
  return;
454
454
  if (!t.sourceToken) {
@@ -483,20 +483,20 @@ const $s = (e) => {
483
483
  token: a ?? l
484
484
  });
485
485
  }, [r, t.sourceToken]);
486
- }, js = ({ isEnabled: e }) => {
486
+ }, Ys = ({ isEnabled: e }) => {
487
487
  const { connectedWallets: t } = y(), { ctx: r, state: s } = _(), { walletAddress: n } = ot(
488
488
  t,
489
489
  r.sourceToken
490
490
  );
491
- C(() => {
491
+ R(() => {
492
492
  if (!e)
493
493
  return;
494
494
  p("walletAddressSet", n), D(r, ["initial_dry", "initial_wallet"]) && (s === "initial_wallet" && !n ? O("initial_dry") : s === "initial_dry" && n && O("initial_wallet"));
495
495
  }, [e, n, r, s]);
496
- }, zs = (e) => (["depositAddress"].forEach((t) => {
496
+ }, Zs = (e) => (["depositAddress"].forEach((t) => {
497
497
  if (!(t in e))
498
498
  return b.error(`Missing ${t} in quote response`), !1;
499
- }), !0), Ys = () => {
499
+ }), !0), Xs = () => {
500
500
  const { ctx: e } = _(), {
501
501
  walletSupportedChains: t,
502
502
  intentsAccountType: r,
@@ -504,22 +504,22 @@ const $s = (e) => {
504
504
  appFees: n,
505
505
  fetchQuote: a,
506
506
  slippageTolerance: l
507
- } = y(), c = Re(e), d = Y(null), u = Y(new AbortController()), i = v(() => async (h, g) => {
508
- const { signal: f } = u.current;
509
- return a ? a(h, {
510
- ...g,
511
- signal: f
507
+ } = y(), c = Ce(e), d = Y(null), u = Y(new AbortController()), i = v(() => async (T, I) => {
508
+ const { signal: m } = u.current;
509
+ return a ? a(T, {
510
+ ...I,
511
+ signal: m
512
512
  }) : (await Ie.post(
513
513
  "https://1click.chaindefuser.com/v0/quote",
514
- h,
515
- { signal: f }
514
+ T,
515
+ { signal: m }
516
516
  )).data.quote;
517
517
  }, [Ie]);
518
518
  return {
519
519
  make: async ({
520
- message: h,
521
- quoteType: g = "exact_in",
522
- options: f = {}
520
+ message: T,
521
+ quoteType: I = "exact_in",
522
+ options: m = {}
523
523
  } = {}) => {
524
524
  if (!D(e, [
525
525
  "input_valid_dry",
@@ -534,17 +534,17 @@ const $s = (e) => {
534
534
  meta: { isDry: c, message: k }
535
535
  });
536
536
  }
537
- const S = te({
537
+ const N = te({
538
538
  addressType: r,
539
539
  walletAddress: c ? (
540
540
  // address on the target chain should be a dry quote recipient
541
541
  Pe(e.targetToken.blockchain)
542
542
  ) : e.walletAddress ?? ""
543
- }), E = S && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), B = () => c ? Pe(
543
+ }), E = N && (e.sourceToken.isIntent || !t.includes(e.sourceToken.blockchain)), B = () => c ? Pe(
544
544
  e.sourceToken.blockchain,
545
545
  e.sourceToken.isIntent
546
- ) : E ? S : e.walletAddress ?? "";
547
- if (!S) {
546
+ ) : E ? N : e.walletAddress ?? "";
547
+ if (!N) {
548
548
  const k = "No corresponding intents account to run a quote";
549
549
  throw b.error(`[WIDGET] ${k}`), new q({
550
550
  code: "QUOTE_INVALID_INITIAL",
@@ -559,39 +559,39 @@ const $s = (e) => {
559
559
  slippageTolerance: l,
560
560
  deadline: new Date(Date.now() + 3600 * 1e3).toISOString(),
561
561
  // 1 hour
562
- swapType: g === "exact_out" ? U.swapType.EXACT_OUTPUT : U.swapType.EXACT_INPUT,
562
+ swapType: I === "exact_out" ? U.swapType.EXACT_OUTPUT : U.swapType.EXACT_INPUT,
563
563
  // Target
564
564
  destinationAsset: e.targetToken.assetId === $ ? ge : e.targetToken.assetId,
565
565
  // Source
566
566
  originAsset: e.sourceToken.assetId === $ ? ge : e.sourceToken.assetId,
567
- amount: g === "exact_out" ? e.targetTokenAmount : e.sourceTokenAmount,
567
+ amount: I === "exact_out" ? e.targetTokenAmount : e.sourceTokenAmount,
568
568
  // Experimental
569
569
  quoteWaitingTimeMs: 0
570
570
  };
571
- h && (L.customRecipientMsg = h), s && (L.referral = dt(s)), n && (L.appFees = [...n]);
571
+ T && (L.customRecipientMsg = T), s && (L.referral = dt(s)), n && (L.appFees = [...n]);
572
572
  try {
573
573
  e.sourceToken.isIntent && e.targetToken.isIntent && (d.current = i(
574
574
  {
575
575
  ...L,
576
- recipient: S,
576
+ recipient: N,
577
577
  recipientType: U.recipientType.INTENTS,
578
578
  depositType: U.depositType.INTENTS,
579
579
  // Refund
580
- refundTo: S,
580
+ refundTo: N,
581
581
  refundType: U.refundType.INTENTS
582
582
  },
583
- f
583
+ m
584
584
  ), F = await d.current), d.current = i(
585
585
  {
586
586
  ...L,
587
- recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : S,
587
+ recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : N,
588
588
  recipientType: e.targetToken.isIntent ? U.recipientType.INTENTS : U.recipientType.DESTINATION_CHAIN,
589
589
  depositType: e.sourceToken.isIntent ? U.depositType.INTENTS : U.depositType.ORIGIN_CHAIN,
590
590
  // Refund
591
591
  refundTo: B(),
592
592
  refundType: E ? U.refundType.INTENTS : U.refundType.ORIGIN_CHAIN
593
593
  },
594
- f
594
+ m
595
595
  ), F = await d.current;
596
596
  } catch (k) {
597
597
  if (k instanceof ut)
@@ -604,7 +604,7 @@ const $s = (e) => {
604
604
  throw new q({
605
605
  code: "QUOTE_AMOUNT_IS_TOO_LOW",
606
606
  meta: {
607
- minAmount: (J && z(J, e.sourceToken.decimals)) ?? "0"
607
+ minAmount: (J && j(J, e.sourceToken.decimals)) ?? "0"
608
608
  }
609
609
  });
610
610
  }
@@ -626,7 +626,7 @@ const $s = (e) => {
626
626
  ...F,
627
627
  deadline: void 0,
628
628
  depositAddress: void 0
629
- } : (zs(F), {
629
+ } : (Zs(F), {
630
630
  dry: !1,
631
631
  ...F,
632
632
  deadline: F.deadline,
@@ -637,8 +637,8 @@ const $s = (e) => {
637
637
  u.current.abort("Abort quote manually"), u.current = new AbortController();
638
638
  }
639
639
  };
640
- }, Zs = () => {
641
- const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: r } = j(), s = te({
640
+ }, Js = () => {
641
+ const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: r } = z(), s = te({
642
642
  addressType: t,
643
643
  walletAddress: e.walletAddress ?? ""
644
644
  }), n = Y(null), a = Y(new AbortController()), l = v(() => async (d) => ft.post(
@@ -723,12 +723,12 @@ const $s = (e) => {
723
723
  amountIn: e.sourceTokenAmount,
724
724
  amountOut: e.targetTokenAmount,
725
725
  amountInUsd: `${parseFloat(
726
- z(e.sourceTokenAmount, e.sourceToken.decimals)
726
+ j(e.sourceTokenAmount, e.sourceToken.decimals)
727
727
  ) * e.sourceToken.price}`,
728
728
  amountOutUsd: `${parseFloat(
729
- z(e.targetTokenAmount, e.targetToken.decimals)
729
+ j(e.targetTokenAmount, e.targetToken.decimals)
730
730
  ) * e.targetToken.price}`,
731
- amountOutFormatted: z(
731
+ amountOutFormatted: j(
732
732
  e.targetTokenAmount,
733
733
  e.targetToken.decimals
734
734
  ),
@@ -741,11 +741,11 @@ const $s = (e) => {
741
741
  if (i instanceof ut)
742
742
  return;
743
743
  if (b.error(i), i instanceof mt) {
744
- const m = i.response?.data.message || i.message;
744
+ const f = i.response?.data.message || i.message;
745
745
  throw new q({
746
746
  code: "QUOTE_FAILED",
747
747
  meta: {
748
- message: m ?? "Failed to fetch quote. Please try again."
748
+ message: f ?? "Failed to fetch quote. Please try again."
749
749
  }
750
750
  });
751
751
  }
@@ -777,7 +777,7 @@ const $s = (e) => {
777
777
  }), O("initial_wallet");
778
778
  return;
779
779
  }
780
- e.error ? hn(e.error) && (p("errorSet", null), O("input_valid_external")) : O("input_valid_external");
780
+ e.error ? Tn(e.error) && (p("errorSet", null), O("input_valid_external")) : O("input_valid_external");
781
781
  }, bt = (e) => {
782
782
  const t = D(e, ["initial_dry"]), r = D(e, ["input_valid_dry"]);
783
783
  if (!t && !r)
@@ -790,25 +790,25 @@ const $s = (e) => {
790
790
  return;
791
791
  const s = e.sourceTokenBalance;
792
792
  let 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" ? 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" ? Tt(e.sendAddress) ? Xe(e) : n = {
794
794
  code: "SEND_ADDRESS_IS_INVALID",
795
795
  meta: { address: e.sendAddress, chain: "near" }
796
796
  } : 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;
797
- }, Ct = (e) => {
797
+ }, Rt = (e) => {
798
798
  const t = D(e, ["initial_wallet"]), r = D(e, ["input_valid_internal"]);
799
799
  if (!t && !r)
800
800
  return;
801
801
  const s = e.sourceTokenBalance;
802
802
  let n;
803
803
  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;
804
- }, Rt = (e) => {
805
- const t = Re(e), r = !t && e.targetToken?.isIntent === !0, s = !t && e.targetToken?.isIntent === !1;
804
+ }, Ct = (e) => {
805
+ const t = Ce(e), r = !t && e.targetToken?.isIntent === !0, s = !t && e.targetToken?.isIntent === !1;
806
806
  if (t) {
807
807
  const n = bt(e);
808
808
  return O(n ? "input_valid_dry" : "initial_dry");
809
809
  }
810
- s && Et(e) ? O("input_valid_external") : r && Ct(e) ? O("input_valid_internal") : O("initial_wallet");
811
- }, Xs = ({
810
+ s && Et(e) ? O("input_valid_external") : r && Rt(e) ? O("input_valid_internal") : O("initial_wallet");
811
+ }, er = ({
812
812
  isEnabled: e,
813
813
  message: t,
814
814
  type: r = "exact_in",
@@ -821,26 +821,26 @@ const $s = (e) => {
821
821
  isDirectNearTokenWithdrawal: d,
822
822
  isDirectTokenOnNearTransfer: u,
823
823
  isSameAssetDiffChainWithdrawal: i
824
- } = j(), m = Re(n), h = e && !n.areInputsValidating && (i || (c || a) && n.isDepositFromExternalWallet || !d && !l && !c && !u), { make: g, cancel: f } = Ys(), { make: w, cancel: S } = Zs(), E = Y(null), B = () => {
825
- f(), S();
824
+ } = z(), f = Ce(n), T = e && !n.areInputsValidating && (i || (c || a) && n.isDepositFromExternalWallet || !d && !l && !c && !u), { make: I, cancel: m } = Xs(), { make: w, cancel: N } = Js(), E = Y(null), B = () => {
825
+ m(), N();
826
826
  };
827
- C(() => {
827
+ R(() => {
828
828
  const L = D(n, ["input_valid_dry"]), k = D(n, ["input_valid_external"]), x = D(n, ["input_valid_internal"]);
829
- (m && !L || !m && n.targetToken?.isIntent && !x || !m && !n.targetToken?.isIntent && !k || n.areInputsValidating) && B();
830
- }, [B, m, n]);
831
- const F = he(
829
+ (f && !L || !f && n.targetToken?.isIntent && !x || !f && !n.targetToken?.isIntent && !k || n.areInputsValidating) && B();
830
+ }, [B, f, n]);
831
+ const F = Te(
832
832
  async (L) => {
833
833
  try {
834
834
  let k;
835
835
  if (n.sourceToken?.assetId === n.targetToken?.assetId || a && n.isDepositFromExternalWallet) {
836
- if (m)
836
+ if (f)
837
837
  return;
838
838
  p("quoteSetStatus", "pending"), k = await w();
839
839
  } else
840
- p("quoteSetStatus", "pending"), k = await g({ message: t, quoteType: r, options: L });
840
+ p("quoteSetStatus", "pending"), k = await I({ message: t, quoteType: r, options: L });
841
841
  if (!k)
842
842
  return;
843
- if (p("quoteSetStatus", "success"), p("quoteSet", k), !m && n.error?.code !== "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", null), p("tokenSetAmount", {
843
+ if (p("quoteSetStatus", "success"), p("quoteSet", k), !f && n.error?.code !== "SOURCE_BALANCE_INSUFFICIENT" && p("errorSet", null), p("tokenSetAmount", {
844
844
  variant: "target",
845
845
  amount: k.amountOut
846
846
  }), n.state === "input_valid_dry") {
@@ -854,7 +854,7 @@ const $s = (e) => {
854
854
  p("quoteSetStatus", "idle"), p("quoteSet", void 0), p("errorSet", null);
855
855
  return;
856
856
  }
857
- p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", k.data), Rt(n);
857
+ p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", k.data), Ct(n);
858
858
  return;
859
859
  }
860
860
  b.error("Unhandled error in useMakeQuoteEffect:", k), p("quoteSetStatus", "error"), p("quoteSet", void 0), p("errorSet", {
@@ -863,23 +863,23 @@ const $s = (e) => {
863
863
  });
864
864
  }
865
865
  },
866
- [n, m, w, g, t, r, h]
866
+ [n, f, w, I, t, r, T]
867
867
  );
868
- C(() => {
869
- !h || !(m ? 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
- }, [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(() => {
871
871
  const L = () => {
872
872
  E.current && (clearInterval(E.current), E.current = null);
873
873
  };
874
874
  return n.state !== "quote_success_internal" && n.state !== "quote_success_external" || !s || (E.current = setInterval(async () => {
875
875
  await F({ isRefetch: !0 });
876
876
  }, s)), L;
877
- }, [h, F, B, n.state]);
877
+ }, [T, F, B, n.state]);
878
878
  }, me = {
879
879
  sol: "sol",
880
880
  evm: "eth",
881
881
  near: "near"
882
- }, Js = ({
882
+ }, tr = ({
883
883
  isEnabled: e,
884
884
  skipIntents: t = !1,
885
885
  target: r = "none"
@@ -889,7 +889,7 @@ const $s = (e) => {
889
889
  walletSupportedChains: c,
890
890
  balances: l,
891
891
  across: "intents"
892
- }), [m, h] = v(() => !n.walletAddress && !t ? [
892
+ }), [f, T] = v(() => !n.walletAddress && !t ? [
893
893
  { token: gn({ tokens: s }), status: "loaded" },
894
894
  { token: void 0, status: "loaded" }
895
895
  ] : d.source.intents !== "none" && !t ? i ? [
@@ -899,7 +899,7 @@ const $s = (e) => {
899
899
  { token: void 0, status: "loading" },
900
900
  { token: void 0, status: "loading" }
901
901
  ] : [
902
- { token: Tn({
902
+ { token: hn({
903
903
  tokens: s,
904
904
  walletSupportedChains: c
905
905
  }), status: "loaded" },
@@ -913,60 +913,60 @@ const $s = (e) => {
913
913
  c,
914
914
  a
915
915
  ]);
916
- C(() => {
916
+ R(() => {
917
917
  if (!e)
918
918
  return;
919
- if (D(n, ["initial_dry", "initial_wallet"]) && (m.status === "loaded" && !n.sourceToken && p("tokenSelect", {
919
+ if (D(n, ["initial_dry", "initial_wallet"]) && (f.status === "loaded" && !n.sourceToken && p("tokenSelect", {
920
920
  variant: "source",
921
- token: m.token
922
- }), h.status === "loaded" && m.status === "loaded" && !n.targetToken)) {
923
- let w = h.token;
921
+ token: f.token
922
+ }), T.status === "loaded" && f.status === "loaded" && !n.targetToken)) {
923
+ let w = T.token;
924
924
  if (r === "same-asset")
925
- if (m.token?.isIntent) {
925
+ if (f.token?.isIntent) {
926
926
  if (!u)
927
927
  throw new Error(
928
928
  "Intents account type is required to select same-asset target token"
929
929
  );
930
930
  w = s.find(
931
- (S) => !S.isIntent && S.symbol === n.sourceToken?.symbol && S.blockchain === me[u]
931
+ (N) => !N.isIntent && N.symbol === n.sourceToken?.symbol && N.blockchain === me[u]
932
932
  );
933
933
  } else
934
934
  w = s.find(
935
- (S) => S.isIntent && S.symbol === n.sourceToken?.symbol
935
+ (N) => N.isIntent && N.symbol === n.sourceToken?.symbol
936
936
  );
937
937
  p("tokenSelect", {
938
938
  variant: "target",
939
939
  token: w
940
940
  });
941
941
  }
942
- }, [n, m, h, e]);
943
- const g = (f, w) => {
944
- const S = s.find(
945
- (E) => !E.isIntent && E.blockchain === me[f] && E.symbol.toLowerCase() === en[me[f]]?.toLowerCase()
942
+ }, [n, f, T, e]);
943
+ const I = (m, w) => {
944
+ const N = s.find(
945
+ (E) => !E.isIntent && E.blockchain === me[m] && E.symbol.toLowerCase() === en[me[m]]?.toLowerCase()
946
946
  ) ?? w;
947
947
  p("tokenSelect", {
948
948
  variant: "source",
949
- token: S
949
+ token: N
950
950
  });
951
951
  };
952
- return C(() => {
953
- const f = D(n, ["initial_dry", "initial_wallet"]);
954
- if (!e || !f)
952
+ return R(() => {
953
+ const m = D(n, ["initial_dry", "initial_wallet"]);
954
+ if (!e || !m)
955
955
  return;
956
956
  const w = s.find(
957
957
  (E) => E.isIntent && E.symbol === "AURORA" && E.blockchain === "near"
958
- ), S = setTimeout(() => {
959
- m.token || (!t && i ? p("tokenSelect", {
958
+ ), N = setTimeout(() => {
959
+ f.token || (!t && i ? p("tokenSelect", {
960
960
  variant: "source",
961
961
  token: i
962
- }) : c.length && u ? g(u, w) : n.walletAddress && Tt(n.walletAddress) ? g("sol", w) : n.walletAddress && gt(n.walletAddress) ? g("evm", w) : n.walletAddress && ht(n.walletAddress) ? g("near", w) : p("tokenSelect", {
962
+ }) : c.length && u ? I(u, w) : n.walletAddress && ht(n.walletAddress) ? I("sol", w) : n.walletAddress && gt(n.walletAddress) ? I("evm", w) : n.walletAddress && Tt(n.walletAddress) ? I("near", w) : p("tokenSelect", {
963
963
  variant: "source",
964
964
  token: w
965
965
  }));
966
966
  }, 3e3);
967
- return () => clearTimeout(S);
968
- }, [s, m, t]), { source: n.sourceToken, target: n.targetToken };
969
- }, er = ({
967
+ return () => clearTimeout(N);
968
+ }, [s, f, t]), { source: n.sourceToken, target: n.targetToken };
969
+ }, nr = ({
970
970
  isEnabled: e,
971
971
  alchemyApiKey: t
972
972
  }) => {
@@ -976,13 +976,13 @@ const $s = (e) => {
976
976
  connectedWallets: r,
977
977
  alchemyApiKey: t ?? ""
978
978
  });
979
- }, tr = (e, t) => {
980
- const { config: r } = Ne(Ue);
979
+ }, sr = (e, t) => {
980
+ const { config: r } = Se(Ue);
981
981
  return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((s) => s?.key === "sendAddress") && r.walletSupportedChains.includes(e.targetToken.blockchain);
982
- }, nr = ({ debug: e }) => {
982
+ }, rr = ({ debug: e }) => {
983
983
  Z.onContextChange((t, r) => {
984
984
  const s = r;
985
- if (e && b.debug("[WIDGET] Context changed", s), e && t.error && An(s) && b.debug(`[WIDGET] Error set to ${t.error.code}`), Sn(s) || bn(t, s, e))
985
+ if (e && b.debug("[WIDGET] Context changed", s), e && t.error && An(s) && b.debug(`[WIDGET] Error set to ${t.error.code}`), Nn(s) || bn(t, s, e))
986
986
  return;
987
987
  if (_n(t, s)) {
988
988
  p("reset", { clearWalletAddress: !0 }), O("initial_dry");
@@ -990,7 +990,7 @@ const $s = (e) => {
990
990
  }
991
991
  const { isChanged: n, isDry: a } = kn(t, s);
992
992
  if (n) {
993
- if (Nn(t)) {
993
+ if (Sn(t)) {
994
994
  const l = a ? "initial_dry" : "initial_wallet";
995
995
  O(l, {
996
996
  onMoved: () => {
@@ -1000,15 +1000,15 @@ const $s = (e) => {
1000
1000
  }
1001
1001
  });
1002
1002
  }
1003
- wn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), yn(t) && (t.sendAddress = void 0), tr(t, s) && (t.sendAddress = t.walletAddress), Rt(t);
1003
+ wn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), yn(t) && (t.sendAddress = void 0), sr(t, s) && (t.sendAddress = t.walletAddress), Ct(t);
1004
1004
  }
1005
1005
  });
1006
- }, sr = ({ debug: e }) => {
1006
+ }, ar = ({ debug: e }) => {
1007
1007
  Z.onTransition((t, r) => {
1008
1008
  e && b.debug(`===> [WIDGET] State moved from ${t} to ${r}`);
1009
1009
  });
1010
- }, rr = (e, t) => {
1011
- const { variant: r, token: s } = t, { config: n } = Ne(Ue);
1010
+ }, or = (e, t) => {
1011
+ const { variant: r, token: s } = t, { config: n } = Se(Ue);
1012
1012
  switch (r) {
1013
1013
  case "source":
1014
1014
  if (s && s.assetId === e.targetToken?.assetId && s.isIntent === e.targetToken.isIntent && n.enableAutoTokensSwitching) {
@@ -1031,20 +1031,20 @@ const $s = (e) => {
1031
1031
  e.targetToken = s;
1032
1032
  break;
1033
1033
  default:
1034
- Ce(r, { throwError: !1 });
1034
+ Re(r, { throwError: !1 });
1035
1035
  }
1036
- }, R = (e, t) => Z.on(
1036
+ }, C = (e, t) => Z.on(
1037
1037
  e,
1038
1038
  (r, s) => t(r, s, Z)
1039
- ), ar = () => {
1040
- R("quoteSetStatus", xn), R("walletAddressSet", Bn), R("transferSetStatus", Un), R("tokenSelectRotate", we), R("tokenSetBalance", qn), R("tokenSetAmount", Dn), R("depositTypeSet", On), R("setInputsValidating", Ln), R("externalDepositTxSet", Fn), R("tokenSelect", rr), R("addressSet", vn), R("errorSet", Cn), R("quoteSet", Rn), R("reset", En), R("validateDryInputs", bt), R("validateExternalInputs", Et), R("validateInternalInputs", Ct);
1041
- }, or = on(({ debug: e }) => {
1039
+ ), ir = () => {
1040
+ C("quoteSetStatus", xn), C("walletAddressSet", Bn), C("transferSetStatus", Un), C("tokenSelectRotate", we), C("tokenSetBalance", qn), C("tokenSetAmount", Dn), C("depositTypeSet", On), C("setInputsValidating", Ln), C("externalDepositTxSet", Fn), C("tokenSelect", or), C("addressSet", vn), C("errorSet", Rn), C("quoteSet", Cn), C("reset", En), C("validateDryInputs", bt), C("validateExternalInputs", Et), C("validateInternalInputs", Rt);
1041
+ }, cr = on(({ debug: e }) => {
1042
1042
  e && b.debug(
1043
- "[WIDGET] Debug mode is enabled (package version: 3.14.0)"
1044
- ), ar(), sr({ debug: e }), nr({ debug: e });
1045
- }), Fi = ({ listenTo: e, debug: t = !1 }) => {
1046
- C(() => {
1047
- or({ debug: t });
1043
+ "[WIDGET] Debug mode is enabled (package version: 3.14.2)"
1044
+ ), ir(), ar({ debug: e }), rr({ debug: e });
1045
+ }), Bi = ({ listenTo: e, debug: t = !1 }) => {
1046
+ R(() => {
1047
+ cr({ debug: t });
1048
1048
  }, [t]);
1049
1049
  const r = e.find(
1050
1050
  (a) => Array.isArray(a) && a[0] === "setBalancesUsingAlchemyExt"
@@ -1053,34 +1053,34 @@ const $s = (e) => {
1053
1053
  ), n = e.find(
1054
1054
  (a) => Array.isArray(a) && a[0] === "makeQuote"
1055
1055
  );
1056
- er({
1056
+ nr({
1057
1057
  isEnabled: !!r,
1058
1058
  alchemyApiKey: r?.[1].alchemyApiKey
1059
- }), Js({
1059
+ }), tr({
1060
1060
  isEnabled: !!s,
1061
1061
  skipIntents: s?.[1].skipIntents,
1062
1062
  target: s?.[1].target
1063
- }), Xs({
1063
+ }), er({
1064
1064
  isEnabled: !!n,
1065
1065
  message: n?.[1].message,
1066
1066
  type: n?.[1].type,
1067
1067
  refetchQuoteInterval: n?.[1].refetchQuoteInterval
1068
- }), js({
1068
+ }), Ys({
1069
1069
  isEnabled: e.includes("checkWalletConnection")
1070
- }), Hs({
1070
+ }), js({
1071
1071
  isEnabled: e.includes("setSourceTokenBalance")
1072
- }), Gs({
1072
+ }), zs({
1073
1073
  isEnabled: e.includes("setSourceTokenIntentsTarget")
1074
- }), Ks({
1074
+ }), Gs({
1075
1075
  isEnabled: e.includes("updateBalances"),
1076
1076
  alchemyApiKey: r?.[1].alchemyApiKey
1077
1077
  });
1078
- }, ir = Z.getStore();
1078
+ }, lr = Z.getStore();
1079
1079
  class W extends Error {
1080
1080
  context;
1081
1081
  _is_widget_error = !0;
1082
1082
  constructor(t, r) {
1083
- super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = Ne(ir).context;
1083
+ super(t), this.name = "WidgetError", this.cause = r?.cause, this.context = Se(lr).context;
1084
1084
  }
1085
1085
  }
1086
1086
  class vt extends W {
@@ -1094,12 +1094,12 @@ class q extends vt {
1094
1094
  super(t), this.name = "QuoteError";
1095
1095
  }
1096
1096
  }
1097
- class I extends vt {
1097
+ class g extends vt {
1098
1098
  constructor(t) {
1099
1099
  super(t), this.name = "TransferError";
1100
1100
  }
1101
1101
  }
1102
- const Li = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, V = Z.getStore(), cr = sn({
1102
+ const qi = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e && !!e._is_widget_error, V = Z.getStore(), dr = sn({
1103
1103
  usdTradeDelta: (e) => Pn(e(V.context)),
1104
1104
  isDirectNearTokenWithdrawal: (e) => Mn(e(V.context)),
1105
1105
  isDirectNonNearWithdrawal: (e) => Wn(e(V.context)),
@@ -1107,20 +1107,20 @@ const Li = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
1107
1107
  isNativeNearDeposit: (e) => rn(e(V.context)),
1108
1108
  isSameAssetDiffChainWithdrawal: (e) => Qn(e(V.context)),
1109
1109
  isDirectTokenOnNearTransfer: (e) => Vn(e(V.context))
1110
- }), j = () => oe(cr), _ = () => {
1110
+ }), z = () => oe(dr), _ = () => {
1111
1111
  const e = oe(V);
1112
1112
  return {
1113
1113
  state: e.state,
1114
1114
  ctx: e.context
1115
1115
  };
1116
- }, Bi = (e) => {
1116
+ }, Ui = (e) => {
1117
1117
  const t = oe(V);
1118
1118
  if (!D(t.context, [e]))
1119
1119
  throw new W(
1120
1120
  `[WIDGET] Attempt to access snapshot for ${e} state while context does not match`
1121
1121
  );
1122
1122
  return t.context;
1123
- }, lr = async ({
1123
+ }, ur = async ({
1124
1124
  contractId: e,
1125
1125
  accountId: t
1126
1126
  }) => {
@@ -1140,27 +1140,27 @@ const Li = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
1140
1140
  throw new W("Error fetching balance", { cause: r });
1141
1141
  }
1142
1142
  };
1143
- function dr(e) {
1144
- const { ctx: t } = _(), { isNativeNearDeposit: r } = j(), s = t.sourceToken?.contractAddress, n = t.quote?.amountIn ?? t.sourceTokenAmount;
1143
+ function mr(e) {
1144
+ const { ctx: t } = _(), { isNativeNearDeposit: r } = z(), s = t.sourceToken?.contractAddress, n = t.quote?.amountIn ?? t.sourceTokenAmount;
1145
1145
  return {
1146
1146
  make: async (l, c) => {
1147
1147
  if (!e)
1148
- throw new I({
1148
+ throw new g({
1149
1149
  code: "TRANSFER_INVALID_INITIAL",
1150
1150
  meta: { message: "No connected wallet to sign a transfer." }
1151
1151
  });
1152
1152
  if (!s && t.sourceToken?.assetId !== $)
1153
- throw new I({
1153
+ throw new g({
1154
1154
  code: "TRANSFER_INVALID_INITIAL",
1155
1155
  meta: { message: "No token selected to transfer." }
1156
1156
  });
1157
1157
  if (!l)
1158
- throw new I({
1158
+ throw new g({
1159
1159
  code: "TRANSFER_INVALID_INITIAL",
1160
1160
  meta: { message: "No recipient address to transfer." }
1161
1161
  });
1162
1162
  if (!n)
1163
- throw new I({
1163
+ throw new g({
1164
1164
  code: "TRANSFER_INVALID_INITIAL",
1165
1165
  meta: { message: "No amount to transfer." }
1166
1166
  });
@@ -1232,36 +1232,36 @@ function dr(e) {
1232
1232
  transactionLink: `https://nearblocks.io/txns/${i[0].transaction?.hash}`,
1233
1233
  intent: void 0
1234
1234
  };
1235
- throw new I({
1235
+ throw new g({
1236
1236
  code: "NO_DEPOSIT_RESULT"
1237
1237
  });
1238
1238
  } catch (i) {
1239
- throw b.error("[TRANSFER ERROR]", i), new I({
1239
+ throw b.error("[TRANSFER ERROR]", i), new g({
1240
1240
  code: "DIRECT_TRANSFER_ERROR"
1241
1241
  });
1242
1242
  }
1243
1243
  if (!s)
1244
- throw new I({
1244
+ throw new g({
1245
1245
  code: "TRANSFER_INVALID_INITIAL",
1246
1246
  meta: { message: "No token selected to transfer." }
1247
1247
  });
1248
1248
  try {
1249
- const [i, m] = await Promise.all([
1249
+ const [i, f] = await Promise.all([
1250
1250
  Hn({
1251
1251
  contractId: s
1252
1252
  }),
1253
- lr({
1253
+ ur({
1254
1254
  contractId: s,
1255
1255
  accountId: l
1256
1256
  })
1257
- ]), h = i - m;
1258
- h > 0n && u.push({
1257
+ ]), T = i - f;
1258
+ T > 0n && u.push({
1259
1259
  type: "FunctionCall",
1260
1260
  params: {
1261
1261
  methodName: "storage_deposit",
1262
1262
  args: { account_id: l },
1263
1263
  gas: We,
1264
- deposit: h.toString()
1264
+ deposit: T.toString()
1265
1265
  }
1266
1266
  }), u.push({
1267
1267
  type: "FunctionCall",
@@ -1276,7 +1276,7 @@ function dr(e) {
1276
1276
  deposit: "1"
1277
1277
  }
1278
1278
  });
1279
- const g = await d.signAndSendTransactions({
1279
+ const I = await d.signAndSendTransactions({
1280
1280
  transactions: [
1281
1281
  {
1282
1282
  receiverId: s,
@@ -1284,24 +1284,24 @@ function dr(e) {
1284
1284
  }
1285
1285
  ]
1286
1286
  });
1287
- if (g?.[0]?.transaction?.hash)
1287
+ if (I?.[0]?.transaction?.hash)
1288
1288
  return {
1289
- hash: g[0].transaction?.hash ?? "",
1290
- transactionLink: `https://nearblocks.io/txns/${g[0].transaction?.hash}`,
1289
+ hash: I[0].transaction?.hash ?? "",
1290
+ transactionLink: `https://nearblocks.io/txns/${I[0].transaction?.hash}`,
1291
1291
  intent: void 0
1292
1292
  };
1293
- throw new I({
1293
+ throw new g({
1294
1294
  code: "NO_DEPOSIT_RESULT"
1295
1295
  });
1296
1296
  } catch (i) {
1297
- throw b.error("[TRANSFER ERROR]", i), new I({
1297
+ throw b.error("[TRANSFER ERROR]", i), new g({
1298
1298
  code: "DIRECT_TRANSFER_ERROR"
1299
1299
  });
1300
1300
  }
1301
1301
  }
1302
1302
  };
1303
1303
  }
1304
- const ur = ({
1304
+ const fr = ({
1305
1305
  makeTransfer: e,
1306
1306
  providers: t
1307
1307
  }) => {
@@ -1315,9 +1315,9 @@ const ur = ({
1315
1315
  return e;
1316
1316
  if (gt(d))
1317
1317
  return n;
1318
- if (Tt(d))
1318
+ if (ht(d))
1319
1319
  return a;
1320
- throw new I({
1320
+ throw new g({
1321
1321
  code: "TRANSFER_INVALID_INITIAL",
1322
1322
  meta: { message: "No transfer function established." }
1323
1323
  });
@@ -1325,21 +1325,21 @@ const ur = ({
1325
1325
  return { make: async () => {
1326
1326
  if (!r.sourceToken) {
1327
1327
  const i = "No token selected to transfer.";
1328
- throw new I({
1328
+ throw new g({
1329
1329
  code: "TRANSFER_INVALID_INITIAL",
1330
1330
  meta: { message: i }
1331
1331
  });
1332
1332
  }
1333
1333
  if (!r.quote) {
1334
1334
  const i = "Quote is required for a transfer.";
1335
- throw new I({
1335
+ throw new g({
1336
1336
  code: "TRANSFER_INVALID_INITIAL",
1337
1337
  meta: { message: i }
1338
1338
  });
1339
1339
  }
1340
1340
  if (!r.quote.depositAddress) {
1341
1341
  const i = "Quote has no deposit address. Make sure not dry.";
1342
- throw new I({
1342
+ throw new g({
1343
1343
  code: "TRANSFER_INVALID_INITIAL",
1344
1344
  meta: { message: i }
1345
1345
  });
@@ -1349,7 +1349,7 @@ const ur = ({
1349
1349
  decimals: r.sourceToken.decimals,
1350
1350
  address: r.quote.depositAddress,
1351
1351
  chain: r.sourceToken.blockchain,
1352
- evmChainId: Q(r.sourceToken.blockchain) ? Te[r.sourceToken.blockchain] : null,
1352
+ evmChainId: Q(r.sourceToken.blockchain) ? he[r.sourceToken.blockchain] : null,
1353
1353
  isNativeEvmTokenTransfer: !!r.sourceToken && It(r.sourceToken),
1354
1354
  tokenAddress: r.sourceToken.assetId === $ ? $ : r.sourceToken.contractAddress,
1355
1355
  sourceAssetId: r.sourceToken.assetId,
@@ -1360,7 +1360,7 @@ const ur = ({
1360
1360
  if (!i) {
1361
1361
  if (e)
1362
1362
  return;
1363
- throw b.error("[TRANSFER ERROR]", "No deposit result"), new I({
1363
+ throw b.error("[TRANSFER ERROR]", "No deposit result"), new g({
1364
1364
  code: "NO_DEPOSIT_RESULT"
1365
1365
  });
1366
1366
  }
@@ -1371,26 +1371,26 @@ const ur = ({
1371
1371
  };
1372
1372
  } catch (i) {
1373
1373
  b.error("[TRANSFER ERROR]", i, { error: i });
1374
- let m = "Failed to make a transfer. Please try again.";
1375
- const h = i instanceof Error && Ae(i.message);
1376
- if (h)
1374
+ let f = "Failed to make a transfer. Please try again.";
1375
+ const T = i instanceof Error && Ae(i.message);
1376
+ if (T)
1377
1377
  return;
1378
- throw fn.isAxiosError(i) ? (m = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new I({
1378
+ throw fn.isAxiosError(i) ? (f = i.response?.data?.detail ?? i.message ?? "Failed to make deposit. Please try again.", new g({
1379
1379
  code: "QUOTE_ERROR",
1380
- meta: { message: m }
1381
- })) : m === "No quotes found" ? new I({
1380
+ meta: { message: f }
1381
+ })) : f === "No quotes found" ? new g({
1382
1382
  code: "NO_QUOTE_FOUND"
1383
- }) : i instanceof Error && !h ? new I({
1383
+ }) : i instanceof Error && !T ? new g({
1384
1384
  code: "QUOTE_ERROR",
1385
1385
  meta: { message: i.message }
1386
- }) : new I({
1386
+ }) : new g({
1387
1387
  code: "QUOTE_ERROR",
1388
1388
  meta: { message: "Unknown quote transfer error" }
1389
1389
  });
1390
1390
  }
1391
1391
  } };
1392
1392
  };
1393
- class mr {
1393
+ class pr {
1394
1394
  constructor(t, r) {
1395
1395
  this.account = t, this.provider = r;
1396
1396
  }
@@ -1419,7 +1419,7 @@ class mr {
1419
1419
  };
1420
1420
  }
1421
1421
  }
1422
- const fr = ({
1422
+ const Tr = ({
1423
1423
  walletAddress: e,
1424
1424
  getProvider: t
1425
1425
  }) => zn({
@@ -1446,25 +1446,25 @@ const fr = ({
1446
1446
  signature: n.signature
1447
1447
  };
1448
1448
  }
1449
- }), pr = (e, t) => {
1449
+ }), hr = (e, t) => {
1450
1450
  if (t) {
1451
1451
  if (e.sendAddress)
1452
1452
  return e.sendAddress;
1453
- throw new I({
1453
+ throw new g({
1454
1454
  code: "TRANSFER_INVALID_INITIAL",
1455
1455
  meta: { message: "Send to address is required for a direct transfer" }
1456
1456
  });
1457
1457
  }
1458
1458
  if (!e.quote || e.quote.dry)
1459
- throw new I({
1459
+ throw new g({
1460
1460
  code: "TRANSFER_INVALID_INITIAL",
1461
1461
  meta: { message: "Quote is required for intents non-direct transfer" }
1462
1462
  });
1463
1463
  return e.quote.depositAddress;
1464
- }, hr = async (e, t) => {
1464
+ }, gr = async (e, t) => {
1465
1465
  let r = Me.getItem("nearWalletsPk")[t];
1466
1466
  if (!e.signMessage)
1467
- throw new I({
1467
+ throw new g({
1468
1468
  code: "DIRECT_TRANSFER_ERROR",
1469
1469
  meta: { message: "Your wallet doesn't support signing messages" }
1470
1470
  });
@@ -1473,10 +1473,10 @@ const fr = ({
1473
1473
  const a = await e.signMessage({
1474
1474
  message: "Authenticate",
1475
1475
  recipient: "intents.near",
1476
- nonce: Fe.from(Jn(32))
1476
+ nonce: Fe.from(ts(32))
1477
1477
  });
1478
1478
  if (!a)
1479
- throw new I({
1479
+ throw new g({
1480
1480
  code: "DIRECT_TRANSFER_ERROR",
1481
1481
  meta: { message: "Signing message failed" }
1482
1482
  });
@@ -1484,7 +1484,7 @@ const fr = ({
1484
1484
  [t]: a.publicKey
1485
1485
  });
1486
1486
  } catch {
1487
- throw new I({
1487
+ throw new g({
1488
1488
  code: "DIRECT_TRANSFER_ERROR",
1489
1489
  meta: { message: "Your wallet doesn't support signing messages" }
1490
1490
  });
@@ -1493,7 +1493,7 @@ const fr = ({
1493
1493
  walletAddress: t,
1494
1494
  addressType: "near"
1495
1495
  });
1496
- if (!await ts({
1496
+ if (!await ss({
1497
1497
  contractId: ke,
1498
1498
  methodName: "has_public_key",
1499
1499
  args: {
@@ -1522,33 +1522,33 @@ const fr = ({
1522
1522
  ]
1523
1523
  });
1524
1524
  } catch {
1525
- throw new I({
1525
+ throw new g({
1526
1526
  code: "DIRECT_TRANSFER_ERROR",
1527
1527
  meta: { message: "Unable to add public key to intents account" }
1528
1528
  });
1529
1529
  }
1530
- }, Tr = ({ providers: e }) => {
1530
+ }, Ir = ({ providers: e }) => {
1531
1531
  const { ctx: t } = _(), { appName: r, intentsAccountType: s } = y(), {
1532
1532
  isNativeNearDeposit: n,
1533
1533
  isDirectNearTokenWithdrawal: a,
1534
1534
  isDirectNonNearWithdrawal: l
1535
- } = j();
1535
+ } = z();
1536
1536
  return { make: async ({
1537
1537
  message: d,
1538
1538
  onPending: u
1539
1539
  }) => {
1540
1540
  if (!t.walletAddress)
1541
- throw new I({
1541
+ throw new g({
1542
1542
  code: "TRANSFER_INVALID_INITIAL",
1543
1543
  meta: { message: "No connected wallet to sign a transfer." }
1544
1544
  });
1545
1545
  if (!t.sourceToken || !t.targetToken)
1546
- throw new I({
1546
+ throw new g({
1547
1547
  code: "TRANSFER_INVALID_INITIAL",
1548
1548
  meta: { message: "No token selected to transfer." }
1549
1549
  });
1550
1550
  if (!t.sourceToken.isIntent)
1551
- throw new I({
1551
+ throw new g({
1552
1552
  code: "TRANSFER_INVALID_INITIAL",
1553
1553
  meta: {
1554
1554
  message: "For not intents source token use useMakeQuoteTransfer instead"
@@ -1556,90 +1556,105 @@ const fr = ({
1556
1556
  });
1557
1557
  let i;
1558
1558
  if (!s)
1559
- throw new I({
1559
+ throw new g({
1560
1560
  code: "TRANSFER_INVALID_INITIAL",
1561
1561
  meta: { message: "Intents account type is not defined" }
1562
1562
  });
1563
1563
  switch (s) {
1564
1564
  case "evm":
1565
1565
  if (!e?.evm)
1566
- throw new I({
1566
+ throw new g({
1567
1567
  code: "TRANSFER_INVALID_INITIAL",
1568
1568
  meta: { message: "No EVM provider configured" }
1569
1569
  });
1570
- i = new mr(
1570
+ i = new pr(
1571
1571
  { walletAddress: t.walletAddress },
1572
1572
  e.evm
1573
1573
  );
1574
1574
  break;
1575
1575
  case "sol":
1576
1576
  if (!e?.sol)
1577
- throw new I({
1577
+ throw new g({
1578
1578
  code: "TRANSFER_INVALID_INITIAL",
1579
1579
  meta: { message: "No SOL provider configured" }
1580
1580
  });
1581
- i = new es(
1581
+ i = new ns(
1582
1582
  { walletAddress: t.walletAddress },
1583
1583
  e.sol
1584
1584
  );
1585
1585
  break;
1586
1586
  case "near": {
1587
1587
  if (!e?.near)
1588
- throw new I({
1588
+ throw new g({
1589
1589
  code: "TRANSFER_INVALID_INITIAL",
1590
1590
  meta: { message: "No NEAR provider configured" }
1591
1591
  });
1592
- await hr(e.near(), t.walletAddress), i = fr({
1592
+ await gr(e.near(), t.walletAddress), i = Tr({
1593
1593
  walletAddress: t.walletAddress,
1594
1594
  getProvider: e.near
1595
1595
  });
1596
1596
  break;
1597
1597
  }
1598
1598
  default:
1599
- Ce(s);
1599
+ Re(s);
1600
1600
  }
1601
- const m = new Yn({ referral: dt(r) });
1602
- m.setIntentSigner(i);
1603
- let h;
1604
- n ? h = void 0 : a ? h = Zn(d ?? void 0) : l ? h = void 0 : h = Xn();
1605
- const g = m.createWithdrawal({
1601
+ const f = new Yn({ referral: dt(r) });
1602
+ f.setIntentSigner(i);
1603
+ let T;
1604
+ n ? T = void 0 : a ? T = Zn(d ?? void 0) : l ? T = void 0 : T = Xn();
1605
+ const I = f.createWithdrawal({
1606
1606
  withdrawalParams: {
1607
1607
  assetId: t.sourceToken.assetId,
1608
1608
  amount: BigInt(t.sourceTokenAmount),
1609
- destinationAddress: pr(
1609
+ destinationAddress: hr(
1610
1610
  t,
1611
1611
  a || l
1612
1612
  ),
1613
1613
  destinationMemo: void 0,
1614
1614
  feeInclusive: !1,
1615
- routeConfig: h
1615
+ routeConfig: T
1616
1616
  }
1617
1617
  });
1618
1618
  try {
1619
- await g.estimateFee(), u("WAITING_CONFIRMATION");
1620
- const f = await g.signAndSendIntent();
1619
+ await I.estimateFee(), u("WAITING_CONFIRMATION");
1620
+ const m = await I.signAndSendIntent();
1621
1621
  u("PROCESSING");
1622
- const w = await g.waitForIntentSettlement();
1623
- return await g.waitForWithdrawalCompletion(), {
1622
+ const w = await I.waitForIntentSettlement();
1623
+ return await I.waitForWithdrawalCompletion(), {
1624
1624
  hash: w.hash,
1625
- transactionLink: ns(tn.near, w.hash),
1626
- intent: f
1625
+ transactionLink: rs(tn.near, w.hash),
1626
+ intent: m
1627
1627
  };
1628
- } catch (f) {
1629
- if (b.error("[TRANSFER ERROR]", f), f instanceof Error) {
1630
- if (f.message.includes("Fee is not estimated"))
1631
- throw new I({
1628
+ } catch (m) {
1629
+ if (b.error("[TRANSFER ERROR]", m), m instanceof Jn)
1630
+ throw new g({
1631
+ code: "MIN_WITHDRAWAL_AMOUNT_ERROR",
1632
+ meta: {
1633
+ minAmount: j(
1634
+ m.minAmount.toString(),
1635
+ t.sourceToken.decimals
1636
+ )
1637
+ }
1638
+ });
1639
+ if (m instanceof es)
1640
+ throw new g({
1641
+ code: "TRANSFER_INVALID_INITIAL",
1642
+ meta: { message: "Fee is above the maximum allowed" }
1643
+ });
1644
+ if (m instanceof Error) {
1645
+ if (m.message.includes("Fee is not estimated"))
1646
+ throw new g({
1632
1647
  code: "FEES_NOT_ESTIMATED"
1633
1648
  });
1634
- if (Ae(f.message) || Ae(`${f.cause}`))
1649
+ if (Ae(m.message) || Ae(`${m.cause}`))
1635
1650
  return;
1636
1651
  }
1637
- throw new I({
1652
+ throw new g({
1638
1653
  code: "DIRECT_TRANSFER_ERROR"
1639
1654
  });
1640
1655
  }
1641
1656
  } };
1642
- }, gr = ({
1657
+ }, wr = ({
1643
1658
  message: e,
1644
1659
  providers: t,
1645
1660
  makeTransfer: r
@@ -1648,121 +1663,121 @@ const fr = ({
1648
1663
  isDirectTokenOnNearDeposit: n,
1649
1664
  isDirectTokenOnNearTransfer: a,
1650
1665
  isNativeNearDeposit: l
1651
- } = j(), { make: c } = Tr({ providers: t }), { make: d } = ur({
1666
+ } = z(), { make: c } = Ir({ providers: t }), { make: d } = fr({
1652
1667
  makeTransfer: r,
1653
1668
  providers: t
1654
- }), { make: u } = dr(
1669
+ }), { make: u } = mr(
1655
1670
  t?.near
1656
1671
  );
1657
1672
  return { make: async () => {
1658
1673
  if (!s.targetToken)
1659
1674
  return;
1660
- let m;
1675
+ let f;
1661
1676
  try {
1662
1677
  if (p("transferSetStatus", {
1663
1678
  status: "pending",
1664
1679
  reason: "WAITING_CONFIRMATION"
1665
1680
  }), s.sourceToken?.isIntent)
1666
- m = await c({
1681
+ f = await c({
1667
1682
  message: e,
1668
- onPending: (h) => {
1683
+ onPending: (T) => {
1669
1684
  p("transferSetStatus", {
1670
1685
  status: "pending",
1671
- reason: h
1686
+ reason: T
1672
1687
  });
1673
1688
  }
1674
1689
  });
1675
1690
  else if ((l || n) && !s.isDepositFromExternalWallet)
1676
- m = await u(
1691
+ f = await u(
1677
1692
  s.sendAddress ?? ke,
1678
1693
  e
1679
1694
  );
1680
1695
  else if (a) {
1681
1696
  if (!s.sendAddress)
1682
- throw new I({
1697
+ throw new g({
1683
1698
  code: "TRANSFER_INVALID_INITIAL",
1684
1699
  meta: { message: "No recipient address to transfer" }
1685
1700
  });
1686
- m = await u(
1701
+ f = await u(
1687
1702
  s.sendAddress,
1688
1703
  e
1689
1704
  );
1690
1705
  } else
1691
- m = await d();
1692
- } catch (h) {
1693
- h instanceof I && (b.error(h.data), p("transferSetStatus", { status: "error" }), p("errorSet", h.data));
1706
+ f = await d();
1707
+ } catch (T) {
1708
+ T instanceof g && (b.error(T.data), p("transferSetStatus", { status: "error" }), p("errorSet", T.data));
1694
1709
  }
1695
- if (!m) {
1710
+ if (!f) {
1696
1711
  p("transferSetStatus", { status: "idle" });
1697
1712
  return;
1698
1713
  }
1699
- return p("transferSetStatus", { status: "success" }), O("transfer_success"), m;
1714
+ return p("transferSetStatus", { status: "success" }), O("transfer_success"), f;
1700
1715
  } };
1701
- }, Ir = async (e) => {
1716
+ }, kr = async (e) => {
1702
1717
  if (!e)
1703
1718
  return;
1704
1719
  const t = await e.request({
1705
1720
  method: "eth_chainId"
1706
1721
  });
1707
1722
  return parseInt(t, 16);
1708
- }, wr = ({ providers: e }) => {
1709
- const { ctx: t } = _(), [r, s] = re(!1), [n, a] = re(!1), l = he(async () => {
1723
+ }, Ar = ({ providers: e }) => {
1724
+ const { ctx: t } = _(), [r, s] = re(!1), [n, a] = re(!1), l = Te(async () => {
1710
1725
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1711
1726
  if (!t.sourceToken || !d)
1712
1727
  return !1;
1713
- const u = await Ir(d);
1728
+ const u = await kr(d);
1714
1729
  if (!Q(t.sourceToken.blockchain))
1715
1730
  return !1;
1716
- const i = Te[t.sourceToken.blockchain];
1731
+ const i = he[t.sourceToken.blockchain];
1717
1732
  return !i || !u ? !1 : u !== i;
1718
- }, [t.sourceToken, e]), c = he(async () => {
1733
+ }, [t.sourceToken, e]), c = Te(async () => {
1719
1734
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1720
1735
  if (!t.sourceToken || !d || !Q(t.sourceToken.blockchain))
1721
1736
  return !1;
1722
- const u = Te[t.sourceToken.blockchain];
1737
+ const u = he[t.sourceToken.blockchain];
1723
1738
  if (!u)
1724
1739
  return !1;
1725
1740
  try {
1726
- return s(!0), await ss(u, d), !0;
1741
+ return s(!0), await as(u, d), !0;
1727
1742
  } catch (i) {
1728
1743
  return b.error("Failed to switch chain:", i), !1;
1729
1744
  } finally {
1730
1745
  s(!1);
1731
1746
  }
1732
1747
  }, [t.sourceToken, e]);
1733
- return C(() => {
1748
+ return R(() => {
1734
1749
  l().then(a);
1735
1750
  }, [l]), {
1736
1751
  isSwitchingChainRequired: n,
1737
1752
  switchChain: c,
1738
1753
  isSwitchingChain: r
1739
1754
  };
1740
- }, N = {
1755
+ }, S = {
1741
1756
  size: "lg",
1742
1757
  variant: "primary"
1743
1758
  }, Le = (e) => {
1744
1759
  const { t } = M();
1745
1760
  if (e.error?.code === "TOKEN_IS_NOT_SUPPORTED")
1746
- return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.invalidAddress", "Invalid address") });
1761
+ return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.invalidAddress", "Invalid address") });
1747
1762
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_EMPTY")
1748
- return /* @__PURE__ */ o(A, { state: "disabled", ...N, children: t("submit.disabled.enterRecipientAddress", "Enter recipient address") });
1763
+ return /* @__PURE__ */ o(A, { state: "disabled", ...S, children: t("submit.disabled.enterRecipientAddress", "Enter recipient address") });
1749
1764
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_NOT_FOUND")
1750
- return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.sendAddressNotFound", {
1765
+ return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.sendAddressNotFound", {
1751
1766
  defaultValue: "Address not found on {{chain}}",
1752
1767
  chain: e.error.meta.chain.toUpperCase()
1753
1768
  }) });
1754
1769
  if (e.state === "initial_wallet" && e.error?.code === "SEND_ADDRESS_IS_INVALID")
1755
- return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.sendAddressInvalid", {
1770
+ return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.sendAddressInvalid", {
1756
1771
  defaultValue: "Invalid {{chain}} address",
1757
1772
  chain: e.error.meta.chain.toUpperCase()
1758
1773
  }) });
1759
- if (e.error?.code === "QUOTE_AMOUNT_IS_TOO_LOW")
1760
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1761
- /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.amountTooLow.label", "Amount is too low") }),
1762
- /* @__PURE__ */ o(K, { children: /* @__PURE__ */ T(Gt, { i18nKey: "submit.error.amountTooLow.message", children: [
1774
+ if (e.error?.code === "QUOTE_AMOUNT_IS_TOO_LOW" || e.error?.code === "MIN_WITHDRAWAL_AMOUNT_ERROR")
1775
+ return /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1776
+ /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.amountTooLow.label", "Amount is too low") }),
1777
+ /* @__PURE__ */ o(K, { children: /* @__PURE__ */ h(Gt, { i18nKey: "submit.error.amountTooLow.message", children: [
1763
1778
  "Amount you entered is very low. Please try increasing it",
1764
1779
  " ",
1765
- /* @__PURE__ */ T("span", { className: "text-nowrap", children: [
1780
+ /* @__PURE__ */ h("span", { className: "text-nowrap", children: [
1766
1781
  "above ",
1767
1782
  /* @__PURE__ */ o(Oe, { value: e.error.meta.minAmount ?? "0" }),
1768
1783
  " ",
@@ -1772,81 +1787,81 @@ const fr = ({
1772
1787
  ] }) })
1773
1788
  ] });
1774
1789
  if (e.quoteStatus === "error")
1775
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1776
- /* @__PURE__ */ o(A, { state: "error", ...N, 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", ...S, children: t("submit.error.quoteFailed.label", "Quote failed") }),
1777
1792
  /* @__PURE__ */ o(K, { children: t(
1778
1793
  "submit.error.quoteFailed.message",
1779
1794
  "We couldn’t finalize your quote. Please try again or adjust your values."
1780
1795
  ) })
1781
1796
  ] });
1782
1797
  if (e.error?.code === "TRANSFER_INVALID_INITIAL")
1783
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1784
- /* @__PURE__ */ o(A, { state: "error", ...N, 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", ...S, children: t("submit.error.invalidTransferData.label", "Invalid transfer data") }),
1785
1800
  e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1786
1801
  ] });
1787
1802
  if (e.error?.code === "EXTERNAL_TRANSFER_FAILED")
1788
- return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.externalTransferFailed.label", "Transfer failed") });
1803
+ return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") });
1789
1804
  if (e.error?.code === "EXTERNAL_TRANSFER_INCOMPLETE")
1790
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1791
- /* @__PURE__ */ o(A, { state: "error", ...N, 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", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1792
1807
  /* @__PURE__ */ o(K, { children: t(
1793
1808
  "submit.error.externalTransferFailed.incompleteMessage",
1794
1809
  "Incomplete transfer. Deposited amount will be refunded."
1795
1810
  ) })
1796
1811
  ] });
1797
1812
  if (e.error?.code === "EXTERNAL_TRANSFER_REFUNDED")
1798
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1799
- /* @__PURE__ */ o(A, { state: "error", ...N, 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", ...S, children: t("submit.error.externalTransferFailed.label", "Transfer failed") }),
1800
1815
  /* @__PURE__ */ o(K, { children: t(
1801
1816
  "submit.error.externalTransferFailed.refundedMessage",
1802
1817
  "Deposited amount will be refunded."
1803
1818
  ) })
1804
1819
  ] });
1805
1820
  if (e.error?.code === "DIRECT_TRANSFER_ERROR")
1806
- return /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1807
- /* @__PURE__ */ o(A, { state: "error", ...N, 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", ...S, children: t("submit.error.transferFailed.label", "Transfer failed") }),
1808
1823
  e.error.meta?.message ? /* @__PURE__ */ o(K, { children: e.error.meta.message }) : null
1809
1824
  ] });
1810
1825
  if (e.error?.code === "SOURCE_BALANCE_INSUFFICIENT")
1811
- return /* @__PURE__ */ o(A, { state: "error", ...N, children: t("submit.error.insufficientBalance", "Insufficient balance") });
1812
- }, kr = ({ onClick: e }) => {
1826
+ return /* @__PURE__ */ o(A, { state: "error", ...S, children: t("submit.error.insufficientBalance", "Insufficient balance") });
1827
+ }, Nr = ({ onClick: e }) => {
1813
1828
  const { t } = M();
1814
- return /* @__PURE__ */ o(A, { state: "disabled", ...N, onClick: e, children: t("submit.error.connectWallet", "Connect wallet") });
1815
- }, Ar = () => {
1829
+ return /* @__PURE__ */ o(A, { state: "disabled", ...S, onClick: e, children: t("submit.error.connectWallet", "Connect wallet") });
1830
+ }, Sr = () => {
1816
1831
  const { ctx: e } = _();
1817
1832
  return Le(e) ?? null;
1818
- }, Sr = (e) => {
1833
+ }, _r = (e) => {
1819
1834
  const { providers: t, makeTransfer: r, onSuccess: s } = e, { ctx: n } = _(), { t: a } = M(), {
1820
1835
  isNativeNearDeposit: l,
1821
1836
  isDirectNonNearWithdrawal: c,
1822
1837
  isDirectTokenOnNearDeposit: d,
1823
1838
  isDirectNearTokenWithdrawal: u
1824
- } = j(), { make: i } = gr({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: m, switchChain: h, isSwitchingChain: g } = wr({ providers: t }), f = Le(n), w = async () => {
1825
- if (m && !await h())
1839
+ } = z(), { make: i } = wr({ providers: t, makeTransfer: r }), { isSwitchingChainRequired: f, switchChain: T, isSwitchingChain: I } = Ar({ providers: t }), m = Le(n), w = async () => {
1840
+ if (f && !await T())
1826
1841
  return;
1827
- const S = await i();
1828
- S && s(S);
1842
+ const N = await i();
1843
+ N && s(N);
1829
1844
  };
1830
1845
  if (!n.targetToken)
1831
- return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1846
+ return /* @__PURE__ */ o(A, { ...S, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1832
1847
  if (!ne(n.sourceTokenAmount))
1833
- return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1848
+ return /* @__PURE__ */ o(A, { ...S, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1834
1849
  if (n.areInputsValidating)
1835
- return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.validating", "Validating...") });
1836
- if (g)
1837
- return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.switchingChain", "Switching network...") });
1838
- if (!m && f)
1839
- return f;
1850
+ return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.validating", "Validating...") });
1851
+ if (I)
1852
+ return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.switchingChain", "Switching network...") });
1853
+ if (!f && m)
1854
+ return m;
1840
1855
  if (n.transferStatus.status === "pending")
1841
1856
  switch (n.transferStatus.reason) {
1842
1857
  case "WAITING_CONFIRMATION":
1843
- return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.transfer.confirmInWallet", "Confirm in wallet") });
1858
+ return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.transfer.confirmInWallet", "Confirm in wallet") });
1844
1859
  case "PROCESSING":
1845
1860
  default:
1846
- return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.transfer.finalizing", "Finalizing transfer") });
1861
+ return /* @__PURE__ */ o(A, { state: "loading", ...S, children: a("submit.pending.transfer.finalizing", "Finalizing transfer") });
1847
1862
  }
1848
- return n.transferStatus.status === "error" ? /* @__PURE__ */ T("div", { className: "gap-sw-md flex flex-col", children: [
1849
- /* @__PURE__ */ o(A, { ...N, children: e.label }),
1863
+ return n.transferStatus.status === "error" ? /* @__PURE__ */ h("div", { className: "gap-sw-md flex flex-col", children: [
1864
+ /* @__PURE__ */ o(A, { ...S, children: e.label }),
1850
1865
  /* @__PURE__ */ o(K, { children: (() => {
1851
1866
  switch (n.error?.code) {
1852
1867
  case "FEES_NOT_ESTIMATED":
@@ -1861,39 +1876,39 @@ const fr = ({
1861
1876
  );
1862
1877
  }
1863
1878
  })() })
1864
- ] }) : 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 && !c && !d && !u && !l ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : /* @__PURE__ */ o(A, { ...N, onClick: w, children: e.label });
1865
- }, Nr = (e) => {
1879
+ ] }) : 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 });
1880
+ }, yr = (e) => {
1866
1881
  const { t } = M(), { ctx: r } = _(), s = Le(r);
1867
- 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 });
1868
- }, _r = (e) => {
1882
+ 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(_r, { ...e });
1883
+ }, br = (e) => {
1869
1884
  const { ctx: t } = _(), r = y();
1870
- return t.walletAddress ? /* @__PURE__ */ o(Nr, { ...e }) : /* @__PURE__ */ o(kr, { onClick: r.onWalletSignin });
1885
+ return t.walletAddress ? /* @__PURE__ */ o(yr, { ...e }) : /* @__PURE__ */ o(Nr, { onClick: r.onWalletSignin });
1871
1886
  };
1872
- _r.Error = Ar;
1873
- const yr = ({ className: e }) => {
1887
+ br.Error = Sr;
1888
+ const Er = ({ className: e }) => {
1874
1889
  const { t } = M(), { slippageTolerance: r } = y(), { ctx: s } = _(), n = s.sourceToken && s.targetToken && s.sourceToken.price / s.targetToken.price;
1875
1890
  return s.sourceToken ? /* @__PURE__ */ o(
1876
- rs,
1891
+ os,
1877
1892
  {
1878
1893
  expandedByDefault: !1,
1879
1894
  expandedHeightPx: s.walletAddress ? 80 : 50,
1880
1895
  isBadgeLoading: s.quoteStatus === "pending",
1881
1896
  badge: s.quote ? `~ ${s.quote.timeEstimate} sec` : void 0,
1882
1897
  className: e,
1883
- 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: [
1884
1899
  `1 ${s.sourceToken.symbol} ≈ `,
1885
1900
  " ",
1886
- as(n ?? 0),
1901
+ is(n ?? 0),
1887
1902
  " ",
1888
1903
  `${s.targetToken.symbol}`,
1889
1904
  /* @__PURE__ */ o("span", { className: "text-sw-gray-50", children: ` (${$e(s.sourceToken.price)})` })
1890
- ] }) : /* @__PURE__ */ T("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1905
+ ] }) : /* @__PURE__ */ h("span", { style: { borderBottomWidth: "2px", borderStyle: "dotted" }, children: [
1891
1906
  `1 ${s.sourceToken.symbol} ≈ `,
1892
1907
  " ",
1893
1908
  $e(s.sourceToken.price),
1894
1909
  " USD"
1895
1910
  ] }),
1896
- children: /* @__PURE__ */ T(de, { children: [
1911
+ children: /* @__PURE__ */ h(de, { children: [
1897
1912
  /* @__PURE__ */ o(
1898
1913
  de.Item,
1899
1914
  {
@@ -1912,21 +1927,21 @@ const yr = ({ className: e }) => {
1912
1927
  ] })
1913
1928
  }
1914
1929
  ) : /* @__PURE__ */ o(wt, {});
1915
- }, qi = Object.assign(yr, {
1930
+ }, Pi = Object.assign(Er, {
1916
1931
  Skeleton: wt
1917
- }), br = ({
1932
+ }), Rr = ({
1918
1933
  token: e,
1919
1934
  balance: t,
1920
1935
  isNotSufficient: r = !1,
1921
1936
  onClick: s
1922
1937
  }) => {
1923
1938
  const n = y();
1924
- return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(is, { width: 100 }) : /* @__PURE__ */ o(
1939
+ return !e.isIntent && !n.walletSupportedChains.includes(e.blockchain) ? /* @__PURE__ */ o("span", {}) : t === void 0 ? /* @__PURE__ */ o(ls, { width: 100 }) : /* @__PURE__ */ o(
1925
1940
  "span",
1926
1941
  {
1927
1942
  onClick: t ? s : void 0,
1928
1943
  style: t ? { borderBottomWidth: "2px", borderStyle: "dotted" } : void 0,
1929
- className: os("text-sw-label-sm", {
1944
+ className: cs("text-sw-label-sm", {
1930
1945
  "text-sw-status-error": r,
1931
1946
  "text-sw-gray-100": !r,
1932
1947
  "cursor-pointer": !!t && !!s
@@ -1952,36 +1967,36 @@ const yr = ({ className: e }) => {
1952
1967
  heading: d,
1953
1968
  onMsg: u
1954
1969
  }) => {
1955
- const i = Wt(), { ctx: m } = _(), { t: h } = M(), { hideTokenInputHeadings: g } = y(), f = ls(e, r, n), w = (S) => {
1970
+ const i = Wt(), { ctx: f } = _(), { t: T } = M(), { hideTokenInputHeadings: I } = y(), m = us(e, r, n), w = (N) => {
1956
1971
  u({
1957
1972
  type: "on_change_amount",
1958
- amount: cs(t, e.decimals, S)
1973
+ amount: ds(t, e.decimals, N)
1959
1974
  });
1960
1975
  };
1961
- return /* @__PURE__ */ T(ie, { className: "flex flex-col", "aria-label": d, children: [
1962
- !g && /* @__PURE__ */ o(kt, { children: d }),
1963
- /* @__PURE__ */ T(
1976
+ return /* @__PURE__ */ h(ie, { className: "flex flex-col", "aria-label": d, children: [
1977
+ !I && /* @__PURE__ */ o(kt, { children: d }),
1978
+ /* @__PURE__ */ h(
1964
1979
  "div",
1965
1980
  {
1966
1981
  className: H(
1967
1982
  "flex items-center justify-between",
1968
- !g && "mt-sw-2xl"
1983
+ !I && "mt-sw-2xl"
1969
1984
  ),
1970
1985
  children: [
1971
1986
  /* @__PURE__ */ o(
1972
- us,
1987
+ fs,
1973
1988
  {
1974
1989
  value: r,
1975
1990
  name: i,
1976
- setValue: ds,
1991
+ setValue: ms,
1977
1992
  placeholder: "0",
1978
1993
  state: a === "default" || a === "disabled" ? a : "error",
1979
- onChange: (S) => {
1980
- u({ type: "on_change_amount", amount: S.target.value });
1994
+ onChange: (N) => {
1995
+ u({ type: "on_change_amount", amount: N.target.value });
1981
1996
  }
1982
1997
  }
1983
1998
  ),
1984
- /* @__PURE__ */ T(
1999
+ /* @__PURE__ */ h(
1985
2000
  "button",
1986
2001
  {
1987
2002
  type: "button",
@@ -2009,9 +2024,9 @@ const yr = ({ className: e }) => {
2009
2024
  ]
2010
2025
  }
2011
2026
  ),
2012
- /* @__PURE__ */ T("div", { className: "gap-sw-sm min-h-sw-2xl flex items-center justify-between mt-sw-lg", children: [
2013
- /* @__PURE__ */ T("div", { className: "gap-sw-md flex items-center", children: [
2014
- /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-100", children: f }),
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: [
2029
+ /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-100", children: m }),
2015
2030
  s ? /* @__PURE__ */ o(
2016
2031
  "span",
2017
2032
  {
@@ -2025,9 +2040,9 @@ const yr = ({ className: e }) => {
2025
2040
  }
2026
2041
  ) : null
2027
2042
  ] }),
2028
- /* @__PURE__ */ T("div", { className: "gap-sw-sm flex items-center", children: [
2029
- e && !!m.walletAddress && l && /* @__PURE__ */ o(
2030
- br,
2043
+ /* @__PURE__ */ h("div", { className: "gap-sw-sm flex items-center", children: [
2044
+ e && !!f.walletAddress && l && /* @__PURE__ */ o(
2045
+ Rr,
2031
2046
  {
2032
2047
  token: e,
2033
2048
  balance: t,
@@ -2035,13 +2050,13 @@ const yr = ({ className: e }) => {
2035
2050
  onClick: () => w(1)
2036
2051
  }
2037
2052
  ),
2038
- !!t && l && c && /* @__PURE__ */ T(Lt, { children: [
2053
+ !!t && l && c && /* @__PURE__ */ h(Lt, { children: [
2039
2054
  /* @__PURE__ */ o(
2040
2055
  Ke,
2041
2056
  {
2042
2057
  isClickable: a !== "disabled",
2043
2058
  onClick: () => w(2),
2044
- children: h("tokens.input.half.label", "50%")
2059
+ children: T("tokens.input.half.label", "50%")
2045
2060
  }
2046
2061
  ),
2047
2062
  /* @__PURE__ */ o(
@@ -2049,17 +2064,17 @@ const yr = ({ className: e }) => {
2049
2064
  {
2050
2065
  isClickable: a !== "disabled",
2051
2066
  onClick: () => w(1),
2052
- children: h("tokens.input.max.label", "Max")
2067
+ children: T("tokens.input.max.label", "Max")
2053
2068
  }
2054
2069
  )
2055
2070
  ] }),
2056
- !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
+ !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: T("tokens.input.externalBalance.label", "External balance") }) })
2057
2072
  ] })
2058
2073
  ] })
2059
2074
  ] });
2060
2075
  }, qe = ({ onMsg: e, heading: t }) => {
2061
2076
  const { hideTokenInputHeadings: r } = y();
2062
- return /* @__PURE__ */ T(
2077
+ return /* @__PURE__ */ h(
2063
2078
  ie,
2064
2079
  {
2065
2080
  isClickable: !0,
@@ -2067,7 +2082,7 @@ const yr = ({ className: e }) => {
2067
2082
  onClick: () => e({ type: "on_click_select_token" }),
2068
2083
  children: [
2069
2084
  !r && /* @__PURE__ */ o(kt, { children: t }),
2070
- /* @__PURE__ */ T(
2085
+ /* @__PURE__ */ h(
2071
2086
  "div",
2072
2087
  {
2073
2088
  className: H(
@@ -2103,7 +2118,7 @@ const yr = ({ className: e }) => {
2103
2118
  const { mergedBalance: t } = le(), [r, s] = re(
2104
2119
  e ? t[G(e)] : void 0
2105
2120
  );
2106
- return C(() => {
2121
+ return R(() => {
2107
2122
  let n;
2108
2123
  if (e) {
2109
2124
  const a = t[G(e)];
@@ -2123,11 +2138,11 @@ const yr = ({ className: e }) => {
2123
2138
  const { tokens: r } = P(e), s = Array.from(
2124
2139
  new Set(r.map((n) => n.assetId))
2125
2140
  );
2126
- C(() => {
2141
+ R(() => {
2127
2142
  const n = s.length === 1 ? r[0] : null;
2128
2143
  n && t({ type: "on_select_token", token: n });
2129
2144
  }, [r]);
2130
- }, Er = ({
2145
+ }, Cr = ({
2131
2146
  onMsg: e,
2132
2147
  isChanging: t = !0,
2133
2148
  showBalance: r = !0,
@@ -2154,16 +2169,16 @@ const yr = ({ className: e }) => {
2154
2169
  balance: a,
2155
2170
  showBalance: r,
2156
2171
  showQuickBalanceActions: !0,
2157
- value: z(n.sourceTokenAmount, n.sourceToken?.decimals),
2172
+ value: j(n.sourceTokenAmount, n.sourceToken?.decimals),
2158
2173
  onMsg: e
2159
2174
  }
2160
2175
  ) : /* @__PURE__ */ o(qe, { heading: s, onMsg: e });
2161
- }, Cr = ({
2176
+ }, vr = ({
2162
2177
  isChanging: e = !1,
2163
2178
  onMsg: t,
2164
2179
  heading: r
2165
2180
  }) => {
2166
- const { ctx: s } = _(), { usdTradeDelta: n } = j(), a = Dt(s.targetToken);
2181
+ const { ctx: s } = _(), { usdTradeDelta: n } = z(), a = Dt(s.targetToken);
2167
2182
  xt("target", t);
2168
2183
  const l = v(() => !e && s.quoteStatus === "pending" ? "disabled" : "default", [e, s.quoteStatus]);
2169
2184
  return s.targetToken ? /* @__PURE__ */ o(
@@ -2174,17 +2189,17 @@ const yr = ({ className: e }) => {
2174
2189
  balance: a,
2175
2190
  quoteUsdDelta: n?.percentage,
2176
2191
  quoteUsdValue: s.quote && parseFloat(s.quote.amountOutUsd),
2177
- value: z(s.targetTokenAmount, s.targetToken?.decimals),
2192
+ value: j(s.targetTokenAmount, s.targetToken?.decimals),
2178
2193
  state: l,
2179
2194
  showQuickBalanceActions: !1,
2180
2195
  showBalance: !0,
2181
2196
  onMsg: t
2182
2197
  }
2183
2198
  ) : /* @__PURE__ */ o(qe, { heading: r, onMsg: t });
2184
- }, Rr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Be, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(qe, { onMsg: r.onMsg, heading: t }), Ui = Object.assign(Rr, {
2185
- Skeleton: ms,
2186
- Source: Er,
2187
- Target: Cr
2199
+ }, Dr = ({ token: e, heading: t, ...r }) => e ? /* @__PURE__ */ o(Be, { ...r, token: e, heading: t }) : /* @__PURE__ */ o(qe, { onMsg: r.onMsg, heading: t }), Wi = Object.assign(Dr, {
2200
+ Skeleton: ps,
2201
+ Source: Cr,
2202
+ Target: vr
2188
2203
  }), Je = 58, Ot = ({
2189
2204
  token: e,
2190
2205
  balance: t,
@@ -2193,8 +2208,8 @@ const yr = ({ className: e }) => {
2193
2208
  className: n,
2194
2209
  onMsg: a
2195
2210
  }) => {
2196
- const { ctx: l } = _(), { walletSupportedChains: c, appName: d } = y(), u = fs(t, e), i = c.includes(e.blockchain) || e.isIntent, m = t !== "0" && t !== 0 && t !== void 0;
2197
- return /* @__PURE__ */ o("li", { className: "list-none group", children: /* @__PURE__ */ T(
2211
+ 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;
2212
+ return /* @__PURE__ */ o("li", { className: "list-none group", children: /* @__PURE__ */ h(
2198
2213
  "div",
2199
2214
  {
2200
2215
  className: H(
@@ -2215,27 +2230,27 @@ const yr = ({ className: e }) => {
2215
2230
  ...e
2216
2231
  }
2217
2232
  ),
2218
- /* @__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: [
2219
2234
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e.name }),
2220
- 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: [
2221
2236
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2222
2237
  " ",
2223
- /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${d} ${e.chainName.toLowerCase() !== "near" && m ? `(${e.chainName})` : ""}` })
2224
- ] }) : /* @__PURE__ */ T("div", { className: "flex items-center gap-sw-xs", children: [
2238
+ /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${d} ${e.chainName.toLowerCase() !== "near" && f ? `(${e.chainName})` : ""}` })
2239
+ ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-sw-xs", children: [
2225
2240
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-300", children: e.symbol }),
2226
2241
  " ",
2227
2242
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: `on ${e.chainName}` })
2228
2243
  ] })
2229
2244
  ] }),
2230
- i && !!l.walletAddress && r && /* @__PURE__ */ T("div", { className: "gap-sw-xs flex flex-col items-end", children: [
2231
- 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: m && /* @__PURE__ */ o(
2245
+ i && !!l.walletAddress && r && /* @__PURE__ */ h("div", { className: "gap-sw-xs flex flex-col items-end", children: [
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(
2232
2247
  Oe,
2233
2248
  {
2234
2249
  decimals: e.decimals,
2235
2250
  value: t === void 0 ? "0" : `${t}`
2236
2251
  }
2237
2252
  ) }),
2238
- m && /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: u })
2253
+ f && /* @__PURE__ */ o("span", { className: "text-sw-label-sm text-sw-gray-300", children: u })
2239
2254
  ] })
2240
2255
  ]
2241
2256
  }
@@ -2253,7 +2268,7 @@ const yr = ({ className: e }) => {
2253
2268
  // NEAR (bsc)
2254
2269
  "nep141:eth-0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c.omft.near"
2255
2270
  // SPX (eth)
2256
- ], vr = () => {
2271
+ ], xr = () => {
2257
2272
  const { tokens: e } = P();
2258
2273
  return {
2259
2274
  uniqueIntentsTokens: v(() => {
@@ -2263,25 +2278,25 @@ const yr = ({ className: e }) => {
2263
2278
  return [...t, ...s];
2264
2279
  }, [e])
2265
2280
  };
2266
- }, Dr = ({
2281
+ }, Or = ({
2267
2282
  variant: e,
2268
2283
  search: t,
2269
2284
  selectedChain: r,
2270
2285
  chainsFilter: s,
2271
2286
  walletSupportedChains: n
2272
2287
  }) => {
2273
- $s(e);
2274
- const { tokens: a } = P(e), { mergedBalance: l } = le(), { intentBalances: c } = ce(), { uniqueIntentsTokens: d } = vr(), u = Ts(
2288
+ Hs(e);
2289
+ const { tokens: a } = P(e), { mergedBalance: l } = le(), { intentBalances: c } = ce(), { uniqueIntentsTokens: d } = xr(), u = Is(
2275
2290
  l,
2276
2291
  n,
2277
2292
  t
2278
- ), i = a.filter(gs({ search: t })).filter(
2279
- Is({
2293
+ ), i = a.filter(ws({ search: t })).filter(
2294
+ ks({
2280
2295
  selectedChain: r,
2281
2296
  chainsFilter: s,
2282
2297
  walletSupportedChains: n,
2283
2298
  intentBalances: c,
2284
- uniqueIntentTokenIds: d.map((m) => m.assetId)
2299
+ uniqueIntentTokenIds: d.map((f) => f.assetId)
2285
2300
  })
2286
2301
  );
2287
2302
  return {
@@ -2289,7 +2304,7 @@ const yr = ({ className: e }) => {
2289
2304
  intents: i.filter(He({ isIntent: !0 })).sort(u),
2290
2305
  wallet: i.filter(He({ isIntent: !1 })).sort(u)
2291
2306
  };
2292
- }, xr = (e, t) => e.length === 0 && t ? "EMPTY_SEARCH" : e.length === 0 && !t ? "NO_TOKENS" : "HAS_TOKENS", Or = ({
2307
+ }, Fr = (e, t) => e.length === 0 && t ? "EMPTY_SEARCH" : e.length === 0 && !t ? "NO_TOKENS" : "HAS_TOKENS", Lr = ({
2293
2308
  variant: e,
2294
2309
  search: t,
2295
2310
  className: r,
@@ -2300,32 +2315,32 @@ const yr = ({ className: e }) => {
2300
2315
  chainIsNotSupported: c,
2301
2316
  onMsg: d
2302
2317
  }) => {
2303
- const { t: u } = M(), { ctx: i } = _(), { walletSupportedChains: m, appName: h } = y(), { mergedBalance: g } = le(), f = Dr({
2318
+ const { t: u } = M(), { ctx: i } = _(), { walletSupportedChains: f, appName: T } = y(), { mergedBalance: I } = le(), m = Or({
2304
2319
  variant: e,
2305
2320
  search: t,
2306
2321
  chainsFilter: a,
2307
2322
  selectedChain: l,
2308
- walletSupportedChains: m
2309
- }), w = i.walletAddress ? s : !1, S = xr(f.all, t), E = v(
2310
- () => [{ label: null, tokens: f.all }],
2311
- [f.all]
2323
+ walletSupportedChains: f
2324
+ }), w = i.walletAddress ? s : !1, N = Fr(m.all, t), E = v(
2325
+ () => [{ label: null, tokens: m.all }],
2326
+ [m.all]
2312
2327
  ), B = v(
2313
2328
  () => [
2314
- { label: `${h} account`, tokens: f.intents },
2329
+ { label: T, tokens: m.intents },
2315
2330
  {
2316
2331
  label: c ? null : "Connected wallet",
2317
- tokens: f.wallet
2332
+ tokens: m.wallet
2318
2333
  }
2319
2334
  ],
2320
- [f.wallet, f.intents, c]
2335
+ [m.wallet, m.intents, c]
2321
2336
  ), F = v(() => (w ? B : E).reduce(
2322
2337
  (k, x) => k + x.tokens.length,
2323
2338
  0
2324
2339
  ), [B, E, w]), L = "450px";
2325
- switch (S) {
2340
+ switch (N) {
2326
2341
  case "EMPTY_SEARCH":
2327
2342
  return /* @__PURE__ */ o(
2328
- Se,
2343
+ Ne,
2329
2344
  {
2330
2345
  hasAction: !0,
2331
2346
  actionType: "outlined",
@@ -2341,7 +2356,7 @@ const yr = ({ className: e }) => {
2341
2356
  );
2342
2357
  case "HAS_TOKENS":
2343
2358
  return /* @__PURE__ */ o("div", { className: H("gap-sw-lg flex flex-col", r), children: /* @__PURE__ */ o(
2344
- ps,
2359
+ hs,
2345
2360
  {
2346
2361
  className: "hide-scrollbar",
2347
2362
  style: {
@@ -2350,9 +2365,9 @@ const yr = ({ className: e }) => {
2350
2365
  height: F ? F * Je + (w ? B.length * 62 : 0) : Je * 2
2351
2366
  },
2352
2367
  children: (w ? B : E).map(
2353
- ({ label: k, tokens: x }) => /* @__PURE__ */ T(Vt, { children: [
2354
- x.length && k ? /* @__PURE__ */ T("header", { className: "pb-sw-lg flex flex-col", children: [
2355
- /* @__PURE__ */ o(hs, {}),
2368
+ ({ label: k, tokens: x }) => /* @__PURE__ */ h(Vt, { children: [
2369
+ x.length && k ? /* @__PURE__ */ h("header", { className: "pb-sw-lg flex flex-col", children: [
2370
+ /* @__PURE__ */ o(gs, {}),
2356
2371
  /* @__PURE__ */ o("span", { className: "text-sw-label-sm pt-sw-xl text-sw-gray-100", children: `${k} — ${x.length}` })
2357
2372
  ] }) : null,
2358
2373
  x.map((X) => {
@@ -2362,7 +2377,7 @@ const yr = ({ className: e }) => {
2362
2377
  {
2363
2378
  token: X,
2364
2379
  showBalance: n,
2365
- balance: g[J],
2380
+ balance: I[J],
2366
2381
  isNotSelectable: c && !!i.walletAddress,
2367
2382
  onMsg: d
2368
2383
  },
@@ -2377,7 +2392,7 @@ const yr = ({ className: e }) => {
2377
2392
  case "NO_TOKENS":
2378
2393
  default:
2379
2394
  return /* @__PURE__ */ o(
2380
- Se,
2395
+ Ne,
2381
2396
  {
2382
2397
  className: "pt-sw-5xl pb-sw-5xl",
2383
2398
  subHeading: u(
@@ -2386,15 +2401,15 @@ const yr = ({ className: e }) => {
2386
2401
  ),
2387
2402
  heading: u("tokens.list.noBalanceOnApp.label", {
2388
2403
  defaultValue: "You have no balances on {{appName}}",
2389
- appName: h
2404
+ appName: T
2390
2405
  })
2391
2406
  }
2392
2407
  );
2393
2408
  }
2394
- }, Pi = Object.assign(Or, {
2395
- Placeholder: Se,
2409
+ }, Vi = Object.assign(Lr, {
2410
+ Placeholder: Ne,
2396
2411
  Item: Ot
2397
- }), Fr = (e, t) => {
2412
+ }), Br = (e, t) => {
2398
2413
  const r = t.assetId.substring(t.assetId.indexOf(":") + 1), s = (a) => {
2399
2414
  const l = (u) => u.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, ""), c = l(t.amount), d = l(
2400
2415
  a.amount.toLocaleString("en-US", {
@@ -2407,12 +2422,12 @@ const yr = ({ className: e }) => {
2407
2422
  return (e.result.deposits || []).find(
2408
2423
  (a) => a.chain === t.chainId && a.account_id === t.intentsAccountId && a.address === t.depositAddress && a.near_token_id === r && n(a) && s(a)
2409
2424
  );
2410
- }, Lr = {
2425
+ }, qr = {
2411
2426
  CREDITED: ee.status.PROCESSING,
2412
2427
  PENDING: ee.status.PROCESSING,
2413
2428
  COMPLETED: ee.status.SUCCESS,
2414
2429
  FAILED: ee.status.FAILED
2415
- }, Wi = ({ depositAddress: e }) => {
2430
+ }, Mi = ({ depositAddress: e }) => {
2416
2431
  const { ctx: t } = _(), { intentsAccountType: r } = y(), [s, n] = re(null), a = te({
2417
2432
  addressType: r,
2418
2433
  walletAddress: t.walletAddress
@@ -2432,9 +2447,9 @@ const yr = ({ className: e }) => {
2432
2447
  throw new W(
2433
2448
  `Unknown chain for POA deposit check ${c}`
2434
2449
  );
2435
- const m = s ?? (/* @__PURE__ */ new Date()).toUTCString();
2436
- s || n(m);
2437
- const h = await ft.post("", {
2450
+ const f = s ?? (/* @__PURE__ */ new Date()).toUTCString();
2451
+ s || n(f);
2452
+ const T = await ft.post("", {
2438
2453
  id: 1,
2439
2454
  jsonrpc: "2.0",
2440
2455
  method: "recent_deposits",
@@ -2444,19 +2459,19 @@ const yr = ({ className: e }) => {
2444
2459
  chain: i
2445
2460
  }
2446
2461
  ]
2447
- }), g = Fr(h.data, {
2462
+ }), I = Br(T.data, {
2448
2463
  intentsAccountId: a,
2449
- initiatedAtDate: m,
2464
+ initiatedAtDate: f,
2450
2465
  depositAddress: e,
2451
2466
  chainId: i,
2452
2467
  assetId: u,
2453
2468
  amount: d
2454
2469
  });
2455
- return g ? {
2456
- status: Lr[g.status],
2470
+ return I ? {
2471
+ status: qr[I.status],
2457
2472
  swapDetails: {
2458
2473
  intentHashes: [""],
2459
- destinationChainTxHashes: [{ hash: g.tx_hash ?? "" }]
2474
+ destinationChainTxHashes: [{ hash: I.tx_hash ?? "" }]
2460
2475
  }
2461
2476
  } : {
2462
2477
  status: ee.status.PENDING_DEPOSIT,
@@ -2466,38 +2481,38 @@ const yr = ({ className: e }) => {
2466
2481
  }
2467
2482
  };
2468
2483
  } };
2469
- }, Br = (e, t, r) => {
2470
- if (St) {
2484
+ }, Ur = (e, t, r) => {
2485
+ if (Nt) {
2471
2486
  let s = document.body;
2472
2487
  r instanceof HTMLElement && (s = r), Object.entries(e).forEach(([n, a]) => {
2473
2488
  s.style.setProperty(`--c-sw-${t}-${n}`, a);
2474
2489
  });
2475
2490
  }
2476
2491
  }, tt = (e, t, r, s) => {
2477
- const n = r ? ws(r, s ?? "dark") : null;
2478
- n && Br(n, e, t);
2479
- }, qr = (e, t) => {
2492
+ const n = r ? As(r, s ?? "dark") : null;
2493
+ n && Ur(n, e, t);
2494
+ }, Pr = (e, t) => {
2480
2495
  const { primaryColor: r, surfaceColor: s, colorScheme: n } = t;
2481
2496
  tt("accent", e, r, n), tt("gray", e, s, n);
2482
- }, Ur = at(void 0), Pr = ({ children: e, theme: t }) => {
2497
+ }, Wr = at(void 0), Vr = ({ children: e, theme: t }) => {
2483
2498
  const { themeParentElementSelector: r } = y(), s = v(() => t, [t]);
2484
- return C(() => {
2485
- if (t && St) {
2499
+ return R(() => {
2500
+ if (t && Nt) {
2486
2501
  const n = r ? document.querySelector(r) : null;
2487
- qr(n, t);
2502
+ Pr(n, t);
2488
2503
  }
2489
- }, [t]), /* @__PURE__ */ o(Ur.Provider, { value: s, children: e });
2504
+ }, [t]), /* @__PURE__ */ o(Wr.Provider, { value: s, children: e });
2490
2505
  }, fe = ({
2491
2506
  text: e,
2492
2507
  icon: t
2493
- }) => /* @__PURE__ */ T("li", { className: "flex items-center gap-sw-md", children: [
2508
+ }) => /* @__PURE__ */ h("li", { className: "flex items-center gap-sw-md", children: [
2494
2509
  t && /* @__PURE__ */ o(t, { size: 20, className: "text-sw-gray-300" }),
2495
2510
  /* @__PURE__ */ o("span", { className: "text-sw-label-md text-sw-gray-50", children: e })
2496
2511
  ] }), nt = ({
2497
2512
  label: e,
2498
2513
  icon: t,
2499
2514
  className: r
2500
- }) => /* @__PURE__ */ T(
2515
+ }) => /* @__PURE__ */ h(
2501
2516
  "div",
2502
2517
  {
2503
2518
  className: H(
@@ -2509,8 +2524,8 @@ const yr = ({ className: e }) => {
2509
2524
  /* @__PURE__ */ o("span", { className: "text-sw-label-md", children: e })
2510
2525
  ]
2511
2526
  }
2512
- ), Wr = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2513
- const { t: s } = M(), n = bs({
2527
+ ), Mr = ({ isSigned: e, isSigning: t, onMsg: r }) => {
2528
+ const { t: s } = M(), n = Rs({
2514
2529
  endTime: 0,
2515
2530
  autostart: !1,
2516
2531
  timerType: "DECREMENTAL",
@@ -2519,18 +2534,18 @@ const yr = ({ className: e }) => {
2519
2534
  r({ type: "on_close" });
2520
2535
  }
2521
2536
  });
2522
- return C(() => {
2537
+ return R(() => {
2523
2538
  e ? n.start() : n.reset();
2524
- }, [e]), /* @__PURE__ */ T(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2539
+ }, [e]), /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2525
2540
  /* @__PURE__ */ o(
2526
- Nt,
2541
+ St,
2527
2542
  {
2528
2543
  onClick: () => r({ type: "on_close" }),
2529
2544
  className: "absolute top-sw-2xl right-sw-2xl"
2530
2545
  }
2531
2546
  ),
2532
- /* @__PURE__ */ o(ks, { size: 48, className: "text-sw-status-warning" }),
2533
- /* @__PURE__ */ T("header", { className: "flex flex-col gap-sw-lg", children: [
2547
+ /* @__PURE__ */ o(Ns, { size: 48, className: "text-sw-status-warning" }),
2548
+ /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2534
2549
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: s(
2535
2550
  "walletCompatibility.modal.title.initial",
2536
2551
  "Verify your wallet to continue"
@@ -2540,7 +2555,7 @@ const yr = ({ className: e }) => {
2540
2555
  "Please sign a message to verify your wallet. This confirms your wallet is compatible and lets us securely read your public key."
2541
2556
  ) })
2542
2557
  ] }),
2543
- /* @__PURE__ */ T("ul", { className: "flex flex-col gap-sw-xl", children: [
2558
+ /* @__PURE__ */ h("ul", { className: "flex flex-col gap-sw-xl", children: [
2544
2559
  /* @__PURE__ */ o(
2545
2560
  fe,
2546
2561
  {
@@ -2548,7 +2563,7 @@ const yr = ({ className: e }) => {
2548
2563
  "walletCompatibility.modal.feature.secureTransactions",
2549
2564
  "Read-only signature – no gas required."
2550
2565
  ),
2551
- icon: As
2566
+ icon: Ss
2552
2567
  }
2553
2568
  ),
2554
2569
  /* @__PURE__ */ o(
@@ -2558,7 +2573,7 @@ const yr = ({ className: e }) => {
2558
2573
  "walletCompatibility.modal.feature.fullAccess",
2559
2574
  "No access to your funds, no hidden permissions."
2560
2575
  ),
2561
- icon: Ss
2576
+ icon: _s
2562
2577
  }
2563
2578
  ),
2564
2579
  /* @__PURE__ */ o(
@@ -2568,11 +2583,11 @@ const yr = ({ className: e }) => {
2568
2583
  "walletCompatibility.modal.feature.fundProtection",
2569
2584
  "Only checks whether your wallet is supported."
2570
2585
  ),
2571
- icon: Ns
2586
+ icon: ys
2572
2587
  }
2573
2588
  )
2574
2589
  ] }),
2575
- e ? /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
2590
+ e ? /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
2576
2591
  /* @__PURE__ */ o(
2577
2592
  nt,
2578
2593
  {
@@ -2581,7 +2596,7 @@ const yr = ({ className: e }) => {
2581
2596
  "Wallet verified"
2582
2597
  ),
2583
2598
  className: "bg-sw-status-success text-sw-gray-950",
2584
- icon: _s
2599
+ icon: bs
2585
2600
  }
2586
2601
  ),
2587
2602
  n.status === "RUNNING" && /* @__PURE__ */ o(
@@ -2594,7 +2609,7 @@ const yr = ({ className: e }) => {
2594
2609
  })
2595
2610
  }
2596
2611
  )
2597
- ] }) : /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2612
+ ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2598
2613
  /* @__PURE__ */ o(
2599
2614
  A,
2600
2615
  {
@@ -2619,18 +2634,18 @@ const yr = ({ className: e }) => {
2619
2634
  )
2620
2635
  ] })
2621
2636
  ] });
2622
- }, Vr = ({ onMsg: e }) => {
2637
+ }, Qr = ({ onMsg: e }) => {
2623
2638
  const { t } = M();
2624
- return /* @__PURE__ */ T(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2639
+ return /* @__PURE__ */ h(ie, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2625
2640
  /* @__PURE__ */ o(
2626
- Nt,
2641
+ St,
2627
2642
  {
2628
2643
  onClick: () => e({ type: "on_close" }),
2629
2644
  className: "absolute top-sw-2xl right-sw-2xl"
2630
2645
  }
2631
2646
  ),
2632
- /* @__PURE__ */ o(ys, { size: 48, className: "text-sw-status-error" }),
2633
- /* @__PURE__ */ T("header", { className: "flex flex-col gap-sw-lg", children: [
2647
+ /* @__PURE__ */ o(Es, { size: 48, className: "text-sw-status-error" }),
2648
+ /* @__PURE__ */ h("header", { className: "flex flex-col gap-sw-lg", children: [
2634
2649
  /* @__PURE__ */ o("h1", { className: "text-sw-label-lg text-sw-gray-50", children: t(
2635
2650
  "walletCompatibility.modal.title.error",
2636
2651
  "Unable to verify wallet"
@@ -2644,7 +2659,7 @@ const yr = ({ className: e }) => {
2644
2659
  "If the issue continues, please try another wallet."
2645
2660
  ) })
2646
2661
  ] }),
2647
- /* @__PURE__ */ T("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2662
+ /* @__PURE__ */ h("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
2648
2663
  /* @__PURE__ */ o(
2649
2664
  A,
2650
2665
  {
@@ -2665,9 +2680,9 @@ const yr = ({ className: e }) => {
2665
2680
  )
2666
2681
  ] })
2667
2682
  ] });
2668
- }, Vi = Object.assign(Wr, {
2669
- Error: Vr
2670
- }), Mr = (e) => null, Qr = (e) => (t) => {
2683
+ }, Qi = Object.assign(Mr, {
2684
+ Error: Qr
2685
+ }), $r = (e) => null, Kr = (e) => (t) => {
2671
2686
  if (t instanceof W)
2672
2687
  throw t;
2673
2688
  const r = new W(
@@ -2675,24 +2690,24 @@ const yr = ({ className: e }) => {
2675
2690
  { cause: t }
2676
2691
  );
2677
2692
  throw r.context = e, r;
2678
- }, $r = ({ children: e }) => {
2693
+ }, Hr = ({ children: e }) => {
2679
2694
  const { ctx: t } = _();
2680
2695
  return /* @__PURE__ */ o(
2681
- Rs,
2696
+ Ds,
2682
2697
  {
2683
- FallbackComponent: Mr,
2684
- onError: Qr(t),
2698
+ FallbackComponent: $r,
2699
+ onError: Kr(t),
2685
2700
  children: e
2686
2701
  }
2687
2702
  );
2688
- }, Kr = new Kt({
2703
+ }, Gr = new Kt({
2689
2704
  defaultOptions: {
2690
2705
  queries: {
2691
2706
  staleTime: 2e3 * 60,
2692
2707
  retry: st.env.NODE_ENV === "test" ? !1 : 3
2693
2708
  }
2694
2709
  }
2695
- }), Hr = ["fms", "abg", "stjack", "noear", "testnebula"], ae = {
2710
+ }), jr = ["fms", "abg", "stjack", "noear", "testnebula"], ae = {
2696
2711
  appName: "Unknown",
2697
2712
  appIcon: "https://wtmcxrwapthiogjpxwfr.supabase.co/storage/v1/object/public/swap-widget/unknown.svg",
2698
2713
  slippageTolerance: 100,
@@ -2703,7 +2718,7 @@ const yr = ({ className: e }) => {
2703
2718
  enableAutoTokensSwitching: !0,
2704
2719
  showIntentTokens: !0,
2705
2720
  chainsOrder: it,
2706
- filterTokens: (e) => !Hr.includes(e.symbol.toLocaleLowerCase()),
2721
+ filterTokens: (e) => !jr.includes(e.symbol.toLocaleLowerCase()),
2707
2722
  chainsFilter: {
2708
2723
  source: { external: "wallet-supported", intents: "none" },
2709
2724
  target: { external: "all", intents: "none" }
@@ -2715,9 +2730,9 @@ const yr = ({ className: e }) => {
2715
2730
  }), y = () => {
2716
2731
  const e = Mt(Ft);
2717
2732
  return oe(e).config;
2718
- }, Gr = (e) => {
2733
+ }, zr = (e) => {
2719
2734
  Ue.config = pe(e);
2720
- }, Mi = ({
2735
+ }, $i = ({
2721
2736
  children: e,
2722
2737
  config: t,
2723
2738
  balanceViaRpc: r = !0,
@@ -2734,102 +2749,102 @@ const yr = ({ className: e }) => {
2734
2749
  })
2735
2750
  })
2736
2751
  );
2737
- return C(() => {
2752
+ return R(() => {
2738
2753
  const c = pe({
2739
2754
  ...ae,
2740
2755
  ...t
2741
2756
  });
2742
- Object.assign(l.current.config, c), Gr(c);
2743
- }, [t]), zt(s ?? {}), Cs("headlessui-portal-root", "sw"), /* @__PURE__ */ o(Ht, { client: Kr, children: /* @__PURE__ */ o(jt, { i18n: Bt, children: /* @__PURE__ */ T(Ft.Provider, { value: l.current, children: [
2744
- /* @__PURE__ */ T(qt, { children: [
2745
- /* @__PURE__ */ T(Ut, { children: [
2757
+ Object.assign(l.current.config, c), zr(c);
2758
+ }, [t]), zt(s ?? {}), vs("headlessui-portal-root", "sw"), /* @__PURE__ */ o(Ht, { client: Gr, children: /* @__PURE__ */ o(jt, { i18n: Bt, children: /* @__PURE__ */ h(Ft.Provider, { value: l.current, children: [
2759
+ /* @__PURE__ */ h(qt, { children: [
2760
+ /* @__PURE__ */ h(Ut, { children: [
2746
2761
  /* @__PURE__ */ o("link", { rel: "preconnect", href: "https://rsms.me/" }),
2747
2762
  /* @__PURE__ */ o("link", { rel: "stylesheet", href: "https://rsms.me/inter/inter.css" })
2748
2763
  ] }),
2749
- /* @__PURE__ */ o(Pr, { theme: a, children: st.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o($r, { children: e }) })
2764
+ /* @__PURE__ */ o(Vr, { theme: a, children: st.env.NODE_ENV === "test" ? e : /* @__PURE__ */ o(Hr, { children: e }) })
2750
2765
  ] }),
2751
2766
  r && /* @__PURE__ */ o(
2752
- Ms,
2767
+ $s,
2753
2768
  {
2754
- rpcs: n ?? Es,
2769
+ rpcs: n ?? Cs,
2755
2770
  connectedWallets: t.connectedWallets ?? {}
2756
2771
  }
2757
2772
  )
2758
2773
  ] }) }) });
2759
2774
  };
2760
2775
  export {
2761
- lr as $,
2762
- Wi as A,
2763
- Ms as B,
2764
- Ur as C,
2765
- Ls as D,
2776
+ ur as $,
2777
+ Mi as A,
2778
+ $s as B,
2779
+ Wr as C,
2780
+ qs as D,
2766
2781
  Ge as E,
2767
- Ks as F,
2768
- Hs as G,
2769
- Gs as H,
2770
- js as I,
2771
- Zs as J,
2782
+ Gs as F,
2783
+ js as G,
2784
+ zs as H,
2785
+ Ys as I,
2786
+ Js as J,
2772
2787
  bt as K,
2773
2788
  Et as L,
2774
2789
  vt as M,
2775
- Ct as N,
2776
- Rt as O,
2777
- Xs as P,
2790
+ Rt as N,
2791
+ Ct as O,
2792
+ er as P,
2778
2793
  q as Q,
2779
- Js as R,
2780
- _r as S,
2781
- Rr as T,
2782
- er as U,
2783
- tr as V,
2784
- Mi as W,
2785
- nr as X,
2786
- sr as Y,
2787
- rr as Z,
2788
- ar as _,
2789
- Bi as a,
2790
- dr as a0,
2791
- mr as a1,
2792
- fr as a2,
2793
- yr as a3,
2794
- br as a4,
2794
+ tr as R,
2795
+ br as S,
2796
+ Dr as T,
2797
+ nr as U,
2798
+ sr as V,
2799
+ $i as W,
2800
+ rr as X,
2801
+ ar as Y,
2802
+ or as Z,
2803
+ ir as _,
2804
+ Ui as a,
2805
+ mr as a0,
2806
+ pr as a1,
2807
+ Tr as a2,
2808
+ Er as a3,
2809
+ Rr as a4,
2795
2810
  Be as a5,
2796
2811
  qe as a6,
2797
2812
  xt as a7,
2798
- Er as a8,
2799
- Cr as a9,
2813
+ Cr as a8,
2814
+ vr as a9,
2800
2815
  Je as aa,
2801
2816
  Ot as ab,
2802
- vr as ac,
2803
- Or as ad,
2804
- Pr as ae,
2805
- Wr as af,
2806
- Vr as ag,
2807
- $r as ah,
2817
+ xr as ac,
2818
+ Lr as ad,
2819
+ Vr as ae,
2820
+ Mr as af,
2821
+ Qr as ag,
2822
+ Hr as ah,
2808
2823
  Ue as ai,
2809
2824
  _ as b,
2810
- Fi as c,
2811
- $s as d,
2812
- Ws as e,
2825
+ Bi as c,
2826
+ Hs as d,
2827
+ Ms as e,
2813
2828
  ce as f,
2814
- Tr as g,
2815
- Ys as h,
2816
- gr as i,
2817
- ur as j,
2829
+ Ir as g,
2830
+ Xs as h,
2831
+ wr as i,
2832
+ fr as j,
2818
2833
  le as k,
2819
- wr as l,
2820
- Dr as m,
2834
+ Ar as l,
2835
+ Or as m,
2821
2836
  P as n,
2822
- qi as o,
2823
- Ui as p,
2824
- Pi as q,
2825
- or as r,
2837
+ Pi as o,
2838
+ Wi as p,
2839
+ Vi as q,
2840
+ cr as r,
2826
2841
  Dt as s,
2827
2842
  yt as t,
2828
- j as u,
2843
+ z as u,
2829
2844
  W as v,
2830
- I as w,
2831
- Li as x,
2845
+ g as w,
2846
+ qi as x,
2832
2847
  y,
2833
- Vi as z
2848
+ Qi as z
2834
2849
  };
2835
- //# sourceMappingURL=config-CeOg2QLU.js.map
2850
+ //# sourceMappingURL=config-r-k8Mo4x.js.map