@aurora-is-near/intents-swap-widget 3.20.0 → 3.21.0

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 (111) hide show
  1. package/dist/components/BaseContainer.d.ts +2 -0
  2. package/dist/components/BaseContainer.js +23 -0
  3. package/dist/components/BaseContainer.js.map +1 -0
  4. package/dist/components/WidgetContainer.js +17 -18
  5. package/dist/components/WidgetContainer.js.map +1 -1
  6. package/dist/{config-ZkO5GwI_.js → config-CyBNYvb1.js} +96 -95
  7. package/dist/{config-ZkO5GwI_.js.map → config-CyBNYvb1.js.map} +1 -1
  8. package/dist/config.js +1 -1
  9. package/dist/errors.js +1 -1
  10. package/dist/ext/alchemy/index.js +1 -1
  11. package/dist/ext/index.js +1 -1
  12. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  13. package/dist/features/BalanceRpcLoader/index.js +1 -1
  14. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  15. package/dist/features/ChainsDropdown/index.js +1 -1
  16. package/dist/features/ChainsSelector/index.js +1 -1
  17. package/dist/features/DepositMethodSwitcher.js +1 -1
  18. package/dist/features/ErrorBoundary.js +1 -1
  19. package/dist/features/ExternalDeposit.js +1 -1
  20. package/dist/features/SendAddress/index.js +1 -1
  21. package/dist/features/SendAddress/useNotification.js +1 -1
  22. package/dist/features/SubmitButton/index.js +1 -1
  23. package/dist/features/SuccessScreen/index.js +1 -1
  24. package/dist/features/SuccessScreen/useSummaryItemsCount.js +1 -1
  25. package/dist/features/SwapDirectionSwitcher.js +1 -1
  26. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  27. package/dist/features/SwapQuote/index.js +1 -1
  28. package/dist/features/TokenInput/TokenInput.js +1 -1
  29. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  30. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  31. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  32. package/dist/features/TokenInput/WalletBalance.js +1 -1
  33. package/dist/features/TokenInput/hooks/index.js +1 -1
  34. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  35. package/dist/features/TokenInput/index.js +1 -1
  36. package/dist/features/TokensList/TokenItem.js +1 -1
  37. package/dist/features/TokensList/TokensList.js +1 -1
  38. package/dist/features/TokensList/index.js +1 -1
  39. package/dist/features/TokensModal.js +1 -1
  40. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  41. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  42. package/dist/features/index.js +1 -1
  43. package/dist/hooks/index.js +1 -1
  44. package/dist/hooks/useAllTokens.js +1 -1
  45. package/dist/hooks/useChains.js +1 -1
  46. package/dist/hooks/useCompatibilityCheck.js +1 -1
  47. package/dist/hooks/useDefaultToken.js +1 -1
  48. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  49. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  50. package/dist/hooks/useIntentsBalance.js +1 -1
  51. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  52. package/dist/hooks/useMakeDepositAddress.js +1 -1
  53. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  54. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  55. package/dist/hooks/useMakeQuote.js +1 -1
  56. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  57. package/dist/hooks/useMakeTransfer.js +1 -1
  58. package/dist/hooks/useMergedBalance.js +1 -1
  59. package/dist/hooks/useSwitchChain.js +1 -1
  60. package/dist/hooks/useTheme.js +1 -1
  61. package/dist/hooks/useTokenInputPair.js +1 -1
  62. package/dist/hooks/useTokens.js +1 -1
  63. package/dist/hooks/useTokensFiltered.js +1 -1
  64. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  65. package/dist/index.js +1 -1
  66. package/dist/machine/effects/index.js +1 -1
  67. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  68. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  69. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  70. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  71. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  72. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  73. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  74. package/dist/machine/events/index.js +1 -1
  75. package/dist/machine/events/tokenSelect.js +1 -1
  76. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  77. package/dist/machine/events/validateInputs.js +1 -1
  78. package/dist/machine/index.js +1 -1
  79. package/dist/machine/snap.js +1 -1
  80. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  81. package/dist/machine/subscriptions/index.js +1 -1
  82. package/dist/styles.css +1 -1
  83. package/dist/tailwind.css +3 -0
  84. package/dist/theme/ThemeProvider.js +1 -1
  85. package/dist/theme.css +4 -0
  86. package/dist/types/theme.d.ts +2 -0
  87. package/dist/utils/intents/signers/near.js +1 -1
  88. package/dist/utils/intents/signers/privy.js +1 -1
  89. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  90. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  91. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  92. package/dist/widgets/WidgetDeposit/index.js +15 -14
  93. package/dist/widgets/WidgetDeposit/index.js.map +1 -1
  94. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  95. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  96. package/dist/widgets/WidgetSwap/index.js +15 -14
  97. package/dist/widgets/WidgetSwap/index.js.map +1 -1
  98. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  99. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  100. package/dist/widgets/WidgetWithdraw/index.js +13 -12
  101. package/dist/widgets/WidgetWithdraw/index.js.map +1 -1
  102. package/package.json +1 -1
  103. package/src/components/BaseContainer.tsx +19 -0
  104. package/src/components/WidgetContainer.tsx +0 -1
  105. package/src/tailwind.css +3 -0
  106. package/src/theme/ThemeProvider.tsx +5 -0
  107. package/src/theme.css +4 -0
  108. package/src/types/theme.ts +2 -0
  109. package/src/widgets/WidgetDeposit/index.tsx +10 -7
  110. package/src/widgets/WidgetSwap/index.tsx +10 -7
  111. package/src/widgets/WidgetWithdraw/index.tsx +10 -7
@@ -2,9 +2,9 @@ import { p as dt } from "./index-xuotMAFm.js";
2
2
  import { jsx as o, jsxs as T, Fragment as Gt } from "react/jsx-runtime";
3
3
  import jt from "i18next";
4
4
  import { deepClone as Se } from "valtio/utils";
5
- import { snapshot as Ce, useSnapshot as fe, proxy as ut } from "valtio";
5
+ import { snapshot as Re, useSnapshot as fe, proxy as ut } from "valtio";
6
6
  import { HelmetProvider as zt, Helmet as Yt } from "react-helmet-async";
7
- import { memo as Xt, useEffect as R, useMemo as L, useRef as Z, useCallback as ce, useState as ne, useId as Zt, createContext as mt, useContext as Jt } from "react";
7
+ import { memo as Xt, useEffect as C, useMemo as L, useRef as Z, useCallback as ce, useState as re, useId as Zt, createContext as mt, useContext as Jt } from "react";
8
8
  import { useQuery as ve, useInfiniteQuery as en, useQueryClient as tn, QueryClient as nn, QueryClientProvider as rn } from "@tanstack/react-query";
9
9
  import { Trans as sn, I18nextProvider as an } from "react-i18next";
10
10
  import { useTypedTranslation as K, initLocalisation as on } from "./localisation.js";
@@ -35,7 +35,7 @@ import { fireEvent as h } from "./machine/events/utils/fireEvent.js";
35
35
  import { NATIVE_NEAR_DUMB_ASSET_ID as j, TOKENS_DATA as De, WNEAR_ASSET_ID as _e } from "./constants/tokens.js";
36
36
  import { isValidChain as An } from "./utils/checkers/isValidChain.js";
37
37
  import { useWalletBalance as xe } from "./hooks/useWalletBalance.js";
38
- import { getIntentsAccountId as re } from "./utils/intents/getIntentsAccountId.js";
38
+ import { getIntentsAccountId as se } from "./utils/intents/getIntentsAccountId.js";
39
39
  import { getIntentsBalances as Sn } from "./utils/intents/getIntentsBalance.js";
40
40
  import { notReachable as Oe } from "./utils/notReachable.js";
41
41
  import { getTokenBalanceKey as Y } from "./utils/intents/getTokenBalanceKey.js";
@@ -47,7 +47,7 @@ import { formatBigToHuman as X } from "./utils/formatters/formatBigToHuman.js";
47
47
  import { getDryQuoteAddress as ze } from "./utils/getDryQuoteAddress.js";
48
48
  import { isEvmChain as G } from "./utils/evm/isEvmChain.js";
49
49
  import { checkNearAccountExists as _n } from "./utils/near/checkNearAccountExists.js";
50
- import { isNotEmptyAmount as se } from "./utils/checkers/isNotEmptyAmount.js";
50
+ import { isNotEmptyAmount as ae } from "./utils/checkers/isNotEmptyAmount.js";
51
51
  import { isValidBigint as St } from "./utils/checkers/isValidBigint.js";
52
52
  import { isNearAddress as Nt } from "./utils/near/isNearAddress.js";
53
53
  import { isBalanceSufficient as Le } from "./machine/guards/checks/isBalanceSufficient.js";
@@ -56,8 +56,8 @@ import { isSolanaAddress as _t } from "./utils/solana/isSolanaAddress.js";
56
56
  import { isEvmAddress as yt } from "./utils/evm/isEvmAddress.js";
57
57
  import { getMainTokenByChain as bn } from "./utils/tokens/getMainTokenByChain.js";
58
58
  import { getDefaultIntentsToken as En } from "./utils/tokens/getDefaultIntentsToken.js";
59
- import { getTokenWithHighBalance as Rn } from "./utils/tokens/getTokenWithHighBalance.js";
60
- import { isQuoteIdle as Cn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
59
+ import { getTokenWithHighBalance as Cn } from "./utils/tokens/getTokenWithHighBalance.js";
60
+ import { isQuoteIdle as Rn } from "./machine/subscriptions/checkers/isQuoteIdle.js";
61
61
  import { isInputChanged as vn } from "./machine/subscriptions/checkers/isInputChanged.js";
62
62
  import { isErrorChanged as Dn } from "./machine/subscriptions/checkers/isErrorChanged.js";
63
63
  import { isOnlyErrorChanged as xn } from "./machine/subscriptions/checkers/isOnlyErrorChanged.js";
@@ -94,7 +94,7 @@ import { TinyNumber as Ue } from "./components/TinyNumber.js";
94
94
  import { ErrorMessage as z } from "./components/ErrorMessage.js";
95
95
  import { FT_DEPOSIT_GAS as Ye, FT_TRANSFER_GAS as Xe } from "./utils/near/config.js";
96
96
  import { a as Pe } from "./index-DEq3oXQF.js";
97
- import { z as oe } from "zod";
97
+ import { z as ie } from "zod";
98
98
  import { decodeQueryResult as er } from "./utils/near/decodeQueryResult.js";
99
99
  import { nearRpcClient as tr } from "./utils/near/rpc.js";
100
100
  import { getNearNep141MinStorageBalance as nr } from "./utils/near/getNearNep141MinStorageBalance.js";
@@ -128,18 +128,18 @@ import Ir from "clsx";
128
128
  import { Skeleton as wr } from "./components/Skeleton.js";
129
129
  import { getBalancePortion as kr } from "./features/TokenInput/utils/getBalancePortion.js";
130
130
  import { getUsdDisplayAmount as Ar } from "./features/TokenInput/utils/getUsdDisplayAmount.js";
131
- import { TokenInputHeading as Rt } from "./features/TokenInput/TokenInputHeading.js";
131
+ import { TokenInputHeading as Ct } from "./features/TokenInput/TokenInputHeading.js";
132
132
  import { noop as Sr } from "./utils/noop.js";
133
133
  import { Card as pe } from "./components/Card.js";
134
134
  import { Badge as tt } from "./components/Badge.js";
135
- import { TokenIcon as Ct } from "./components/TokenIcon.js";
135
+ import { TokenIcon as Rt } from "./components/TokenIcon.js";
136
136
  import { InputAmount as Nr } from "./components/InputAmount.js";
137
137
  import { TokenInputSkeleton as _r } from "./features/TokenInput/TokenInputSkeleton.js";
138
138
  import { getUsdDisplayBalance as yr } from "./utils/formatters/getUsdDisplayBalance.js";
139
139
  import { VList as br } from "virtua";
140
140
  import { useFocusOnList as Er } from "./features/TokensList/hooks/useFocusOnList.js";
141
- import { TokensListPlaceholder as Re } from "./features/TokensList/TokensListPlaceholder.js";
142
- import { MAX_LIST_VIEW_AREA_HEIGHT as Rr, TOKEN_ITEM_HEIGHT as Cr, LIST_CONTAINER_ID as vr } from "./features/TokensList/constants.js";
141
+ import { TokensListPlaceholder as Ce } from "./features/TokensList/TokensListPlaceholder.js";
142
+ import { MAX_LIST_VIEW_AREA_HEIGHT as Cr, TOKEN_ITEM_HEIGHT as Rr, LIST_CONTAINER_ID as vr } from "./features/TokensList/constants.js";
143
143
  import { getGroupHeadersTotalIndexes as Dr } from "./features/TokensList/utils/getGroupHeadersTotalIndexes.js";
144
144
  import { getFirstGroupItemTotalIndex as xr } from "./features/TokensList/utils/getFirstGroupItemTotalIndex.js";
145
145
  import { getListItemsTotalCount as Or } from "./features/TokensList/utils/getListItemsTotalCount.js";
@@ -207,7 +207,7 @@ const ss = ({
207
207
  rpcs: e,
208
208
  token: t,
209
209
  onBalancesLoaded: s
210
- }) => (R(() => {
210
+ }) => (C(() => {
211
211
  t.isIntent || !Object.keys(e).includes(t.blockchain) || s({ [t.assetId]: "0" });
212
212
  }, [t.assetId]), null), xt = Xt(
213
213
  ({ rpcs: e, token: t, connectedWallets: s, onBalancesLoaded: r }) => {
@@ -216,7 +216,7 @@ const ss = ({
216
216
  token: t,
217
217
  connectedWallets: s
218
218
  });
219
- return R(() => {
219
+ return C(() => {
220
220
  !t.isIntent && n != null && r({ [t.assetId]: n });
221
221
  }, [t, n, r]), null;
222
222
  },
@@ -373,7 +373,7 @@ const ms = (e) => {
373
373
  return i.pageKey;
374
374
  }
375
375
  });
376
- R(() => {
376
+ C(() => {
377
377
  l && d.data && d.hasNextPage && d.data.pages.length < st && !d.isFetchingNextPage && d.fetchNextPage();
378
378
  }, [l, d]);
379
379
  const u = L(() => {
@@ -387,7 +387,7 @@ const ms = (e) => {
387
387
  kn(m.blockchain) && !(m.assetId in i) && (i[m.assetId] = "0");
388
388
  }), i;
389
389
  }, [d.data, n]);
390
- return R(() => {
390
+ return C(() => {
391
391
  O(r, ["initial_wallet"]) && (c(e, u), r.sourceToken && Object.keys(u).includes(r.sourceToken.assetId) && h("tokenSetBalance", u[r.sourceToken.assetId]));
392
392
  }, [u]), {
393
393
  status: d.status,
@@ -397,7 +397,7 @@ const ms = (e) => {
397
397
  }, he = () => {
398
398
  const { intentsAccountType: e } = y(), {
399
399
  ctx: { walletAddress: t }
400
- } = _(), { tokens: s } = V(), r = s.filter((l) => l.isIntent).map((l) => l.assetId), n = re({
400
+ } = _(), { tokens: s } = V(), r = s.filter((l) => l.isIntent).map((l) => l.assetId), n = se({
401
401
  walletAddress: t,
402
402
  addressType: e
403
403
  }), a = ve({
@@ -434,7 +434,7 @@ const ms = (e) => {
434
434
  connectedWallets: s,
435
435
  alchemyApiKey: t ?? ""
436
436
  });
437
- R(() => {
437
+ C(() => {
438
438
  const l = O(r, ["transfer_success"]);
439
439
  !e || !l || (async () => (await a(), t && (await new Promise((d) => {
440
440
  setTimeout(d, 1e4);
@@ -448,7 +448,7 @@ const ms = (e) => {
448
448
  ) };
449
449
  }, ps = ({ isEnabled: e }) => {
450
450
  const { ctx: t } = _(), { mergedBalance: s } = Te();
451
- R(() => {
451
+ C(() => {
452
452
  if (!e)
453
453
  return;
454
454
  if (!t.sourceToken || !t.walletAddress) {
@@ -477,7 +477,7 @@ const ms = (e) => {
477
477
  isEnabled: e
478
478
  }) => {
479
479
  const { ctx: t } = _(), { tokens: s } = V();
480
- R(() => {
480
+ C(() => {
481
481
  if (!e)
482
482
  return;
483
483
  if (!t.sourceToken) {
@@ -517,7 +517,7 @@ const ms = (e) => {
517
517
  t,
518
518
  s.sourceToken
519
519
  );
520
- R(() => {
520
+ C(() => {
521
521
  if (!e)
522
522
  return;
523
523
  h("walletAddressSet", n), O(s, ["initial_dry", "initial_wallet"]) && (r === "initial_wallet" && !n ? F("initial_dry") : r === "initial_dry" && n && F("initial_wallet"));
@@ -563,7 +563,7 @@ const ms = (e) => {
563
563
  meta: { isDry: l, message: S }
564
564
  });
565
565
  }
566
- const k = re({
566
+ const k = se({
567
567
  addressType: s,
568
568
  walletAddress: l ? (
569
569
  // address on the target chain should be a dry quote recipient
@@ -582,7 +582,7 @@ const ms = (e) => {
582
582
  }
583
583
  d.current && (u.current.abort("Abort previous quote (auto)"), u.current = new AbortController());
584
584
  let D;
585
- const C = {
585
+ const R = {
586
586
  // Settings
587
587
  dry: l,
588
588
  slippageTolerance: c,
@@ -597,11 +597,11 @@ const ms = (e) => {
597
597
  // Experimental
598
598
  quoteWaitingTimeMs: 0
599
599
  };
600
- p && (C.customRecipientMsg = p), r && (C.referral = It(r)), n && (C.appFees = [...n]);
600
+ p && (R.customRecipientMsg = p), r && (R.referral = It(r)), n && (R.appFees = [...n]);
601
601
  try {
602
602
  e.sourceToken.isIntent && e.targetToken.isIntent && (d.current = i(
603
603
  {
604
- ...C,
604
+ ...R,
605
605
  recipient: k,
606
606
  recipientType: W.recipientType.INTENTS,
607
607
  depositType: W.depositType.INTENTS,
@@ -612,7 +612,7 @@ const ms = (e) => {
612
612
  f
613
613
  ), D = await d.current), d.current = i(
614
614
  {
615
- ...C,
615
+ ...R,
616
616
  recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : k,
617
617
  recipientType: e.targetToken.isIntent ? W.recipientType.INTENTS : W.recipientType.DESTINATION_CHAIN,
618
618
  depositType: e.sourceToken.isIntent ? W.depositType.INTENTS : W.depositType.ORIGIN_CHAIN,
@@ -629,11 +629,11 @@ const ms = (e) => {
629
629
  let U = S instanceof Error ? S.message : "";
630
630
  if (S instanceof kt) {
631
631
  if (U = S.response?.data.message || U, U.includes("Amount is too low")) {
632
- const Q = U.match(/\d+/), ae = Q ? Q[0] : void 0;
632
+ const Q = U.match(/\d+/), oe = Q ? Q[0] : void 0;
633
633
  throw new q({
634
634
  code: "QUOTE_AMOUNT_IS_TOO_LOW",
635
635
  meta: {
636
- minAmount: (ae && X(ae, e.sourceToken.decimals)) ?? "0"
636
+ minAmount: (oe && X(oe, e.sourceToken.decimals)) ?? "0"
637
637
  }
638
638
  });
639
639
  }
@@ -667,7 +667,7 @@ const ms = (e) => {
667
667
  }
668
668
  };
669
669
  }, ws = () => {
670
- const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: s } = J(), r = re({
670
+ const { ctx: e } = _(), { intentsAccountType: t } = y(), { isNativeNearDeposit: s } = J(), r = se({
671
671
  addressType: t,
672
672
  walletAddress: e.walletAddress ?? ""
673
673
  }), n = Z(null), a = Z(new AbortController()), c = L(() => async (d) => At.post(
@@ -812,14 +812,14 @@ const ms = (e) => {
812
812
  if (!t && !s)
813
813
  return;
814
814
  let r;
815
- return t && (e.sourceToken ? e.targetToken ? se(e.sourceTokenAmount) ? e.walletAddress && !Le(e) && (r = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : r = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : r = { code: "TARGET_TOKEN_IS_EMPTY" } : r = { code: "SOURCE_TOKEN_IS_EMPTY" }), !s && r ? h("errorSet", r) : e.error && !Be(e.error) && !qe(e.error) && h("errorSet", null), s && r?.code === "SOURCE_BALANCE_INSUFFICIENT" && h("errorSet", r), s;
815
+ return t && (e.sourceToken ? e.targetToken ? ae(e.sourceTokenAmount) ? e.walletAddress && !Le(e) && (r = { code: "SOURCE_BALANCE_INSUFFICIENT" }) : r = { code: "SOURCE_TOKEN_AMOUNT_IS_EMPTY" } : r = { code: "TARGET_TOKEN_IS_EMPTY" } : r = { code: "SOURCE_TOKEN_IS_EMPTY" }), !s && r ? h("errorSet", r) : e.error && !Be(e.error) && !qe(e.error) && h("errorSet", null), s && r?.code === "SOURCE_BALANCE_INSUFFICIENT" && h("errorSet", r), s;
816
816
  }, Lt = (e) => {
817
817
  const t = O(e, ["initial_wallet"]), s = O(e, ["input_valid_external"]);
818
818
  if (!t && !s)
819
819
  return;
820
820
  const r = e.sourceTokenBalance;
821
821
  let n;
822
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : se(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? Nt(e.sendAddress) ? it(e) : n = {
822
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? n = { code: "SOURCE_TOKEN_IS_INTENT" } : ae(e.sourceTokenAmount) ? e.sendAddress ? e.targetToken.blockchain === "near" ? Nt(e.sendAddress) ? it(e) : n = {
823
823
  code: "SEND_ADDRESS_IS_INVALID",
824
824
  meta: { address: e.sendAddress, chain: "near" }
825
825
  } : e.isDepositFromExternalWallet || (!r || !St(r) ? n = { code: "INVALID_SOURCE_BALANCE" } : Le(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" }), s && e.targetToken.blockchain === "near" && it(e), !s && n ? h("errorSet", n) : e.error && !Be(e.error) && !qe(e.error) && h("errorSet", null), s;
@@ -829,7 +829,7 @@ const ms = (e) => {
829
829
  return;
830
830
  const r = e.sourceTokenBalance;
831
831
  let n;
832
- return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? se(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!r || !St(r) ? n = { code: "INVALID_SOURCE_BALANCE" } : Le(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" }), !s && n ? h("errorSet", n) : e.error && !Be(e.error) && !qe(e.error) && h("errorSet", null), s;
832
+ return t && (e.sourceToken ? e.targetToken ? e.targetToken.isIntent ? ae(e.sourceTokenAmount) ? e.isDepositFromExternalWallet || (!r || !St(r) ? n = { code: "INVALID_SOURCE_BALANCE" } : Le(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" }), !s && n ? h("errorSet", n) : e.error && !Be(e.error) && !qe(e.error) && h("errorSet", null), s;
833
833
  }, qt = (e) => {
834
834
  const t = Fe(e), s = !t && e.targetToken?.isIntent === !0, r = !t && e.targetToken?.isIntent === !1;
835
835
  if (t) {
@@ -853,12 +853,12 @@ const ms = (e) => {
853
853
  } = J(), m = Fe(n), p = e && !n.areInputsValidating && (i || (l || a) && n.isDepositFromExternalWallet || !d && !c && !l && !u), { make: w, cancel: f } = Is(), { make: g, cancel: k } = ws(), b = Z(null), B = () => {
854
854
  f(), k();
855
855
  };
856
- R(() => {
857
- const C = O(n, ["input_valid_dry"]), S = O(n, ["input_valid_external"]), U = O(n, ["input_valid_internal"]);
858
- (m && !C || !m && n.targetToken?.isIntent && !U || !m && !n.targetToken?.isIntent && !S || n.areInputsValidating) && B();
856
+ C(() => {
857
+ const R = O(n, ["input_valid_dry"]), S = O(n, ["input_valid_external"]), U = O(n, ["input_valid_internal"]);
858
+ (m && !R || !m && n.targetToken?.isIntent && !U || !m && !n.targetToken?.isIntent && !S || n.areInputsValidating) && B();
859
859
  }, [B, m, n]);
860
860
  const D = ce(
861
- async (C) => {
861
+ async (R) => {
862
862
  try {
863
863
  let S;
864
864
  if (n.sourceToken?.assetId === n.targetToken?.assetId || a && n.isDepositFromExternalWallet) {
@@ -866,7 +866,7 @@ const ms = (e) => {
866
866
  return;
867
867
  h("quoteSetStatus", "pending"), S = await g();
868
868
  } else
869
- h("quoteSetStatus", "pending"), S = await w({ message: t, quoteType: s, options: C });
869
+ h("quoteSetStatus", "pending"), S = await w({ message: t, quoteType: s, options: R });
870
870
  if (!S)
871
871
  return;
872
872
  if (h("quoteSetStatus", "success"), h("quoteSet", S), !m && n.error?.code !== "SOURCE_BALANCE_INSUFFICIENT" && h("errorSet", null), h("tokenSetAmount", {
@@ -894,15 +894,15 @@ const ms = (e) => {
894
894
  },
895
895
  [n, m, g, w, t, s, p]
896
896
  );
897
- R(() => {
897
+ C(() => {
898
898
  !p || !(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 || D({ isRefetch: !1 }));
899
- }, [p, D, B, n.sourceToken, n.targetToken]), R(() => {
900
- const C = () => {
899
+ }, [p, D, B, n.sourceToken, n.targetToken]), C(() => {
900
+ const R = () => {
901
901
  b.current && (clearInterval(b.current), b.current = null);
902
902
  };
903
903
  return n.state !== "quote_success_internal" && n.state !== "quote_success_external" || !r || (b.current = setInterval(async () => {
904
904
  await D({ isRefetch: !0 });
905
- }, r)), C;
905
+ }, r)), R;
906
906
  }, [p, D, B, n.state]);
907
907
  }, we = {
908
908
  sol: "sol",
@@ -913,7 +913,7 @@ const ms = (e) => {
913
913
  skipIntents: t = !1,
914
914
  target: s = "none"
915
915
  }) => {
916
- const { tokens: r } = V(), { ctx: n, state: a } = _(), { intentBalances: c } = he(), { walletSupportedChains: l, chainsFilter: d, intentsAccountType: u } = y(), i = Rn({
916
+ const { tokens: r } = V(), { ctx: n, state: a } = _(), { intentBalances: c } = he(), { walletSupportedChains: l, chainsFilter: d, intentsAccountType: u } = y(), i = Cn({
917
917
  tokens: r,
918
918
  walletSupportedChains: l,
919
919
  balances: c,
@@ -942,7 +942,7 @@ const ms = (e) => {
942
942
  l,
943
943
  a
944
944
  ]);
945
- R(() => {
945
+ C(() => {
946
946
  if (!e)
947
947
  return;
948
948
  if (O(n, ["initial_dry", "initial_wallet"]) && (m.status === "loaded" && !n.sourceToken && h("tokenSelect", {
@@ -978,7 +978,7 @@ const ms = (e) => {
978
978
  token: k
979
979
  });
980
980
  };
981
- return R(() => {
981
+ return C(() => {
982
982
  const f = O(n, ["initial_dry", "initial_wallet"]);
983
983
  if (!e || !f)
984
984
  return;
@@ -1006,7 +1006,7 @@ const ms = (e) => {
1006
1006
  alchemyApiKey: t ?? ""
1007
1007
  });
1008
1008
  }, Ns = (e, t) => {
1009
- const { config: s } = Ce(Qe);
1009
+ const { config: s } = Re(Qe);
1010
1010
  return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((r) => r?.key === "sendAddress") && s.walletSupportedChains.includes(e.targetToken.blockchain);
1011
1011
  }, _s = ({ debug: e }) => {
1012
1012
  ee.onContextChange((t, s) => {
@@ -1029,7 +1029,7 @@ const ms = (e) => {
1029
1029
  }
1030
1030
  });
1031
1031
  }
1032
- Cn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), Ln(t) && (t.sendAddress = void 0), Ns(t, r) && (t.sendAddress = t.walletAddress), qt(t);
1032
+ Rn(t) || (t.quote = void 0, t.quoteStatus = "idle", t.transferStatus = { status: "idle" }), Ln(t) && (t.sendAddress = void 0), Ns(t, r) && (t.sendAddress = t.walletAddress), qt(t);
1033
1033
  }
1034
1034
  });
1035
1035
  }, ys = ({ debug: e }) => {
@@ -1037,7 +1037,7 @@ const ms = (e) => {
1037
1037
  e && E.debug(`===> [WIDGET] State moved from ${t} to ${s}`);
1038
1038
  });
1039
1039
  }, bs = (e, t) => {
1040
- const { variant: s, token: r } = t, { config: n } = Ce(Qe);
1040
+ const { variant: s, token: r } = t, { config: n } = Re(Qe);
1041
1041
  switch (s) {
1042
1042
  case "source":
1043
1043
  if (r && r.assetId === e.targetToken?.assetId && r.isIntent === e.targetToken.isIntent && n.enableAutoTokensSwitching) {
@@ -1067,13 +1067,13 @@ const ms = (e) => {
1067
1067
  (s, r) => t(s, r, ee)
1068
1068
  ), Es = () => {
1069
1069
  x("quoteSetStatus", Mn), x("walletAddressSet", Hn), x("transferSetStatus", jn), x("tokenSelectRotate", be), x("tokenSetBalance", Gn), x("tokenSetAmount", Vn), x("depositTypeSet", Qn), x("setInputsValidating", Kn), x("externalDepositTxSet", $n), x("tokenSelect", bs), x("addressSet", Wn), x("errorSet", Un), x("quoteSet", Pn), x("reset", qn), x("validateDryInputs", Ft), x("validateExternalInputs", Lt), x("validateInternalInputs", Bt);
1070
- }, Rs = gn(({ debug: e }) => {
1070
+ }, Cs = gn(({ debug: e }) => {
1071
1071
  e && E.debug(
1072
- "[WIDGET] Debug mode is enabled (package version: 3.20.0)"
1072
+ "[WIDGET] Debug mode is enabled (package version: 3.21.0)"
1073
1073
  ), Es(), ys({ debug: e }), _s({ debug: e });
1074
1074
  }), Ol = ({ listenTo: e, debug: t = !1 }) => {
1075
- R(() => {
1076
- Rs({ debug: t });
1075
+ C(() => {
1076
+ Cs({ debug: t });
1077
1077
  }, [t]);
1078
1078
  const s = e.find(
1079
1079
  (a) => Array.isArray(a) && a[0] === "setBalancesUsingAlchemyExt"
@@ -1104,12 +1104,12 @@ const ms = (e) => {
1104
1104
  isEnabled: e.includes("updateBalances"),
1105
1105
  alchemyApiKey: s?.[1].alchemyApiKey
1106
1106
  });
1107
- }, Cs = ee.getStore();
1107
+ }, Rs = ee.getStore();
1108
1108
  class M extends Error {
1109
1109
  context;
1110
1110
  _is_widget_error = !0;
1111
1111
  constructor(t, s) {
1112
- super(t), this.name = "WidgetError", this.cause = s?.cause, this.context = Ce(Cs).context;
1112
+ super(t), this.name = "WidgetError", this.cause = s?.cause, this.context = Re(Rs).context;
1113
1113
  }
1114
1114
  }
1115
1115
  class Ut extends M {
@@ -1162,7 +1162,7 @@ const Fl = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
1162
1162
  finality: "optimistic"
1163
1163
  }), a = er(
1164
1164
  n,
1165
- oe.union([oe.null(), oe.object({ total: oe.string() })])
1165
+ ie.union([ie.null(), ie.object({ total: ie.string() })])
1166
1166
  );
1167
1167
  return BigInt(a?.total ?? "0");
1168
1168
  } catch (s) {
@@ -1522,7 +1522,7 @@ const Ls = ({
1522
1522
  meta: { message: "Your wallet doesn't support signing messages" }
1523
1523
  });
1524
1524
  }
1525
- const r = re({
1525
+ const r = se({
1526
1526
  walletAddress: t,
1527
1527
  addressType: "near"
1528
1528
  });
@@ -1764,7 +1764,7 @@ const Ls = ({
1764
1764
  });
1765
1765
  return parseInt(t, 16);
1766
1766
  }, Vs = ({ providers: e }) => {
1767
- const { ctx: t } = _(), [s, r] = ne(!1), [n, a] = ne(!1), c = ce(async () => {
1767
+ const { ctx: t } = _(), [s, r] = re(!1), [n, a] = re(!1), c = ce(async () => {
1768
1768
  const d = typeof e?.evm == "function" ? await e.evm() : e?.evm;
1769
1769
  if (!t.sourceToken || !d)
1770
1770
  return !1;
@@ -1788,7 +1788,7 @@ const Ls = ({
1788
1788
  r(!1);
1789
1789
  }
1790
1790
  }, [t.sourceToken, e]);
1791
- return R(() => {
1791
+ return C(() => {
1792
1792
  c().then(a);
1793
1793
  }, [c]), {
1794
1794
  isSwitchingChainRequired: n,
@@ -1887,7 +1887,7 @@ const Ls = ({
1887
1887
  };
1888
1888
  if (!n.targetToken)
1889
1889
  return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.selectTokenToReceive", "Select token to receive") });
1890
- if (!se(n.sourceTokenAmount))
1890
+ if (!ae(n.sourceTokenAmount))
1891
1891
  return /* @__PURE__ */ o(A, { ...N, state: "disabled", children: a("submit.disabled.enterAmount", "Enter amount") });
1892
1892
  if (n.areInputsValidating)
1893
1893
  return /* @__PURE__ */ o(A, { state: "loading", ...N, children: a("submit.pending.validating", "Validating...") });
@@ -1922,7 +1922,7 @@ const Ls = ({
1922
1922
  ] }) : n.quoteStatus === "pending" ? /* @__PURE__ */ o(A, { state: "loading", ...N, children: n.quote ? a("submit.pending.quote.refreshing", "Refreshing quote") : a("submit.pending.quote.finalizing", "Finalizing quote") }) : n.error ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : !n.quote && !l && !d && !u && !c ? /* @__PURE__ */ o(A, { state: "disabled", ...N, children: e.label }) : /* @__PURE__ */ o(A, { ...N, onClick: g, children: e.label });
1923
1923
  }, Ks = (e) => {
1924
1924
  const { t } = K(), { ctx: s } = _(), r = We(s);
1925
- return s.isDepositFromExternalWallet ? se(s.sourceTokenAmount) ? s.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") }) : r || /* @__PURE__ */ o($s, { ...e });
1925
+ return s.isDepositFromExternalWallet ? ae(s.sourceTokenAmount) ? s.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") }) : r || /* @__PURE__ */ o($s, { ...e });
1926
1926
  }, Hs = (e) => {
1927
1927
  const { ctx: t } = _(), s = y();
1928
1928
  return t.walletAddress ? /* @__PURE__ */ o(Ks, { ...e }) : /* @__PURE__ */ o(Ms, { onClick: s.onWalletSignin });
@@ -1998,7 +1998,7 @@ const lt = [
1998
1998
  COMPLETED: te.status.SUCCESS,
1999
1999
  FAILED: te.status.FAILED
2000
2000
  }, Bl = ({ depositAddress: e }) => {
2001
- const { ctx: t } = _(), { intentsAccountType: s } = y(), [r, n] = ne(null), a = re({
2001
+ const { ctx: t } = _(), { intentsAccountType: s } = y(), [r, n] = re(null), a = se({
2002
2002
  addressType: s,
2003
2003
  walletAddress: t.walletAddress
2004
2004
  });
@@ -2140,7 +2140,7 @@ const lt = [
2140
2140
  });
2141
2141
  };
2142
2142
  return /* @__PURE__ */ T(pe, { className: "flex flex-col", "aria-label": d, children: [
2143
- !w && /* @__PURE__ */ o(Rt, { children: d }),
2143
+ !w && /* @__PURE__ */ o(Ct, { children: d }),
2144
2144
  /* @__PURE__ */ T(
2145
2145
  "div",
2146
2146
  {
@@ -2176,7 +2176,7 @@ const lt = [
2176
2176
  ),
2177
2177
  children: [
2178
2178
  /* @__PURE__ */ o(
2179
- Ct,
2179
+ Rt,
2180
2180
  {
2181
2181
  token: e,
2182
2182
  chainShowIcon: !e.isIntent,
@@ -2247,7 +2247,7 @@ const lt = [
2247
2247
  className: "flex flex-col",
2248
2248
  onClick: () => e({ type: "on_click_select_token" }),
2249
2249
  children: [
2250
- !s && /* @__PURE__ */ o(Rt, { children: t }),
2250
+ !s && /* @__PURE__ */ o(Ct, { children: t }),
2251
2251
  /* @__PURE__ */ T(
2252
2252
  "div",
2253
2253
  {
@@ -2281,10 +2281,10 @@ const lt = [
2281
2281
  }
2282
2282
  );
2283
2283
  }, Pt = (e) => {
2284
- const { mergedBalance: t } = Te(), [s, r] = ne(
2284
+ const { mergedBalance: t } = Te(), [s, r] = re(
2285
2285
  e ? t[Y(e)] : void 0
2286
2286
  );
2287
- return R(() => {
2287
+ return C(() => {
2288
2288
  let n;
2289
2289
  if (e) {
2290
2290
  const a = t[Y(e)];
@@ -2304,7 +2304,7 @@ const lt = [
2304
2304
  const { tokens: s } = V(e), r = Array.from(
2305
2305
  new Set(s.map((n) => n.assetId))
2306
2306
  );
2307
- R(() => {
2307
+ C(() => {
2308
2308
  const n = r.length === 1 ? s[0] : null;
2309
2309
  n && t({ type: "on_select_token", token: n });
2310
2310
  }, [s]);
@@ -2391,7 +2391,7 @@ const lt = [
2391
2391
  onClick: () => !r && c({ type: "on_select_token", token: e }),
2392
2392
  children: [
2393
2393
  /* @__PURE__ */ o(
2394
- Ct,
2394
+ Rt,
2395
2395
  {
2396
2396
  token: e,
2397
2397
  chainShowIcon: !e.isIntent,
@@ -2444,7 +2444,7 @@ const lt = [
2444
2444
  selectedChain: c,
2445
2445
  walletSupportedChains: m,
2446
2446
  priorityAssets: w
2447
- }), k = i.walletAddress ? r : !1, b = Br(g.all, t), B = Z(null), [D, C] = ne(-1), S = L(
2447
+ }), k = i.walletAddress ? r : !1, b = Br(g.all, t), B = Z(null), [D, R] = re(-1), S = L(
2448
2448
  () => [{ tokens: g.all }],
2449
2449
  [g.all]
2450
2450
  ), U = L(() => [
@@ -2459,18 +2459,18 @@ const lt = [
2459
2459
  },
2460
2460
  { tokens: g.wallet }
2461
2461
  ] : []
2462
- ].filter(Boolean), [g.wallet, g.intents, l]), Q = k ? U : S, ae = Lr(Q), Qt = Or(Q), $e = Dr(Q), $t = ce(() => {
2463
- C(-1);
2462
+ ].filter(Boolean), [g.wallet, g.intents, l]), Q = k ? U : S, oe = Lr(Q), Qt = Or(Q), $e = Dr(Q), $t = ce(() => {
2463
+ R(-1);
2464
2464
  }, []);
2465
2465
  switch (Er({
2466
2466
  listRef: B.current,
2467
2467
  initialFocusedIndex: k ? 1 : 0,
2468
- onFocus: (P) => C(P),
2468
+ onFocus: (P) => R(P),
2469
2469
  onBlur: $t
2470
2470
  }), b) {
2471
2471
  case "EMPTY_SEARCH":
2472
2472
  return /* @__PURE__ */ o(
2473
- Re,
2473
+ Ce,
2474
2474
  {
2475
2475
  hasAction: !0,
2476
2476
  actionType: "outlined",
@@ -2491,12 +2491,12 @@ const lt = [
2491
2491
  ref: B,
2492
2492
  tabIndex: 0,
2493
2493
  id: vr,
2494
- itemSize: Cr,
2494
+ itemSize: Rr,
2495
2495
  className: "hide-scrollbar",
2496
2496
  style: {
2497
2497
  minHeight: 200,
2498
- height: ae,
2499
- maxHeight: Rr,
2498
+ height: oe,
2499
+ maxHeight: Cr,
2500
2500
  overflowAnchor: "none",
2501
2501
  outline: "none"
2502
2502
  },
@@ -2506,7 +2506,7 @@ const lt = [
2506
2506
  case "ArrowUp": {
2507
2507
  P.preventDefault();
2508
2508
  let v = Math.max(D - 1, 0);
2509
- k && $e.includes(v) && (v = v === 0 ? 1 : v - 1), C(v), B.current?.scrollToIndex(v, {
2509
+ k && $e.includes(v) && (v = v === 0 ? 1 : v - 1), R(v), B.current?.scrollToIndex(v, {
2510
2510
  align: "center",
2511
2511
  smooth: !0
2512
2512
  });
@@ -2515,7 +2515,7 @@ const lt = [
2515
2515
  case "ArrowDown": {
2516
2516
  P.preventDefault();
2517
2517
  let v = Math.min(D + 1, Qt - 1);
2518
- k && $e.includes(v) && (v = v === 0 ? 1 : v + 1), C(v), B.current?.scrollToIndex(v, {
2518
+ k && $e.includes(v) && (v = v === 0 ? 1 : v + 1), R(v), B.current?.scrollToIndex(v, {
2519
2519
  align: "center",
2520
2520
  smooth: !0
2521
2521
  });
@@ -2567,7 +2567,7 @@ const lt = [
2567
2567
  case "NO_TOKENS":
2568
2568
  default:
2569
2569
  return /* @__PURE__ */ o(
2570
- Re,
2570
+ Ce,
2571
2571
  {
2572
2572
  className: "pt-sw-5xl pb-sw-5xl",
2573
2573
  subHeading: u(
@@ -2582,16 +2582,16 @@ const lt = [
2582
2582
  );
2583
2583
  }
2584
2584
  }, Pl = Object.assign(na, {
2585
- Placeholder: Re,
2585
+ Placeholder: Ce,
2586
2586
  Item: Vt
2587
- }), ie = (e, t, s) => {
2587
+ }), le = (e, t, s) => {
2588
2588
  let r = document.body;
2589
2589
  s instanceof HTMLElement && (r = s), r.style.setProperty(e, t);
2590
- }, le = (e, t, s) => {
2591
- ie(`--c-sw-${e}`, t, s);
2590
+ }, ne = (e, t, s) => {
2591
+ le(`--c-sw-${e}`, t, s);
2592
2592
  }, ra = (e, t, s) => {
2593
2593
  Object.entries(e).forEach(([r, n]) => {
2594
- le(`${t}-${r}`, n, s);
2594
+ ne(`${t}-${r}`, n, s);
2595
2595
  });
2596
2596
  }, ke = (e, t, s, r, n) => {
2597
2597
  const a = Mr(r, n, t);
@@ -2603,22 +2603,23 @@ const lt = [
2603
2603
  md: { sm: 6, md: 10, lg: 16 },
2604
2604
  lg: { sm: 8, md: 24, lg: 24 }
2605
2605
  };
2606
- ie("--r-sw-sm", `${s[e].sm}px`, t), ie("--r-sw-md", `${s[e].md}px`, t), ie("--r-sw-lg", `${s[e].lg}px`, t);
2606
+ le("--r-sw-sm", `${s[e].sm}px`, t), le("--r-sw-md", `${s[e].md}px`, t), le("--r-sw-lg", `${s[e].lg}px`, t);
2607
2607
  }, aa = (e, t) => {
2608
2608
  const {
2609
2609
  primaryColor: s,
2610
2610
  surfaceColor: r,
2611
- successColor: n,
2612
- warningColor: a,
2613
- errorColor: c,
2614
- colorScheme: l = "dark",
2615
- borderRadius: d = "md",
2616
- stylePreset: u = "clean"
2611
+ containerColor: n,
2612
+ successColor: a,
2613
+ warningColor: c,
2614
+ errorColor: l,
2615
+ colorScheme: d = "dark",
2616
+ borderRadius: u = "md",
2617
+ stylePreset: i = "clean"
2617
2618
  } = t;
2618
- s && (ke("accent", 500, e, s, l), u === "bold" && ke("gray", 50, e, s, l)), r && u === "clean" && ke("gray", 950, e, r, l), n && le("status-success", n, e), a && le("status-warning", a, e), c && le("status-error", c, e), d && sa(d, e);
2619
+ s && (ke("accent", 500, e, s, d), i === "bold" && ke("gray", 50, e, s, d)), r && i === "clean" && ke("gray", 950, e, r, d), n && ne("container", n, e), a && ne("status-success", a, e), c && ne("status-warning", c, e), l && ne("status-error", l, e), u && sa(u, e);
2619
2620
  }, oa = mt(void 0), ia = ({ children: e, theme: t }) => {
2620
2621
  const { themeParentElementSelector: s } = y(), r = L(() => t, [t]);
2621
- return R(() => {
2622
+ return C(() => {
2622
2623
  if (t) {
2623
2624
  const n = s ? document.querySelector(s) : null;
2624
2625
  aa(n, t);
@@ -2656,7 +2657,7 @@ const lt = [
2656
2657
  initialTime: 7,
2657
2658
  onTimeOver: n
2658
2659
  });
2659
- return R(() => {
2660
+ return C(() => {
2660
2661
  e ? a.start() : a.reset();
2661
2662
  }, [e]), /* @__PURE__ */ T(pe, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
2662
2663
  /* @__PURE__ */ o(
@@ -2882,7 +2883,7 @@ const lt = [
2882
2883
  })
2883
2884
  })
2884
2885
  );
2885
- return R(() => {
2886
+ return C(() => {
2886
2887
  const l = Se({
2887
2888
  ...me,
2888
2889
  ...t
@@ -2969,7 +2970,7 @@ export {
2969
2970
  ql as o,
2970
2971
  Ul as p,
2971
2972
  Pl as q,
2972
- Rs as r,
2973
+ Cs as r,
2973
2974
  Pt as s,
2974
2975
  Ot as t,
2975
2976
  J as u,
@@ -2979,4 +2980,4 @@ export {
2979
2980
  y,
2980
2981
  Wl as z
2981
2982
  };
2982
- //# sourceMappingURL=config-ZkO5GwI_.js.map
2983
+ //# sourceMappingURL=config-CyBNYvb1.js.map