@orbs-network/spot-react 0.0.38 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-jtwNG1lx.js → ccip-Dx1a4716.js} +1 -1
- package/dist/{index-KCCFs1DW.js → index-CGvKQVdg.js} +575 -572
- package/dist/spot-react/package.json.d.ts +1 -1
- package/dist/spot-react/src/components/orders/order-preview.d.ts.map +1 -1
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -1
- package/dist/spot-react/src/i18n/en.json.d.ts +1 -0
- package/dist/spot-react/src/types.d.ts +1 -0
- package/dist/spot-react/src/types.d.ts.map +1 -1
- package/dist/spot-react.js +1 -1
- package/dist/spot-react.umd.cjs +12 -12
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var Sc = (e, t, r, n) => ({
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { jsx as _, jsxs as fe, Fragment as mo } from "react/jsx-runtime";
|
|
17
|
-
import * as
|
|
17
|
+
import * as vt from "react";
|
|
18
18
|
import te, { Component as qx, createElement as _a, createContext as Ki, useContext as Zl, useMemo as ee, useEffect as rs, useState as yf, useRef as _m, useCallback as Fe } from "react";
|
|
19
19
|
import Yx from "react-dom";
|
|
20
20
|
const Kx = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0", lensAddress: "0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496", exchangeType: "ExchangeV2", pathfinderKey: "" }, Zx = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SpookySwapSonic", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3", exchangeType: "ExchangeV2", pathfinderKey: "" }, Xx = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "QuickSwap,QuickSwapV3" }, Qx = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0xb7a3d74895bfd3aff6780525e36d79fcf26a895f", exchangeType: "ExchangeV2", pathfinderKey: "" }, Jx = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Chronos", partner: "Orbs:TWAP:Chronos", exchangeAddress: "0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36", exchangeType: "ExchangeV2", pathfinderKey: "Chronos Stable,Chronos Volatile,Chronos V3" }, e5 = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BaseSwap", partner: "Orbs:TWAP:BaseSwap", exchangeAddress: "0xAca3155c17530C4aA96746F226fcC049658490d2", exchangeType: "ExchangeV2", pathfinderKey: "BaseSwap,BaseSwapX" }, t5 = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Arbidex", partner: "Orbs:TWAP:Arbidex", exchangeAddress: "0x49d21052f4695d16C7cce6eF561301Aa4d840420", exchangeType: "ExchangeV2", pathfinderKey: "Arbidex Classic,Arbidex Quantum" }, r5 = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1", exchangeType: "ExchangeV2", pathfinderKey: "43,47" }, n5 = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0x1A2bb6B75D58b740d88413ef4840D6fa3F637940", exchangeType: "P2Exchange", pathfinderKey: "" }, s5 = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, a5 = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, o5 = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0xb37cB9A058c03081Ae6EF934313588cD53d408e7", exchangeType: "P2Exchange", pathfinderKey: "" }, i5 = { chainName: "linea", chainId: 59144, twapVersion: 4, twapAddress: "0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78", lensAddress: "0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "Lynex", partner: "Orbs:TWAP:Lynex", exchangeAddress: "0x04C06C96d7D19977156016DD408B5992af0570a2", exchangeType: "ExchangeV2", pathfinderKey: "19,18" }, c5 = { chainName: "zkSync", chainId: 324, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 100, name: "SyncSwap", partner: "Orbs:TWAP:SyncSwap", exchangeAddress: "0x422623a40c42f026Ed33A9910078Aa843FD66e27", exchangeType: "ExchangeV2", pathfinderKey: "2,3" }, l5 = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Retro", partner: "Orbs:TWAP:Retro", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2", pathfinderKey: "retro,retro-v3" }, u5 = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiArb", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, d5 = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiBase", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, p5 = { chainName: "eth", chainId: 1, twapVersion: 4, twapAddress: "0xb1ed8BCAD1EaC8a1DF0764700472391800D12946", lensAddress: "0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 200, name: "SushiEth", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad", exchangeType: "ExchangeV2", pathfinderKey: "" }, f5 = { chainName: "katana", chainId: 747474, twapVersion: 4, twapAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", lensAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", takers: ["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a", "0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "SushiKatana", partner: "Orbs:TWAP:Sushi", exchangeAddress: "0x92209481507e6B2d14C9b5b70Ed287024177220E", exchangeType: "ExchangeV2", pathfinderKey: "" }, m5 = { chainName: "sei", chainId: 1329, twapVersion: 4, twapAddress: "0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099", lensAddress: "0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "DragonSwap", partner: "Orbs:TWAP:DragonSwap", exchangeAddress: "0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6", exchangeType: "ExchangeV2", pathfinderKey: "" }, h5 = { chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4", lensAddress: "0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "TeaFi", partner: "Orbs:TWAP:TeaFi", exchangeAddress: "0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793", exchangeType: "ParaswapExchange", pathfinderKey: "AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM" }, b5 = { chainName: "flare", chainId: 14, twapVersion: 4, twapAddress: "0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D", lensAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SparkDEX", partner: "Orbs:TWAP:SparkDEX", exchangeAddress: "0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56", exchangeType: "P2Exchange" }, y5 = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "Ramses", partner: "Orbs:TWAP:Ramses", exchangeAddress: "0x8FCc245209bE85C49D738D0CE5613F74E5d91E86", exchangeType: "ParaswapExchange", pathfinderKey: "" }, g5 = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "SwapX", partner: "Orbs:TWAP:SwapX", exchangeAddress: "0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7", exchangeType: "ExchangeV2", pathfinderKey: "" }, x5 = { chainName: "cronos-zkevm", chainId: 388, twapVersion: 4, twapAddress: "0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68", lensAddress: "0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9", takers: ["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC", "0xBE452F03Be354CAC397C3F0c8397672067D44531"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "H2Finance", partner: "Orbs:TWAP:H2Finance", exchangeAddress: "0x2f1f10dc311722Be609e6B427bF3FBac6e44093B", exchangeType: "ExchangeV2" }, w5 = { chainName: "sonic", chainId: 146, twapVersion: 4, twapAddress: "0x8963992816b4EafE5a22b7DB2A99513c18be9afA", lensAddress: "0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D", takers: ["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913", "0x504f6E10173249dD22491829D98862Cf81DeF79E"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Shadow", partner: "Orbs:TWAP:Shadow", exchangeAddress: "0x69e3c891450161b7BF27f181eE85E7bAE69E5b07", exchangeType: "ExchangeV2" }, v5 = { chainName: "berachain", chainId: 80094, twapVersion: 4, twapAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", lensAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "Kodiak", partner: "Orbs:TWAP:Kodiak", exchangeAddress: "0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE", exchangeType: "ExchangeV2" }, E5 = { chainName: "base", chainId: 8453, twapVersion: 4, twapAddress: "0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55", lensAddress: "0x6313188c1909b161074D62E43105faC9B756A23e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 10, name: "OmniBase", partner: "Orbs:TWAP:OmniBase", exchangeAddress: "0x54435FcFDF3A08150Ed799b6EF472A20a432303F", exchangeType: "ParaswapExchange" }, k5 = { chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3", lensAddress: "0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "OmniArb", partner: "Orbs:TWAP:OmniArb", exchangeAddress: "0xF0607785424d342Cceb33E708f4579CA97a3b392", exchangeType: "ParaswapExchange" }, C5 = { chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe", lensAddress: "0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "BlackholeAvax", partner: "Orbs:TWAP:BlackholeAvax", exchangeAddress: "0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F", exchangeType: "ExchangeV2" }, T5 = { chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994", lensAddress: "0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264", takers: ["0xA05405b6340A7F43dC5835351BFC4f5b1F028359", "0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"], bidDelaySeconds: 60, minChunkSizeUsd: 50, name: "NewEraBnb", partner: "Orbs:TWAP:NewEraBnb", exchangeAddress: "0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42", exchangeType: "ExchangeV2" }, Ht = {
|
|
@@ -706,15 +706,15 @@ const Kx = { chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xd3B
|
|
|
706
706
|
}
|
|
707
707
|
]
|
|
708
708
|
}
|
|
709
|
-
], B5 = A5,
|
|
709
|
+
], B5 = A5, MY = S5, F5 = I5, U5 = P5;
|
|
710
710
|
var ke = /* @__PURE__ */ ((e) => (e.TWAP = "TWAP", e.LIMIT = "LIMIT", e.STOP_LOSS = "STOP_LOSS", e.TAKE_PROFIT = "TAKE_PROFIT", e))(ke || {}), yt = /* @__PURE__ */ ((e) => (e.Open = "OPEN", e.Canceled = "CANCELED", e.Completed = "COMPLETED", e.Expired = "EXPIRED", e))(yt || {}), er = /* @__PURE__ */ ((e) => (e[e.Minutes = 6e4] = "Minutes", e[e.Hours = 36e5] = "Hours", e[e.Weeks = 6048e5] = "Weeks", e[e.Days = 864e5] = "Days", e[e.Months = 2592e6] = "Months", e[e.Years = 31536e6] = "Years", e))(er || {}), ht = /* @__PURE__ */ ((e) => (e.LIMIT = "limit", e.TWAP_LIMIT = "twap-limit", e.TWAP_MARKET = "twap-market", e.TRIGGER_PRICE_MARKET = "trigger-price-market", e.TRIGGER_PRICE_LIMIT = "trigger-price-limit", e))(ht || {}), O5 = /* @__PURE__ */ ((e) => (e.Arbidex = "arbidex", e.Blackhole = "blackhole", e.Chronos = "chronos", e.Dragon = "dragon", e.Kodiak = "kodiak", e.Lynex = "lynex", e.Nami = "nami", e.Newera = "newera", e.Omni = "omni", e.Pancake = "pancake", e.Quick = "quick", e.Ramses = "ramses", e.Shadow = "shadow", e.Spark = "spark", e.Spooky = "spooky", e.Swapx = "swapx", e.Teafi = "teafi", e.Thena = "thena", e.Yowie = "yowie", e))(O5 || {});
|
|
711
|
-
const
|
|
711
|
+
const wt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
712
712
|
eth: {
|
|
713
713
|
id: 1,
|
|
714
714
|
name: "Ethereum",
|
|
715
715
|
shortname: "eth",
|
|
716
716
|
native: {
|
|
717
|
-
address:
|
|
717
|
+
address: wt,
|
|
718
718
|
symbol: "ETH",
|
|
719
719
|
decimals: 18,
|
|
720
720
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -735,7 +735,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
735
735
|
name: "BinanceSmartChain",
|
|
736
736
|
shortname: "bsc",
|
|
737
737
|
native: {
|
|
738
|
-
address:
|
|
738
|
+
address: wt,
|
|
739
739
|
symbol: "BNB",
|
|
740
740
|
decimals: 18,
|
|
741
741
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"
|
|
@@ -756,7 +756,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
756
756
|
name: "Polygon",
|
|
757
757
|
shortname: "poly",
|
|
758
758
|
native: {
|
|
759
|
-
address:
|
|
759
|
+
address: wt,
|
|
760
760
|
symbol: "POL",
|
|
761
761
|
decimals: 18,
|
|
762
762
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"
|
|
@@ -777,7 +777,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
777
777
|
name: "Arbitrum",
|
|
778
778
|
shortname: "arb",
|
|
779
779
|
native: {
|
|
780
|
-
address:
|
|
780
|
+
address: wt,
|
|
781
781
|
symbol: "ETH",
|
|
782
782
|
decimals: 18,
|
|
783
783
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -798,7 +798,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
798
798
|
name: "Sei",
|
|
799
799
|
shortname: "sei",
|
|
800
800
|
native: {
|
|
801
|
-
address:
|
|
801
|
+
address: wt,
|
|
802
802
|
symbol: "SEI",
|
|
803
803
|
decimals: 18,
|
|
804
804
|
logoUrl: "https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"
|
|
@@ -819,7 +819,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
819
819
|
name: "Avalanche",
|
|
820
820
|
shortname: "avax",
|
|
821
821
|
native: {
|
|
822
|
-
address:
|
|
822
|
+
address: wt,
|
|
823
823
|
symbol: "AVAX",
|
|
824
824
|
decimals: 18,
|
|
825
825
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/avalanche.svg"
|
|
@@ -840,7 +840,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
840
840
|
name: "Fantom",
|
|
841
841
|
shortname: "ftm",
|
|
842
842
|
native: {
|
|
843
|
-
address:
|
|
843
|
+
address: wt,
|
|
844
844
|
symbol: "FTM",
|
|
845
845
|
decimals: 18,
|
|
846
846
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/fantom.svg"
|
|
@@ -861,7 +861,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
861
861
|
name: "Base",
|
|
862
862
|
shortname: "base",
|
|
863
863
|
native: {
|
|
864
|
-
address:
|
|
864
|
+
address: wt,
|
|
865
865
|
symbol: "ETH",
|
|
866
866
|
decimals: 18,
|
|
867
867
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -882,7 +882,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
882
882
|
name: "Linea",
|
|
883
883
|
shortname: "linea",
|
|
884
884
|
native: {
|
|
885
|
-
address:
|
|
885
|
+
address: wt,
|
|
886
886
|
symbol: "ETH",
|
|
887
887
|
decimals: 18,
|
|
888
888
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -903,7 +903,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
903
903
|
name: "zksync",
|
|
904
904
|
shortname: "zksync",
|
|
905
905
|
native: {
|
|
906
|
-
address:
|
|
906
|
+
address: wt,
|
|
907
907
|
symbol: "ETH",
|
|
908
908
|
decimals: 18,
|
|
909
909
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -924,7 +924,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
924
924
|
name: "zkevm",
|
|
925
925
|
shortname: "zkevm",
|
|
926
926
|
native: {
|
|
927
|
-
address:
|
|
927
|
+
address: wt,
|
|
928
928
|
symbol: "ETH",
|
|
929
929
|
decimals: 18,
|
|
930
930
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -945,7 +945,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
945
945
|
name: "manta",
|
|
946
946
|
shortname: "manta",
|
|
947
947
|
native: {
|
|
948
|
-
address:
|
|
948
|
+
address: wt,
|
|
949
949
|
symbol: "ETH",
|
|
950
950
|
decimals: 18,
|
|
951
951
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_manta.jpg"
|
|
@@ -966,7 +966,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
966
966
|
name: "blast",
|
|
967
967
|
shortname: "blast",
|
|
968
968
|
native: {
|
|
969
|
-
address:
|
|
969
|
+
address: wt,
|
|
970
970
|
symbol: "ETH",
|
|
971
971
|
decimals: 18,
|
|
972
972
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_blast"
|
|
@@ -987,7 +987,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
987
987
|
name: "sonic",
|
|
988
988
|
shortname: "sonic",
|
|
989
989
|
native: {
|
|
990
|
-
address:
|
|
990
|
+
address: wt,
|
|
991
991
|
symbol: "S",
|
|
992
992
|
decimals: 18,
|
|
993
993
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_sonic"
|
|
@@ -1008,7 +1008,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1008
1008
|
name: "scroll",
|
|
1009
1009
|
shortname: "scroll",
|
|
1010
1010
|
native: {
|
|
1011
|
-
address:
|
|
1011
|
+
address: wt,
|
|
1012
1012
|
symbol: "ETH",
|
|
1013
1013
|
decimals: 18,
|
|
1014
1014
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_scroll"
|
|
@@ -1029,7 +1029,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1029
1029
|
name: "Zircuit",
|
|
1030
1030
|
shortname: "zircuit",
|
|
1031
1031
|
native: {
|
|
1032
|
-
address:
|
|
1032
|
+
address: wt,
|
|
1033
1033
|
symbol: "ETH",
|
|
1034
1034
|
decimals: 18,
|
|
1035
1035
|
logoUrl: "https://app.1inch.io/assets/images/network-logos/ethereum.svg"
|
|
@@ -1050,7 +1050,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1050
1050
|
name: "flare",
|
|
1051
1051
|
shortname: "flare",
|
|
1052
1052
|
native: {
|
|
1053
|
-
address:
|
|
1053
|
+
address: wt,
|
|
1054
1054
|
symbol: "FLR",
|
|
1055
1055
|
decimals: 18,
|
|
1056
1056
|
logoUrl: "https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"
|
|
@@ -1095,7 +1095,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1095
1095
|
name: "Katana",
|
|
1096
1096
|
shortname: "katana",
|
|
1097
1097
|
native: {
|
|
1098
|
-
address:
|
|
1098
|
+
address: wt,
|
|
1099
1099
|
symbol: "ETH",
|
|
1100
1100
|
decimals: 18,
|
|
1101
1101
|
logoUrl: "https://katana.network/assets/katana-logo.svg"
|
|
@@ -1118,7 +1118,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1118
1118
|
name: "Bera",
|
|
1119
1119
|
shortname: "bera",
|
|
1120
1120
|
native: {
|
|
1121
|
-
address:
|
|
1121
|
+
address: wt,
|
|
1122
1122
|
symbol: "BERA",
|
|
1123
1123
|
decimals: 18,
|
|
1124
1124
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"
|
|
@@ -1141,7 +1141,7 @@ const xt = "0x0000000000000000000000000000000000000000", Rt = {
|
|
|
1141
1141
|
name: "Monad",
|
|
1142
1142
|
shortname: "monad",
|
|
1143
1143
|
native: {
|
|
1144
|
-
address:
|
|
1144
|
+
address: wt,
|
|
1145
1145
|
symbol: "MONAD",
|
|
1146
1146
|
decimals: 18,
|
|
1147
1147
|
logoUrl: "https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"
|
|
@@ -1805,7 +1805,7 @@ const gs = (e) => e ? e.value * e.unit : 0, N5 = (e) => !e || e === "NaN" ? "0"
|
|
|
1805
1805
|
return Array.from(s);
|
|
1806
1806
|
}, mb = (e, t) => e.version === 1 ? (e.fillDelay || 0) * 1e3 + yb(t) : (e.fillDelay || 0) * 1e3, Xl = (e) => typeof window > "u" ? null : new URLSearchParams(window.location.search).get(e), L5 = (e) => xw().filter((t) => t.name === e).map((t) => t.chainId), Nm = "https://order-sink-dev.orbs.network", td = "https://order-sink.orbs.network";
|
|
1807
1807
|
let Kd;
|
|
1808
|
-
const
|
|
1808
|
+
const RY = (e) => {
|
|
1809
1809
|
Kd = e;
|
|
1810
1810
|
}, hb = () => {
|
|
1811
1811
|
const e = Xl(
|
|
@@ -1813,7 +1813,7 @@ const MY = (e) => {
|
|
|
1813
1813
|
/* ENV */
|
|
1814
1814
|
);
|
|
1815
1815
|
return e === "prod" ? td : e === "dev" ? Nm : Kd === "prod" ? td : Kd === "dev" ? Nm : td;
|
|
1816
|
-
},
|
|
1816
|
+
}, NY = 100, zY = 1, Zd = 300 * 1e3, ni = 365 * 24 * 60 * 60 * 1e3, zm = 300 * 1e3, $5 = new Date(
|
|
1817
1817
|
Zd
|
|
1818
1818
|
).getMinutes(), Lm = (e) => `https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`, vr = "https://hub.orbs.network/api/apikey/subgraphs/id", H5 = {
|
|
1819
1819
|
[Rt.eth.id]: `${vr}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,
|
|
@@ -1837,7 +1837,7 @@ const MY = (e) => {
|
|
|
1837
1837
|
"0x000000000000000000000000000000000000dEaD",
|
|
1838
1838
|
"0x000000000000000000000000000000000000800A",
|
|
1839
1839
|
"0x000000000000000000000000000000000000800a"
|
|
1840
|
-
],
|
|
1840
|
+
], LY = "115792089237316195423570985008687907853269984665640564039457584007913129639935", Gt = (e) => `${e.name}_${e.chainId}`, V5 = {
|
|
1841
1841
|
[Gt(Ht.SushiArb)]: [
|
|
1842
1842
|
"0x846F2B29ef314bF3D667981b4ffdADc5B858312a",
|
|
1843
1843
|
"0x08c41f5D1C844061f6D952E25827eeAA576c6536"
|
|
@@ -1889,7 +1889,7 @@ const MY = (e) => {
|
|
|
1889
1889
|
}, Xd = {
|
|
1890
1890
|
unit: er.Minutes,
|
|
1891
1891
|
value: $5
|
|
1892
|
-
},
|
|
1892
|
+
}, $Y = 0.25, HY = "100", W5 = "RePermitWitnessTransferFrom", q5 = {
|
|
1893
1893
|
RePermitWitnessTransferFrom: [
|
|
1894
1894
|
{
|
|
1895
1895
|
name: "permitted",
|
|
@@ -2014,9 +2014,9 @@ const MY = (e) => {
|
|
|
2014
2014
|
type: "uint256"
|
|
2015
2015
|
}
|
|
2016
2016
|
]
|
|
2017
|
-
}, xf = "https://www.orbs.com/dtwap-and-dlimit-faq/",
|
|
2017
|
+
}, xf = "https://www.orbs.com/dtwap-and-dlimit-faq/", GY = "https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP", jY = "https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg", VY = "https://www.orbs.com/assets/img/common/logo.svg", WY = "https://www.orbs.com/", qY = "https://www.orbs.com/dtwap-dlimit-disclaimer";
|
|
2018
2018
|
var wf = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_USD = "minChunkSizeUsd", e.ENV = "env", e))(wf || {});
|
|
2019
|
-
const Y5 = "-5", K5 = "10", Z5 = "-10", X5 = "5",
|
|
2019
|
+
const Y5 = "-5", K5 = "10", Z5 = "-10", X5 = "5", YY = "Something went wrong";
|
|
2020
2020
|
function Q5(e) {
|
|
2021
2021
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
2022
2022
|
var t = e.default;
|
|
@@ -2100,7 +2100,7 @@ const rw = (e, t, r) => {
|
|
|
2100
2100
|
ni / 2 / gs(e)
|
|
2101
2101
|
);
|
|
2102
2102
|
return Math.max(1, Math.min(a, o));
|
|
2103
|
-
},
|
|
2103
|
+
}, KY = (e) => yb(e) / 1e3 / 60, cw = (e, t) => e + gs(t) + 6e4, yb = (e) => e.bidDelaySeconds * 1e3 * 2, lw = (e, t) => !e || !t ? "0" : H(e).div(t).integerValue(H.ROUND_FLOOR).toFixed(0), ZY = (e, t) => ({
|
|
2104
2104
|
isError: !(e.unit === Xd.unit && e.value === Xd.value) && gs(e) * t > ni,
|
|
2105
2105
|
value: Math.floor(ni / t)
|
|
2106
2106
|
}), uw = (e = "", t = "", r) => {
|
|
@@ -2880,7 +2880,7 @@ const Hw = async ({
|
|
|
2880
2880
|
}) => (await Promise.all([
|
|
2881
2881
|
s ? Hw({ chainId: r, signal: e, page: t, limit: n, filters: { accounts: [a], configs: [s] } }) : Promise.resolve([]),
|
|
2882
2882
|
Ow({ chainId: r, signal: e, account: a })
|
|
2883
|
-
]).then(([c, l]) => [...c, ...l])).sort((c, l) => l.createdAt - c.createdAt), Ww = "0.0.
|
|
2883
|
+
]).then(([c, l]) => [...c, ...l])).sort((c, l) => l.createdAt - c.createdAt), Ww = "0.0.41", qw = {
|
|
2884
2884
|
version: Ww
|
|
2885
2885
|
};
|
|
2886
2886
|
var yo = class {
|
|
@@ -4723,19 +4723,19 @@ var In, is, Jt, Bn, Ln, wl, mp, ub, m3 = (ub = class extends yo {
|
|
|
4723
4723
|
clear() {
|
|
4724
4724
|
M(this, dt).clear(), M(this, cs).clear();
|
|
4725
4725
|
}
|
|
4726
|
-
}, dt = new WeakMap(), cs = new WeakMap(), ls = new WeakMap(), to = new WeakMap(), ro = new WeakMap(), us = new WeakMap(), no = new WeakMap(), so = new WeakMap(), pb), Ub =
|
|
4726
|
+
}, dt = new WeakMap(), cs = new WeakMap(), ls = new WeakMap(), to = new WeakMap(), ro = new WeakMap(), us = new WeakMap(), no = new WeakMap(), so = new WeakMap(), pb), Ub = vt.createContext(
|
|
4727
4727
|
void 0
|
|
4728
4728
|
), Ql = (e) => {
|
|
4729
|
-
const t =
|
|
4729
|
+
const t = vt.useContext(Ub);
|
|
4730
4730
|
if (!t)
|
|
4731
4731
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
4732
4732
|
return t;
|
|
4733
4733
|
}, y3 = ({
|
|
4734
4734
|
client: e,
|
|
4735
4735
|
children: t
|
|
4736
|
-
}) => (
|
|
4736
|
+
}) => (vt.useEffect(() => (e.mount(), () => {
|
|
4737
4737
|
e.unmount();
|
|
4738
|
-
}), [e]), /* @__PURE__ */ _(Ub.Provider, { value: e, children: t })), Ob =
|
|
4738
|
+
}), [e]), /* @__PURE__ */ _(Ub.Provider, { value: e, children: t })), Ob = vt.createContext(!1), g3 = () => vt.useContext(Ob);
|
|
4739
4739
|
Ob.Provider;
|
|
4740
4740
|
function x3() {
|
|
4741
4741
|
let e = !1;
|
|
@@ -4749,10 +4749,10 @@ function x3() {
|
|
|
4749
4749
|
isReset: () => e
|
|
4750
4750
|
};
|
|
4751
4751
|
}
|
|
4752
|
-
var w3 =
|
|
4752
|
+
var w3 = vt.createContext(x3()), v3 = () => vt.useContext(w3), E3 = (e, t) => {
|
|
4753
4753
|
(e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
|
|
4754
4754
|
}, k3 = (e) => {
|
|
4755
|
-
|
|
4755
|
+
vt.useEffect(() => {
|
|
4756
4756
|
e.clearReset();
|
|
4757
4757
|
}, [e]);
|
|
4758
4758
|
}, C3 = ({
|
|
@@ -4785,14 +4785,14 @@ function P3(e, t, r) {
|
|
|
4785
4785
|
), process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
|
|
4786
4786
|
`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
4787
4787
|
)), o._optimisticResults = n ? "isRestoring" : "optimistic", T3(o), E3(o, s), k3(s);
|
|
4788
|
-
const i = !a.getQueryCache().get(o.queryHash), [c] =
|
|
4788
|
+
const i = !a.getQueryCache().get(o.queryHash), [c] = vt.useState(
|
|
4789
4789
|
() => new t(
|
|
4790
4790
|
a,
|
|
4791
4791
|
o
|
|
4792
4792
|
)
|
|
4793
4793
|
), l = c.getOptimisticResult(o), u = !n && e.subscribed !== !1;
|
|
4794
|
-
if (
|
|
4795
|
-
|
|
4794
|
+
if (vt.useSyncExternalStore(
|
|
4795
|
+
vt.useCallback(
|
|
4796
4796
|
(E) => {
|
|
4797
4797
|
const v = u ? c.subscribe(Tt.batchCalls(E)) : Wt;
|
|
4798
4798
|
return c.updateResult(), v;
|
|
@@ -4801,7 +4801,7 @@ function P3(e, t, r) {
|
|
|
4801
4801
|
),
|
|
4802
4802
|
() => c.getCurrentResult(),
|
|
4803
4803
|
() => c.getCurrentResult()
|
|
4804
|
-
),
|
|
4804
|
+
), vt.useEffect(() => {
|
|
4805
4805
|
c.setOptions(o);
|
|
4806
4806
|
}, [o, c]), S3(o, l))
|
|
4807
4807
|
throw eh(o, c, s);
|
|
@@ -4835,23 +4835,23 @@ function I3(e, t) {
|
|
|
4835
4835
|
return P3(e, c3);
|
|
4836
4836
|
}
|
|
4837
4837
|
function jn(e, t) {
|
|
4838
|
-
const r = Ql(), [n] =
|
|
4838
|
+
const r = Ql(), [n] = vt.useState(
|
|
4839
4839
|
() => new m3(
|
|
4840
4840
|
r,
|
|
4841
4841
|
e
|
|
4842
4842
|
)
|
|
4843
4843
|
);
|
|
4844
|
-
|
|
4844
|
+
vt.useEffect(() => {
|
|
4845
4845
|
n.setOptions(e);
|
|
4846
4846
|
}, [n, e]);
|
|
4847
|
-
const s =
|
|
4848
|
-
|
|
4847
|
+
const s = vt.useSyncExternalStore(
|
|
4848
|
+
vt.useCallback(
|
|
4849
4849
|
(o) => n.subscribe(Tt.batchCalls(o)),
|
|
4850
4850
|
[n]
|
|
4851
4851
|
),
|
|
4852
4852
|
() => n.getCurrentResult(),
|
|
4853
4853
|
() => n.getCurrentResult()
|
|
4854
|
-
), a =
|
|
4854
|
+
), a = vt.useCallback(
|
|
4855
4855
|
(o, i) => {
|
|
4856
4856
|
n.mutate(o, i).catch(Wt);
|
|
4857
4857
|
},
|
|
@@ -5010,7 +5010,7 @@ function R3({ children: e, ...t }) {
|
|
|
5010
5010
|
return /* @__PURE__ */ _(Db.Provider, { value: t, children: e });
|
|
5011
5011
|
}
|
|
5012
5012
|
const dn = () => Zl(Db);
|
|
5013
|
-
var
|
|
5013
|
+
var gt = /* @__PURE__ */ ((e) => (e[e.LOADING = 1] = "LOADING", e[e.SUCCESS = 2] = "SUCCESS", e[e.FAILED = 3] = "FAILED", e))(gt || {});
|
|
5014
5014
|
const N3 = ({
|
|
5015
5015
|
className: e = "",
|
|
5016
5016
|
size: t = 38,
|
|
@@ -5054,7 +5054,7 @@ const z3 = ({ link: e, text: t }) => {
|
|
|
5054
5054
|
const { swapStatus: r } = dn();
|
|
5055
5055
|
return !e && !t ? null : /* @__PURE__ */ fe("div", { className: Le("TradeStepLayoutFooter"), children: [
|
|
5056
5056
|
/* @__PURE__ */ _(V3, {}),
|
|
5057
|
-
e ? /* @__PURE__ */ _(L3, { link: e, text: t }) : r ===
|
|
5057
|
+
e ? /* @__PURE__ */ _(L3, { link: e, text: t }) : r === gt.FAILED ? void 0 : /* @__PURE__ */ _(ai, { children: t })
|
|
5058
5058
|
] });
|
|
5059
5059
|
}, L3 = ({ link: e, text: t }) => /* @__PURE__ */ _(
|
|
5060
5060
|
"a",
|
|
@@ -5115,7 +5115,7 @@ function H3() {
|
|
|
5115
5115
|
}
|
|
5116
5116
|
const G3 = () => {
|
|
5117
5117
|
const { swapStatus: e } = dn();
|
|
5118
|
-
return e ===
|
|
5118
|
+
return e === gt.SUCCESS ? /* @__PURE__ */ _($3, {}) : e === gt.FAILED ? /* @__PURE__ */ _(H3, {}) : /* @__PURE__ */ _(j3, {});
|
|
5119
5119
|
}, j3 = () => {
|
|
5120
5120
|
const { components: e } = dn();
|
|
5121
5121
|
return e.Loader ? e.Loader : /* @__PURE__ */ _(
|
|
@@ -5128,7 +5128,7 @@ const G3 = () => {
|
|
|
5128
5128
|
);
|
|
5129
5129
|
}, V3 = () => {
|
|
5130
5130
|
const { totalSteps: e, currentStepIndex: t = 0, swapStatus: r } = dn();
|
|
5131
|
-
return r !==
|
|
5131
|
+
return r !== gt.LOADING || e === 1 ? null : /* @__PURE__ */ _("div", { className: Le("StepIndicator"), children: /* @__PURE__ */ _(
|
|
5132
5132
|
"div",
|
|
5133
5133
|
{
|
|
5134
5134
|
style: {
|
|
@@ -5335,14 +5335,14 @@ const Mb = ({
|
|
|
5335
5335
|
}
|
|
5336
5336
|
), Q3 = () => {
|
|
5337
5337
|
const { swapStatus: e, components: t, className: r } = dn();
|
|
5338
|
-
return /* @__PURE__ */ _("div", { className: `${Le("SwapFlow")} ${r}`, children: e ===
|
|
5338
|
+
return /* @__PURE__ */ _("div", { className: `${Le("SwapFlow")} ${r}`, children: e === gt.SUCCESS ? t == null ? void 0 : t.Success : e === gt.FAILED ? t == null ? void 0 : t.Failed : t == null ? void 0 : t.Main });
|
|
5339
5339
|
};
|
|
5340
5340
|
ks.Success = Y3;
|
|
5341
5341
|
ks.Failed = W3;
|
|
5342
5342
|
ks.Main = Z3;
|
|
5343
5343
|
ks.StepLayout = Jl;
|
|
5344
5344
|
var qt = /* @__PURE__ */ ((e) => (e[e.EMPTY_LIMIT_PRICE = 0] = "EMPTY_LIMIT_PRICE", e[e.MAX_CHUNKS = 1] = "MAX_CHUNKS", e[e.MIN_CHUNKS = 2] = "MIN_CHUNKS", e[e.MIN_TRADE_SIZE = 3] = "MIN_TRADE_SIZE", e[e.MAX_FILL_DELAY = 4] = "MAX_FILL_DELAY", e[e.MIN_FILL_DELAY = 5] = "MIN_FILL_DELAY", e[e.MAX_ORDER_DURATION = 6] = "MAX_ORDER_DURATION", e[e.MIN_ORDER_DURATION = 7] = "MIN_ORDER_DURATION", e[e.MISSING_LIMIT_PRICE = 8] = "MISSING_LIMIT_PRICE", e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE = 9] = "STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE", e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE = 10] = "TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE", e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE = 11] = "TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE", e[e.EMPTY_TRIGGER_PRICE = 12] = "EMPTY_TRIGGER_PRICE", e[e.INSUFFICIENT_BALANCE = 13] = "INSUFFICIENT_BALANCE", e[e.MAX_ORDER_SIZE = 14] = "MAX_ORDER_SIZE", e))(qt || {}), Ma = /* @__PURE__ */ ((e) => (e.WRAP = "wrap", e.APPROVE = "approve", e.CREATE = "create", e))(Ma || {});
|
|
5345
|
-
const
|
|
5345
|
+
const XY = (e) => e.replace(/,/g, ""), QY = async (e) => {
|
|
5346
5346
|
if (!(navigator != null && navigator.clipboard))
|
|
5347
5347
|
return console.warn("Clipboard not supported"), !1;
|
|
5348
5348
|
try {
|
|
@@ -5355,7 +5355,7 @@ const ZY = (e) => e.replace(/,/g, ""), XY = async (e) => {
|
|
|
5355
5355
|
return "";
|
|
5356
5356
|
const t = Math.floor(e / 1e3), r = Math.floor(t / (1440 * 60)), n = Math.floor(t % (1440 * 60) / 3600), s = Math.floor(t % 3600 / 60), a = t % 60, o = [];
|
|
5357
5357
|
return r && o.push(`${r} days `), n && o.push(`${n} hours `), s && o.push(`${s} minutes`), a && o.push(`${a} seconds`), o.join(" ");
|
|
5358
|
-
}, Rb = (e, t) => e ? `${e.substring(0, (t == null ? void 0 : t.start) || 6)}...${e.substring(e.length - ((t == null ? void 0 : t.end) || 5))}` : "",
|
|
5358
|
+
}, Rb = (e, t) => e ? `${e.substring(0, (t == null ? void 0 : t.start) || 6)}...${e.substring(e.length - ((t == null ? void 0 : t.end) || 5))}` : "", JY = (e) => {
|
|
5359
5359
|
const t = "An error occurred.";
|
|
5360
5360
|
if (!e || !e.message) return t;
|
|
5361
5361
|
try {
|
|
@@ -5381,7 +5381,7 @@ const Nb = (e) => {
|
|
|
5381
5381
|
var t, r, n, s;
|
|
5382
5382
|
if (e != null && e.message)
|
|
5383
5383
|
return ((r = (t = e.message) == null ? void 0 : t.toLowerCase()) == null ? void 0 : r.includes("rejected")) || ((s = (n = e.message) == null ? void 0 : n.toLowerCase()) == null ? void 0 : s.includes("denied"));
|
|
5384
|
-
},
|
|
5384
|
+
}, eK = (e) => {
|
|
5385
5385
|
switch (e) {
|
|
5386
5386
|
case Rt.base.id:
|
|
5387
5387
|
return 1e-4;
|
|
@@ -5406,7 +5406,7 @@ function n8(e) {
|
|
|
5406
5406
|
function zb(e) {
|
|
5407
5407
|
return e ? e / 6e4 : 0;
|
|
5408
5408
|
}
|
|
5409
|
-
const
|
|
5409
|
+
const tK = (e, t) => e ? ht.TWAP_MARKET : t === 1 ? ht.LIMIT : ht.TWAP_LIMIT, Lb = (e, t, r) => {
|
|
5410
5410
|
const n = bo(r);
|
|
5411
5411
|
return ho((e == null ? void 0 : e.address) || "") && ao((t == null ? void 0 : t.address) || "", (n == null ? void 0 : n.wToken.address) || "");
|
|
5412
5412
|
}, $b = (e, t, r) => {
|
|
@@ -23823,26 +23823,26 @@ function lg(e, t = {}) {
|
|
|
23823
23823
|
return n = r === "left" ? n.slice(s) : n.slice(0, n.length - s), n;
|
|
23824
23824
|
}
|
|
23825
23825
|
function fu(e, t) {
|
|
23826
|
-
if (
|
|
23826
|
+
if (xt(e) > t)
|
|
23827
23827
|
throw new rU({
|
|
23828
|
-
givenSize:
|
|
23828
|
+
givenSize: xt(e),
|
|
23829
23829
|
maxSize: t
|
|
23830
23830
|
});
|
|
23831
23831
|
}
|
|
23832
23832
|
function YF(e, t) {
|
|
23833
|
-
if (typeof t == "number" && t > 0 && t >
|
|
23833
|
+
if (typeof t == "number" && t > 0 && t > xt(e) - 1)
|
|
23834
23834
|
throw new hg({
|
|
23835
23835
|
offset: t,
|
|
23836
23836
|
position: "start",
|
|
23837
|
-
size:
|
|
23837
|
+
size: xt(e)
|
|
23838
23838
|
});
|
|
23839
23839
|
}
|
|
23840
23840
|
function KF(e, t, r) {
|
|
23841
|
-
if (typeof t == "number" && typeof r == "number" &&
|
|
23841
|
+
if (typeof t == "number" && typeof r == "number" && xt(e) !== r - t)
|
|
23842
23842
|
throw new hg({
|
|
23843
23843
|
offset: r,
|
|
23844
23844
|
position: "end",
|
|
23845
|
-
size:
|
|
23845
|
+
size: xt(e)
|
|
23846
23846
|
});
|
|
23847
23847
|
}
|
|
23848
23848
|
function ug(e, t = {}) {
|
|
@@ -23934,7 +23934,7 @@ function Ie(e, t, r, n = {}) {
|
|
|
23934
23934
|
const a = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (r ?? e.length) * 2)}`;
|
|
23935
23935
|
return s && KF(a, t, r), a;
|
|
23936
23936
|
}
|
|
23937
|
-
function
|
|
23937
|
+
function xt(e) {
|
|
23938
23938
|
return Math.ceil((e.length - 2) / 2);
|
|
23939
23939
|
}
|
|
23940
23940
|
function Dp(e) {
|
|
@@ -24222,7 +24222,7 @@ function vU(e, t = {}) {
|
|
|
24222
24222
|
return r === "Bytes" ? n : Ut(n);
|
|
24223
24223
|
}
|
|
24224
24224
|
function EU(e) {
|
|
24225
|
-
return _r(e) &&
|
|
24225
|
+
return _r(e) && xt(e) === 32;
|
|
24226
24226
|
}
|
|
24227
24227
|
function xg(e, t = {}) {
|
|
24228
24228
|
const { compressed: r } = t, { prefix: n, x: s, y: a } = e;
|
|
@@ -24349,7 +24349,7 @@ let IU = class extends oe {
|
|
|
24349
24349
|
super(`Value \`${t}\` is an invalid public key size.`, {
|
|
24350
24350
|
metaMessages: [
|
|
24351
24351
|
"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",
|
|
24352
|
-
`Received ${
|
|
24352
|
+
`Received ${xt(mu(t))} bytes.`
|
|
24353
24353
|
]
|
|
24354
24354
|
}), Object.defineProperty(this, "name", {
|
|
24355
24355
|
enumerable: !0,
|
|
@@ -25726,7 +25726,7 @@ class wO extends oe {
|
|
|
25726
25726
|
super(`Value \`${t}\` is an invalid signature size.`, {
|
|
25727
25727
|
metaMessages: [
|
|
25728
25728
|
"Expected: 64 bytes or 65 bytes.",
|
|
25729
|
-
`Received ${
|
|
25729
|
+
`Received ${xt(mu(t))} bytes.`
|
|
25730
25730
|
]
|
|
25731
25731
|
}), Object.defineProperty(this, "name", {
|
|
25732
25732
|
enumerable: !0,
|
|
@@ -25852,12 +25852,12 @@ function AO(e) {
|
|
|
25852
25852
|
}
|
|
25853
25853
|
const Lp = "0x01", $p = "0x02", Gg = "0x03", _s = "0x7777777777777777777777777777777777777777777777777777777777777777";
|
|
25854
25854
|
function To(e) {
|
|
25855
|
-
const t = e.endsWith(_s.slice(2)) ? Ie(e, 0, -
|
|
25856
|
-
if (
|
|
25855
|
+
const t = e.endsWith(_s.slice(2)) ? Ie(e, 0, -xt(_s)) : e;
|
|
25856
|
+
if (xt(t) === 65) {
|
|
25857
25857
|
const o = s0(t);
|
|
25858
25858
|
return bu(o), { signature: o, type: "secp256k1" };
|
|
25859
25859
|
}
|
|
25860
|
-
const n = Ie(t, 0, 1), s = Ie(t, 1), a =
|
|
25860
|
+
const n = Ie(t, 0, 1), s = Ie(t, 1), a = xt(s);
|
|
25861
25861
|
if (n === Lp) {
|
|
25862
25862
|
if (a !== 129)
|
|
25863
25863
|
throw new Xo({
|
|
@@ -25963,7 +25963,7 @@ function xu(e) {
|
|
|
25963
25963
|
type: "p256"
|
|
25964
25964
|
};
|
|
25965
25965
|
if (e.type === "webAuthn") {
|
|
25966
|
-
const t = e.webauthnData, r =
|
|
25966
|
+
const t = e.webauthnData, r = xt(t);
|
|
25967
25967
|
let n, s;
|
|
25968
25968
|
for (let a = 37; a < r; a++) {
|
|
25969
25969
|
const o = fg(Ie(t, a));
|
|
@@ -26330,13 +26330,13 @@ function d0(e) {
|
|
|
26330
26330
|
let t = 0;
|
|
26331
26331
|
for (let a = 0; a < e.length; a++) {
|
|
26332
26332
|
const { dynamic: o, encoded: i } = e[a];
|
|
26333
|
-
o ? t += 32 : t +=
|
|
26333
|
+
o ? t += 32 : t += xt(i);
|
|
26334
26334
|
}
|
|
26335
26335
|
const r = [], n = [];
|
|
26336
26336
|
let s = 0;
|
|
26337
26337
|
for (let a = 0; a < e.length; a++) {
|
|
26338
26338
|
const { dynamic: o, encoded: i } = e[a];
|
|
26339
|
-
o ? (r.push(Z(t + s, { size: 32 })), n.push(i), s +=
|
|
26339
|
+
o ? (r.push(Z(t + s, { size: 32 })), n.push(i), s += xt(i)) : r.push(i);
|
|
26340
26340
|
}
|
|
26341
26341
|
return pt(...r, ...n);
|
|
26342
26342
|
}
|
|
@@ -26385,7 +26385,7 @@ function NO(e, t) {
|
|
|
26385
26385
|
};
|
|
26386
26386
|
}
|
|
26387
26387
|
function zO(e, { type: t }) {
|
|
26388
|
-
const [, r] = t.split("bytes"), n =
|
|
26388
|
+
const [, r] = t.split("bytes"), n = xt(e);
|
|
26389
26389
|
if (!r) {
|
|
26390
26390
|
let s = e;
|
|
26391
26391
|
return n % 32 !== 0 && (s = aa(s, Math.ceil((e.length - 2) / 2 / 32) * 32)), {
|
|
@@ -26426,12 +26426,12 @@ function $O(e, { signed: t, size: r }) {
|
|
|
26426
26426
|
};
|
|
26427
26427
|
}
|
|
26428
26428
|
function HO(e) {
|
|
26429
|
-
const t = oc(e), r = Math.ceil(
|
|
26429
|
+
const t = oc(e), r = Math.ceil(xt(t) / 32), n = [];
|
|
26430
26430
|
for (let s = 0; s < r; s++)
|
|
26431
26431
|
n.push(aa(Ie(t, s * 32, (s + 1) * 32)));
|
|
26432
26432
|
return {
|
|
26433
26433
|
dynamic: !0,
|
|
26434
|
-
encoded: pt(aa(Z(
|
|
26434
|
+
encoded: pt(aa(Z(xt(t), { size: 32 })), ...n)
|
|
26435
26435
|
};
|
|
26436
26436
|
}
|
|
26437
26437
|
function GO(e, t) {
|
|
@@ -26758,7 +26758,7 @@ class ZO extends oe {
|
|
|
26758
26758
|
}
|
|
26759
26759
|
class Vg extends oe {
|
|
26760
26760
|
constructor({ expectedSize: t, value: r }) {
|
|
26761
|
-
super(`Size of bytes "${r}" (bytes${
|
|
26761
|
+
super(`Size of bytes "${r}" (bytes${xt(r)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
|
|
26762
26762
|
enumerable: !0,
|
|
26763
26763
|
configurable: !0,
|
|
26764
26764
|
writable: !0,
|
|
@@ -27811,7 +27811,7 @@ async function ku(e, t) {
|
|
|
27811
27811
|
});
|
|
27812
27812
|
return ie === "0x" ? { data: void 0 } : { data: ie };
|
|
27813
27813
|
} catch (U) {
|
|
27814
|
-
const F = OD(U), { offchainLookup: N, offchainLookupSignature: z } = await import("./ccip-
|
|
27814
|
+
const F = OD(U), { offchainLookup: N, offchainLookupSignature: z } = await import("./ccip-Dx1a4716.js");
|
|
27815
27815
|
if (e.ccipRead !== !1 && (F == null ? void 0 : F.slice(0, 10)) === z && C)
|
|
27816
27816
|
return { data: await N(e, { data: F, to: C }) };
|
|
27817
27817
|
throw A && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new ZA({ factory: f }) : Zf(U, {
|
|
@@ -28309,7 +28309,7 @@ function n_(e) {
|
|
|
28309
28309
|
const t = [];
|
|
28310
28310
|
for (const { address: r, storageKeys: n } of e) {
|
|
28311
28311
|
for (let s = 0; s < n.length; s++)
|
|
28312
|
-
if (
|
|
28312
|
+
if (xt(n[s]) !== 32)
|
|
28313
28313
|
throw new s_({
|
|
28314
28314
|
storageKey: n[s]
|
|
28315
28315
|
});
|
|
@@ -28319,7 +28319,7 @@ function n_(e) {
|
|
|
28319
28319
|
}
|
|
28320
28320
|
class s_ extends oe {
|
|
28321
28321
|
constructor({ storageKey: t }) {
|
|
28322
|
-
super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${
|
|
28322
|
+
super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${xt(t)} bytes.`), Object.defineProperty(this, "name", {
|
|
28323
28323
|
enumerable: !0,
|
|
28324
28324
|
configurable: !0,
|
|
28325
28325
|
writable: !0,
|
|
@@ -35885,11 +35885,11 @@ const Jp = Ki({}), Ez = new b3({
|
|
|
35885
35885
|
]
|
|
35886
35886
|
}
|
|
35887
35887
|
);
|
|
35888
|
-
},
|
|
35888
|
+
}, CK = (e) => /* @__PURE__ */ _(y3, { client: Ez, children: /* @__PURE__ */ _(Az, { ...e }) }), ne = () => {
|
|
35889
35889
|
if (!Jp)
|
|
35890
35890
|
throw new Error("useSpotContext must be used within a WidgetProvider");
|
|
35891
35891
|
return Zl(Jp);
|
|
35892
|
-
}, Sz = 2e4,
|
|
35892
|
+
}, Sz = 2e4, TK = [
|
|
35893
35893
|
{
|
|
35894
35894
|
text: "Minutes",
|
|
35895
35895
|
value: er.Minutes
|
|
@@ -35902,7 +35902,7 @@ const Jp = Ki({}), Ez = new b3({
|
|
|
35902
35902
|
text: "Days",
|
|
35903
35903
|
value: er.Days
|
|
35904
35904
|
}
|
|
35905
|
-
],
|
|
35905
|
+
], AK = "The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";
|
|
35906
35906
|
var _d = {}, Pz = [
|
|
35907
35907
|
{
|
|
35908
35908
|
id: "fa",
|
|
@@ -38620,44 +38620,44 @@ function Hu() {
|
|
|
38620
38620
|
var e = Ld(this._milliseconds) / 1e3, t = Ld(this._days), r = Ld(this._months), n, s, a, o, i = this.asSeconds(), c, l, u, d;
|
|
38621
38621
|
return i ? (n = Pr(e / 60), s = Pr(n / 60), e %= 60, n %= 60, a = Pr(r / 12), r %= 12, o = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", c = i < 0 ? "-" : "", l = Pa(this._months) !== Pa(i) ? "-" : "", u = Pa(this._days) !== Pa(i) ? "-" : "", d = Pa(this._milliseconds) !== Pa(i) ? "-" : "", c + "P" + (a ? l + a + "Y" : "") + (r ? l + r + "M" : "") + (t ? u + t + "D" : "") + (s || n || e ? "T" : "") + (s ? d + s + "H" : "") + (n ? d + n + "M" : "") + (e ? d + o + "S" : "")) : "P0D";
|
|
38622
38622
|
}
|
|
38623
|
-
var
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38627
|
-
|
|
38628
|
-
|
|
38629
|
-
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38635
|
-
|
|
38636
|
-
|
|
38637
|
-
|
|
38638
|
-
|
|
38639
|
-
|
|
38640
|
-
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
|
|
38647
|
-
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
38651
|
-
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
|
|
38655
|
-
|
|
38656
|
-
|
|
38623
|
+
var Ne = Lu.prototype;
|
|
38624
|
+
Ne.isValid = P$;
|
|
38625
|
+
Ne.abs = iG;
|
|
38626
|
+
Ne.add = cG;
|
|
38627
|
+
Ne.subtract = lG;
|
|
38628
|
+
Ne.as = dG;
|
|
38629
|
+
Ne.asMilliseconds = H2;
|
|
38630
|
+
Ne.asSeconds = pG;
|
|
38631
|
+
Ne.asMinutes = fG;
|
|
38632
|
+
Ne.asHours = mG;
|
|
38633
|
+
Ne.asDays = hG;
|
|
38634
|
+
Ne.asWeeks = bG;
|
|
38635
|
+
Ne.asMonths = yG;
|
|
38636
|
+
Ne.asQuarters = gG;
|
|
38637
|
+
Ne.asYears = xG;
|
|
38638
|
+
Ne.valueOf = wG;
|
|
38639
|
+
Ne._bubble = uG;
|
|
38640
|
+
Ne.clone = vG;
|
|
38641
|
+
Ne.get = EG;
|
|
38642
|
+
Ne.milliseconds = kG;
|
|
38643
|
+
Ne.seconds = CG;
|
|
38644
|
+
Ne.minutes = TG;
|
|
38645
|
+
Ne.hours = AG;
|
|
38646
|
+
Ne.days = SG;
|
|
38647
|
+
Ne.weeks = BG;
|
|
38648
|
+
Ne.months = PG;
|
|
38649
|
+
Ne.years = IG;
|
|
38650
|
+
Ne.humanize = _G;
|
|
38651
|
+
Ne.toISOString = Hu;
|
|
38652
|
+
Ne.toString = Hu;
|
|
38653
|
+
Ne.toJSON = Hu;
|
|
38654
|
+
Ne.locale = I2;
|
|
38655
|
+
Ne.localeData = F2;
|
|
38656
|
+
Ne.toIsoString = Ur(
|
|
38657
38657
|
"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
|
|
38658
38658
|
Hu
|
|
38659
38659
|
);
|
|
38660
|
-
|
|
38660
|
+
Ne.lang = B2;
|
|
38661
38661
|
ue("X", 0, 0, "unix");
|
|
38662
38662
|
ue("x", 0, 0, "valueOf");
|
|
38663
38663
|
ae("x", Mu);
|
|
@@ -39088,7 +39088,7 @@ const nj = (e, t) => ee(() => Fl(e == null ? void 0 : e.toString(), t), [e, t]),
|
|
|
39088
39088
|
suffix: n
|
|
39089
39089
|
});
|
|
39090
39090
|
return o ? o(e || "") : (c = i.value) == null ? void 0 : c.toString();
|
|
39091
|
-
}, sj = "This is the date and time marking the end of the period which you have selected for your order to be executed.", aj = "The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.", oj = "The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.", ij = " This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.", cj = "Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.", lj = "This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.", uj = "The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.", dj = "The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.", pj = "Place order", fj = "Enter an amount", mj = "Limit price is required", hj = "Insufficient Balance", bj = "Trade interval", yj = "Expiration", gj = "Limit Price", xj = "Final execution price", wj = "Market price", vj = "From", Ej = "To (estimated)", kj = "Open", Cj = "Completed", Tj = "Expired", Aj = "Canceled", Sj = "Min. received per trade",
|
|
39091
|
+
}, sj = "This is the date and time marking the end of the period which you have selected for your order to be executed.", aj = "The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.", oj = "The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.", ij = " This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.", cj = "Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.", lj = "This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.", uj = "The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.", dj = "The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.", pj = "Place order", fj = "Enter an amount", mj = "Limit price is required", hj = "Insufficient Balance", bj = "Trade interval", yj = "Expiration", gj = "Limit Price", xj = "Final execution price", wj = "Market price", vj = "From", Ej = "To (estimated)", kj = "Open", Cj = "Completed", Tj = "Expired", Aj = "Canceled", Sj = "Cancel Order", Pj = "Min. received per trade", Ij = "Trigger Price per trade", Bj = "Max. trades amount is {maxChunks}", Fj = "Min. trades amount is {minChunks}", Uj = "Min. trade size is ${minTradeSize}", Oj = "All", Dj = "Min. trade interval is {fillDelay}", _j = "Max. trade interval is {fillDelay}", Mj = "Recipient", Rj = "Each individual trade in this order will be filled at the current market price at the time of execution.", Nj = "Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.", zj = "Limit", Lj = "Max. expiry is {duration}", $j = "Min. expiry is {duration}", Hj = "Expiry", Gj = "Individual trade size", jj = "No. of trades", Vj = "Avg. execution price", Wj = "TWAP-market", qj = "TWAP-limit", Yj = "Stop-loss", Kj = "Trigger Market Price ", Zj = "Trigger Limit Price ", Xj = "Take-profit", Qj = "Min. received", Jj = "No {status} Orders", eV = "No liquidity for this pair", tV = "Execution summary", rV = "Order info", nV = "Wrap {symbol}", sV = "Approve {symbol}", aV = "Create {name} order", oV = "Amount received", iV = "Created at", cV = "Amount out", lV = "Status", uV = "Progress", dV = "minutes", pV = "days", fV = "Every", mV = "Over", hV = "The trigger price at which your stop-loss order will be activated.", bV = "The trigger price at which your take-profit order will be activated.", yV = "Trigger Price", gV = "Trigger price must be less than market price", xV = "Trigger price must be greater than market price", wV = "Limit price must be less than trigger price", vV = "Trigger Price", EV = "Trade Price", kV = " In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.", CV = "The stop loss order will execute at the specified limit price or better, once the stop price is triggered.", TV = "This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.", AV = "Trigger price is required", SV = "ID", PV = "Fees {value}", IV = "Version", BV = "Max. trade size is {maxOrderSize} USD", FV = "View on explorer", UV = "Proceed in wallet", OV = "Note: {symbol} was wrapped to {wSymbol}", DV = "{name} order placed", _V = {
|
|
39092
39092
|
expirationTooltip: sj,
|
|
39093
39093
|
tradeSizeTooltip: aj,
|
|
39094
39094
|
totalTradesTooltip: oj,
|
|
@@ -39112,75 +39112,76 @@ const nj = (e, t) => ee(() => Fl(e == null ? void 0 : e.toString(), t), [e, t]),
|
|
|
39112
39112
|
Completed: Cj,
|
|
39113
39113
|
Expired: Tj,
|
|
39114
39114
|
Canceled: Aj,
|
|
39115
|
-
|
|
39116
|
-
|
|
39117
|
-
|
|
39118
|
-
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
|
|
39122
|
-
|
|
39123
|
-
|
|
39124
|
-
|
|
39125
|
-
|
|
39126
|
-
|
|
39127
|
-
|
|
39128
|
-
|
|
39129
|
-
|
|
39130
|
-
|
|
39131
|
-
|
|
39132
|
-
|
|
39133
|
-
|
|
39134
|
-
|
|
39135
|
-
|
|
39136
|
-
|
|
39137
|
-
|
|
39138
|
-
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39143
|
-
|
|
39144
|
-
|
|
39145
|
-
|
|
39146
|
-
|
|
39147
|
-
|
|
39148
|
-
|
|
39149
|
-
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
39153
|
-
|
|
39154
|
-
|
|
39155
|
-
|
|
39156
|
-
|
|
39157
|
-
|
|
39158
|
-
|
|
39159
|
-
|
|
39160
|
-
|
|
39161
|
-
|
|
39162
|
-
|
|
39163
|
-
|
|
39164
|
-
|
|
39165
|
-
|
|
39166
|
-
|
|
39167
|
-
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39171
|
-
|
|
39172
|
-
|
|
39173
|
-
|
|
39174
|
-
|
|
39175
|
-
|
|
39115
|
+
cancelOrder: Sj,
|
|
39116
|
+
minReceivedPerTrade: Pj,
|
|
39117
|
+
triggerPricePerChunk: Ij,
|
|
39118
|
+
maxChunksError: Bj,
|
|
39119
|
+
minChunksError: Fj,
|
|
39120
|
+
minTradeSizeError: Uj,
|
|
39121
|
+
allOrders: Oj,
|
|
39122
|
+
minFillDelayError: Dj,
|
|
39123
|
+
maxFillDelayError: _j,
|
|
39124
|
+
recipient: Mj,
|
|
39125
|
+
marketOrderWarning: Rj,
|
|
39126
|
+
limitPriceMessage: Nj,
|
|
39127
|
+
limit: zj,
|
|
39128
|
+
maxDurationError: Lj,
|
|
39129
|
+
minDurationError: $j,
|
|
39130
|
+
expiry: Hj,
|
|
39131
|
+
individualTradeSize: Gj,
|
|
39132
|
+
numberOfTrades: jj,
|
|
39133
|
+
averageExecutionPrice: Vj,
|
|
39134
|
+
twapMarket: Wj,
|
|
39135
|
+
twapLimit: qj,
|
|
39136
|
+
stopLoss: Yj,
|
|
39137
|
+
triggerPriceMarket: Kj,
|
|
39138
|
+
triggerPriceLimit: Zj,
|
|
39139
|
+
takeProfit: Xj,
|
|
39140
|
+
minReceived: Qj,
|
|
39141
|
+
noOrders: Jj,
|
|
39142
|
+
noLiquidity: eV,
|
|
39143
|
+
excecutionSummary: tV,
|
|
39144
|
+
orderInfo: rV,
|
|
39145
|
+
wrapAction: nV,
|
|
39146
|
+
approveAction: sV,
|
|
39147
|
+
createOrderAction: aV,
|
|
39148
|
+
amountReceived: oV,
|
|
39149
|
+
createdAt: iV,
|
|
39150
|
+
amountOut: cV,
|
|
39151
|
+
status: lV,
|
|
39152
|
+
progress: uV,
|
|
39153
|
+
minutes: dV,
|
|
39154
|
+
days: pV,
|
|
39155
|
+
tradeIntervalTitle: fV,
|
|
39156
|
+
tradesAmountTitle: mV,
|
|
39157
|
+
stopLossTooltip: hV,
|
|
39158
|
+
takeProfitTooltip: bV,
|
|
39159
|
+
stopLossLabel: yV,
|
|
39160
|
+
StopLossTriggerPriceError: gV,
|
|
39161
|
+
TakeProfitTriggerPriceError: xV,
|
|
39162
|
+
triggerLimitPriceError: wV,
|
|
39163
|
+
triggerPrice: vV,
|
|
39164
|
+
tradePrice: EV,
|
|
39165
|
+
triggerMarketPriceDisclaimer: kV,
|
|
39166
|
+
stopLossLimitPriceTooltip: CV,
|
|
39167
|
+
stopLossDurationTooltip: TV,
|
|
39168
|
+
emptyTriggerPrice: AV,
|
|
39169
|
+
id: SV,
|
|
39170
|
+
fees: PV,
|
|
39171
|
+
version: IV,
|
|
39172
|
+
maxOrderSizeError: BV,
|
|
39173
|
+
viewOnExplorer: FV,
|
|
39174
|
+
proceedInWallet: UV,
|
|
39175
|
+
wrapMsg: OV,
|
|
39176
|
+
createOrderActionSuccess: DV
|
|
39176
39177
|
};
|
|
39177
|
-
function
|
|
39178
|
+
function MV(e) {
|
|
39178
39179
|
let t = e;
|
|
39179
39180
|
const r = /\{[^{}]*\}/g;
|
|
39180
39181
|
for (; r.test(t); ) t = t.replace(r, "");
|
|
39181
39182
|
return t;
|
|
39182
39183
|
}
|
|
39183
|
-
const
|
|
39184
|
+
const Re = () => {
|
|
39184
39185
|
const e = ne();
|
|
39185
39186
|
return Fe(
|
|
39186
39187
|
(r, n) => {
|
|
@@ -39188,40 +39189,40 @@ const Ne = () => {
|
|
|
39188
39189
|
const s = (o = e.getTranslation) == null ? void 0 : o.call(e, r, n);
|
|
39189
39190
|
if (s && s !== r)
|
|
39190
39191
|
return s;
|
|
39191
|
-
const a = ((i = e.translations) == null ? void 0 : i[r]) ||
|
|
39192
|
-
return
|
|
39192
|
+
const a = ((i = e.translations) == null ? void 0 : i[r]) || _V[r];
|
|
39193
|
+
return MV(a.replace(/{(\w+)}/g, (c, l) => (n == null ? void 0 : n[l]) || c));
|
|
39193
39194
|
},
|
|
39194
39195
|
[e.getTranslation, e.translations]
|
|
39195
39196
|
);
|
|
39196
39197
|
}, ju = ({ value: e }) => {
|
|
39197
39198
|
const t = He({ value: e, decimalScale: 2 });
|
|
39198
39199
|
return t ? /* @__PURE__ */ _("small", { className: "twap-order-details__detail-row-value-usd", children: ` ($${t})` }) : null;
|
|
39199
|
-
},
|
|
39200
|
+
}, RV = ({ deadline: e, label: t, tooltip: r }) => {
|
|
39200
39201
|
const n = im(e);
|
|
39201
39202
|
return /* @__PURE__ */ _(fr, { title: t, tooltip: r, children: n });
|
|
39202
|
-
},
|
|
39203
|
+
}, NV = ({ price: e, dstToken: t, label: r, tooltip: n, usd: s }) => {
|
|
39203
39204
|
const a = He({ value: e });
|
|
39204
39205
|
return H(e || 0).isZero() ? null : /* @__PURE__ */ _(fr, { title: r, tooltip: n, children: /* @__PURE__ */ fe("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
39205
39206
|
`${a || "-"} ${t == null ? void 0 : t.symbol}`,
|
|
39206
39207
|
/* @__PURE__ */ _(ju, { value: s })
|
|
39207
39208
|
] }) });
|
|
39208
|
-
},
|
|
39209
|
-
const s = He({ value: e }), a =
|
|
39209
|
+
}, zV = ({ price: e, dstToken: t, percentage: r, isMarketOrder: n }) => {
|
|
39210
|
+
const s = He({ value: e }), a = Re();
|
|
39210
39211
|
return n ? null : /* @__PURE__ */ _(fr, { title: a("limitPrice") || "", tooltip: a("limitPriceTooltip") || "", children: /* @__PURE__ */ fe("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
39211
39212
|
`${s || "-"} ${t == null ? void 0 : t.symbol}`,
|
|
39212
39213
|
r && /* @__PURE__ */ _("small", { children: `(${r}%)` })
|
|
39213
39214
|
] }) });
|
|
39214
|
-
},
|
|
39215
|
+
}, LV = ({ tradeSize: e, srcToken: t, trades: r, label: n, tooltip: s }) => r === 1 ? null : /* @__PURE__ */ _(fr, { title: n, tooltip: s, children: `${e || "-"} ${(t == null ? void 0 : t.symbol) || ""}` }), $V = ({ dstToken: e, dstMinAmountOut: t, label: r, tooltip: n, usd: s }) => {
|
|
39215
39216
|
const a = He({ value: t });
|
|
39216
39217
|
return H(t || 0).isZero() ? null : /* @__PURE__ */ fe(fr, { title: r, tooltip: n, children: [
|
|
39217
39218
|
`${t ? a : "-"} ${e == null ? void 0 : e.symbol}`,
|
|
39218
39219
|
/* @__PURE__ */ _(ju, { value: s })
|
|
39219
39220
|
] });
|
|
39220
|
-
},
|
|
39221
|
+
}, HV = ({ trades: e, label: t, tooltip: r }) => e === 1 ? null : /* @__PURE__ */ _(fr, { title: t, tooltip: r, children: e }), GV = () => {
|
|
39221
39222
|
var s;
|
|
39222
|
-
const e =
|
|
39223
|
+
const e = Re(), { account: t } = ne(), r = (s = xc()) == null ? void 0 : s.explorer, n = Rb(t);
|
|
39223
39224
|
return /* @__PURE__ */ _(fr, { title: e("recipient") || "", children: r ? /* @__PURE__ */ _("a", { href: `${r}/address/${t}`, target: "_blank", children: n }) : n });
|
|
39224
|
-
},
|
|
39225
|
+
}, jV = ({ fillDelayMillis: e, chunks: t = 0, label: r, tooltip: n }) => {
|
|
39225
39226
|
const s = ee(() => J3(e), [e]);
|
|
39226
39227
|
return t === 1 ? null : /* @__PURE__ */ _(fr, { title: r, tooltip: n, children: s });
|
|
39227
39228
|
}, fr = ({
|
|
@@ -39240,36 +39241,36 @@ const Ne = () => {
|
|
|
39240
39241
|
] }),
|
|
39241
39242
|
/* @__PURE__ */ _("div", { className: "twap-order-details__detail-row-value", children: r })
|
|
39242
39243
|
] });
|
|
39243
|
-
},
|
|
39244
|
+
}, VV = ({ id: e }) => {
|
|
39244
39245
|
const { components: t } = ne(), r = t == null ? void 0 : t.Tooltip, n = rj();
|
|
39245
39246
|
return e.startsWith("0x") ? /* @__PURE__ */ _(fr, { title: "ID", onClick: () => n(e), style: { cursor: "pointer" }, children: r && /* @__PURE__ */ _(r, { tooltipText: e, children: /* @__PURE__ */ fe("div", { className: "twap-order-details__detail-row-value-id", children: [
|
|
39246
39247
|
/* @__PURE__ */ _("p", { children: Rb(e) }),
|
|
39247
39248
|
/* @__PURE__ */ _(_z.AiOutlineCopy, {})
|
|
39248
39249
|
] }) }) }) : /* @__PURE__ */ _(fr, { title: "ID", children: e });
|
|
39249
|
-
},
|
|
39250
|
+
}, WV = ({ version: e }) => /* @__PURE__ */ _(fr, { title: "Version", children: e });
|
|
39250
39251
|
function Ee({ children: e, className: t = "" }) {
|
|
39251
39252
|
return /* @__PURE__ */ _("div", { className: `${t} twap-order-details`, children: e });
|
|
39252
39253
|
}
|
|
39253
|
-
const
|
|
39254
|
+
const qV = ({ children: e }) => e, YV = ({ fees: e, label: t, usd: r, dstTokenSymbol: n }) => {
|
|
39254
39255
|
const s = He({ value: e });
|
|
39255
39256
|
return /* @__PURE__ */ fe(fr, { title: t, children: [
|
|
39256
39257
|
`${e ? s : "-"} ${n}`,
|
|
39257
39258
|
/* @__PURE__ */ _(ju, { value: r })
|
|
39258
39259
|
] });
|
|
39259
39260
|
};
|
|
39260
|
-
Ee.Deadline =
|
|
39261
|
-
Ee.Fees =
|
|
39262
|
-
Ee.TradeSize =
|
|
39263
|
-
Ee.MinDestAmount =
|
|
39264
|
-
Ee.TradesAmount =
|
|
39265
|
-
Ee.Recipient =
|
|
39266
|
-
Ee.TradeInterval =
|
|
39261
|
+
Ee.Deadline = RV;
|
|
39262
|
+
Ee.Fees = YV;
|
|
39263
|
+
Ee.TradeSize = LV;
|
|
39264
|
+
Ee.MinDestAmount = $V;
|
|
39265
|
+
Ee.TradesAmount = HV;
|
|
39266
|
+
Ee.Recipient = GV;
|
|
39267
|
+
Ee.TradeInterval = jV;
|
|
39267
39268
|
Ee.DetailRow = fr;
|
|
39268
|
-
Ee.TriggerPrice =
|
|
39269
|
-
Ee.LimitPrice =
|
|
39270
|
-
Ee.OrderID =
|
|
39271
|
-
Ee.Container =
|
|
39272
|
-
Ee.OrderVersion =
|
|
39269
|
+
Ee.TriggerPrice = NV;
|
|
39270
|
+
Ee.LimitPrice = zV;
|
|
39271
|
+
Ee.OrderID = VV;
|
|
39272
|
+
Ee.Container = qV;
|
|
39273
|
+
Ee.OrderVersion = WV;
|
|
39273
39274
|
Ee.USD = ju;
|
|
39274
39275
|
const cm = () => {
|
|
39275
39276
|
const { publicClient: e } = ne();
|
|
@@ -39348,7 +39349,7 @@ const cm = () => {
|
|
|
39348
39349
|
throw new Error("missing required parameters");
|
|
39349
39350
|
try {
|
|
39350
39351
|
(d = s == null ? void 0 : s.onCancelOrderRequest) == null || d.call(s, u), i({
|
|
39351
|
-
cancelOrderStatus:
|
|
39352
|
+
cancelOrderStatus: gt.LOADING,
|
|
39352
39353
|
cancelOrderTxHash: void 0,
|
|
39353
39354
|
cancelOrderError: void 0
|
|
39354
39355
|
});
|
|
@@ -39357,16 +39358,16 @@ const cm = () => {
|
|
|
39357
39358
|
y.length ? l(y) : Promise.resolve("")
|
|
39358
39359
|
]);
|
|
39359
39360
|
return i({
|
|
39360
|
-
cancelOrderStatus:
|
|
39361
|
+
cancelOrderStatus: gt.SUCCESS,
|
|
39361
39362
|
orderIdsToCancel: []
|
|
39362
39363
|
}), [...g || [], E];
|
|
39363
39364
|
} catch (m) {
|
|
39364
|
-
console.error("cancel order error", m), (f = s == null ? void 0 : s.onCancelOrderFailed) == null || f.call(s, m), Nb(m) ? i({ cancelOrderStatus: void 0 }) : (i({ cancelOrderStatus:
|
|
39365
|
+
console.error("cancel order error", m), (f = s == null ? void 0 : s.onCancelOrderFailed) == null || f.call(s, m), Nb(m) ? i({ cancelOrderStatus: void 0 }) : (i({ cancelOrderStatus: gt.FAILED }), bt.onCancelOrderError(m));
|
|
39365
39366
|
}
|
|
39366
39367
|
}
|
|
39367
39368
|
});
|
|
39368
39369
|
}, K2 = (e) => {
|
|
39369
|
-
const t =
|
|
39370
|
+
const t = Re();
|
|
39370
39371
|
return ee(() => e ? e.type === ht.TRIGGER_PRICE_MARKET ? t("triggerPriceMarket") : e.type === ht.TRIGGER_PRICE_LIMIT ? t("triggerPriceLimit") : e.type === ht.TWAP_MARKET ? t("twapMarket") : e.type === ht.TWAP_LIMIT ? t("twapLimit") : t("twapMarket") : t("twapMarket"), [t, e == null ? void 0 : e.type]);
|
|
39371
39372
|
}, um = () => {
|
|
39372
39373
|
const { account: e, config: t, chainId: r } = ne();
|
|
@@ -39374,7 +39375,7 @@ const cm = () => {
|
|
|
39374
39375
|
() => ["useTwapOrderHistoryManager", e, t == null ? void 0 : t.partner, r],
|
|
39375
39376
|
[e, t, r]
|
|
39376
39377
|
);
|
|
39377
|
-
},
|
|
39378
|
+
}, KV = () => {
|
|
39378
39379
|
const e = Ql(), { account: t } = ne(), r = um();
|
|
39379
39380
|
return Fe(
|
|
39380
39381
|
(n) => {
|
|
@@ -39382,7 +39383,7 @@ const cm = () => {
|
|
|
39382
39383
|
},
|
|
39383
39384
|
[e, r, t]
|
|
39384
39385
|
);
|
|
39385
|
-
},
|
|
39386
|
+
}, ZV = () => {
|
|
39386
39387
|
const { callbacks: e, refetchBalances: t } = ne(), r = Ql(), n = um();
|
|
39387
39388
|
return Fe(
|
|
39388
39389
|
(s) => {
|
|
@@ -39398,8 +39399,8 @@ const cm = () => {
|
|
|
39398
39399
|
},
|
|
39399
39400
|
[r, n, e, t]
|
|
39400
39401
|
);
|
|
39401
|
-
},
|
|
39402
|
-
const { account: e, config: t, chainId: r } = ne(), n = um(), s =
|
|
39402
|
+
}, XV = () => {
|
|
39403
|
+
const { account: e, config: t, chainId: r } = ne(), n = um(), s = ZV();
|
|
39403
39404
|
return I3({
|
|
39404
39405
|
refetchInterval: Sz,
|
|
39405
39406
|
refetchOnWindowFocus: !0,
|
|
@@ -39427,7 +39428,7 @@ const cm = () => {
|
|
|
39427
39428
|
error: r,
|
|
39428
39429
|
refetch: n,
|
|
39429
39430
|
isRefetching: s
|
|
39430
|
-
} =
|
|
39431
|
+
} = XV(), { mutateAsync: a } = lm();
|
|
39431
39432
|
return ee(() => ({
|
|
39432
39433
|
orders: {
|
|
39433
39434
|
all: e ?? [],
|
|
@@ -39447,14 +39448,14 @@ const cm = () => {
|
|
|
39447
39448
|
return ee(() => e ? t.all.filter(
|
|
39448
39449
|
(r) => r.status.toLowerCase() === e.toLowerCase()
|
|
39449
39450
|
) || [] : t.all, [e, t]);
|
|
39450
|
-
}, yl = (e, t) => e.filter((r) => r.status === t).sort((r, n) => n.createdAt - r.createdAt),
|
|
39451
|
+
}, yl = (e, t) => e.filter((r) => r.status === t).sort((r, n) => n.createdAt - r.createdAt), QV = (e, t, r) => ee(() => {
|
|
39451
39452
|
if (!(!e || !t || !r || r != null && r.isMarketPrice))
|
|
39452
39453
|
return t8(
|
|
39453
39454
|
r,
|
|
39454
39455
|
e == null ? void 0 : e.decimals,
|
|
39455
39456
|
t == null ? void 0 : t.decimals
|
|
39456
39457
|
);
|
|
39457
|
-
}, [r, e, t]),
|
|
39458
|
+
}, [r, e, t]), JV = (e, t, r) => ee(() => {
|
|
39458
39459
|
if (!(!e || !t || !r))
|
|
39459
39460
|
return e8(r, e.decimals, t.decimals);
|
|
39460
39461
|
}, [r, e, t]), X2 = () => {
|
|
@@ -39469,9 +39470,9 @@ const cm = () => {
|
|
|
39469
39470
|
},
|
|
39470
39471
|
[e, t]
|
|
39471
39472
|
);
|
|
39472
|
-
},
|
|
39473
|
+
}, SK = () => {
|
|
39473
39474
|
var T, h;
|
|
39474
|
-
const e =
|
|
39475
|
+
const e = Re(), {
|
|
39475
39476
|
orders: t,
|
|
39476
39477
|
isLoading: r,
|
|
39477
39478
|
refetch: n,
|
|
@@ -39526,7 +39527,7 @@ const cm = () => {
|
|
|
39526
39527
|
onSelectAllOrdersToCancel: O
|
|
39527
39528
|
};
|
|
39528
39529
|
}, Q2 = (e) => {
|
|
39529
|
-
const t =
|
|
39530
|
+
const t = Re(), r = He({ value: e.srcAmount }), n = He({ value: e.limitPrice }), s = He({ value: e.limitPriceUsd }), a = He({ value: e.srcAmountPerTrade }), o = He({
|
|
39530
39531
|
value: e.srcAmountPerTradeUsd,
|
|
39531
39532
|
decimalScale: 2
|
|
39532
39533
|
}), i = He({
|
|
@@ -39613,11 +39614,11 @@ const cm = () => {
|
|
|
39613
39614
|
c
|
|
39614
39615
|
]);
|
|
39615
39616
|
}, J2 = (e) => {
|
|
39616
|
-
const { orders: t } = Vu(), { useToken: r, config: n } = ne(), s =
|
|
39617
|
+
const { orders: t } = Vu(), { useToken: r, config: n } = ne(), s = Re(), a = ee(
|
|
39617
39618
|
() => t == null ? void 0 : t.all.find((C) => C.id === e),
|
|
39618
39619
|
[t, e]
|
|
39619
|
-
) || {}, o = K2(a), i = r == null ? void 0 : r(a == null ? void 0 : a.srcTokenAddress), c = r == null ? void 0 : r(a == null ? void 0 : a.dstTokenAddress), l = Nr(i == null ? void 0 : i.decimals, a == null ? void 0 : a.srcAmount), u =
|
|
39620
|
-
value:
|
|
39620
|
+
) || {}, o = K2(a), i = r == null ? void 0 : r(a == null ? void 0 : a.srcTokenAddress), c = r == null ? void 0 : r(a == null ? void 0 : a.dstTokenAddress), l = Nr(i == null ? void 0 : i.decimals, a == null ? void 0 : a.srcAmount), u = QV(i, c, a), d = He({
|
|
39621
|
+
value: JV(i, c, a)
|
|
39621
39622
|
}), f = He({
|
|
39622
39623
|
value: Nr(i == null ? void 0 : i.decimals, a == null ? void 0 : a.srcAmountFilled)
|
|
39623
39624
|
}), m = He({
|
|
@@ -39691,8 +39692,8 @@ const cm = () => {
|
|
|
39691
39692
|
c,
|
|
39692
39693
|
S
|
|
39693
39694
|
]);
|
|
39694
|
-
}, ex = Ki({}), $t = () => Zl(ex),
|
|
39695
|
-
const e = Y((c) => c.state.selectedOrderID), t = J2(e), r =
|
|
39695
|
+
}, ex = Ki({}), $t = () => Zl(ex), eW = () => {
|
|
39696
|
+
const e = Y((c) => c.state.selectedOrderID), t = J2(e), r = Re(), [n, s] = yf("panel1"), { components: a } = ne(), o = a.TokenLogo;
|
|
39696
39697
|
rs(() => {
|
|
39697
39698
|
s("panel1");
|
|
39698
39699
|
}, [t.id.value]);
|
|
@@ -39719,7 +39720,7 @@ const cm = () => {
|
|
|
39719
39720
|
title: r("excecutionSummary"),
|
|
39720
39721
|
onClick: () => i("panel1"),
|
|
39721
39722
|
expanded: n === "panel1",
|
|
39722
|
-
children: /* @__PURE__ */ _(
|
|
39723
|
+
children: /* @__PURE__ */ _(lW, {})
|
|
39723
39724
|
}
|
|
39724
39725
|
),
|
|
39725
39726
|
/* @__PURE__ */ _(
|
|
@@ -39728,11 +39729,11 @@ const cm = () => {
|
|
|
39728
39729
|
title: r("orderInfo"),
|
|
39729
39730
|
expanded: n === "panel2",
|
|
39730
39731
|
onClick: () => i("panel2"),
|
|
39731
|
-
children: /* @__PURE__ */ _(
|
|
39732
|
+
children: /* @__PURE__ */ _(tW, {})
|
|
39732
39733
|
}
|
|
39733
39734
|
)
|
|
39734
39735
|
] }),
|
|
39735
|
-
/* @__PURE__ */ _(
|
|
39736
|
+
/* @__PURE__ */ _(dW, {})
|
|
39736
39737
|
] }) })
|
|
39737
39738
|
] }) }) : null;
|
|
39738
39739
|
}, U1 = ({
|
|
@@ -39758,19 +39759,19 @@ const cm = () => {
|
|
|
39758
39759
|
}
|
|
39759
39760
|
),
|
|
39760
39761
|
e && /* @__PURE__ */ _("div", { className: "twap-orders__selected-order-accordion-details", children: r })
|
|
39761
|
-
] }),
|
|
39762
|
-
/* @__PURE__ */ _(
|
|
39763
|
-
/* @__PURE__ */ _(dW, {}),
|
|
39764
|
-
/* @__PURE__ */ _(sW, {}),
|
|
39762
|
+
] }), tW = () => /* @__PURE__ */ fe(Ee, { children: [
|
|
39763
|
+
/* @__PURE__ */ _(cW, {}),
|
|
39765
39764
|
/* @__PURE__ */ _(pW, {}),
|
|
39766
|
-
/* @__PURE__ */ _(
|
|
39765
|
+
/* @__PURE__ */ _(aW, {}),
|
|
39766
|
+
/* @__PURE__ */ _(fW, {}),
|
|
39767
39767
|
/* @__PURE__ */ _(rW, {}),
|
|
39768
39768
|
/* @__PURE__ */ _(nW, {}),
|
|
39769
|
-
/* @__PURE__ */ _(
|
|
39769
|
+
/* @__PURE__ */ _(sW, {}),
|
|
39770
39770
|
/* @__PURE__ */ _(oW, {}),
|
|
39771
|
-
/* @__PURE__ */ _(
|
|
39771
|
+
/* @__PURE__ */ _(iW, {}),
|
|
39772
|
+
/* @__PURE__ */ _(gW, {}),
|
|
39772
39773
|
/* @__PURE__ */ _(Ee.Recipient, {})
|
|
39773
|
-
] }),
|
|
39774
|
+
] }), rW = () => {
|
|
39774
39775
|
const { order: e } = $t();
|
|
39775
39776
|
return /* @__PURE__ */ _(
|
|
39776
39777
|
Ee.TradeSize,
|
|
@@ -39782,7 +39783,7 @@ const cm = () => {
|
|
|
39782
39783
|
trades: e.totalTrades.value
|
|
39783
39784
|
}
|
|
39784
39785
|
);
|
|
39785
|
-
},
|
|
39786
|
+
}, nW = () => {
|
|
39786
39787
|
const { order: e } = $t();
|
|
39787
39788
|
return /* @__PURE__ */ _(
|
|
39788
39789
|
Ee.TradesAmount,
|
|
@@ -39792,7 +39793,7 @@ const cm = () => {
|
|
|
39792
39793
|
tooltip: e.totalTrades.tooltip
|
|
39793
39794
|
}
|
|
39794
39795
|
);
|
|
39795
|
-
},
|
|
39796
|
+
}, sW = () => {
|
|
39796
39797
|
const { order: e } = $t();
|
|
39797
39798
|
return /* @__PURE__ */ _(
|
|
39798
39799
|
Ee.MinDestAmount,
|
|
@@ -39803,7 +39804,7 @@ const cm = () => {
|
|
|
39803
39804
|
tooltip: e.minDestAmountPerTrade.tooltip
|
|
39804
39805
|
}
|
|
39805
39806
|
);
|
|
39806
|
-
},
|
|
39807
|
+
}, aW = () => {
|
|
39807
39808
|
const { order: e } = $t();
|
|
39808
39809
|
return /* @__PURE__ */ _(
|
|
39809
39810
|
Ee.Deadline,
|
|
@@ -39813,7 +39814,7 @@ const cm = () => {
|
|
|
39813
39814
|
tooltip: e.deadline.tooltip
|
|
39814
39815
|
}
|
|
39815
39816
|
);
|
|
39816
|
-
},
|
|
39817
|
+
}, oW = () => {
|
|
39817
39818
|
const { order: e } = $t();
|
|
39818
39819
|
return /* @__PURE__ */ _(
|
|
39819
39820
|
Ee.TradeInterval,
|
|
@@ -39824,7 +39825,7 @@ const cm = () => {
|
|
|
39824
39825
|
tooltip: e.tradeInterval.tooltip
|
|
39825
39826
|
}
|
|
39826
39827
|
);
|
|
39827
|
-
},
|
|
39828
|
+
}, iW = () => {
|
|
39828
39829
|
const { order: e } = $t();
|
|
39829
39830
|
return /* @__PURE__ */ _(
|
|
39830
39831
|
Ee.TriggerPrice,
|
|
@@ -39835,16 +39836,16 @@ const cm = () => {
|
|
|
39835
39836
|
tooltip: e.triggerPricePerTrade.tooltip
|
|
39836
39837
|
}
|
|
39837
39838
|
);
|
|
39838
|
-
},
|
|
39839
|
+
}, cW = () => {
|
|
39839
39840
|
const { order: e } = $t();
|
|
39840
39841
|
return /* @__PURE__ */ _(Ee.OrderID, { id: e.id.value || "" });
|
|
39841
|
-
},
|
|
39842
|
-
/* @__PURE__ */ _(hW, {}),
|
|
39843
|
-
/* @__PURE__ */ _(fW, {}),
|
|
39844
|
-
/* @__PURE__ */ _(lW, {}),
|
|
39842
|
+
}, lW = () => /* @__PURE__ */ fe(Ee, { children: [
|
|
39845
39843
|
/* @__PURE__ */ _(bW, {}),
|
|
39846
|
-
/* @__PURE__ */ _(
|
|
39847
|
-
|
|
39844
|
+
/* @__PURE__ */ _(mW, {}),
|
|
39845
|
+
/* @__PURE__ */ _(uW, {}),
|
|
39846
|
+
/* @__PURE__ */ _(yW, {}),
|
|
39847
|
+
/* @__PURE__ */ _(xW, {})
|
|
39848
|
+
] }), uW = () => {
|
|
39848
39849
|
var r;
|
|
39849
39850
|
const { order: e } = $t(), t = He({
|
|
39850
39851
|
value: e.amountOutFilled.value,
|
|
@@ -39855,24 +39856,25 @@ const cm = () => {
|
|
|
39855
39856
|
" ",
|
|
39856
39857
|
(r = e.dstToken) == null ? void 0 : r.symbol
|
|
39857
39858
|
] }) }) : null;
|
|
39858
|
-
},
|
|
39859
|
-
const { order: e } = $t(), { mutateAsync:
|
|
39860
|
-
return !e || e.original.status !== yt.Open || !
|
|
39861
|
-
|
|
39859
|
+
}, dW = () => {
|
|
39860
|
+
const { order: e } = $t(), t = Re(), { mutateAsync: r, isPending: n } = lm(), { components: s } = ne(), a = s.Button, o = Fe(async () => r({ orders: [e.original] }), [r, e]);
|
|
39861
|
+
return !e || e.original.status !== yt.Open || !a ? null : /* @__PURE__ */ _(
|
|
39862
|
+
a,
|
|
39862
39863
|
{
|
|
39863
|
-
loading:
|
|
39864
|
-
onClick:
|
|
39865
|
-
disabled:
|
|
39864
|
+
loading: n,
|
|
39865
|
+
onClick: o,
|
|
39866
|
+
disabled: n,
|
|
39866
39867
|
className: "twap-cancel-order",
|
|
39867
|
-
|
|
39868
|
+
text: t("cancelOrder"),
|
|
39869
|
+
children: t("cancelOrder")
|
|
39868
39870
|
}
|
|
39869
39871
|
);
|
|
39870
|
-
}, dW = () => {
|
|
39871
|
-
const { order: e } = $t(), t = Ne(), r = im(e.createdAt.value);
|
|
39872
|
-
return /* @__PURE__ */ _(Ee.DetailRow, { title: t("createdAt") || "", children: /* @__PURE__ */ _("p", { children: r }) });
|
|
39873
39872
|
}, pW = () => {
|
|
39873
|
+
const { order: e } = $t(), t = Re(), r = im(e.createdAt.value);
|
|
39874
|
+
return /* @__PURE__ */ _(Ee.DetailRow, { title: t("createdAt") || "", children: /* @__PURE__ */ _("p", { children: r }) });
|
|
39875
|
+
}, fW = () => {
|
|
39874
39876
|
var n;
|
|
39875
|
-
const { order: e } = $t(), t =
|
|
39877
|
+
const { order: e } = $t(), t = Re(), r = He({
|
|
39876
39878
|
value: e.srcAmount.value,
|
|
39877
39879
|
decimalScale: 3
|
|
39878
39880
|
});
|
|
@@ -39881,7 +39883,7 @@ const cm = () => {
|
|
|
39881
39883
|
" ",
|
|
39882
39884
|
(n = e.srcToken) == null ? void 0 : n.symbol
|
|
39883
39885
|
] }) });
|
|
39884
|
-
},
|
|
39886
|
+
}, mW = () => {
|
|
39885
39887
|
var r;
|
|
39886
39888
|
const { order: e } = $t(), t = He({
|
|
39887
39889
|
value: e.amountInFilled.value,
|
|
@@ -39892,8 +39894,8 @@ const cm = () => {
|
|
|
39892
39894
|
" ",
|
|
39893
39895
|
(r = e.srcToken) == null ? void 0 : r.symbol
|
|
39894
39896
|
] }) });
|
|
39895
|
-
},
|
|
39896
|
-
const { order: e } = $t(), t =
|
|
39897
|
+
}, hW = () => {
|
|
39898
|
+
const { order: e } = $t(), t = Re();
|
|
39897
39899
|
return ee(() => {
|
|
39898
39900
|
switch (e.original.status) {
|
|
39899
39901
|
case yt.Open:
|
|
@@ -39906,10 +39908,10 @@ const cm = () => {
|
|
|
39906
39908
|
return t("Canceled") || "";
|
|
39907
39909
|
}
|
|
39908
39910
|
}, [e.original.status, t]);
|
|
39909
|
-
}, hW = () => {
|
|
39910
|
-
const e = Ne(), t = mW();
|
|
39911
|
-
return /* @__PURE__ */ _(Ee.DetailRow, { title: e("status") || "", children: /* @__PURE__ */ _("p", { children: t }) });
|
|
39912
39911
|
}, bW = () => {
|
|
39912
|
+
const e = Re(), t = hW();
|
|
39913
|
+
return /* @__PURE__ */ _(Ee.DetailRow, { title: e("status") || "", children: /* @__PURE__ */ _("p", { children: t }) });
|
|
39914
|
+
}, yW = () => {
|
|
39913
39915
|
const { order: e } = $t(), t = He({
|
|
39914
39916
|
value: e.progress.value,
|
|
39915
39917
|
decimalScale: 2
|
|
@@ -39918,8 +39920,8 @@ const cm = () => {
|
|
|
39918
39920
|
t || 0,
|
|
39919
39921
|
"%"
|
|
39920
39922
|
] }) });
|
|
39921
|
-
},
|
|
39922
|
-
const { order: e } = $t(), t =
|
|
39923
|
+
}, gW = () => {
|
|
39924
|
+
const { order: e } = $t(), t = Re();
|
|
39923
39925
|
return e.limitPrice.value ? /* @__PURE__ */ _(
|
|
39924
39926
|
tx,
|
|
39925
39927
|
{
|
|
@@ -39929,7 +39931,7 @@ const cm = () => {
|
|
|
39929
39931
|
dstToken: e.dstToken
|
|
39930
39932
|
}
|
|
39931
39933
|
) : null;
|
|
39932
|
-
},
|
|
39934
|
+
}, xW = () => {
|
|
39933
39935
|
const { order: e } = $t();
|
|
39934
39936
|
return e.excecutionPrice.value ? /* @__PURE__ */ _(
|
|
39935
39937
|
tx,
|
|
@@ -39957,7 +39959,7 @@ const cm = () => {
|
|
|
39957
39959
|
] }) });
|
|
39958
39960
|
};
|
|
39959
39961
|
var Hd = {}, O1;
|
|
39960
|
-
function
|
|
39962
|
+
function wW() {
|
|
39961
39963
|
if (O1) return Hd;
|
|
39962
39964
|
O1 = 1;
|
|
39963
39965
|
var e = Fu.GenIcon;
|
|
@@ -39965,12 +39967,12 @@ function xW() {
|
|
|
39965
39967
|
return e({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z", clipRule: "evenodd" } }] })(r);
|
|
39966
39968
|
}, Hd;
|
|
39967
39969
|
}
|
|
39968
|
-
var
|
|
39970
|
+
var vW = /* @__PURE__ */ wW();
|
|
39969
39971
|
const Wu = 0, As = 1, Bo = 2, rx = 4;
|
|
39970
39972
|
function D1(e) {
|
|
39971
39973
|
return () => e;
|
|
39972
39974
|
}
|
|
39973
|
-
function
|
|
39975
|
+
function EW(e) {
|
|
39974
39976
|
e();
|
|
39975
39977
|
}
|
|
39976
39978
|
function nx(e, t) {
|
|
@@ -39979,15 +39981,15 @@ function nx(e, t) {
|
|
|
39979
39981
|
function _1(e, t) {
|
|
39980
39982
|
return () => e(t);
|
|
39981
39983
|
}
|
|
39982
|
-
function
|
|
39984
|
+
function kW(e, t) {
|
|
39983
39985
|
return (r) => e(t, r);
|
|
39984
39986
|
}
|
|
39985
39987
|
function dm(e) {
|
|
39986
39988
|
return e !== void 0;
|
|
39987
39989
|
}
|
|
39988
|
-
function
|
|
39990
|
+
function CW(...e) {
|
|
39989
39991
|
return () => {
|
|
39990
|
-
e.map(
|
|
39992
|
+
e.map(EW);
|
|
39991
39993
|
};
|
|
39992
39994
|
}
|
|
39993
39995
|
function Fo() {
|
|
@@ -39995,7 +39997,7 @@ function Fo() {
|
|
|
39995
39997
|
function qu(e, t) {
|
|
39996
39998
|
return t(e), e;
|
|
39997
39999
|
}
|
|
39998
|
-
function
|
|
40000
|
+
function TW(e, t) {
|
|
39999
40001
|
return t(e);
|
|
40000
40002
|
}
|
|
40001
40003
|
function nt(...e) {
|
|
@@ -40014,7 +40016,7 @@ function it(e) {
|
|
|
40014
40016
|
return e(rx);
|
|
40015
40017
|
}
|
|
40016
40018
|
function ce(e, t) {
|
|
40017
|
-
return We(e,
|
|
40019
|
+
return We(e, kW(t, Wu));
|
|
40018
40020
|
}
|
|
40019
40021
|
function $r(e, t) {
|
|
40020
40022
|
const r = e(As, (n) => {
|
|
@@ -40053,7 +40055,7 @@ function nn(e) {
|
|
|
40053
40055
|
};
|
|
40054
40056
|
}
|
|
40055
40057
|
function j(e, ...t) {
|
|
40056
|
-
const r =
|
|
40058
|
+
const r = AW(...t);
|
|
40057
40059
|
return (n, s) => {
|
|
40058
40060
|
switch (n) {
|
|
40059
40061
|
case Bo:
|
|
@@ -40099,10 +40101,10 @@ function Pe(...e) {
|
|
|
40099
40101
|
r === s ? i() : n = i;
|
|
40100
40102
|
};
|
|
40101
40103
|
}
|
|
40102
|
-
function
|
|
40103
|
-
return (t) => e.reduceRight(
|
|
40104
|
+
function AW(...e) {
|
|
40105
|
+
return (t) => e.reduceRight(TW, t);
|
|
40104
40106
|
}
|
|
40105
|
-
function
|
|
40107
|
+
function SW(e) {
|
|
40106
40108
|
let t, r;
|
|
40107
40109
|
const n = () => t == null ? void 0 : t();
|
|
40108
40110
|
return function(s, a) {
|
|
@@ -40163,12 +40165,12 @@ function Ve(e, t = [], { singleton: r } = { singleton: !0 }) {
|
|
|
40163
40165
|
return {
|
|
40164
40166
|
constructor: e,
|
|
40165
40167
|
dependencies: t,
|
|
40166
|
-
id:
|
|
40168
|
+
id: PW(),
|
|
40167
40169
|
singleton: r
|
|
40168
40170
|
};
|
|
40169
40171
|
}
|
|
40170
|
-
const
|
|
40171
|
-
function
|
|
40172
|
+
const PW = () => Symbol();
|
|
40173
|
+
function IW(e) {
|
|
40172
40174
|
const t = /* @__PURE__ */ new Map(), r = ({ constructor: n, dependencies: s, id: a, singleton: o }) => {
|
|
40173
40175
|
if (o && t.has(a))
|
|
40174
40176
|
return t.get(a);
|
|
@@ -40206,17 +40208,17 @@ function df(...e) {
|
|
|
40206
40208
|
case Bo:
|
|
40207
40209
|
return;
|
|
40208
40210
|
case As:
|
|
40209
|
-
return
|
|
40211
|
+
return CW(...e.map((n) => We(n, r)));
|
|
40210
40212
|
}
|
|
40211
40213
|
};
|
|
40212
40214
|
}
|
|
40213
40215
|
var ar = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(ar || {});
|
|
40214
|
-
const
|
|
40216
|
+
const BW = {
|
|
40215
40217
|
0: "debug",
|
|
40216
40218
|
3: "error",
|
|
40217
40219
|
1: "log",
|
|
40218
40220
|
2: "warn"
|
|
40219
|
-
},
|
|
40221
|
+
}, FW = () => typeof globalThis > "u" ? window : globalThis, Ss = Ve(
|
|
40220
40222
|
() => {
|
|
40221
40223
|
const e = q(
|
|
40222
40224
|
3
|
|
@@ -40225,8 +40227,8 @@ const IW = {
|
|
|
40225
40227
|
return {
|
|
40226
40228
|
log: q((t, r, n = 1) => {
|
|
40227
40229
|
var s;
|
|
40228
|
-
const a = (s =
|
|
40229
|
-
n >= a && console[
|
|
40230
|
+
const a = (s = FW().VIRTUOSO_LOG_LEVEL) != null ? s : it(e);
|
|
40231
|
+
n >= a && console[BW[n]](
|
|
40230
40232
|
"%creact-virtuoso: %c%s %o",
|
|
40231
40233
|
"color: #0253b3; font-weight: bold",
|
|
40232
40234
|
"color: initial",
|
|
@@ -40258,10 +40260,10 @@ function fm(e, t, r) {
|
|
|
40258
40260
|
o && t ? (a == null || a.observe(o), n.current = o) : (n.current && (a == null || a.unobserve(n.current)), n.current = null);
|
|
40259
40261
|
}, { callbackRef: s, ref: n };
|
|
40260
40262
|
}
|
|
40261
|
-
function
|
|
40263
|
+
function UW(e, t, r, n, s, a, o, i, c) {
|
|
40262
40264
|
const l = te.useCallback(
|
|
40263
40265
|
(u) => {
|
|
40264
|
-
const d =
|
|
40266
|
+
const d = OW(u.children, t, i ? "offsetWidth" : "offsetHeight", s);
|
|
40265
40267
|
let f = u.parentElement;
|
|
40266
40268
|
for (; !f.dataset.virtuosoScroller; )
|
|
40267
40269
|
f = f.parentElement;
|
|
@@ -40281,7 +40283,7 @@ function FW(e, t, r, n, s, a, o, i, c) {
|
|
|
40281
40283
|
);
|
|
40282
40284
|
return fm(l, r, c);
|
|
40283
40285
|
}
|
|
40284
|
-
function
|
|
40286
|
+
function OW(e, t, r, n) {
|
|
40285
40287
|
const s = e.length;
|
|
40286
40288
|
if (s === 0)
|
|
40287
40289
|
return null;
|
|
@@ -40424,7 +40426,7 @@ function Wa(e, t, r) {
|
|
|
40424
40426
|
if (Ke(e))
|
|
40425
40427
|
return [];
|
|
40426
40428
|
const n = qr(e, t)[0];
|
|
40427
|
-
return
|
|
40429
|
+
return DW(ff(e, n, r));
|
|
40428
40430
|
}
|
|
40429
40431
|
function pf(e, t) {
|
|
40430
40432
|
if (Ke(e)) return Ri;
|
|
@@ -40516,7 +40518,7 @@ function mf(e) {
|
|
|
40516
40518
|
const { lvl: t, r } = e;
|
|
40517
40519
|
return !Ke(r) && !Ke(r.r) && r.lvl === t && r.r.lvl === t ? Ct(r, { l: Ct(e, { r: r.l }), lvl: t + 1 }) : e;
|
|
40518
40520
|
}
|
|
40519
|
-
function
|
|
40521
|
+
function DW(e) {
|
|
40520
40522
|
return ox(e, ({ k: t, v: r }) => ({ index: t, value: r }));
|
|
40521
40523
|
}
|
|
40522
40524
|
function dx(e, t) {
|
|
@@ -40551,7 +40553,7 @@ function Yl(e, t, r, n = 0) {
|
|
|
40551
40553
|
}
|
|
40552
40554
|
throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
|
|
40553
40555
|
}
|
|
40554
|
-
function
|
|
40556
|
+
function _W(e, t, r, n) {
|
|
40555
40557
|
const s = Yl(e, t, n), a = Yl(e, r, n, s);
|
|
40556
40558
|
return e.slice(s, a + 1);
|
|
40557
40559
|
}
|
|
@@ -40564,7 +40566,7 @@ function Yu(e) {
|
|
|
40564
40566
|
function hm({ index: e }, t) {
|
|
40565
40567
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
40566
40568
|
}
|
|
40567
|
-
function
|
|
40569
|
+
function MW() {
|
|
40568
40570
|
return {
|
|
40569
40571
|
groupIndices: [],
|
|
40570
40572
|
groupOffsetTree: Va(),
|
|
@@ -40575,7 +40577,7 @@ function _W() {
|
|
|
40575
40577
|
sizeTree: Va()
|
|
40576
40578
|
};
|
|
40577
40579
|
}
|
|
40578
|
-
function
|
|
40580
|
+
function RW(e, t) {
|
|
40579
40581
|
let r = Ke(e) ? 0 : 1 / 0;
|
|
40580
40582
|
for (const n of t) {
|
|
40581
40583
|
const { endIndex: s, size: a, startIndex: o } = n;
|
|
@@ -40584,7 +40586,7 @@ function MW(e, t) {
|
|
|
40584
40586
|
continue;
|
|
40585
40587
|
}
|
|
40586
40588
|
const i = Wa(e, o - 1, s + 1);
|
|
40587
|
-
if (i.some(
|
|
40589
|
+
if (i.some(jW(n)))
|
|
40588
40590
|
continue;
|
|
40589
40591
|
let c = !1, l = !1;
|
|
40590
40592
|
for (const { end: u, start: d, value: f } of i)
|
|
@@ -40593,10 +40595,10 @@ function MW(e, t) {
|
|
|
40593
40595
|
}
|
|
40594
40596
|
return [e, r];
|
|
40595
40597
|
}
|
|
40596
|
-
function
|
|
40598
|
+
function NW(e) {
|
|
40597
40599
|
return typeof e.groupIndex < "u";
|
|
40598
40600
|
}
|
|
40599
|
-
function
|
|
40601
|
+
function zW({ offset: e }, t) {
|
|
40600
40602
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
40601
40603
|
}
|
|
40602
40604
|
function Li(e, t, r) {
|
|
@@ -40614,7 +40616,7 @@ function fx(e, t) {
|
|
|
40614
40616
|
return e + r;
|
|
40615
40617
|
}
|
|
40616
40618
|
function mx(e, t, r) {
|
|
40617
|
-
if (
|
|
40619
|
+
if (NW(e))
|
|
40618
40620
|
return t.groupIndices[e.groupIndex] + 1;
|
|
40619
40621
|
{
|
|
40620
40622
|
const n = e.index === "LAST" ? r : e.index;
|
|
@@ -40622,10 +40624,10 @@ function mx(e, t, r) {
|
|
|
40622
40624
|
return s = Math.max(0, s, Math.min(r, s)), s;
|
|
40623
40625
|
}
|
|
40624
40626
|
}
|
|
40625
|
-
function
|
|
40626
|
-
return n > 0 && (t = Math.max(t, px(e, n, hm).offset)), ox(
|
|
40627
|
+
function LW(e, t, r, n = 0) {
|
|
40628
|
+
return n > 0 && (t = Math.max(t, px(e, n, hm).offset)), ox(_W(e, t, r, zW), GW);
|
|
40627
40629
|
}
|
|
40628
|
-
function
|
|
40630
|
+
function $W(e, [t, r, n, s]) {
|
|
40629
40631
|
t.length > 0 && n("received item sizes", t, ar.DEBUG);
|
|
40630
40632
|
const a = e.sizeTree;
|
|
40631
40633
|
let o = a, i = 0;
|
|
@@ -40633,7 +40635,7 @@ function LW(e, [t, r, n, s]) {
|
|
|
40633
40635
|
const f = t[0].size, m = t[1].size;
|
|
40634
40636
|
o = r.reduce((y, g) => lr(lr(y, g, f), g + 1, m), o);
|
|
40635
40637
|
} else
|
|
40636
|
-
[o, i] =
|
|
40638
|
+
[o, i] = RW(o, t);
|
|
40637
40639
|
if (o === a)
|
|
40638
40640
|
return e;
|
|
40639
40641
|
const { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } = hf(e.offsetTree, i, o, s);
|
|
@@ -40647,7 +40649,7 @@ function LW(e, [t, r, n, s]) {
|
|
|
40647
40649
|
sizeTree: o
|
|
40648
40650
|
};
|
|
40649
40651
|
}
|
|
40650
|
-
function
|
|
40652
|
+
function HW(e) {
|
|
40651
40653
|
return Rs(e).map(({ k: t, v: r }, n, s) => {
|
|
40652
40654
|
const a = s[n + 1];
|
|
40653
40655
|
return { endIndex: a ? a.k - 1 : 1 / 0, size: r, startIndex: t };
|
|
@@ -40682,20 +40684,20 @@ function hf(e, t, r, n) {
|
|
|
40682
40684
|
offsetTree: s
|
|
40683
40685
|
};
|
|
40684
40686
|
}
|
|
40685
|
-
function
|
|
40687
|
+
function GW(e) {
|
|
40686
40688
|
return { index: e.index, value: e };
|
|
40687
40689
|
}
|
|
40688
|
-
function
|
|
40690
|
+
function jW(e) {
|
|
40689
40691
|
const { endIndex: t, size: r, startIndex: n } = e;
|
|
40690
40692
|
return (s) => s.start === n && (s.end === t || s.end === 1 / 0) && s.value === r;
|
|
40691
40693
|
}
|
|
40692
|
-
const
|
|
40694
|
+
const VW = {
|
|
40693
40695
|
offsetHeight: "height",
|
|
40694
40696
|
offsetWidth: "width"
|
|
40695
40697
|
}, hn = Ve(
|
|
40696
40698
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
40697
|
-
const r = Me(), n = Me(), s = zt(n, 0), a = Me(), o = Me(), i = q(0), c = q([]), l = q(void 0), u = q(void 0), d = q(void 0), f = q(void 0), m = q((T, h) => Es(T,
|
|
40698
|
-
j(r, Pe(c, e, g), an(
|
|
40699
|
+
const r = Me(), n = Me(), s = zt(n, 0), a = Me(), o = Me(), i = q(0), c = q([]), l = q(void 0), u = q(void 0), d = q(void 0), f = q(void 0), m = q((T, h) => Es(T, VW[h])), y = q(void 0), g = q(0), E = MW(), v = zt(
|
|
40700
|
+
j(r, Pe(c, e, g), an($W, E), et()),
|
|
40699
40701
|
E
|
|
40700
40702
|
), w = zt(
|
|
40701
40703
|
j(
|
|
@@ -40982,7 +40984,7 @@ const jW = {
|
|
|
40982
40984
|
nt(Ss, mm),
|
|
40983
40985
|
{ singleton: !0 }
|
|
40984
40986
|
);
|
|
40985
|
-
function
|
|
40987
|
+
function WW(e) {
|
|
40986
40988
|
return e.reduce(
|
|
40987
40989
|
(t, r) => (t.groupIndices.push(t.totalCount), t.totalCount += r + 1, t),
|
|
40988
40990
|
{
|
|
@@ -40993,7 +40995,7 @@ function VW(e) {
|
|
|
40993
40995
|
}
|
|
40994
40996
|
const hx = Ve(
|
|
40995
40997
|
([{ groupIndices: e, sizes: t, totalCount: r }, { headerHeight: n, scrollTop: s }]) => {
|
|
40996
|
-
const a = Me(), o = Me(), i = dr(j(a, re(
|
|
40998
|
+
const a = Me(), o = Me(), i = dr(j(a, re(WW)));
|
|
40997
40999
|
return ce(
|
|
40998
41000
|
j(
|
|
40999
41001
|
i,
|
|
@@ -41033,10 +41035,10 @@ const hx = Ve(
|
|
|
41033
41035
|
},
|
|
41034
41036
|
nt(Ss),
|
|
41035
41037
|
{ singleton: !0 }
|
|
41036
|
-
),
|
|
41038
|
+
), qW = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
41037
41039
|
function bx(e) {
|
|
41038
41040
|
const t = typeof e == "number" ? { index: e } : e;
|
|
41039
|
-
return t.align || (t.align = "start"), (!t.behavior || !
|
|
41041
|
+
return t.align || (t.align = "start"), (!t.behavior || !qW) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
|
|
41040
41042
|
}
|
|
41041
41043
|
const wc = Ve(
|
|
41042
41044
|
([
|
|
@@ -41084,7 +41086,7 @@ const wc = Ve(
|
|
|
41084
41086
|
X(pe);
|
|
41085
41087
|
});
|
|
41086
41088
|
} else
|
|
41087
|
-
E = $r(j(t,
|
|
41089
|
+
E = $r(j(t, YW(150)), X);
|
|
41088
41090
|
return v = setTimeout(() => {
|
|
41089
41091
|
S();
|
|
41090
41092
|
}, 1200), Te(c, !0), A("scrolling from index to", { behavior: U, index: z, top: $ }, ar.DEBUG), { behavior: U, top: $ };
|
|
@@ -41101,7 +41103,7 @@ const wc = Ve(
|
|
|
41101
41103
|
nt(hn, Kt, Ss),
|
|
41102
41104
|
{ singleton: !0 }
|
|
41103
41105
|
);
|
|
41104
|
-
function
|
|
41106
|
+
function YW(e) {
|
|
41105
41107
|
return (t) => {
|
|
41106
41108
|
const r = setTimeout(() => {
|
|
41107
41109
|
t(!1);
|
|
@@ -41167,7 +41169,7 @@ const vc = Ve(
|
|
|
41167
41169
|
function yx(e, t) {
|
|
41168
41170
|
return Math.abs(e - t) < 1.01;
|
|
41169
41171
|
}
|
|
41170
|
-
const $i = "up", ti = "down",
|
|
41172
|
+
const $i = "up", ti = "down", KW = "none", ZW = {
|
|
41171
41173
|
atBottom: !1,
|
|
41172
41174
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
41173
41175
|
state: {
|
|
@@ -41176,8 +41178,8 @@ const $i = "up", ti = "down", YW = "none", KW = {
|
|
|
41176
41178
|
scrollTop: 0,
|
|
41177
41179
|
viewportHeight: 0
|
|
41178
41180
|
}
|
|
41179
|
-
},
|
|
41180
|
-
const o = q(!1), i = q(!0), c = Me(), l = Me(), u = q(4), d = q(
|
|
41181
|
+
}, XW = 0, Ec = Ve(([{ footerHeight: e, headerHeight: t, scrollBy: r, scrollContainerState: n, scrollTop: s, viewportHeight: a }]) => {
|
|
41182
|
+
const o = q(!1), i = q(!0), c = Me(), l = Me(), u = q(4), d = q(XW), f = zt(
|
|
41181
41183
|
j(
|
|
41182
41184
|
df(j(me(s), la(1), nn(!0)), j(me(s), la(1), nn(!1), M1(100))),
|
|
41183
41185
|
et()
|
|
@@ -41219,7 +41221,7 @@ const $i = "up", ti = "down", YW = "none", KW = {
|
|
|
41219
41221
|
notAtBottomBecause: A,
|
|
41220
41222
|
state: x
|
|
41221
41223
|
};
|
|
41222
|
-
},
|
|
41224
|
+
}, ZW),
|
|
41223
41225
|
et((w, S) => w && w.atBottom === S.atBottom)
|
|
41224
41226
|
)
|
|
41225
41227
|
), g = zt(
|
|
@@ -41276,7 +41278,7 @@ const $i = "up", ti = "down", YW = "none", KW = {
|
|
|
41276
41278
|
re((w) => w.direction)
|
|
41277
41279
|
),
|
|
41278
41280
|
E
|
|
41279
|
-
), ce(j(n, Dn(50), nn(
|
|
41281
|
+
), ce(j(n, Dn(50), nn(KW)), E);
|
|
41280
41282
|
const v = q(0);
|
|
41281
41283
|
return ce(
|
|
41282
41284
|
j(
|
|
@@ -41370,7 +41372,7 @@ const gm = Ve(
|
|
|
41370
41372
|
nt(Kt),
|
|
41371
41373
|
{ singleton: !0 }
|
|
41372
41374
|
);
|
|
41373
|
-
function
|
|
41375
|
+
function QW(e, t, r) {
|
|
41374
41376
|
if (Yu(t)) {
|
|
41375
41377
|
const n = fx(e, t);
|
|
41376
41378
|
return [
|
|
@@ -41514,7 +41516,7 @@ const ga = Ve(
|
|
|
41514
41516
|
return ie === 0 ? { ...jd, totalCount: b } : gx(ie, A, x, D, k, U || []);
|
|
41515
41517
|
if (Ke(be))
|
|
41516
41518
|
return ie > 0 ? null : Sl(
|
|
41517
|
-
|
|
41519
|
+
QW(ym(A, b), X, U),
|
|
41518
41520
|
[],
|
|
41519
41521
|
b,
|
|
41520
41522
|
k,
|
|
@@ -41533,7 +41535,7 @@ const ga = Ve(
|
|
|
41533
41535
|
}
|
|
41534
41536
|
if (!I)
|
|
41535
41537
|
return Sl([], de, b, k, X, D);
|
|
41536
|
-
const Be = B.length > 0 ? B[B.length - 1] + 1 : 0, K =
|
|
41538
|
+
const Be = B.length > 0 ? B[B.length - 1] + 1 : 0, K = LW(pe, T, h, Be);
|
|
41537
41539
|
if (K.length === 0)
|
|
41538
41540
|
return null;
|
|
41539
41541
|
const xe = b - 1, Oe = qu([], (Ae) => {
|
|
@@ -41679,7 +41681,7 @@ const ga = Ve(
|
|
|
41679
41681
|
},
|
|
41680
41682
|
nt(Kt, ga),
|
|
41681
41683
|
{ singleton: !0 }
|
|
41682
|
-
),
|
|
41684
|
+
), JW = Ve(
|
|
41683
41685
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
41684
41686
|
const r = q(!1), n = zt(
|
|
41685
41687
|
j(
|
|
@@ -41697,7 +41699,7 @@ const ga = Ve(
|
|
|
41697
41699
|
{ singleton: !0 }
|
|
41698
41700
|
), wx = Ve(() => ({
|
|
41699
41701
|
context: q(null)
|
|
41700
|
-
})),
|
|
41702
|
+
})), eq = ({
|
|
41701
41703
|
itemBottom: e,
|
|
41702
41704
|
itemTop: t,
|
|
41703
41705
|
locationParams: { align: r, behavior: n, ...s },
|
|
@@ -41716,7 +41718,7 @@ const ga = Ve(
|
|
|
41716
41718
|
Pe(t, c, r, a, s, n, i),
|
|
41717
41719
|
Pe(e),
|
|
41718
41720
|
re(([[d, f, m, y, g, E, v, w], S]) => {
|
|
41719
|
-
const { align: C, behavior: O, calculateViewLocation: R =
|
|
41721
|
+
const { align: C, behavior: O, calculateViewLocation: R = eq, done: T, ...h } = d, b = mx(d, f, y - 1), x = Li(b, f.offsetTree, S) + g + E, A = x + qr(f.sizeTree, b)[1], I = w + E, B = w + m - v, D = R({
|
|
41720
41722
|
itemBottom: A,
|
|
41721
41723
|
itemTop: x,
|
|
41722
41724
|
locationParams: { align: C, behavior: O, ...h },
|
|
@@ -41747,7 +41749,7 @@ const ga = Ve(
|
|
|
41747
41749
|
function V1(e) {
|
|
41748
41750
|
return e ? e === "smooth" ? "smooth" : "auto" : !1;
|
|
41749
41751
|
}
|
|
41750
|
-
const
|
|
41752
|
+
const tq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), rq = Ve(
|
|
41751
41753
|
([
|
|
41752
41754
|
{ listRefresh: e, totalCount: t, fixedItemSize: r, data: n },
|
|
41753
41755
|
{ atBottomState: s, isAtBottom: a },
|
|
@@ -41774,7 +41776,7 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41774
41776
|
Pe(me(y), a, i, d),
|
|
41775
41777
|
re(([[O, R], T, h, b, x]) => {
|
|
41776
41778
|
let A = R && b, I = "auto";
|
|
41777
|
-
return A && (I =
|
|
41779
|
+
return A && (I = tq(T, h || x), A = A && !!I), { followOutputBehavior: I, shouldFollow: A, totalCount: O };
|
|
41778
41780
|
}),
|
|
41779
41781
|
he(({ shouldFollow: O }) => O)
|
|
41780
41782
|
),
|
|
@@ -41852,7 +41854,7 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41852
41854
|
wx,
|
|
41853
41855
|
vx
|
|
41854
41856
|
)
|
|
41855
|
-
),
|
|
41857
|
+
), nq = Ve(
|
|
41856
41858
|
([{ data: e, firstItemIndex: t, gap: r, sizes: n }, { initialTopMostItemIndex: s }, { initialItemCount: a, listState: o }, { didMount: i }]) => (ce(
|
|
41857
41859
|
j(
|
|
41858
41860
|
i,
|
|
@@ -41865,7 +41867,7 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41865
41867
|
), {}),
|
|
41866
41868
|
nt(hn, vc, ga, Ps),
|
|
41867
41869
|
{ singleton: !0 }
|
|
41868
|
-
),
|
|
41870
|
+
), sq = Ve(
|
|
41869
41871
|
([{ didMount: e }, { scrollTo: t }, { listState: r }]) => {
|
|
41870
41872
|
const n = q(0);
|
|
41871
41873
|
return We(
|
|
@@ -41956,7 +41958,7 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41956
41958
|
windowScrollTo: s,
|
|
41957
41959
|
windowViewportRect: n
|
|
41958
41960
|
};
|
|
41959
|
-
}, nt(Kt)),
|
|
41961
|
+
}, nt(Kt)), aq = Ve(
|
|
41960
41962
|
([
|
|
41961
41963
|
{ sizeRanges: e, sizes: t },
|
|
41962
41964
|
{ headerHeight: r, scrollTop: n },
|
|
@@ -41971,10 +41973,10 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41971
41973
|
Pe(t, n, o, d, f, r)
|
|
41972
41974
|
),
|
|
41973
41975
|
([m, y, g, E, v, w, S]) => {
|
|
41974
|
-
const C =
|
|
41976
|
+
const C = HW(y.sizeTree);
|
|
41975
41977
|
E && v !== null && w !== null && (g = v.scrollTop - w.offsetTop), g -= S, m({ ranges: C, scrollTop: g });
|
|
41976
41978
|
}
|
|
41977
|
-
), ce(j(u, he(dm), re(
|
|
41979
|
+
), ce(j(u, he(dm), re(oq)), s), ce(
|
|
41978
41980
|
j(
|
|
41979
41981
|
a,
|
|
41980
41982
|
Pe(u),
|
|
@@ -41990,10 +41992,10 @@ const eq = (e, t) => typeof e == "function" ? V1(e(t)) : t && V1(e), tq = Ve(
|
|
|
41990
41992
|
},
|
|
41991
41993
|
nt(hn, Kt, vc, Ps, xm)
|
|
41992
41994
|
);
|
|
41993
|
-
function
|
|
41995
|
+
function oq(e) {
|
|
41994
41996
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
41995
41997
|
}
|
|
41996
|
-
const
|
|
41998
|
+
const iq = Ve(([{ topItemsIndexes: e }]) => {
|
|
41997
41999
|
const t = q(0);
|
|
41998
42000
|
return ce(
|
|
41999
42001
|
j(
|
|
@@ -42008,7 +42010,7 @@ function kx(e) {
|
|
|
42008
42010
|
let t = !1, r;
|
|
42009
42011
|
return () => (t || (t = !0, r = e()), r);
|
|
42010
42012
|
}
|
|
42011
|
-
const
|
|
42013
|
+
const cq = kx(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), lq = Ve(
|
|
42012
42014
|
([
|
|
42013
42015
|
{ deviation: e, scrollBy: t, scrollingInProgress: r, scrollTop: n },
|
|
42014
42016
|
{ isAtBottom: s, isScrolling: a, lastJumpDueToItemResize: o, scrollDirection: i },
|
|
@@ -42039,7 +42041,7 @@ const iq = kx(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
42039
42041
|
v > 0 ? (Te(t, { behavior: "auto", top: -v }), Te(e, 0)) : (Te(e, 0), Te(t, { behavior: "auto", top: -v }));
|
|
42040
42042
|
}
|
|
42041
42043
|
return We(j(g, Pe(e, a)), ([v, w, S]) => {
|
|
42042
|
-
S &&
|
|
42044
|
+
S && cq() ? Te(e, w - v) : E(-v);
|
|
42043
42045
|
}), We(
|
|
42044
42046
|
j(
|
|
42045
42047
|
Et(zt(a, !1), e, y),
|
|
@@ -42087,7 +42089,7 @@ const iq = kx(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
42087
42089
|
), { deviation: e };
|
|
42088
42090
|
},
|
|
42089
42091
|
nt(Kt, Ec, ga, hn, Ss, mm)
|
|
42090
|
-
),
|
|
42092
|
+
), uq = Ve(
|
|
42091
42093
|
([
|
|
42092
42094
|
e,
|
|
42093
42095
|
t,
|
|
@@ -42115,12 +42117,12 @@ const iq = kx(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
42115
42117
|
}),
|
|
42116
42118
|
nt(
|
|
42117
42119
|
gm,
|
|
42118
|
-
|
|
42120
|
+
nq,
|
|
42119
42121
|
Ps,
|
|
42120
42122
|
Ex,
|
|
42121
42123
|
xx,
|
|
42122
|
-
|
|
42123
|
-
|
|
42124
|
+
sq,
|
|
42125
|
+
JW,
|
|
42124
42126
|
xm,
|
|
42125
42127
|
vx,
|
|
42126
42128
|
Ss,
|
|
@@ -42202,17 +42204,17 @@ const iq = kx(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
42202
42204
|
hn,
|
|
42203
42205
|
vc,
|
|
42204
42206
|
Kt,
|
|
42205
|
-
|
|
42206
|
-
|
|
42207
|
+
aq,
|
|
42208
|
+
rq,
|
|
42207
42209
|
ga,
|
|
42208
42210
|
wc,
|
|
42209
|
-
|
|
42210
|
-
|
|
42211
|
+
lq,
|
|
42212
|
+
iq,
|
|
42211
42213
|
hx,
|
|
42212
|
-
|
|
42214
|
+
uq
|
|
42213
42215
|
)
|
|
42214
42216
|
);
|
|
42215
|
-
function
|
|
42217
|
+
function dq(e, t) {
|
|
42216
42218
|
const r = {}, n = {};
|
|
42217
42219
|
let s = 0;
|
|
42218
42220
|
const a = e.length;
|
|
@@ -42245,10 +42247,10 @@ function Tx(e, t, r) {
|
|
|
42245
42247
|
}, v), {});
|
|
42246
42248
|
}
|
|
42247
42249
|
function u(E) {
|
|
42248
|
-
return o.reduce((v, w) => (v[w] =
|
|
42250
|
+
return o.reduce((v, w) => (v[w] = SW(E[t.events[w]]), v), {});
|
|
42249
42251
|
}
|
|
42250
42252
|
const d = te.forwardRef((E, v) => {
|
|
42251
|
-
const { children: w, ...S } = E, [C] = te.useState(() => qu(
|
|
42253
|
+
const { children: w, ...S } = E, [C] = te.useState(() => qu(IW(e), (T) => {
|
|
42252
42254
|
c(T, S);
|
|
42253
42255
|
})), [O] = te.useState(_1(u, C));
|
|
42254
42256
|
gl(() => {
|
|
@@ -42261,7 +42263,7 @@ function Tx(e, t, r) {
|
|
|
42261
42263
|
c(C, S);
|
|
42262
42264
|
}), te.useImperativeHandle(v, D1(l(C)));
|
|
42263
42265
|
const R = r;
|
|
42264
|
-
return /* @__PURE__ */ _(i.Provider, { value: C, children: r ? /* @__PURE__ */ _(R, { ...
|
|
42266
|
+
return /* @__PURE__ */ _(i.Provider, { value: C, children: r ? /* @__PURE__ */ _(R, { ...dq([...n, ...s, ...o], S), children: w }) : w });
|
|
42265
42267
|
}), f = (E) => {
|
|
42266
42268
|
const v = te.useContext(i);
|
|
42267
42269
|
return te.useCallback(
|
|
@@ -42303,7 +42305,7 @@ const Ax = te.createContext(void 0), Sx = te.createContext(void 0), Px = typeof
|
|
|
42303
42305
|
function Vd(e) {
|
|
42304
42306
|
return "self" in e;
|
|
42305
42307
|
}
|
|
42306
|
-
function
|
|
42308
|
+
function pq(e) {
|
|
42307
42309
|
return "body" in e;
|
|
42308
42310
|
}
|
|
42309
42311
|
function Ix(e, t, r, n = Fo, s, a) {
|
|
@@ -42311,7 +42313,7 @@ function Ix(e, t, r, n = Fo, s, a) {
|
|
|
42311
42313
|
(f) => {
|
|
42312
42314
|
let m, y, g;
|
|
42313
42315
|
const E = f.target;
|
|
42314
|
-
if (
|
|
42316
|
+
if (pq(E) || Vd(E)) {
|
|
42315
42317
|
const w = Vd(E) ? E : E.defaultView;
|
|
42316
42318
|
g = a ? w.scrollX : w.scrollY, m = a ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, y = a ? w.innerWidth : w.innerHeight;
|
|
42317
42319
|
} else
|
|
@@ -42366,7 +42368,7 @@ const Wd = "-webkit-sticky", W1 = "sticky", wm = kx(() => {
|
|
|
42366
42368
|
function vm(e) {
|
|
42367
42369
|
return e;
|
|
42368
42370
|
}
|
|
42369
|
-
const
|
|
42371
|
+
const fq = /* @__PURE__ */ Ve(() => {
|
|
42370
42372
|
const e = q((i) => `Item ${i}`), t = q((i) => `Group ${i}`), r = q({}), n = q(vm), s = q("div"), a = q(Fo), o = (i, c = null) => zt(
|
|
42371
42373
|
j(
|
|
42372
42374
|
r,
|
|
@@ -42392,11 +42394,11 @@ const pq = /* @__PURE__ */ Ve(() => {
|
|
|
42392
42394
|
ScrollSeekPlaceholder: o("ScrollSeekPlaceholder"),
|
|
42393
42395
|
TopItemListComponent: o("TopItemList")
|
|
42394
42396
|
};
|
|
42395
|
-
}),
|
|
42397
|
+
}), mq = /* @__PURE__ */ Ve(
|
|
42396
42398
|
([e, t]) => ({ ...e, ...t }),
|
|
42397
|
-
nt(Cx,
|
|
42398
|
-
),
|
|
42399
|
-
const t = ge("listState"), r = Ir("sizeRanges"), n = ge("useWindowScroll"), s = ge("customScrollParent"), a = Ir("windowScrollContainerState"), o = Ir("scrollContainerState"), i = s || n ? a : o, c = ge("itemContent"), l = ge("context"), u = ge("groupContent"), d = ge("trackItemSizes"), f = ge("itemSize"), m = ge("log"), y = Ir("gap"), g = ge("horizontalDirection"), { callbackRef: E } =
|
|
42399
|
+
nt(Cx, fq)
|
|
42400
|
+
), hq = ({ height: e }) => /* @__PURE__ */ _("div", { style: { height: e } }), bq = { overflowAnchor: "none", position: wm(), zIndex: 1 }, Bx = { overflowAnchor: "none" }, yq = { ...Bx, display: "inline-block", height: "100%" }, q1 = /* @__PURE__ */ te.memo(function({ showTopList: e = !1 }) {
|
|
42401
|
+
const t = ge("listState"), r = Ir("sizeRanges"), n = ge("useWindowScroll"), s = ge("customScrollParent"), a = Ir("windowScrollContainerState"), o = Ir("scrollContainerState"), i = s || n ? a : o, c = ge("itemContent"), l = ge("context"), u = ge("groupContent"), d = ge("trackItemSizes"), f = ge("itemSize"), m = ge("log"), y = Ir("gap"), g = ge("horizontalDirection"), { callbackRef: E } = UW(
|
|
42400
42402
|
r,
|
|
42401
42403
|
f,
|
|
42402
42404
|
d,
|
|
@@ -42410,7 +42412,7 @@ const pq = /* @__PURE__ */ Ve(() => {
|
|
|
42410
42412
|
Em("deviation", (D) => {
|
|
42411
42413
|
v !== D && w(D);
|
|
42412
42414
|
});
|
|
42413
|
-
const S = ge("EmptyPlaceholder"), C = ge("ScrollSeekPlaceholder") ||
|
|
42415
|
+
const S = ge("EmptyPlaceholder"), C = ge("ScrollSeekPlaceholder") || hq, O = ge("ListComponent"), R = ge("ItemComponent"), T = ge("GroupComponent"), h = ge("computeItemKey"), b = ge("isSeeking"), x = ge("groupIndices").length > 0, A = ge("alignToBottom"), I = ge("initialItemFinalLocationReached"), B = e ? {} : {
|
|
42414
42416
|
boxSizing: "border-box",
|
|
42415
42417
|
...g ? {
|
|
42416
42418
|
display: "inline-block",
|
|
@@ -42453,33 +42455,33 @@ const pq = /* @__PURE__ */ Ve(() => {
|
|
|
42453
42455
|
"data-item-index": D.index,
|
|
42454
42456
|
"data-known-size": D.size,
|
|
42455
42457
|
key: P,
|
|
42456
|
-
style:
|
|
42458
|
+
style: bq
|
|
42457
42459
|
},
|
|
42458
42460
|
u(D.index, l)
|
|
42459
42461
|
) : /* @__PURE__ */ _a(
|
|
42460
42462
|
R,
|
|
42461
42463
|
{
|
|
42462
42464
|
...Nt(R, l),
|
|
42463
|
-
...
|
|
42465
|
+
...vq(R, D.data),
|
|
42464
42466
|
"data-index": k,
|
|
42465
42467
|
"data-item-group-index": D.groupIndex,
|
|
42466
42468
|
"data-item-index": D.index,
|
|
42467
42469
|
"data-known-size": D.size,
|
|
42468
42470
|
key: P,
|
|
42469
|
-
style: g ?
|
|
42471
|
+
style: g ? yq : Bx
|
|
42470
42472
|
},
|
|
42471
42473
|
x ? c(D.index, D.groupIndex, D.data, l) : c(D.index, D.data, l)
|
|
42472
42474
|
);
|
|
42473
42475
|
})
|
|
42474
42476
|
}
|
|
42475
42477
|
);
|
|
42476
|
-
}),
|
|
42478
|
+
}), gq = {
|
|
42477
42479
|
height: "100%",
|
|
42478
42480
|
outline: "none",
|
|
42479
42481
|
overflowY: "auto",
|
|
42480
42482
|
position: "relative",
|
|
42481
42483
|
WebkitOverflowScrolling: "touch"
|
|
42482
|
-
},
|
|
42484
|
+
}, xq = {
|
|
42483
42485
|
outline: "none",
|
|
42484
42486
|
overflowX: "auto",
|
|
42485
42487
|
position: "relative"
|
|
@@ -42489,7 +42491,7 @@ const pq = /* @__PURE__ */ Ve(() => {
|
|
|
42489
42491
|
top: 0,
|
|
42490
42492
|
width: "100%",
|
|
42491
42493
|
...e ? { display: "flex", flexDirection: "column" } : {}
|
|
42492
|
-
}),
|
|
42494
|
+
}), wq = {
|
|
42493
42495
|
position: wm(),
|
|
42494
42496
|
top: 0,
|
|
42495
42497
|
width: "100%",
|
|
@@ -42499,10 +42501,10 @@ function Nt(e, t) {
|
|
|
42499
42501
|
if (typeof e != "string")
|
|
42500
42502
|
return { context: t };
|
|
42501
42503
|
}
|
|
42502
|
-
function
|
|
42504
|
+
function vq(e, t) {
|
|
42503
42505
|
return { item: typeof e == "string" ? void 0 : t };
|
|
42504
42506
|
}
|
|
42505
|
-
const
|
|
42507
|
+
const Eq = /* @__PURE__ */ te.memo(function() {
|
|
42506
42508
|
const e = ge("HeaderComponent"), t = Ir("headerHeight"), r = ge("HeaderFooterTag"), n = ya(
|
|
42507
42509
|
te.useMemo(
|
|
42508
42510
|
() => (a) => {
|
|
@@ -42514,7 +42516,7 @@ const vq = /* @__PURE__ */ te.memo(function() {
|
|
|
42514
42516
|
ge("skipAnimationFrameInResizeObserver")
|
|
42515
42517
|
), s = ge("context");
|
|
42516
42518
|
return e ? /* @__PURE__ */ _(r, { ref: n, children: /* @__PURE__ */ _(e, { ...Nt(e, s) }) }) : null;
|
|
42517
|
-
}),
|
|
42519
|
+
}), kq = /* @__PURE__ */ te.memo(function() {
|
|
42518
42520
|
const e = ge("FooterComponent"), t = Ir("footerHeight"), r = ge("HeaderFooterTag"), n = ya(
|
|
42519
42521
|
te.useMemo(
|
|
42520
42522
|
() => (a) => {
|
|
@@ -42543,7 +42545,7 @@ function Fx({ useEmitter: e, useEmitterValue: t, usePublisher: r }) {
|
|
|
42543
42545
|
"data-testid": "virtuoso-scroller",
|
|
42544
42546
|
"data-virtuoso-scroller": !0,
|
|
42545
42547
|
ref: m,
|
|
42546
|
-
style: { ...d ?
|
|
42548
|
+
style: { ...d ? xq : gq, ...s },
|
|
42547
42549
|
tabIndex: 0,
|
|
42548
42550
|
...o,
|
|
42549
42551
|
...Nt(c, a),
|
|
@@ -42579,7 +42581,7 @@ function Ux({ useEmitter: e, useEmitterValue: t, usePublisher: r }) {
|
|
|
42579
42581
|
);
|
|
42580
42582
|
});
|
|
42581
42583
|
}
|
|
42582
|
-
const
|
|
42584
|
+
const Cq = ({ children: e }) => {
|
|
42583
42585
|
const t = te.useContext(Ax), r = Ir("viewportHeight"), n = Ir("fixedItemHeight"), s = ge("alignToBottom"), a = ge("horizontalDirection"), o = te.useMemo(
|
|
42584
42586
|
() => nx(r, (c) => Es(c, a ? "width" : "height")),
|
|
42585
42587
|
[r, a]
|
|
@@ -42587,7 +42589,7 @@ const kq = ({ children: e }) => {
|
|
|
42587
42589
|
return te.useEffect(() => {
|
|
42588
42590
|
t && (r(t.viewportHeight), n(t.itemHeight));
|
|
42589
42591
|
}, [t, r, n]), /* @__PURE__ */ _("div", { "data-viewport-type": "element", ref: i, style: Ku(s), children: e });
|
|
42590
|
-
},
|
|
42592
|
+
}, Tq = ({ children: e }) => {
|
|
42591
42593
|
const t = te.useContext(Ax), r = Ir("windowViewportRect"), n = Ir("fixedItemHeight"), s = ge("customScrollParent"), a = ax(
|
|
42592
42594
|
r,
|
|
42593
42595
|
s,
|
|
@@ -42596,26 +42598,26 @@ const kq = ({ children: e }) => {
|
|
|
42596
42598
|
return te.useEffect(() => {
|
|
42597
42599
|
t && (n(t.itemHeight), r({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
|
|
42598
42600
|
}, [t, r, n]), /* @__PURE__ */ _("div", { "data-viewport-type": "window", ref: a, style: Ku(o), children: e });
|
|
42599
|
-
},
|
|
42600
|
-
const t = ge("TopItemListComponent") || "div", r = ge("headerHeight"), n = { ...
|
|
42601
|
+
}, Aq = ({ children: e }) => {
|
|
42602
|
+
const t = ge("TopItemListComponent") || "div", r = ge("headerHeight"), n = { ...wq, marginTop: `${r}px` }, s = ge("context");
|
|
42601
42603
|
return /* @__PURE__ */ _(t, { style: n, ...Nt(t, s), children: e });
|
|
42602
|
-
},
|
|
42604
|
+
}, Sq = /* @__PURE__ */ te.memo(function(e) {
|
|
42603
42605
|
const t = ge("useWindowScroll"), r = ge("topItemsIndexes").length > 0, n = ge("customScrollParent"), s = ge("context");
|
|
42604
|
-
return /* @__PURE__ */ fe(n || t ?
|
|
42605
|
-
r && /* @__PURE__ */ _(
|
|
42606
|
-
/* @__PURE__ */ fe(n || t ?
|
|
42607
|
-
/* @__PURE__ */ _(
|
|
42606
|
+
return /* @__PURE__ */ fe(n || t ? Bq : Iq, { ...e, context: s, children: [
|
|
42607
|
+
r && /* @__PURE__ */ _(Aq, { children: /* @__PURE__ */ _(q1, { showTopList: !0 }) }),
|
|
42608
|
+
/* @__PURE__ */ fe(n || t ? Tq : Cq, { children: [
|
|
42609
|
+
/* @__PURE__ */ _(Eq, {}),
|
|
42608
42610
|
/* @__PURE__ */ _(q1, {}),
|
|
42609
|
-
/* @__PURE__ */ _(
|
|
42611
|
+
/* @__PURE__ */ _(kq, {})
|
|
42610
42612
|
] })
|
|
42611
42613
|
] });
|
|
42612
42614
|
}), {
|
|
42613
|
-
Component:
|
|
42615
|
+
Component: Pq,
|
|
42614
42616
|
useEmitter: Em,
|
|
42615
42617
|
useEmitterValue: ge,
|
|
42616
42618
|
usePublisher: Ir
|
|
42617
42619
|
} = /* @__PURE__ */ Tx(
|
|
42618
|
-
|
|
42620
|
+
mq,
|
|
42619
42621
|
{
|
|
42620
42622
|
required: {},
|
|
42621
42623
|
optional: {
|
|
@@ -42676,8 +42678,8 @@ const kq = ({ children: e }) => {
|
|
|
42676
42678
|
groupIndices: "groupIndices"
|
|
42677
42679
|
}
|
|
42678
42680
|
},
|
|
42679
|
-
|
|
42680
|
-
),
|
|
42681
|
+
Sq
|
|
42682
|
+
), Iq = /* @__PURE__ */ Fx({ useEmitter: Em, useEmitterValue: ge, usePublisher: Ir }), Bq = /* @__PURE__ */ Ux({ useEmitter: Em, useEmitterValue: ge, usePublisher: Ir }), Fq = Pq, Uq = /* @__PURE__ */ Ve(() => {
|
|
42681
42683
|
const e = q((l) => /* @__PURE__ */ fe("td", { children: [
|
|
42682
42684
|
"Item $",
|
|
42683
42685
|
l
|
|
@@ -42713,7 +42715,7 @@ const kq = ({ children: e }) => {
|
|
|
42713
42715
|
GroupComponent: c("Group", "tr")
|
|
42714
42716
|
};
|
|
42715
42717
|
});
|
|
42716
|
-
nt(Cx,
|
|
42718
|
+
nt(Cx, Uq);
|
|
42717
42719
|
wm();
|
|
42718
42720
|
const Y1 = {
|
|
42719
42721
|
bottom: 0,
|
|
@@ -42723,7 +42725,7 @@ const Y1 = {
|
|
|
42723
42725
|
offsetBottom: 0,
|
|
42724
42726
|
offsetTop: 0,
|
|
42725
42727
|
top: 0
|
|
42726
|
-
},
|
|
42728
|
+
}, Oq = {
|
|
42727
42729
|
bottom: 0,
|
|
42728
42730
|
itemHeight: 0,
|
|
42729
42731
|
items: [{ index: 0 }],
|
|
@@ -42735,19 +42737,19 @@ const Y1 = {
|
|
|
42735
42737
|
function X1(e, t, r) {
|
|
42736
42738
|
return Array.from({ length: t - e + 1 }).map((n, s) => ({ data: r === null ? null : r[s + e], index: s + e }));
|
|
42737
42739
|
}
|
|
42738
|
-
function
|
|
42740
|
+
function Dq(e) {
|
|
42739
42741
|
return {
|
|
42740
|
-
...
|
|
42742
|
+
...Oq,
|
|
42741
42743
|
items: e
|
|
42742
42744
|
};
|
|
42743
42745
|
}
|
|
42744
42746
|
function xl(e, t) {
|
|
42745
42747
|
return e && e.width === t.width && e.height === t.height;
|
|
42746
42748
|
}
|
|
42747
|
-
function
|
|
42749
|
+
function _q(e, t) {
|
|
42748
42750
|
return e && e.column === t.column && e.row === t.row;
|
|
42749
42751
|
}
|
|
42750
|
-
const
|
|
42752
|
+
const Mq = /* @__PURE__ */ Ve(
|
|
42751
42753
|
([
|
|
42752
42754
|
{ increaseViewportBy: e, listBoundary: t, overscan: r, visibleRange: n },
|
|
42753
42755
|
{ footerHeight: s, headerHeight: a, scrollBy: o, scrollContainerState: i, scrollTo: c, scrollTop: l, smoothScrollTargetReached: u, viewportHeight: d },
|
|
@@ -42824,7 +42826,7 @@ const _q = /* @__PURE__ */ Ve(
|
|
|
42824
42826
|
Et(
|
|
42825
42827
|
me(R),
|
|
42826
42828
|
n,
|
|
42827
|
-
me(k,
|
|
42829
|
+
me(k, _q),
|
|
42828
42830
|
me(x, xl),
|
|
42829
42831
|
me(b, xl),
|
|
42830
42832
|
me(D),
|
|
@@ -42852,7 +42854,7 @@ const _q = /* @__PURE__ */ Ve(
|
|
|
42852
42854
|
return Y1;
|
|
42853
42855
|
if (Zu === 0) {
|
|
42854
42856
|
const Om = ym(Ye, K), jx = Om + Math.max(ye - 1, 0);
|
|
42855
|
-
return
|
|
42857
|
+
return Dq(X1(Om, jx, we));
|
|
42856
42858
|
}
|
|
42857
42859
|
const Tc = Ox(Pm, Zu, Je);
|
|
42858
42860
|
let va, Is;
|
|
@@ -43008,7 +43010,7 @@ function bf(e, t, r, n) {
|
|
|
43008
43010
|
const s = Ox(e.width, r.width, t.column), a = Kl(n / s), o = a * r.height + ri(0, a - 1) * t.row;
|
|
43009
43011
|
return o > 0 ? o + t.row : o;
|
|
43010
43012
|
}
|
|
43011
|
-
const
|
|
43013
|
+
const Rq = /* @__PURE__ */ Ve(() => {
|
|
43012
43014
|
const e = q((d) => `Item ${d}`), t = q({}), r = q(null), n = q("virtuoso-grid-item"), s = q("virtuoso-grid-list"), a = q(vm), o = q("div"), i = q(Fo), c = (d, f = null) => zt(
|
|
43013
43015
|
j(
|
|
43014
43016
|
t,
|
|
@@ -43035,10 +43037,10 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43035
43037
|
scrollerRef: i,
|
|
43036
43038
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
43037
43039
|
};
|
|
43038
|
-
}),
|
|
43040
|
+
}), Nq = /* @__PURE__ */ Ve(
|
|
43039
43041
|
([e, t]) => ({ ...e, ...t }),
|
|
43040
|
-
nt(
|
|
43041
|
-
),
|
|
43042
|
+
nt(Mq, Rq)
|
|
43043
|
+
), zq = /* @__PURE__ */ te.memo(function() {
|
|
43042
43044
|
const e = ot("gridState"), t = ot("listClassName"), r = ot("itemClassName"), n = ot("itemContent"), s = ot("computeItemKey"), a = ot("isSeeking"), o = Br("scrollHeight"), i = ot("ItemComponent"), c = ot("ListComponent"), l = ot("ScrollSeekPlaceholder"), u = ot("context"), d = Br("itemDimensions"), f = Br("gap"), m = ot("log"), y = ot("stateRestoreInProgress"), g = Br("reportReadyState"), E = ya(
|
|
43043
43045
|
te.useMemo(
|
|
43044
43046
|
() => (v) => {
|
|
@@ -43093,7 +43095,7 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43093
43095
|
})
|
|
43094
43096
|
}
|
|
43095
43097
|
);
|
|
43096
|
-
}),
|
|
43098
|
+
}), Lq = te.memo(function() {
|
|
43097
43099
|
const e = ot("HeaderComponent"), t = Br("headerHeight"), r = ot("headerFooterTag"), n = ya(
|
|
43098
43100
|
te.useMemo(
|
|
43099
43101
|
() => (a) => {
|
|
@@ -43105,7 +43107,7 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43105
43107
|
!1
|
|
43106
43108
|
), s = ot("context");
|
|
43107
43109
|
return e ? /* @__PURE__ */ _(r, { ref: n, children: /* @__PURE__ */ _(e, { ...Nt(e, s) }) }) : null;
|
|
43108
|
-
}),
|
|
43110
|
+
}), $q = te.memo(function() {
|
|
43109
43111
|
const e = ot("FooterComponent"), t = Br("footerHeight"), r = ot("headerFooterTag"), n = ya(
|
|
43110
43112
|
te.useMemo(
|
|
43111
43113
|
() => (a) => {
|
|
@@ -43117,7 +43119,7 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43117
43119
|
!1
|
|
43118
43120
|
), s = ot("context");
|
|
43119
43121
|
return e ? /* @__PURE__ */ _(r, { ref: n, children: /* @__PURE__ */ _(e, { ...Nt(e, s) }) }) : null;
|
|
43120
|
-
}),
|
|
43122
|
+
}), Hq = ({ children: e }) => {
|
|
43121
43123
|
const t = te.useContext(Sx), r = Br("itemDimensions"), n = Br("viewportDimensions"), s = ya(
|
|
43122
43124
|
te.useMemo(
|
|
43123
43125
|
() => (a) => {
|
|
@@ -43131,24 +43133,24 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43131
43133
|
return te.useEffect(() => {
|
|
43132
43134
|
t && (n({ height: t.viewportHeight, width: t.viewportWidth }), r({ height: t.itemHeight, width: t.itemWidth }));
|
|
43133
43135
|
}, [t, n, r]), /* @__PURE__ */ _("div", { ref: s, style: Ku(!1), children: e });
|
|
43134
|
-
},
|
|
43136
|
+
}, Gq = ({ children: e }) => {
|
|
43135
43137
|
const t = te.useContext(Sx), r = Br("windowViewportRect"), n = Br("itemDimensions"), s = ot("customScrollParent"), a = ax(r, s, !1);
|
|
43136
43138
|
return te.useEffect(() => {
|
|
43137
43139
|
t && (n({ height: t.itemHeight, width: t.itemWidth }), r({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
43138
43140
|
}, [t, r, n]), /* @__PURE__ */ _("div", { ref: a, style: Ku(!1), children: e });
|
|
43139
|
-
},
|
|
43140
|
-
const t = ot("useWindowScroll"), r = ot("customScrollParent"), n = r || t ?
|
|
43141
|
+
}, jq = /* @__PURE__ */ te.memo(function({ ...e }) {
|
|
43142
|
+
const t = ot("useWindowScroll"), r = ot("customScrollParent"), n = r || t ? Wq : Vq, s = r || t ? Gq : Hq, a = ot("context");
|
|
43141
43143
|
return /* @__PURE__ */ _(n, { ...e, ...Nt(n, a), children: /* @__PURE__ */ fe(s, { children: [
|
|
43144
|
+
/* @__PURE__ */ _(Lq, {}),
|
|
43142
43145
|
/* @__PURE__ */ _(zq, {}),
|
|
43143
|
-
/* @__PURE__ */ _(
|
|
43144
|
-
/* @__PURE__ */ _(Lq, {})
|
|
43146
|
+
/* @__PURE__ */ _($q, {})
|
|
43145
43147
|
] }) });
|
|
43146
43148
|
}), {
|
|
43147
43149
|
useEmitter: Dx,
|
|
43148
43150
|
useEmitterValue: ot,
|
|
43149
43151
|
usePublisher: Br
|
|
43150
43152
|
} = /* @__PURE__ */ Tx(
|
|
43151
|
-
|
|
43153
|
+
Nq,
|
|
43152
43154
|
{
|
|
43153
43155
|
optional: {
|
|
43154
43156
|
context: "context",
|
|
@@ -43187,13 +43189,13 @@ const Mq = /* @__PURE__ */ Ve(() => {
|
|
|
43187
43189
|
readyStateChanged: "readyStateChanged"
|
|
43188
43190
|
}
|
|
43189
43191
|
},
|
|
43190
|
-
|
|
43191
|
-
),
|
|
43192
|
+
jq
|
|
43193
|
+
), Vq = /* @__PURE__ */ Fx({ useEmitter: Dx, useEmitterValue: ot, usePublisher: Br }), Wq = /* @__PURE__ */ Ux({ useEmitter: Dx, useEmitterValue: ot, usePublisher: Br });
|
|
43192
43194
|
function J1(e, t, r) {
|
|
43193
43195
|
return t !== "normal" && !(t != null && t.endsWith("px")) && r(`${e} was not resolved to pixel value correctly`, t, ar.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
43194
43196
|
}
|
|
43195
43197
|
var Yd = {}, eb;
|
|
43196
|
-
function
|
|
43198
|
+
function qq() {
|
|
43197
43199
|
if (eb) return Yd;
|
|
43198
43200
|
eb = 1;
|
|
43199
43201
|
var e = Fu.GenIcon;
|
|
@@ -43201,22 +43203,22 @@ function Wq() {
|
|
|
43201
43203
|
return e({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z" } }] })(r);
|
|
43202
43204
|
}, Yd;
|
|
43203
43205
|
}
|
|
43204
|
-
var
|
|
43205
|
-
function
|
|
43206
|
+
var Yq = /* @__PURE__ */ qq();
|
|
43207
|
+
function Kq({ logo: e, className: t = "", style: r = {}, alt: n = "Token logo" }) {
|
|
43206
43208
|
const [s, a] = yf(!1);
|
|
43207
43209
|
return rs(() => {
|
|
43208
43210
|
a(!1);
|
|
43209
|
-
}, [e]), e && !s ? /* @__PURE__ */ _("img", { alt: n, style: r, onError: () => a(!0), className: `twap-token-logo ${t}`, src: e }) : /* @__PURE__ */ _(
|
|
43211
|
+
}, [e]), e && !s ? /* @__PURE__ */ _("img", { alt: n, style: r, onError: () => a(!0), className: `twap-token-logo ${t}`, src: e }) : /* @__PURE__ */ _(Yq.AiFillQuestionCircle, { style: { width: 20, height: 20 }, className: "twap-token-svg" });
|
|
43210
43212
|
}
|
|
43211
|
-
const
|
|
43213
|
+
const Zq = () => /* @__PURE__ */ _("div", { className: "twap-orders__loader", children: /* @__PURE__ */ _("p", { children: "Loading..." }) }), Xq = () => {
|
|
43212
43214
|
const { isLoading: e } = Vu(), t = Z2(), r = Y((a) => a.state.orderIdsToCancel), n = Y((a) => a.state.cancelOrdersMode), s = X2();
|
|
43213
|
-
return /* @__PURE__ */ _(mo, { children: e ? /* @__PURE__ */ _(
|
|
43214
|
-
|
|
43215
|
+
return /* @__PURE__ */ _(mo, { children: e ? /* @__PURE__ */ _(Zq, {}) : t != null && t.length ? /* @__PURE__ */ _("div", { className: `twap-orders__list ${n ? "twap-orders__list-select-mode" : ""}`, children: /* @__PURE__ */ _(
|
|
43216
|
+
Fq,
|
|
43215
43217
|
{
|
|
43216
43218
|
style: { height: "100%" },
|
|
43217
43219
|
data: t,
|
|
43218
43220
|
itemContent: (a, o) => /* @__PURE__ */ _(
|
|
43219
|
-
|
|
43221
|
+
Qq,
|
|
43220
43222
|
{
|
|
43221
43223
|
cancelOrdersMode: !!n,
|
|
43222
43224
|
selected: (r == null ? void 0 : r.includes(o.id)) || !1,
|
|
@@ -43226,11 +43228,11 @@ const Kq = () => /* @__PURE__ */ _("div", { className: "twap-orders__loader", ch
|
|
|
43226
43228
|
a
|
|
43227
43229
|
)
|
|
43228
43230
|
}
|
|
43229
|
-
) }) : /* @__PURE__ */ _(
|
|
43230
|
-
},
|
|
43231
|
-
const s = Y((i) => i.updateState), a =
|
|
43231
|
+
) }) : /* @__PURE__ */ _(Jq, {}) });
|
|
43232
|
+
}, Qq = ({ order: e, selectOrder: t, selected: r, cancelOrdersMode: n }) => {
|
|
43233
|
+
const s = Y((i) => i.updateState), a = vt.useCallback(() => {
|
|
43232
43234
|
s({ selectedOrderID: e == null ? void 0 : e.id });
|
|
43233
|
-
}, [s, e == null ? void 0 : e.id]), o =
|
|
43235
|
+
}, [s, e == null ? void 0 : e.id]), o = vt.useCallback(() => {
|
|
43234
43236
|
n ? t(e == null ? void 0 : e.id) : a();
|
|
43235
43237
|
}, [n, t, a, e == null ? void 0 : e.id]);
|
|
43236
43238
|
return /* @__PURE__ */ _(
|
|
@@ -43239,20 +43241,20 @@ const Kq = () => /* @__PURE__ */ _("div", { className: "twap-orders__loader", ch
|
|
|
43239
43241
|
className: `twap-orders__list-item twap-orders__list-item-${e.status} ${n ? "twap-orders__list-item-select-mode" : ""} ${r ? "twap-orders__list-item-selected" : ""}`,
|
|
43240
43242
|
onClick: o,
|
|
43241
43243
|
children: /* @__PURE__ */ fe("div", { className: "twap-orders__list-item-content", children: [
|
|
43242
|
-
/* @__PURE__ */ _(
|
|
43243
|
-
/* @__PURE__ */ _(
|
|
43244
|
+
/* @__PURE__ */ _(eY, { order: e }),
|
|
43245
|
+
/* @__PURE__ */ _(tY, { value: e.progress || 0 }),
|
|
43244
43246
|
/* @__PURE__ */ fe("div", { className: "twap-orders__list-item-tokens", children: [
|
|
43245
43247
|
/* @__PURE__ */ _(tb, { address: e.srcTokenAddress }),
|
|
43246
|
-
/* @__PURE__ */ _(
|
|
43248
|
+
/* @__PURE__ */ _(vW.HiArrowRight, { className: "twap-orders__list-item-tokens-arrow" }),
|
|
43247
43249
|
/* @__PURE__ */ _(tb, { address: e.dstTokenAddress })
|
|
43248
43250
|
] })
|
|
43249
43251
|
] })
|
|
43250
43252
|
}
|
|
43251
43253
|
);
|
|
43252
|
-
},
|
|
43253
|
-
const e = Y((n) => n.state.orderHistoryStatusFilter), t =
|
|
43254
|
+
}, Jq = () => {
|
|
43255
|
+
const e = Y((n) => n.state.orderHistoryStatusFilter), t = Re(), r = vt.useMemo(() => e || "", [e]);
|
|
43254
43256
|
return /* @__PURE__ */ _("div", { className: "twap-orders__list-empty", children: /* @__PURE__ */ _("p", { children: t("noOrders", { status: r }) }) });
|
|
43255
|
-
},
|
|
43257
|
+
}, eY = ({ order: e }) => {
|
|
43256
43258
|
const t = e && e.status, r = K2(e), n = im(e.createdAt);
|
|
43257
43259
|
return /* @__PURE__ */ fe("div", { className: "twap-orders__list-item-header", children: [
|
|
43258
43260
|
/* @__PURE__ */ fe("p", { className: "twap-orders__list-item-header-title", children: [
|
|
@@ -43265,21 +43267,21 @@ const Kq = () => /* @__PURE__ */ _("div", { className: "twap-orders__loader", ch
|
|
|
43265
43267
|
}, tb = (e) => {
|
|
43266
43268
|
const { useToken: t, components: r } = ne(), n = t == null ? void 0 : t(e.address);
|
|
43267
43269
|
return /* @__PURE__ */ _("div", { className: "twap-orders__list-item-token", children: n ? /* @__PURE__ */ fe(mo, { children: [
|
|
43268
|
-
/* @__PURE__ */ _("div", { className: "twap-orders__list-item-token-logo", children: r.TokenLogo ? /* @__PURE__ */ _(r.TokenLogo, { token: n }) : /* @__PURE__ */ _(
|
|
43270
|
+
/* @__PURE__ */ _("div", { className: "twap-orders__list-item-token-logo", children: r.TokenLogo ? /* @__PURE__ */ _(r.TokenLogo, { token: n }) : /* @__PURE__ */ _(Kq, { logo: n == null ? void 0 : n.logoUrl }) }),
|
|
43269
43271
|
/* @__PURE__ */ _("p", { className: "twap-orders__list-item-token-symbol", children: n == null ? void 0 : n.symbol })
|
|
43270
43272
|
] }) : /* @__PURE__ */ _("div", {}) });
|
|
43271
43273
|
};
|
|
43272
|
-
function
|
|
43274
|
+
function tY(e) {
|
|
43273
43275
|
return /* @__PURE__ */ fe("div", { className: "twap-orders__list-item-progress", children: [
|
|
43274
43276
|
/* @__PURE__ */ _("div", { className: "twap-orders__list-item-progress-bar", children: /* @__PURE__ */ _("div", { className: "twap-orders__list-item-progress-bar-filled", style: { width: `${e.value}%` } }) }),
|
|
43275
43277
|
/* @__PURE__ */ _("div", { className: "twap-orders__list-item-token-progress-label", children: /* @__PURE__ */ _("p", { children: `${Math.round(e.value)}%` }) })
|
|
43276
43278
|
] });
|
|
43277
43279
|
}
|
|
43278
|
-
const
|
|
43280
|
+
const rY = () => {
|
|
43279
43281
|
const e = Y((r) => r.state.selectedOrderID);
|
|
43280
|
-
return /* @__PURE__ */ _("div", { className: `twap-orders ${e !== void 0 ? "twap-orders__show-selected" : ""}`, children: e !== void 0 ? /* @__PURE__ */ _(
|
|
43281
|
-
},
|
|
43282
|
-
const t =
|
|
43282
|
+
return /* @__PURE__ */ _("div", { className: `twap-orders ${e !== void 0 ? "twap-orders__show-selected" : ""}`, children: e !== void 0 ? /* @__PURE__ */ _(eW, {}) : /* @__PURE__ */ _(Xq, {}) });
|
|
43283
|
+
}, nY = (e) => {
|
|
43284
|
+
const t = Re(), { marketPrice: r } = ne(), n = Y((a) => a.state.typedSrcAmount);
|
|
43283
43285
|
return ee(() => {
|
|
43284
43286
|
const { isError: a, value: o } = bw(e);
|
|
43285
43287
|
if (!(!a || H(n || "0").isZero() || !r))
|
|
@@ -43290,15 +43292,15 @@ const tY = () => {
|
|
|
43290
43292
|
};
|
|
43291
43293
|
}, [e, t, n, r]);
|
|
43292
43294
|
}, xa = () => {
|
|
43293
|
-
const e = Y((s) => s.state.typedFillDelay), t = Y((s) => s.updateState), r = ee(() => e || Xd, [e]), n =
|
|
43295
|
+
const e = Y((s) => s.state.typedFillDelay), t = Y((s) => s.updateState), r = ee(() => e || Xd, [e]), n = nY(r);
|
|
43294
43296
|
return {
|
|
43295
43297
|
fillDelay: r,
|
|
43296
43298
|
onChange: Fe((s) => t({ typedFillDelay: s }), [t]),
|
|
43297
43299
|
error: n,
|
|
43298
43300
|
milliseconds: r.unit * r.value
|
|
43299
43301
|
};
|
|
43300
|
-
},
|
|
43301
|
-
const { onChange: e, fillDelay: t, error: r } = xa(), n =
|
|
43302
|
+
}, PK = () => {
|
|
43303
|
+
const { onChange: e, fillDelay: t, error: r } = xa(), n = Re(), s = Fe((o) => e({ unit: t.unit, value: Number(o) }), [e, t]), a = Fe((o) => e({ unit: o, value: t.value }), [e, t]);
|
|
43302
43304
|
return {
|
|
43303
43305
|
onInputChange: s,
|
|
43304
43306
|
onUnitSelect: a,
|
|
@@ -43310,14 +43312,14 @@ const tY = () => {
|
|
|
43310
43312
|
tooltip: n("tradeIntervalTootlip")
|
|
43311
43313
|
};
|
|
43312
43314
|
}, bn = () => {
|
|
43313
|
-
const { srcToken: e } = ne(), t =
|
|
43315
|
+
const { srcToken: e } = ne(), t = Re(), r = Y((a) => a.state.typedSrcAmount), s = Y((a) => a.state.acceptedSrcAmount) || r;
|
|
43314
43316
|
return {
|
|
43315
43317
|
amountWei: Y2(e == null ? void 0 : e.decimals, s),
|
|
43316
43318
|
amountUI: s,
|
|
43317
43319
|
error: H(s || 0).isZero() ? t("enterAmount") : void 0
|
|
43318
43320
|
};
|
|
43319
|
-
},
|
|
43320
|
-
const { module: r, srcUsd1Token: n, marketPrice: s, minChunkSizeUsd: a } = ne(), o =
|
|
43321
|
+
}, sY = (e, t) => {
|
|
43322
|
+
const { module: r, srcUsd1Token: n, marketPrice: s, minChunkSizeUsd: a } = ne(), o = Re(), i = Y((c) => c.state.typedSrcAmount);
|
|
43321
43323
|
return ee(() => {
|
|
43322
43324
|
if (H(i || "0").isZero() || !s) return;
|
|
43323
43325
|
if (!e)
|
|
@@ -43358,10 +43360,10 @@ const tY = () => {
|
|
|
43358
43360
|
amountPerTradeWei: f,
|
|
43359
43361
|
amountPerTradeUsd: y,
|
|
43360
43362
|
onChange: d,
|
|
43361
|
-
error:
|
|
43363
|
+
error: sY(u, l)
|
|
43362
43364
|
};
|
|
43363
|
-
},
|
|
43364
|
-
const { srcToken: e, dstToken: t } = ne(), r =
|
|
43365
|
+
}, IK = () => {
|
|
43366
|
+
const { srcToken: e, dstToken: t } = ne(), r = Re(), { onChange: n, totalTrades: s, amountPerTradeUsd: a, amountPerTradeUI: o, error: i, maxTrades: c, amountPerTradeWei: l } = Kn(), u = He({ value: o }), d = He({ value: a });
|
|
43365
43367
|
return {
|
|
43366
43368
|
error: i,
|
|
43367
43369
|
maxTrades: c,
|
|
@@ -43375,8 +43377,8 @@ const tY = () => {
|
|
|
43375
43377
|
fromToken: e,
|
|
43376
43378
|
toToken: t
|
|
43377
43379
|
};
|
|
43378
|
-
},
|
|
43379
|
-
const { module: t, marketPrice: r } = ne(), n =
|
|
43380
|
+
}, aY = (e) => {
|
|
43381
|
+
const { module: t, marketPrice: r } = ne(), n = Re();
|
|
43380
43382
|
return ee(() => {
|
|
43381
43383
|
const s = mw(t, e), a = hw(e);
|
|
43382
43384
|
if (r) {
|
|
@@ -43395,14 +43397,14 @@ const tY = () => {
|
|
|
43395
43397
|
}
|
|
43396
43398
|
}, [e, n, t, r]);
|
|
43397
43399
|
}, km = () => {
|
|
43398
|
-
const { module: e } = ne(), t = Y((i) => i.state.typedDuration), r = Y((i) => i.updateState), n = Kn().totalTrades, s = xa().fillDelay, a = ee(() => aw(e, n, s, t), [n, s, t, e]), o =
|
|
43400
|
+
const { module: e } = ne(), t = Y((i) => i.state.typedDuration), r = Y((i) => i.updateState), n = Kn().totalTrades, s = xa().fillDelay, a = ee(() => aw(e, n, s, t), [n, s, t, e]), o = aY(a);
|
|
43399
43401
|
return {
|
|
43400
43402
|
duration: a,
|
|
43401
43403
|
setDuration: Fe((i) => r({ typedDuration: i }), [r]),
|
|
43402
43404
|
error: o
|
|
43403
43405
|
};
|
|
43404
|
-
},
|
|
43405
|
-
const { module: e } = ne(), t =
|
|
43406
|
+
}, BK = () => {
|
|
43407
|
+
const { module: e } = ne(), t = Re(), { duration: r, setDuration: n, error: s } = km(), a = Fe(
|
|
43406
43408
|
(c) => {
|
|
43407
43409
|
n({ unit: r.unit, value: Number(c) });
|
|
43408
43410
|
},
|
|
@@ -43423,8 +43425,8 @@ const tY = () => {
|
|
|
43423
43425
|
tooltip: i,
|
|
43424
43426
|
error: s
|
|
43425
43427
|
};
|
|
43426
|
-
},
|
|
43427
|
-
const e = Y((a) => a.state.isMarketOrder), { module: t } = ne(), r =
|
|
43428
|
+
}, FK = () => {
|
|
43429
|
+
const e = Y((a) => a.state.isMarketOrder), { module: t } = ne(), r = Re(), n = ee(() => {
|
|
43428
43430
|
if (e && !(t !== ke.STOP_LOSS && t !== ke.TAKE_PROFIT))
|
|
43429
43431
|
return {
|
|
43430
43432
|
text: r("triggerMarketPriceDisclaimer"),
|
|
@@ -43507,14 +43509,14 @@ const tY = () => {
|
|
|
43507
43509
|
isInverted: c,
|
|
43508
43510
|
usd: H(y).isNaN() ? "" : y
|
|
43509
43511
|
};
|
|
43510
|
-
},
|
|
43512
|
+
}, oY = () => {
|
|
43511
43513
|
const { module: e } = ne();
|
|
43512
43514
|
return ee(() => e === ke.STOP_LOSS ? Y5 : K5, [e]);
|
|
43513
43515
|
}, Tm = () => {
|
|
43514
43516
|
const { module: e } = ne(), t = Y((r) => r.state.isMarketOrder);
|
|
43515
43517
|
return ee(() => e !== ke.STOP_LOSS && e !== ke.TAKE_PROFIT || t ? void 0 : e === ke.STOP_LOSS ? Z5 : X5, [e, t]);
|
|
43516
|
-
},
|
|
43517
|
-
const { module: t, marketPrice: r } = ne(), n =
|
|
43518
|
+
}, iY = (e = "") => {
|
|
43519
|
+
const { module: t, marketPrice: r } = ne(), n = Re(), s = Y((a) => a.state.typedSrcAmount);
|
|
43518
43520
|
return ee(() => {
|
|
43519
43521
|
if (H(s || "0").isZero() || !r || t !== ke.STOP_LOSS && t !== ke.TAKE_PROFIT) return;
|
|
43520
43522
|
const a = uw(r || "", e || "", t);
|
|
@@ -43538,14 +43540,14 @@ const tY = () => {
|
|
|
43538
43540
|
message: n("emptyTriggerPrice") || ""
|
|
43539
43541
|
};
|
|
43540
43542
|
}, [r, e, t, n, s]);
|
|
43541
|
-
},
|
|
43543
|
+
}, cY = (e) => {
|
|
43542
43544
|
const { srcToken: t, dstToken: r, module: n } = ne(), s = Kn().amountPerTradeWei, a = Y((i) => i.state.isMarketOrder), o = ee(() => sw(n, s, e, (t == null ? void 0 : t.decimals) || 0), [e, s, a, t == null ? void 0 : t.decimals, n]);
|
|
43543
43545
|
return {
|
|
43544
43546
|
amountWei: o,
|
|
43545
43547
|
amountUI: Nr((r == null ? void 0 : r.decimals) || 0, o)
|
|
43546
43548
|
};
|
|
43547
43549
|
}, wa = () => {
|
|
43548
|
-
const { dstToken: e, marketPrice: t, module: r } = ne(), n = Y((m) => m.updateState), s =
|
|
43550
|
+
const { dstToken: e, marketPrice: t, module: r } = ne(), n = Y((m) => m.updateState), s = oY(), a = Y((m) => m.state.triggerPricePercent), o = Fe(
|
|
43549
43551
|
(m) => {
|
|
43550
43552
|
n({ triggerPricePercent: m });
|
|
43551
43553
|
},
|
|
@@ -43557,15 +43559,15 @@ const tY = () => {
|
|
|
43557
43559
|
initialPrice: c ? t : void 0,
|
|
43558
43560
|
setValue: Fe((m) => n({ typedTriggerPrice: m }), [n]),
|
|
43559
43561
|
setPercentage: o
|
|
43560
|
-
}), u =
|
|
43562
|
+
}), u = iY(l.amountWei), { amountWei: d, amountUI: f } = cY(l.amountWei);
|
|
43561
43563
|
return ee(() => ({
|
|
43562
43564
|
...l,
|
|
43563
43565
|
error: u,
|
|
43564
43566
|
pricePerChunkWei: d,
|
|
43565
43567
|
pricePerChunkUI: f
|
|
43566
43568
|
}), [l, u, d, f]);
|
|
43567
|
-
},
|
|
43568
|
-
const { module: e, marketPrice: t, marketPriceLoading: r } = ne(), n =
|
|
43569
|
+
}, UK = () => {
|
|
43570
|
+
const { module: e, marketPrice: t, marketPriceLoading: r } = ne(), n = Re(), { amountUI: s, onChange: a, onPercentageChange: o, usd: i, selectedPercentage: c, error: l } = wa(), u = Y((w) => w.state.isMarketOrder), d = Y((w) => w.updateState), { isInverted: f, onInvert: m, fromToken: y, toToken: g } = Cm(), E = Fe(() => {
|
|
43569
43571
|
d({ triggerPricePercent: void 0, typedTriggerPrice: void 0 });
|
|
43570
43572
|
}, [d]), v = e !== ke.STOP_LOSS && e !== ke.TAKE_PROFIT;
|
|
43571
43573
|
return {
|
|
@@ -43587,8 +43589,8 @@ const tY = () => {
|
|
|
43587
43589
|
hide: v,
|
|
43588
43590
|
onInvert: m
|
|
43589
43591
|
};
|
|
43590
|
-
},
|
|
43591
|
-
const { module: t, marketPrice: r } = ne(), n =
|
|
43592
|
+
}, lY = (e) => {
|
|
43593
|
+
const { module: t, marketPrice: r } = ne(), n = Re(), { amountWei: s } = wa(), a = Y((i) => i.state.isMarketOrder), o = Y((i) => i.state.typedSrcAmount);
|
|
43592
43594
|
return ee(() => {
|
|
43593
43595
|
if (H(o || "0").isZero() || !s || !r) return;
|
|
43594
43596
|
const i = pw(s, e, a, t), c = fw(s, e, a, t);
|
|
@@ -43624,12 +43626,12 @@ const tY = () => {
|
|
|
43624
43626
|
},
|
|
43625
43627
|
[n, r]
|
|
43626
43628
|
)
|
|
43627
|
-
}), c =
|
|
43629
|
+
}), c = lY(i.amountWei);
|
|
43628
43630
|
return ee(() => ({
|
|
43629
43631
|
...i,
|
|
43630
43632
|
error: c
|
|
43631
43633
|
}), [i, c]);
|
|
43632
|
-
},
|
|
43634
|
+
}, uY = () => {
|
|
43633
43635
|
const { module: e } = ne(), t = Y((i) => i.updateState), r = Y((i) => i.state.isMarketOrder), n = Tm(), s = Y((i) => i.state.triggerPricePercent) || 0, a = e === ke.LIMIT, o = Fe(() => {
|
|
43634
43636
|
!r && e === ke.STOP_LOSS && t({ limitPricePercent: n }), t({ isMarketOrder: !r });
|
|
43635
43637
|
}, [t, s, e, r, n]);
|
|
@@ -43638,8 +43640,8 @@ const tY = () => {
|
|
|
43638
43640
|
toggleLimitPrice: o,
|
|
43639
43641
|
hide: a
|
|
43640
43642
|
};
|
|
43641
|
-
},
|
|
43642
|
-
const { module: e, marketPriceLoading: t } = ne(), r =
|
|
43643
|
+
}, OK = () => {
|
|
43644
|
+
const { module: e, marketPriceLoading: t } = ne(), r = Re(), { amountUI: n, onChange: s, onPercentageChange: a, usd: o, selectedPercentage: i, error: c } = kc(), l = Y((R) => R.state.isMarketOrder), u = Y((R) => R.updateState), d = Tm(), { isLimitPrice: f, toggleLimitPrice: m } = uY(), { triggerPricePercent: y } = Y((R) => R.state), { isInverted: g, onInvert: E, fromToken: v, toToken: w } = Cm(), S = ee(() => {
|
|
43643
43645
|
if (!(e !== ke.STOP_LOSS && e !== ke.TAKE_PROFIT || !l))
|
|
43644
43646
|
return {
|
|
43645
43647
|
text: r("triggerMarketPriceDisclaimer"),
|
|
@@ -43687,7 +43689,7 @@ const tY = () => {
|
|
|
43687
43689
|
usd: ca(i, r)
|
|
43688
43690
|
};
|
|
43689
43691
|
}, Rx = () => {
|
|
43690
|
-
const { srcBalance: e, chainId: t } = ne(), r =
|
|
43692
|
+
const { srcBalance: e, chainId: t } = ne(), r = Re(), n = bn().amountWei;
|
|
43691
43693
|
return ee(() => {
|
|
43692
43694
|
if (e && H(n).gt(e))
|
|
43693
43695
|
return {
|
|
@@ -43697,21 +43699,22 @@ const tY = () => {
|
|
|
43697
43699
|
};
|
|
43698
43700
|
}, [e, n, r, t]);
|
|
43699
43701
|
};
|
|
43700
|
-
function
|
|
43701
|
-
const { marketPrice: e, marketPriceLoading: t } = ne(), r = Y((
|
|
43702
|
+
function dY() {
|
|
43703
|
+
const { marketPrice: e, marketPriceLoading: t } = ne(), r = Y((u) => u.state.typedSrcAmount), n = Y((u) => u.state.swapExecution.status), s = Rx(), { error: a } = wa(), { error: o } = kc(), { error: i } = Kn(), { error: c } = xa(), { error: l } = km();
|
|
43702
43704
|
return ee(() => {
|
|
43703
|
-
const
|
|
43704
|
-
if (!(H(e || 0).isZero() || H(r || 0).isZero() || t ||
|
|
43705
|
-
return
|
|
43705
|
+
const u = Xl("ignore-errors");
|
|
43706
|
+
if (n !== gt.LOADING && !(H(e || 0).isZero() || H(r || 0).isZero() || t || u))
|
|
43707
|
+
return a || o || i || c || l || s;
|
|
43706
43708
|
}, [
|
|
43707
43709
|
e,
|
|
43708
43710
|
t,
|
|
43709
43711
|
r,
|
|
43710
|
-
s,
|
|
43711
43712
|
a,
|
|
43712
43713
|
o,
|
|
43713
43714
|
i,
|
|
43714
43715
|
c,
|
|
43716
|
+
l,
|
|
43717
|
+
s,
|
|
43715
43718
|
n
|
|
43716
43719
|
]);
|
|
43717
43720
|
}
|
|
@@ -43735,16 +43738,16 @@ const Nx = (e, t) => {
|
|
|
43735
43738
|
token: y,
|
|
43736
43739
|
isInsufficientBalance: e ? E : void 0
|
|
43737
43740
|
};
|
|
43738
|
-
},
|
|
43741
|
+
}, DK = () => Nx(!0), _K = () => {
|
|
43739
43742
|
const e = Cc().amountUI, t = Y((r) => r.state.typedSrcAmount);
|
|
43740
43743
|
return Nx(!1, t ? e : "");
|
|
43741
|
-
},
|
|
43744
|
+
}, MK = () => {
|
|
43742
43745
|
const e = Y((t) => t.updateState);
|
|
43743
43746
|
return {
|
|
43744
43747
|
amount: Y((t) => t.state.typedSrcAmount) || "",
|
|
43745
43748
|
reset: Fe(() => e({ typedSrcAmount: "" }), [e])
|
|
43746
43749
|
};
|
|
43747
|
-
},
|
|
43750
|
+
}, RK = () => {
|
|
43748
43751
|
const e = Y((n) => n.state.isMarketOrder), t = Y((n) => n.updateState), r = Fe(() => {
|
|
43749
43752
|
t({ isMarketOrder: !e });
|
|
43750
43753
|
}, [t, e]);
|
|
@@ -43755,17 +43758,17 @@ const Nx = (e, t) => {
|
|
|
43755
43758
|
}, Sm = () => {
|
|
43756
43759
|
const e = Y((r) => r.state.currentTime), t = km().duration;
|
|
43757
43760
|
return ee(() => cw(e, t), [e, t]);
|
|
43758
|
-
},
|
|
43761
|
+
}, pY = () => {
|
|
43759
43762
|
const { srcUsd1Token: e, dstUsd1Token: t } = ne(), r = bn().amountUI, n = Cc().amountUI, s = ca(r, e), a = ca(n, t);
|
|
43760
43763
|
return { srcAmountUsd: s, dstAmountUsd: a };
|
|
43761
|
-
},
|
|
43764
|
+
}, fY = () => {
|
|
43762
43765
|
const { fees: e, dstUsd1Token: t } = ne(), { amountUI: r } = Cc(), n = ee(() => !e || !r ? "" : H(r).multipliedBy(e).dividedBy(100).toFixed(), [r, e]);
|
|
43763
43766
|
return {
|
|
43764
43767
|
amount: n,
|
|
43765
43768
|
percent: e,
|
|
43766
43769
|
usd: ca(n, t)
|
|
43767
43770
|
};
|
|
43768
|
-
},
|
|
43771
|
+
}, mY = () => {
|
|
43769
43772
|
const { srcToken: e, dstToken: t, account: r, chainId: n, slippage: s, config: a } = ne(), { amountWei: o } = bn(), { amountWei: i } = kc(), { amountPerTradeWei: c, totalTrades: l } = Kn(), u = Sm(), { amountWei: d } = Am(), { amountWei: f } = wa(), { milliseconds: m } = xa();
|
|
43770
43773
|
return ee(() => {
|
|
43771
43774
|
var y;
|
|
@@ -43812,8 +43815,8 @@ const Nx = (e, t) => {
|
|
|
43812
43815
|
n,
|
|
43813
43816
|
a
|
|
43814
43817
|
]);
|
|
43815
|
-
},
|
|
43816
|
-
const { srcToken: e, dstToken: t, account: r } = ne(), n =
|
|
43818
|
+
}, hY = () => {
|
|
43819
|
+
const { srcToken: e, dstToken: t, account: r } = ne(), n = Re(), { amountUI: s, usd: a } = Am(), {
|
|
43817
43820
|
amountPerTradeUI: o,
|
|
43818
43821
|
amountPerTradeUsd: i,
|
|
43819
43822
|
totalTrades: c
|
|
@@ -43821,7 +43824,7 @@ const Nx = (e, t) => {
|
|
|
43821
43824
|
amount: y,
|
|
43822
43825
|
percent: g,
|
|
43823
43826
|
usd: E
|
|
43824
|
-
} =
|
|
43827
|
+
} = fY(), { milliseconds: v } = xa(), { amountUI: w } = Cc(), { srcAmountUsd: S, dstAmountUsd: C } = pY(), O = bn().amountUI, R = Y((x) => x.state.isMarketOrder), T = Q2({
|
|
43825
43828
|
srcToken: e,
|
|
43826
43829
|
dstToken: t,
|
|
43827
43830
|
account: r,
|
|
@@ -43850,14 +43853,14 @@ const Nx = (e, t) => {
|
|
|
43850
43853
|
percentage: g
|
|
43851
43854
|
}
|
|
43852
43855
|
}), [T, h, b, g]);
|
|
43853
|
-
}, zx = Ki({}),
|
|
43856
|
+
}, zx = Ki({}), bY = ({ children: e, ...t }) => /* @__PURE__ */ _(zx.Provider, { value: t, children: e }), yY = () => Zl(zx), Lx = () => {
|
|
43854
43857
|
var s, a;
|
|
43855
|
-
const e =
|
|
43858
|
+
const e = Re(), { wrapTxHash: t, srcToken: r } = Y((o) => o.state.swapExecution), n = (a = (s = xc()) == null ? void 0 : s.wToken) == null ? void 0 : a.symbol;
|
|
43856
43859
|
return t ? /* @__PURE__ */ _("p", { className: "twap-error-wrap-msg", children: e("wrapMsg", { symbol: (r == null ? void 0 : r.symbol) || "", wSymbol: n || "" }) }) : null;
|
|
43857
|
-
},
|
|
43858
|
-
const { module: r } = ne(), n =
|
|
43860
|
+
}, gY = (e = !1, t = 1) => {
|
|
43861
|
+
const { module: r } = ne(), n = Re();
|
|
43859
43862
|
return ee(() => r === ke.STOP_LOSS ? n("stopLoss") : r === ke.TAKE_PROFIT ? n("takeProfit") : n(e ? "twapMarket" : t === 1 ? "limit" : "twapLimit"), [n, r, e, t]);
|
|
43860
|
-
},
|
|
43863
|
+
}, xY = ({
|
|
43861
43864
|
price: e,
|
|
43862
43865
|
dstTokenSymbol: t,
|
|
43863
43866
|
label: r,
|
|
@@ -43866,10 +43869,10 @@ const Nx = (e, t) => {
|
|
|
43866
43869
|
`${e || "-"} ${t || ""}`,
|
|
43867
43870
|
/* @__PURE__ */ _(Ee.USD, { value: n })
|
|
43868
43871
|
] }), $x = () => {
|
|
43869
|
-
const e =
|
|
43870
|
-
return r ===
|
|
43871
|
-
},
|
|
43872
|
-
const e = Y((y) => y.state.swapExecution.srcToken), t =
|
|
43872
|
+
const e = Re(), t = Y((a) => a.state.isMarketOrder), r = Y((a) => a.state.swapExecution.status), { totalTrades: n } = Kn(), s = gY(t, n);
|
|
43873
|
+
return r === gt.SUCCESS ? e("createOrderActionSuccess", { name: s }) : e("createOrderAction", { name: s });
|
|
43874
|
+
}, wY = () => {
|
|
43875
|
+
const e = Y((y) => y.state.swapExecution.srcToken), t = Re(), { step: r, wrapTxHash: n, approveTxHash: s } = Y(
|
|
43873
43876
|
(y) => y.state.swapExecution
|
|
43874
43877
|
), a = xc(), o = $d(n), i = $d(n), c = $d(s), l = Y((y) => y.state.swapExecution.status), d = ho((e == null ? void 0 : e.address) || "") ? (a == null ? void 0 : a.native.symbol) || "" : (e == null ? void 0 : e.symbol) || "", f = a == null ? void 0 : a.wToken.symbol, m = $x();
|
|
43875
43878
|
return ee(() => r === Ma.WRAP ? {
|
|
@@ -43882,7 +43885,7 @@ const Nx = (e, t) => {
|
|
|
43882
43885
|
footerText: t(c ? "viewOnExplorer" : "proceedInWallet")
|
|
43883
43886
|
} : {
|
|
43884
43887
|
title: m,
|
|
43885
|
-
footerText: l ===
|
|
43888
|
+
footerText: l === gt.LOADING ? t("proceedInWallet") : void 0
|
|
43886
43889
|
}, [
|
|
43887
43890
|
r,
|
|
43888
43891
|
c,
|
|
@@ -43894,7 +43897,7 @@ const Nx = (e, t) => {
|
|
|
43894
43897
|
f,
|
|
43895
43898
|
l
|
|
43896
43899
|
]);
|
|
43897
|
-
},
|
|
43900
|
+
}, vY = ({ error: e }) => /* @__PURE__ */ fe("div", { className: "twap-error", children: [
|
|
43898
43901
|
/* @__PURE__ */ _("h2", { className: "twap-error-title", children: "Transaction failed" }),
|
|
43899
43902
|
(e == null ? void 0 : e.code) && /* @__PURE__ */ fe("p", { className: "twap-error-code", children: [
|
|
43900
43903
|
"Error code: ",
|
|
@@ -43902,27 +43905,27 @@ const Nx = (e, t) => {
|
|
|
43902
43905
|
] }),
|
|
43903
43906
|
/* @__PURE__ */ _(Lx, {})
|
|
43904
43907
|
] });
|
|
43905
|
-
function
|
|
43906
|
-
const { components: t } = ne(), r =
|
|
43908
|
+
function EY({ error: e }) {
|
|
43909
|
+
const { components: t } = ne(), r = Re(), n = Y((o) => {
|
|
43907
43910
|
var i;
|
|
43908
43911
|
return (i = o.state.swapExecution) == null ? void 0 : i.wrapTxHash;
|
|
43909
43912
|
}), s = t.SubmitOrderErrorView, a = /* @__PURE__ */ _(
|
|
43910
43913
|
ks.Failed,
|
|
43911
43914
|
{
|
|
43912
|
-
error: /* @__PURE__ */ _(
|
|
43915
|
+
error: /* @__PURE__ */ _(vY, { error: e }),
|
|
43913
43916
|
footerLink: xf,
|
|
43914
43917
|
footerText: r("viewOnExplorer")
|
|
43915
43918
|
}
|
|
43916
43919
|
);
|
|
43917
43920
|
return s ? /* @__PURE__ */ _(s, { wrapTxHash: n, error: e, children: a }) : a;
|
|
43918
43921
|
}
|
|
43919
|
-
const
|
|
43920
|
-
const { components: e } = ne(), t = Y((u) => u.state.swapExecution.srcToken), r = Y((u) => u.state.swapExecution.dstToken), { reviewDetails: n } =
|
|
43922
|
+
const kY = () => {
|
|
43923
|
+
const { components: e } = ne(), t = Y((u) => u.state.swapExecution.srcToken), r = Y((u) => u.state.swapExecution.dstToken), { reviewDetails: n } = yY(), s = Re(), a = Y(
|
|
43921
43924
|
(u) => {
|
|
43922
43925
|
var d;
|
|
43923
43926
|
return !!((d = u.state.swapExecution) != null && d.status);
|
|
43924
43927
|
}
|
|
43925
|
-
), o =
|
|
43928
|
+
), o = hY(), i = e.USD, c = e.SubmitOrderMainView, l = /* @__PURE__ */ fe(mo, { children: [
|
|
43926
43929
|
/* @__PURE__ */ _(
|
|
43927
43930
|
ks.Main,
|
|
43928
43931
|
{
|
|
@@ -43953,7 +43956,7 @@ const EY = () => {
|
|
|
43953
43956
|
}
|
|
43954
43957
|
),
|
|
43955
43958
|
/* @__PURE__ */ _(
|
|
43956
|
-
|
|
43959
|
+
xY,
|
|
43957
43960
|
{
|
|
43958
43961
|
price: o.limitPrice.value,
|
|
43959
43962
|
dstTokenSymbol: r == null ? void 0 : r.symbol,
|
|
@@ -44013,7 +44016,7 @@ const EY = () => {
|
|
|
44013
44016
|
] })
|
|
44014
44017
|
] });
|
|
44015
44018
|
return c ? /* @__PURE__ */ _(c, { children: l }) : l;
|
|
44016
|
-
},
|
|
44019
|
+
}, CY = (e) => {
|
|
44017
44020
|
const { status: t, stepIndex: r, totalSteps: n, parsedError: s } = Y(
|
|
44018
44021
|
(w) => w.state.swapExecution
|
|
44019
44022
|
), { components: a } = ne(), o = a.Spinner, i = a.SuccessIcon, c = a.ErrorIcon, l = a.TokenLogo, { srcToken: u, dstToken: d } = ne(), f = bn().amountUI, m = Cc().amountUI, y = He({ value: f, decimalScale: 2 }), g = He({ value: m, decimalScale: 2 }), E = ee(() => ({
|
|
@@ -44023,44 +44026,44 @@ const EY = () => {
|
|
|
44023
44026
|
symbol: d == null ? void 0 : d.symbol,
|
|
44024
44027
|
logoUrl: d == null ? void 0 : d.logoUrl
|
|
44025
44028
|
}), [d]);
|
|
44026
|
-
return /* @__PURE__ */ _(
|
|
44029
|
+
return /* @__PURE__ */ _(bY, { ...e, children: /* @__PURE__ */ _(
|
|
44027
44030
|
ks,
|
|
44028
44031
|
{
|
|
44029
44032
|
inAmount: y,
|
|
44030
44033
|
outAmount: g,
|
|
44031
44034
|
swapStatus: t,
|
|
44032
44035
|
totalSteps: n,
|
|
44033
|
-
currentStep:
|
|
44036
|
+
currentStep: wY(),
|
|
44034
44037
|
currentStepIndex: r,
|
|
44035
44038
|
inToken: E,
|
|
44036
44039
|
outToken: v,
|
|
44037
44040
|
components: {
|
|
44038
44041
|
SrcTokenLogo: l && /* @__PURE__ */ _(l, { token: u }),
|
|
44039
44042
|
DstTokenLogo: l && /* @__PURE__ */ _(l, { token: d }),
|
|
44040
|
-
Failed: /* @__PURE__ */ _(
|
|
44041
|
-
Success: /* @__PURE__ */ _(
|
|
44042
|
-
Main: /* @__PURE__ */ _(
|
|
44043
|
+
Failed: /* @__PURE__ */ _(EY, { error: s }),
|
|
44044
|
+
Success: /* @__PURE__ */ _(TY, {}),
|
|
44045
|
+
Main: /* @__PURE__ */ _(kY, {}),
|
|
44043
44046
|
Loader: o,
|
|
44044
44047
|
SuccessIcon: i,
|
|
44045
44048
|
FailedIcon: c
|
|
44046
44049
|
}
|
|
44047
44050
|
}
|
|
44048
44051
|
) });
|
|
44049
|
-
},
|
|
44052
|
+
}, TY = () => {
|
|
44050
44053
|
const e = $x(), { components: t } = ne(), r = Y((a) => a.state.swapExecution.orderId), n = t.SubmitOrderSuccessView, s = /* @__PURE__ */ fe(mo, { children: [
|
|
44051
44054
|
/* @__PURE__ */ _(ks.Success, { title: e }),
|
|
44052
44055
|
/* @__PURE__ */ _(Lx, {})
|
|
44053
44056
|
] });
|
|
44054
44057
|
return n ? /* @__PURE__ */ _(n, { newOrderId: r, children: s }) : s;
|
|
44055
|
-
},
|
|
44058
|
+
}, NK = () => {
|
|
44056
44059
|
const { supportedChains: e } = ne();
|
|
44057
44060
|
return ee(() => e, [e]);
|
|
44058
|
-
},
|
|
44061
|
+
}, zK = () => {
|
|
44059
44062
|
const { config: e } = ne();
|
|
44060
44063
|
return ee(() => ({
|
|
44061
44064
|
spender: e.repermit
|
|
44062
44065
|
}), [e]);
|
|
44063
|
-
},
|
|
44066
|
+
}, AY = () => {
|
|
44064
44067
|
var c;
|
|
44065
44068
|
const {
|
|
44066
44069
|
account: e,
|
|
@@ -44106,8 +44109,8 @@ const EY = () => {
|
|
|
44106
44109
|
throw bt.onWrapError(l), l;
|
|
44107
44110
|
}
|
|
44108
44111
|
});
|
|
44109
|
-
},
|
|
44110
|
-
const { account: e, walletClient: t, chainId: r, callbacks: n } = ne(), s =
|
|
44112
|
+
}, SY = () => {
|
|
44113
|
+
const { account: e, walletClient: t, chainId: r, callbacks: n } = ne(), s = mY().rePermitData, a = KV();
|
|
44111
44114
|
return jn({
|
|
44112
44115
|
mutationFn: async () => {
|
|
44113
44116
|
var y, g, E, v;
|
|
@@ -44171,7 +44174,7 @@ const EY = () => {
|
|
|
44171
44174
|
return { allowance: a, approvalRequired: o };
|
|
44172
44175
|
}
|
|
44173
44176
|
});
|
|
44174
|
-
},
|
|
44177
|
+
}, PY = () => {
|
|
44175
44178
|
const { account: e, walletClient: t, overrides: r, config: n, chainId: s, callbacks: a } = ne(), o = cm(), { mutateAsync: i } = Hx();
|
|
44176
44179
|
return jn({
|
|
44177
44180
|
onError: (c) => {
|
|
@@ -44234,7 +44237,7 @@ const EY = () => {
|
|
|
44234
44237
|
}), f;
|
|
44235
44238
|
}
|
|
44236
44239
|
});
|
|
44237
|
-
},
|
|
44240
|
+
}, IY = () => {
|
|
44238
44241
|
const { account: e, chainId: t, srcToken: r, dstToken: n, module: s, slippage: a } = ne(), o = wa(), i = bn().amountWei, c = Kn().amountPerTradeWei, l = Sm(), u = xa().fillDelay, d = Am().amountWei, f = Y((m) => m.state.isMarketOrder);
|
|
44239
44242
|
return jn({
|
|
44240
44243
|
mutationFn: async () => {
|
|
@@ -44256,15 +44259,15 @@ const EY = () => {
|
|
|
44256
44259
|
}
|
|
44257
44260
|
});
|
|
44258
44261
|
};
|
|
44259
|
-
function
|
|
44262
|
+
function BY(e) {
|
|
44260
44263
|
const t = e.message, r = t.match(/,\s*code\s*:\s*(\d+)/i);
|
|
44261
44264
|
return {
|
|
44262
44265
|
message: t.replace(/^error\s*:/i, "").replace(/,\s*code\s*:\s*\d+/i, "").trim() || "",
|
|
44263
44266
|
code: r ? Number(r[1]) : 0
|
|
44264
44267
|
};
|
|
44265
44268
|
}
|
|
44266
|
-
const
|
|
44267
|
-
const { srcToken: e, dstToken: t, chainId: r, callbacks: n } = ne(), s =
|
|
44269
|
+
const FY = () => {
|
|
44270
|
+
const { srcToken: e, dstToken: t, chainId: r, callbacks: n } = ne(), s = PY().mutateAsync, a = AY().mutateAsync, o = SY().mutateAsync, { mutateAsync: i } = Hx(), c = Y((d) => d.updateSwapExecution), { amountWei: l } = bn(), u = IY().mutate;
|
|
44268
44271
|
return jn({
|
|
44269
44272
|
mutationFn: async () => {
|
|
44270
44273
|
var f, m;
|
|
@@ -44287,7 +44290,7 @@ const BY = () => {
|
|
|
44287
44290
|
totalSteps: v,
|
|
44288
44291
|
stepIndex: E,
|
|
44289
44292
|
allowanceLoading: !1,
|
|
44290
|
-
status:
|
|
44293
|
+
status: gt.LOADING
|
|
44291
44294
|
}), u(), d && (c({ step: Ma.WRAP }), await a({
|
|
44292
44295
|
onHash: (S) => c({ wrapTxHash: S }),
|
|
44293
44296
|
srcAmountWei: l
|
|
@@ -44297,7 +44300,7 @@ const BY = () => {
|
|
|
44297
44300
|
srcAmountWei: l
|
|
44298
44301
|
}), E++, c({ stepIndex: E })), c({ step: Ma.CREATE });
|
|
44299
44302
|
const w = await o();
|
|
44300
|
-
return c({ status:
|
|
44303
|
+
return c({ status: gt.SUCCESS, orderId: w.id }), w;
|
|
44301
44304
|
} catch (y) {
|
|
44302
44305
|
if (Nb(y))
|
|
44303
44306
|
(f = n == null ? void 0 : n.onSubmitOrderRejected) == null || f.call(n), c({
|
|
@@ -44307,9 +44310,9 @@ const BY = () => {
|
|
|
44307
44310
|
error: y
|
|
44308
44311
|
});
|
|
44309
44312
|
else {
|
|
44310
|
-
const g =
|
|
44313
|
+
const g = BY(y);
|
|
44311
44314
|
(m = n == null ? void 0 : n.onSubmitOrderFailed) == null || m.call(n, g), c({
|
|
44312
|
-
status:
|
|
44315
|
+
status: gt.FAILED,
|
|
44313
44316
|
parsedError: g,
|
|
44314
44317
|
error: y
|
|
44315
44318
|
});
|
|
@@ -44318,13 +44321,13 @@ const BY = () => {
|
|
|
44318
44321
|
}
|
|
44319
44322
|
}
|
|
44320
44323
|
});
|
|
44321
|
-
},
|
|
44322
|
-
const { marketPrice: e, srcToken: t, dstToken: r } = ne(), n =
|
|
44323
|
-
(i == null ? void 0 : i.status) ===
|
|
44324
|
+
}, LK = () => {
|
|
44325
|
+
const { marketPrice: e, srcToken: t, dstToken: r } = ne(), n = FY(), s = Y((f) => f.updateState), { amountUI: a } = bn(), o = Y((f) => f.resetState), i = Y((f) => f.state.swapExecution), c = Fe(() => {
|
|
44326
|
+
(i == null ? void 0 : i.status) === gt.SUCCESS && (s({ typedSrcAmount: "" }), setTimeout(() => {
|
|
44324
44327
|
o();
|
|
44325
44328
|
}, 1e3));
|
|
44326
44329
|
}, [i == null ? void 0 : i.status, o, s]), l = Fe(() => {
|
|
44327
|
-
(i == null ? void 0 : i.status) !==
|
|
44330
|
+
(i == null ? void 0 : i.status) !== gt.LOADING && s({
|
|
44328
44331
|
acceptedSrcAmount: void 0,
|
|
44329
44332
|
acceptedMarketPrice: void 0,
|
|
44330
44333
|
swapExecution: { srcToken: t, dstToken: r }
|
|
@@ -44344,12 +44347,12 @@ const BY = () => {
|
|
|
44344
44347
|
onOpenModal: l,
|
|
44345
44348
|
onSubmit: d,
|
|
44346
44349
|
...i,
|
|
44347
|
-
isLoading: !!((i == null ? void 0 : i.status) ===
|
|
44348
|
-
isSuccess: (i == null ? void 0 : i.status) ===
|
|
44349
|
-
isFailed: (i == null ? void 0 : i.status) ===
|
|
44350
|
+
isLoading: !!((i == null ? void 0 : i.status) === gt.LOADING || i != null && i.allowanceLoading),
|
|
44351
|
+
isSuccess: (i == null ? void 0 : i.status) === gt.SUCCESS,
|
|
44352
|
+
isFailed: (i == null ? void 0 : i.status) === gt.FAILED
|
|
44350
44353
|
}), [o, c, d, i]);
|
|
44351
|
-
},
|
|
44352
|
-
const e =
|
|
44354
|
+
}, $K = () => {
|
|
44355
|
+
const e = Re(), {
|
|
44353
44356
|
marketPrice: t,
|
|
44354
44357
|
srcToken: r,
|
|
44355
44358
|
dstToken: n,
|
|
@@ -44357,7 +44360,7 @@ const BY = () => {
|
|
|
44357
44360
|
srcBalance: a,
|
|
44358
44361
|
srcUsd1Token: o,
|
|
44359
44362
|
noLiquidity: i
|
|
44360
|
-
} = ne(), c = s || H(o || "0").isZero() || a === void 0 || H(t || "0").isZero(), l = Y((y) => y.state.typedSrcAmount), u = !!(r && n && l && c), d =
|
|
44363
|
+
} = ne(), c = s || H(o || "0").isZero() || a === void 0 || H(t || "0").isZero(), l = Y((y) => y.state.typedSrcAmount), u = !!(r && n && l && c), d = dY(), f = ee(() => i ? e("noLiquidity") : H(l || "0").isZero() ? e("enterAmount") : (d == null ? void 0 : d.type) === qt.INSUFFICIENT_BALANCE ? e("insufficientFunds") : e("placeOrder"), [d, e, l, i]), m = !!(d || i || u || H(l || "0").isZero() || !r || !n);
|
|
44361
44364
|
return ee(() => ({
|
|
44362
44365
|
disabled: m,
|
|
44363
44366
|
text: f,
|
|
@@ -44365,78 +44368,78 @@ const BY = () => {
|
|
|
44365
44368
|
}), [m, f, u]);
|
|
44366
44369
|
};
|
|
44367
44370
|
Tw(qw.version);
|
|
44368
|
-
const
|
|
44369
|
-
SubmitOrderPanel:
|
|
44370
|
-
Orders:
|
|
44371
|
+
const HK = {
|
|
44372
|
+
SubmitOrderPanel: CY,
|
|
44373
|
+
Orders: rY
|
|
44371
44374
|
};
|
|
44372
44375
|
export {
|
|
44373
44376
|
t8 as $,
|
|
44374
|
-
|
|
44377
|
+
zK as A,
|
|
44375
44378
|
L as B,
|
|
44376
|
-
|
|
44377
|
-
|
|
44378
|
-
|
|
44379
|
-
|
|
44380
|
-
|
|
44379
|
+
HK as C,
|
|
44380
|
+
TK as D,
|
|
44381
|
+
$K as E,
|
|
44382
|
+
mY as F,
|
|
44383
|
+
hY as G,
|
|
44381
44384
|
Qo as H,
|
|
44382
44385
|
He as I,
|
|
44383
44386
|
qt as J,
|
|
44384
44387
|
Ma as K,
|
|
44385
|
-
|
|
44388
|
+
gt as L,
|
|
44386
44389
|
O5 as M,
|
|
44387
44390
|
ht as N,
|
|
44388
44391
|
yt as O,
|
|
44389
|
-
|
|
44392
|
+
AK as P,
|
|
44390
44393
|
ke as Q,
|
|
44391
|
-
|
|
44392
|
-
|
|
44393
|
-
|
|
44394
|
+
XY as R,
|
|
44395
|
+
CK as S,
|
|
44396
|
+
QY as T,
|
|
44394
44397
|
J3 as U,
|
|
44395
44398
|
Rb as V,
|
|
44396
|
-
|
|
44399
|
+
JY as W,
|
|
44397
44400
|
Fl as X,
|
|
44398
44401
|
Nb as Y,
|
|
44399
|
-
|
|
44402
|
+
eK as Z,
|
|
44400
44403
|
e8 as _,
|
|
44401
44404
|
BR as a,
|
|
44402
44405
|
cw as a$,
|
|
44403
44406
|
r8 as a0,
|
|
44404
44407
|
n8 as a1,
|
|
44405
44408
|
zb as a2,
|
|
44406
|
-
|
|
44409
|
+
tK as a3,
|
|
44407
44410
|
Lb as a4,
|
|
44408
44411
|
$b as a5,
|
|
44409
44412
|
ao as a6,
|
|
44410
44413
|
ho as a7,
|
|
44411
44414
|
eu as a8,
|
|
44412
44415
|
Ht as a9,
|
|
44413
|
-
|
|
44416
|
+
LY as aA,
|
|
44414
44417
|
Gt as aB,
|
|
44415
44418
|
V5 as aC,
|
|
44416
44419
|
Xd as aD,
|
|
44417
|
-
|
|
44418
|
-
|
|
44420
|
+
$Y as aE,
|
|
44421
|
+
HY as aF,
|
|
44419
44422
|
W5 as aG,
|
|
44420
44423
|
q5 as aH,
|
|
44421
44424
|
xf as aI,
|
|
44422
|
-
|
|
44423
|
-
|
|
44424
|
-
|
|
44425
|
-
|
|
44426
|
-
|
|
44425
|
+
GY as aJ,
|
|
44426
|
+
jY as aK,
|
|
44427
|
+
VY as aL,
|
|
44428
|
+
WY as aM,
|
|
44429
|
+
qY as aN,
|
|
44427
44430
|
wf as aO,
|
|
44428
44431
|
Y5 as aP,
|
|
44429
44432
|
K5 as aQ,
|
|
44430
44433
|
Z5 as aR,
|
|
44431
44434
|
X5 as aS,
|
|
44432
|
-
|
|
44435
|
+
YY as aT,
|
|
44433
44436
|
rw as aU,
|
|
44434
44437
|
nw as aV,
|
|
44435
44438
|
sw as aW,
|
|
44436
44439
|
aw as aX,
|
|
44437
44440
|
ow as aY,
|
|
44438
44441
|
iw as aZ,
|
|
44439
|
-
|
|
44442
|
+
KY as a_,
|
|
44440
44443
|
bt as aa,
|
|
44441
44444
|
Tw as ab,
|
|
44442
44445
|
bo as ac,
|
|
@@ -44448,14 +44451,14 @@ export {
|
|
|
44448
44451
|
Rt as ai,
|
|
44449
44452
|
Vw as aj,
|
|
44450
44453
|
B5 as ak,
|
|
44451
|
-
|
|
44454
|
+
MY as al,
|
|
44452
44455
|
F5 as am,
|
|
44453
44456
|
U5 as an,
|
|
44454
44457
|
er as ao,
|
|
44455
|
-
|
|
44458
|
+
RY as ap,
|
|
44456
44459
|
hb as aq,
|
|
44457
|
-
|
|
44458
|
-
|
|
44460
|
+
NY as ar,
|
|
44461
|
+
zY as as,
|
|
44459
44462
|
Zd as at,
|
|
44460
44463
|
ni as au,
|
|
44461
44464
|
zm as av,
|
|
@@ -44466,7 +44469,7 @@ export {
|
|
|
44466
44469
|
Fr as b,
|
|
44467
44470
|
yb as b0,
|
|
44468
44471
|
lw as b1,
|
|
44469
|
-
|
|
44472
|
+
ZY as b2,
|
|
44470
44473
|
uw as b3,
|
|
44471
44474
|
dw as b4,
|
|
44472
44475
|
pw as b5,
|
|
@@ -44485,23 +44488,23 @@ export {
|
|
|
44485
44488
|
pa as e,
|
|
44486
44489
|
on as f,
|
|
44487
44490
|
Yf as g,
|
|
44488
|
-
|
|
44491
|
+
BK as h,
|
|
44489
44492
|
uc as i,
|
|
44490
|
-
|
|
44491
|
-
|
|
44493
|
+
PK as j,
|
|
44494
|
+
OK as k,
|
|
44492
44495
|
Iu as l,
|
|
44493
|
-
|
|
44494
|
-
|
|
44495
|
-
|
|
44496
|
-
|
|
44497
|
-
|
|
44498
|
-
|
|
44496
|
+
DK as m,
|
|
44497
|
+
_K as n,
|
|
44498
|
+
UK as o,
|
|
44499
|
+
SK as p,
|
|
44500
|
+
LK as q,
|
|
44501
|
+
FK as r,
|
|
44499
44502
|
Pt as s,
|
|
44500
44503
|
Cm as t,
|
|
44501
|
-
|
|
44502
|
-
|
|
44503
|
-
|
|
44504
|
-
|
|
44505
|
-
|
|
44506
|
-
|
|
44504
|
+
IK as u,
|
|
44505
|
+
dY as v,
|
|
44506
|
+
RK as w,
|
|
44507
|
+
MK as x,
|
|
44508
|
+
Re as y,
|
|
44509
|
+
NK as z
|
|
44507
44510
|
};
|