@ape.swap/bonds-sdk 2.0.9-seedify → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -4,7 +4,6 @@ import { useWaitForTransactionReceipt, useChainId, useAccount, useSwitchChain, u
4
4
  import { useQuery, useQueryClient } from '@tanstack/react-query';
5
5
  import axios from 'axios';
6
6
  import { ConnectButton as ConnectButton$1 } from '@rainbow-me/rainbowkit';
7
- import domtoimage from 'dom-to-image';
8
7
 
9
8
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
9
 
@@ -6295,7 +6294,7 @@ const Text$1 = /*#__PURE__*/React__default.forwardRef(function Text(props, ref)
6295
6294
  * Image style variants can be defined in the theme.images object.
6296
6295
  * @see https://theme-ui.com/components/image/
6297
6296
  */
6298
- const Image = /*#__PURE__*/React__default.forwardRef(function Image(props, ref) {
6297
+ const Image$1 = /*#__PURE__*/React__default.forwardRef(function Image(props, ref) {
6299
6298
  const __outerCss = props.__css;
6300
6299
  return jsx$2(Box$1, {
6301
6300
  ref: ref,
@@ -18688,6 +18687,25 @@ const AddFavToken = ({ tokenSymbol, hotBond }) => {
18688
18687
  }, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22 })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20 })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
18689
18688
  };
18690
18689
 
18690
+ const defaultUrls = {
18691
+ apiV2: 'https://api.ape.bond',
18692
+ realTimeApi: 'https://realtime-api.ape.bond/bonds',
18693
+ apeswapLists: 'https://raw.githubusercontent.com/ApeSwapFinance/apeswap-lists/main',
18694
+ mainUrl: 'https://ape.bond',
18695
+ };
18696
+ const useSDKConfig = (config) => {
18697
+ var _a;
18698
+ const { data } = useQuery({
18699
+ queryKey: [QUERY_KEYS.SDK_CONFIG],
18700
+ initialData: Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.config), { urls: Object.assign(Object.assign({}, defaultUrls), (_a = config === null || config === void 0 ? void 0 : config.config) === null || _a === void 0 ? void 0 : _a.urls) }),
18701
+ });
18702
+ return data;
18703
+ };
18704
+ const useURLByEnvironment = (key) => {
18705
+ const config = useSDKConfig();
18706
+ return config === null || config === void 0 ? void 0 : config.urls[key];
18707
+ };
18708
+
18691
18709
  const NETWORK_COLORS = {
18692
18710
  [types.ChainId.BSC]: '#F3BA2F',
18693
18711
  [types.ChainId.MAINNET]: '#627eea',
@@ -18701,15 +18719,21 @@ const NETWORK_COLORS = {
18701
18719
  [types.ChainId.AVAX]: '#e74344',
18702
18720
  };
18703
18721
  const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
18704
- var _a, _b, _c, _d;
18722
+ var _a, _b, _c, _d, _e;
18723
+ const SDKConfig = useSDKConfig();
18705
18724
  const tokenName = 'showcaseTokenName' in bill ? bill.showcaseTokenName : bill.earnToken.symbol;
18706
- return (jsxs(Flex, { className: "tokeninfoname container", children: [jsx$2(Flex, { className: "tokeninfoname chain", children: jsx$2(Svg, { width: 20, height: 20, icon: (_a = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _a !== void 0 ? _a : 'question' }) }), jsx$2(Flex, { className: "tokeninfoname gradient", sx: {
18707
- background: isHotBond || vestEnds ? 'transparent' : NETWORK_COLORS[bill.chainId],
18708
- } }), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: { marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0 }, children: [jsx$2(TokenImage, { symbol: tokenName, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [tokenName, vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { sx: { minWidth: '25px', p: '5px' }, children: jsx$2(AddFavToken, { tokenSymbol: tokenName, hotBond: isHotBond }) })] }), jsx$2(Flex, { sx: {
18725
+ return (jsxs(Flex, { className: "tokeninfoname container", children: [SDKConfig.referenceId === 'seedify' ? (jsx$2(Flex, { sx: {
18726
+ p: '10px',
18727
+ opacity: 0.2,
18728
+ position: 'absolute',
18729
+ left: '-20px',
18730
+ }, children: jsx$2(Flex, { sx: { borderRadius: '56px', overflow: 'hidden' }, children: jsx$2(Svg, { width: 100, height: 100, icon: (_a = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _a !== void 0 ? _a : 'question' }) }) })) : (jsxs(Fragment$1, { children: [jsx$2(Flex, { className: "tokeninfoname chain", children: jsx$2(Svg, { width: 20, height: 20, icon: (_b = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bill === null || bill === void 0 ? void 0 : bill.chainId]) !== null && _b !== void 0 ? _b : 'question' }) }), jsx$2(Flex, { className: "tokeninfoname gradient", sx: {
18731
+ background: isHotBond || vestEnds ? 'transparent' : NETWORK_COLORS[bill.chainId],
18732
+ } })] })), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: { marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0 }, children: [jsx$2(TokenImage, { symbol: tokenName, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [tokenName, vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: { minWidth: '25px', p: '5px' }, children: jsx$2(AddFavToken, { tokenSymbol: tokenName, hotBond: isHotBond }) })] }), jsx$2(Flex, { sx: {
18709
18733
  display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'],
18710
18734
  justifyContent: isHotBond ? 'center' : 'flex-start',
18711
18735
  width: '100%',
18712
- }, children: ((_b = bill.tags) === null || _b === void 0 ? void 0 : _b[0]) && jsx$2(ListTag, { text: (_d = (_c = bill.tags) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.toUpperCase() }) })] }));
18736
+ }, children: ((_c = bill.tags) === null || _c === void 0 ? void 0 : _c[0]) && jsx$2(ListTag, { text: (_e = (_d = bill.tags) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.toUpperCase() }) })] }));
18713
18737
  };
18714
18738
 
18715
18739
  const MINUTE_IN_SECONDS = 60;
@@ -41467,25 +41491,6 @@ const getBillNftBatchData = (apiV2URL, billNftIds, billNftAddress, chainId) => _
41467
41491
  }
41468
41492
  });
41469
41493
 
41470
- const defaultUrls = {
41471
- apiV2: 'https://api.ape.bond',
41472
- realTimeApi: 'https://realtime-api.ape.bond/bonds',
41473
- apeswapLists: 'https://raw.githubusercontent.com/ApeSwapFinance/apeswap-lists/main',
41474
- mainUrl: 'https://ape.bond',
41475
- };
41476
- const useSDKConfig = (config) => {
41477
- var _a;
41478
- const { data } = useQuery({
41479
- queryKey: [QUERY_KEYS.SDK_CONFIG],
41480
- initialData: Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.config), { urls: Object.assign(Object.assign({}, defaultUrls), (_a = config === null || config === void 0 ? void 0 : config.config) === null || _a === void 0 ? void 0 : _a.urls) }),
41481
- });
41482
- return data;
41483
- };
41484
- const useURLByEnvironment = (key) => {
41485
- const config = useSDKConfig();
41486
- return config === null || config === void 0 ? void 0 : config.urls[key];
41487
- };
41488
-
41489
41494
  function useBondNFTData(id, billNftAddress, chainId) {
41490
41495
  const apiV2URL = useURLByEnvironment('apiV2');
41491
41496
  return useQuery({
@@ -71184,18 +71189,20 @@ function useUserBonds() {
71184
71189
  // First fetch the full list of bonds
71185
71190
  const { data: bondList } = useBondsList();
71186
71191
  const { address } = useAccount();
71192
+ const SDKConfig = useSDKConfig();
71193
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71187
71194
  // Once the full list is fetched, fetch user's purchased bonds
71188
71195
  return useQuery({
71189
71196
  queryKey: [QUERY_KEYS.USER_BONDS, address],
71190
- queryFn: () => getUserBonds(address, bondList),
71197
+ queryFn: () => getUserBonds(address, bondList, chains),
71191
71198
  refetchOnWindowFocus: false,
71192
71199
  refetchInterval: 60000,
71193
71200
  enabled: !!bondList && !!address,
71194
71201
  });
71195
71202
  }
71196
- const getUserBonds = (account, bondList) => __awaiter$9(void 0, void 0, void 0, function* () {
71203
+ const getUserBonds = (account, bondList, chains) => __awaiter$9(void 0, void 0, void 0, function* () {
71197
71204
  try {
71198
- const results = yield Promise.allSettled(MAINNET_CHAINS.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71205
+ const results = yield Promise.allSettled(chains.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71199
71206
  // Filter out only fulfilled promises
71200
71207
  const fulfilledResults = results
71201
71208
  .filter((result) => result.status === 'fulfilled')
@@ -71309,13 +71316,19 @@ const MenuSelect = (_a) => {
71309
71316
  display: 'flex',
71310
71317
  width: '100%',
71311
71318
  paddingRight: '4px',
71312
- } }, props, { children: options === null || options === void 0 ? void 0 : options.map((option) => {
71313
- return (jsx$2(SelectItem, { size: "xsm", value: option.value, children: jsx$2(Text, { sx: { fontWeight: 400, pl: '10px' }, children: option.label }) }, option.label));
71319
+ background: 'white2',
71320
+ } }, props, { className: "dropdown", children: options === null || options === void 0 ? void 0 : options.map((option) => {
71321
+ return (jsx$2(SelectItem, { size: "xsm", value: option.value, children: jsx$2(Text, { sx: { fontWeight: 400, pl: '10px' }, className: "menu-selector", children: option.label }) }, option.label));
71314
71322
  }) })));
71315
71323
  };
71316
71324
 
71317
71325
  const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71326
+ // Hooks
71327
+ const SDKConfig = useSDKConfig();
71328
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71329
+ // State
71318
71330
  const [isOpen, setIsOpen] = useState(false);
71331
+ // Handlers
71319
71332
  const handleCheckbox = (newChain) => {
71320
71333
  const prevChainFilterOptions = chainFilterOption;
71321
71334
  let newChainFilterOption;
@@ -71353,18 +71366,18 @@ const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71353
71366
  alignItems: 'center',
71354
71367
  width: '100%',
71355
71368
  justifyContent: 'space-between',
71356
- }, onClick: () => setIsOpen(!isOpen), children: [jsx$2(Text, { sx: { lineHeight: '22px', fontSize: '14px', fontWeight: 400, px: '10px' }, children: chainFilterOption.includes('All Chains') ? 'All Chains' : `Chains (${chainFilterOption.length})` }), jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) })] }), isOpen && (jsx$2(Flex, { sx: {
71369
+ }, onClick: () => setIsOpen(!isOpen), className: "dropdown", children: [jsx$2(Text, { sx: { lineHeight: '22px', fontSize: '14px', fontWeight: 400, px: '10px' }, children: chainFilterOption.includes('All Chains') ? 'All Chains' : `Chains (${chainFilterOption.length})` }), jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "caret", direction: isOpen ? 'up' : 'down' }) })] }), isOpen && (jsx$2(Flex, { sx: {
71357
71370
  flexDirection: ['column', 'column', 'column'],
71358
71371
  position: 'absolute',
71359
71372
  top: '45px',
71360
71373
  right: '0px',
71361
71374
  width: '200px',
71362
- height: ['300px', '300px', '350px'],
71375
+ maxHeight: ['300px', '300px', '350px'],
71363
71376
  overflowY: 'scroll',
71364
71377
  borderRadius: 'normal',
71365
71378
  background: 'white2',
71366
71379
  zIndex: 1001,
71367
- }, children: ['All Chains', ...MAINNET_CHAINS].map((chainId) => {
71380
+ }, children: ['All Chains', ...chains].map((chainId) => {
71368
71381
  return (jsx$2(Flex, { sx: {
71369
71382
  borderRadius: 'normal',
71370
71383
  p: '5px 15px',
@@ -71387,7 +71400,7 @@ const BondFilters = ({ setChainFilterOption, chainFilterOption, filterOptions, f
71387
71400
  setChainFilterOption(['All Chains']);
71388
71401
  setFilterOption(newOption);
71389
71402
  }, [setChainFilterOption, setFilterOption]);
71390
- return (jsxs("div", { className: "bonds-filters", children: [jsx$2("div", { className: "desktop-rec-container", children: jsx$2(RecommendationSelector, { options: filterOptions, activeOption: filterOption, setActiveOption: handleFilterSelection }) }), jsx$2("div", { className: "mobile-rec-container", children: jsx$2(MenuSelect, { selectedOption: filterOption, setOption: setFilterOption, options: mappedFilters, sx: { background: 'white2' } }) }), jsx$2("div", { className: "network-filter", children: jsx$2(NetworkFilter, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption }) }), jsxs("div", { className: "clear-all-button", onClick: () => {
71403
+ return (jsxs("div", { className: "bonds-filters", children: [jsx$2("div", { className: "desktop-rec-container", children: jsx$2(RecommendationSelector, { options: filterOptions, activeOption: filterOption, setActiveOption: handleFilterSelection }) }), jsx$2("div", { className: "mobile-rec-container", children: jsx$2(MenuSelect, { selectedOption: filterOption, setOption: setFilterOption, options: mappedFilters }) }), jsx$2("div", { className: "network-filter", children: jsx$2(NetworkFilter, { chainFilterOption: chainFilterOption, setChainFilterOption: setChainFilterOption }) }), jsxs("div", { className: "clear-all-button", onClick: () => {
71391
71404
  setChainFilterOption(['All Chains']);
71392
71405
  setFilterOption(asPath.includes('yourBonds') ? 'CLAIMABLE' : 'ALL');
71393
71406
  onHandleQueryChange('');
@@ -71395,7 +71408,7 @@ const BondFilters = ({ setChainFilterOption, chainFilterOption, filterOptions, f
71395
71408
  };
71396
71409
 
71397
71410
  const YourBondsMenu = ({ chainFilterOption, setChainFilterOption, filterOptions, filterOption, setFilterOption, setInputValue, inputValue, handleSort, }) => {
71398
- return (jsxs("div", { className: "bonds-menu", children: [jsx$2(BondFilters, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption, onHandleQueryChange: () => setInputValue('') }), jsxs("div", { className: "table-header-container", children: [jsx$2("div", { className: "search-container", children: jsx$2(Flex$1, { sx: { width: '100%', maxWidth: '300px' }, children: jsx$2(Input, { value: inputValue, onChange: (event) => setInputValue(event.target.value), variant: "search", sx: { fontWeight: 600, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }) }), jsxs("div", { className: "headers-container", children: [jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('claimable'), children: ["CLAIMABLE", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('pending'), children: ["PENDING", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2(Flex$1, { className: "claim-all-button-container" })] })] })] }));
71411
+ return (jsxs("div", { className: "bonds-menu", children: [jsx$2(BondFilters, { chainFilterOption: chainFilterOption !== null && chainFilterOption !== void 0 ? chainFilterOption : ['All Chains'], setChainFilterOption: setChainFilterOption, filterOptions: filterOptions, filterOption: filterOption, setFilterOption: setFilterOption, onHandleQueryChange: () => setInputValue('') }), jsxs("div", { className: "table-header-container", children: [jsx$2("div", { className: "search-container", children: jsx$2(Flex$1, { sx: { width: '100%', maxWidth: '300px' }, children: jsx$2(Input, { className: "search-input", value: inputValue, onChange: (event) => setInputValue(event.target.value), variant: "search", sx: { fontWeight: 600, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }) }), jsxs("div", { className: "headers-container", children: [jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('claimable'), children: ["CLAIMABLE", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('pending'), children: ["PENDING", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsxs("div", { className: "your-bonds-table-headers", onClick: () => handleSort('terms'), children: ["TERMS", jsx$2(Flex$1, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), jsx$2(Flex$1, { className: "claim-all-button-container" })] })] })] }));
71399
71412
  };
71400
71413
 
71401
71414
  const YourBonds = () => {
@@ -71507,6 +71520,8 @@ const YourBonds = () => {
71507
71520
 
71508
71521
  // This basically returns the 2 tags with the higher active bond count
71509
71522
  const useTopTags = (initialBondList) => {
71523
+ const SDKConfig = useSDKConfig();
71524
+ const chains = SDKConfig.chains;
71510
71525
  const bonds = initialBondList;
71511
71526
  const countTagsInBonds = (bonds) => {
71512
71527
  const tagCount = {};
@@ -71525,7 +71540,7 @@ const useTopTags = (initialBondList) => {
71525
71540
  });
71526
71541
  return tagCount;
71527
71542
  };
71528
- const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut);
71543
+ const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut && (chains === null || chains === void 0 ? void 0 : chains.includes(bond.chainId)));
71529
71544
  const countedTags = countTagsInBonds(activeBonds);
71530
71545
  const sortedTagsArray = Object.entries(countedTags).sort((a, b) => b[1] - a[1]);
71531
71546
  return sortedTagsArray.slice(0, 2).map((tagCountArray) => tagCountArray[0]);
@@ -72231,7 +72246,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, bondEarnToken, handleCurrencyS
72231
72246
  const checksummedInput = isAddress(input);
72232
72247
  setSearchQuery(checksummedInput || input);
72233
72248
  }, [setSearchQuery]);
72234
- return (jsx$2(Modal, { onDismiss: onDismiss, title: "Tokens", children: jsx$2(Flex, { sx: {
72249
+ return (jsx$2(Modal, { onDismiss: onDismiss, title: "Tokens", className: "token-selector-modal", children: jsx$2(Flex, { sx: {
72235
72250
  flexDirection: 'column',
72236
72251
  maxHeight: 'none',
72237
72252
  height: 'auto',
@@ -72248,15 +72263,16 @@ const TokenSelectorModal = ({ bondPrincipalToken, bondEarnToken, handleCurrencyS
72248
72263
  }) })] }) }) }));
72249
72264
  };
72250
72265
 
72251
- const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId, handleMaxBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, bondEarnToken, }) => {
72266
+ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, bondEarnToken, modalVariant, }) => {
72252
72267
  var _a, _b;
72268
+ const { address: account } = useAccount();
72253
72269
  const tokenBalanceString = tokenBalance ? new BigNumber$1(tokenBalance).toPrecision(5) : 'loading';
72254
72270
  const splited = typeof selectedToken !== 'string' ? (_a = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.symbol) === null || _a === void 0 ? void 0 : _a.split('-') : undefined;
72255
72271
  const handleInputChange = (event) => {
72256
72272
  setTypedValue(event.target.value);
72257
72273
  };
72258
72274
  const [onTokenSelectorModal] = useModal(jsx$2(TokenSelectorModal, { bondPrincipalToken: bondPrincipalToken, bondEarnToken: bondEarnToken, handleCurrencySelect: handleCurrencySelect, chainId: chainId }), true, false, `tokenSelectorOnLiquidityModal${(_b = bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.address) === null || _b === void 0 ? void 0 : _b[chainId]}-${bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.symbol}`);
72259
- return (jsxs(Flex$1, { className: "modaltable-container buy-container", children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
72275
+ return (jsxs(Flex$1, { className: "token-selector-panel", children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
72260
72276
  if (v.currentTarget.value.includes(',')) {
72261
72277
  v.currentTarget.value = v.currentTarget.value.replace(/,/g, '.');
72262
72278
  }
@@ -72270,7 +72286,9 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId,
72270
72286
  !!v.currentTarget.value && isNumber$1(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
72271
72287
  ? v.currentTarget.value
72272
72288
  : v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
72273
- } }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default' }, children: [jsxs(Flex$1, { children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: chainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, chainId), size: 28, chain: chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, chainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), tokenBalance && (jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { children: selectedTokenPrice && typedValue ? `$${(selectedTokenPrice * parseFloat(typedValue)).toFixed(2)}` : '' }), jsxs(Flex$1, { children: [jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsx$2(Flex$1, { className: "balancerow max", children: tokenBalance !== '0' && handleMaxBtn && (jsx$2(Button, { className: "max-button", onClick: handleMaxBtn, children: "Max" })) })] })] }))] }));
72289
+ } }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default' }, children: [jsxs(Flex$1, { children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: chainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, chainId), size: 28, chain: chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, chainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { children: selectedTokenPrice && typedValue
72290
+ ? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
72291
+ : '' }), jsxs(Flex$1, { children: [account && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsxs(Flex$1, { className: "balancerow max", children: [tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant !== 'alt' && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })), tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant === 'alt' && (jsxs(Flex$1, { children: [jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 4).toString()), children: "25%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 2).toString()), children: "50%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) * 0.75).toString()), children: "75%" }), jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" })] }))] })] })] })] }));
72274
72292
  };
72275
72293
 
72276
72294
  var NetworkNames;
@@ -72451,6 +72469,708 @@ const useSoulZapTokenQuote = (typedValue, inputCurrency, outputToken, chainId, a
72451
72469
  return [isLoading, response, estimateOutput, zapError];
72452
72470
  };
72453
72471
 
72472
+ var USDT_ETH_ABI = [
72473
+ {
72474
+ constant: true,
72475
+ inputs: [
72476
+ ],
72477
+ name: "name",
72478
+ outputs: [
72479
+ {
72480
+ name: "",
72481
+ type: "string"
72482
+ }
72483
+ ],
72484
+ payable: false,
72485
+ stateMutability: "view",
72486
+ type: "function"
72487
+ },
72488
+ {
72489
+ constant: false,
72490
+ inputs: [
72491
+ {
72492
+ name: "_upgradedAddress",
72493
+ type: "address"
72494
+ }
72495
+ ],
72496
+ name: "deprecate",
72497
+ outputs: [
72498
+ ],
72499
+ payable: false,
72500
+ stateMutability: "nonpayable",
72501
+ type: "function"
72502
+ },
72503
+ {
72504
+ constant: false,
72505
+ inputs: [
72506
+ {
72507
+ name: "_spender",
72508
+ type: "address"
72509
+ },
72510
+ {
72511
+ name: "_value",
72512
+ type: "uint256"
72513
+ }
72514
+ ],
72515
+ name: "approve",
72516
+ outputs: [
72517
+ ],
72518
+ payable: false,
72519
+ stateMutability: "nonpayable",
72520
+ type: "function"
72521
+ },
72522
+ {
72523
+ constant: true,
72524
+ inputs: [
72525
+ ],
72526
+ name: "deprecated",
72527
+ outputs: [
72528
+ {
72529
+ name: "",
72530
+ type: "bool"
72531
+ }
72532
+ ],
72533
+ payable: false,
72534
+ stateMutability: "view",
72535
+ type: "function"
72536
+ },
72537
+ {
72538
+ constant: false,
72539
+ inputs: [
72540
+ {
72541
+ name: "_evilUser",
72542
+ type: "address"
72543
+ }
72544
+ ],
72545
+ name: "addBlackList",
72546
+ outputs: [
72547
+ ],
72548
+ payable: false,
72549
+ stateMutability: "nonpayable",
72550
+ type: "function"
72551
+ },
72552
+ {
72553
+ constant: true,
72554
+ inputs: [
72555
+ ],
72556
+ name: "totalSupply",
72557
+ outputs: [
72558
+ {
72559
+ name: "",
72560
+ type: "uint256"
72561
+ }
72562
+ ],
72563
+ payable: false,
72564
+ stateMutability: "view",
72565
+ type: "function"
72566
+ },
72567
+ {
72568
+ constant: false,
72569
+ inputs: [
72570
+ {
72571
+ name: "_from",
72572
+ type: "address"
72573
+ },
72574
+ {
72575
+ name: "_to",
72576
+ type: "address"
72577
+ },
72578
+ {
72579
+ name: "_value",
72580
+ type: "uint256"
72581
+ }
72582
+ ],
72583
+ name: "transferFrom",
72584
+ outputs: [
72585
+ ],
72586
+ payable: false,
72587
+ stateMutability: "nonpayable",
72588
+ type: "function"
72589
+ },
72590
+ {
72591
+ constant: true,
72592
+ inputs: [
72593
+ ],
72594
+ name: "upgradedAddress",
72595
+ outputs: [
72596
+ {
72597
+ name: "",
72598
+ type: "address"
72599
+ }
72600
+ ],
72601
+ payable: false,
72602
+ stateMutability: "view",
72603
+ type: "function"
72604
+ },
72605
+ {
72606
+ constant: true,
72607
+ inputs: [
72608
+ {
72609
+ name: "",
72610
+ type: "address"
72611
+ }
72612
+ ],
72613
+ name: "balances",
72614
+ outputs: [
72615
+ {
72616
+ name: "",
72617
+ type: "uint256"
72618
+ }
72619
+ ],
72620
+ payable: false,
72621
+ stateMutability: "view",
72622
+ type: "function"
72623
+ },
72624
+ {
72625
+ constant: true,
72626
+ inputs: [
72627
+ ],
72628
+ name: "decimals",
72629
+ outputs: [
72630
+ {
72631
+ name: "",
72632
+ type: "uint256"
72633
+ }
72634
+ ],
72635
+ payable: false,
72636
+ stateMutability: "view",
72637
+ type: "function"
72638
+ },
72639
+ {
72640
+ constant: true,
72641
+ inputs: [
72642
+ ],
72643
+ name: "maximumFee",
72644
+ outputs: [
72645
+ {
72646
+ name: "",
72647
+ type: "uint256"
72648
+ }
72649
+ ],
72650
+ payable: false,
72651
+ stateMutability: "view",
72652
+ type: "function"
72653
+ },
72654
+ {
72655
+ constant: true,
72656
+ inputs: [
72657
+ ],
72658
+ name: "_totalSupply",
72659
+ outputs: [
72660
+ {
72661
+ name: "",
72662
+ type: "uint256"
72663
+ }
72664
+ ],
72665
+ payable: false,
72666
+ stateMutability: "view",
72667
+ type: "function"
72668
+ },
72669
+ {
72670
+ constant: false,
72671
+ inputs: [
72672
+ ],
72673
+ name: "unpause",
72674
+ outputs: [
72675
+ ],
72676
+ payable: false,
72677
+ stateMutability: "nonpayable",
72678
+ type: "function"
72679
+ },
72680
+ {
72681
+ constant: true,
72682
+ inputs: [
72683
+ {
72684
+ name: "_maker",
72685
+ type: "address"
72686
+ }
72687
+ ],
72688
+ name: "getBlackListStatus",
72689
+ outputs: [
72690
+ {
72691
+ name: "",
72692
+ type: "bool"
72693
+ }
72694
+ ],
72695
+ payable: false,
72696
+ stateMutability: "view",
72697
+ type: "function"
72698
+ },
72699
+ {
72700
+ constant: true,
72701
+ inputs: [
72702
+ {
72703
+ name: "",
72704
+ type: "address"
72705
+ },
72706
+ {
72707
+ name: "",
72708
+ type: "address"
72709
+ }
72710
+ ],
72711
+ name: "allowed",
72712
+ outputs: [
72713
+ {
72714
+ name: "",
72715
+ type: "uint256"
72716
+ }
72717
+ ],
72718
+ payable: false,
72719
+ stateMutability: "view",
72720
+ type: "function"
72721
+ },
72722
+ {
72723
+ constant: true,
72724
+ inputs: [
72725
+ ],
72726
+ name: "paused",
72727
+ outputs: [
72728
+ {
72729
+ name: "",
72730
+ type: "bool"
72731
+ }
72732
+ ],
72733
+ payable: false,
72734
+ stateMutability: "view",
72735
+ type: "function"
72736
+ },
72737
+ {
72738
+ constant: true,
72739
+ inputs: [
72740
+ {
72741
+ name: "who",
72742
+ type: "address"
72743
+ }
72744
+ ],
72745
+ name: "balanceOf",
72746
+ outputs: [
72747
+ {
72748
+ name: "",
72749
+ type: "uint256"
72750
+ }
72751
+ ],
72752
+ payable: false,
72753
+ stateMutability: "view",
72754
+ type: "function"
72755
+ },
72756
+ {
72757
+ constant: false,
72758
+ inputs: [
72759
+ ],
72760
+ name: "pause",
72761
+ outputs: [
72762
+ ],
72763
+ payable: false,
72764
+ stateMutability: "nonpayable",
72765
+ type: "function"
72766
+ },
72767
+ {
72768
+ constant: true,
72769
+ inputs: [
72770
+ ],
72771
+ name: "getOwner",
72772
+ outputs: [
72773
+ {
72774
+ name: "",
72775
+ type: "address"
72776
+ }
72777
+ ],
72778
+ payable: false,
72779
+ stateMutability: "view",
72780
+ type: "function"
72781
+ },
72782
+ {
72783
+ constant: true,
72784
+ inputs: [
72785
+ ],
72786
+ name: "owner",
72787
+ outputs: [
72788
+ {
72789
+ name: "",
72790
+ type: "address"
72791
+ }
72792
+ ],
72793
+ payable: false,
72794
+ stateMutability: "view",
72795
+ type: "function"
72796
+ },
72797
+ {
72798
+ constant: true,
72799
+ inputs: [
72800
+ ],
72801
+ name: "symbol",
72802
+ outputs: [
72803
+ {
72804
+ name: "",
72805
+ type: "string"
72806
+ }
72807
+ ],
72808
+ payable: false,
72809
+ stateMutability: "view",
72810
+ type: "function"
72811
+ },
72812
+ {
72813
+ constant: false,
72814
+ inputs: [
72815
+ {
72816
+ name: "_to",
72817
+ type: "address"
72818
+ },
72819
+ {
72820
+ name: "_value",
72821
+ type: "uint256"
72822
+ }
72823
+ ],
72824
+ name: "transfer",
72825
+ outputs: [
72826
+ ],
72827
+ payable: false,
72828
+ stateMutability: "nonpayable",
72829
+ type: "function"
72830
+ },
72831
+ {
72832
+ constant: false,
72833
+ inputs: [
72834
+ {
72835
+ name: "newBasisPoints",
72836
+ type: "uint256"
72837
+ },
72838
+ {
72839
+ name: "newMaxFee",
72840
+ type: "uint256"
72841
+ }
72842
+ ],
72843
+ name: "setParams",
72844
+ outputs: [
72845
+ ],
72846
+ payable: false,
72847
+ stateMutability: "nonpayable",
72848
+ type: "function"
72849
+ },
72850
+ {
72851
+ constant: false,
72852
+ inputs: [
72853
+ {
72854
+ name: "amount",
72855
+ type: "uint256"
72856
+ }
72857
+ ],
72858
+ name: "issue",
72859
+ outputs: [
72860
+ ],
72861
+ payable: false,
72862
+ stateMutability: "nonpayable",
72863
+ type: "function"
72864
+ },
72865
+ {
72866
+ constant: false,
72867
+ inputs: [
72868
+ {
72869
+ name: "amount",
72870
+ type: "uint256"
72871
+ }
72872
+ ],
72873
+ name: "redeem",
72874
+ outputs: [
72875
+ ],
72876
+ payable: false,
72877
+ stateMutability: "nonpayable",
72878
+ type: "function"
72879
+ },
72880
+ {
72881
+ constant: true,
72882
+ inputs: [
72883
+ {
72884
+ name: "_owner",
72885
+ type: "address"
72886
+ },
72887
+ {
72888
+ name: "_spender",
72889
+ type: "address"
72890
+ }
72891
+ ],
72892
+ name: "allowance",
72893
+ outputs: [
72894
+ {
72895
+ name: "remaining",
72896
+ type: "uint256"
72897
+ }
72898
+ ],
72899
+ payable: false,
72900
+ stateMutability: "view",
72901
+ type: "function"
72902
+ },
72903
+ {
72904
+ constant: true,
72905
+ inputs: [
72906
+ ],
72907
+ name: "basisPointsRate",
72908
+ outputs: [
72909
+ {
72910
+ name: "",
72911
+ type: "uint256"
72912
+ }
72913
+ ],
72914
+ payable: false,
72915
+ stateMutability: "view",
72916
+ type: "function"
72917
+ },
72918
+ {
72919
+ constant: true,
72920
+ inputs: [
72921
+ {
72922
+ name: "",
72923
+ type: "address"
72924
+ }
72925
+ ],
72926
+ name: "isBlackListed",
72927
+ outputs: [
72928
+ {
72929
+ name: "",
72930
+ type: "bool"
72931
+ }
72932
+ ],
72933
+ payable: false,
72934
+ stateMutability: "view",
72935
+ type: "function"
72936
+ },
72937
+ {
72938
+ constant: false,
72939
+ inputs: [
72940
+ {
72941
+ name: "_clearedUser",
72942
+ type: "address"
72943
+ }
72944
+ ],
72945
+ name: "removeBlackList",
72946
+ outputs: [
72947
+ ],
72948
+ payable: false,
72949
+ stateMutability: "nonpayable",
72950
+ type: "function"
72951
+ },
72952
+ {
72953
+ constant: true,
72954
+ inputs: [
72955
+ ],
72956
+ name: "MAX_UINT",
72957
+ outputs: [
72958
+ {
72959
+ name: "",
72960
+ type: "uint256"
72961
+ }
72962
+ ],
72963
+ payable: false,
72964
+ stateMutability: "view",
72965
+ type: "function"
72966
+ },
72967
+ {
72968
+ constant: false,
72969
+ inputs: [
72970
+ {
72971
+ name: "newOwner",
72972
+ type: "address"
72973
+ }
72974
+ ],
72975
+ name: "transferOwnership",
72976
+ outputs: [
72977
+ ],
72978
+ payable: false,
72979
+ stateMutability: "nonpayable",
72980
+ type: "function"
72981
+ },
72982
+ {
72983
+ constant: false,
72984
+ inputs: [
72985
+ {
72986
+ name: "_blackListedUser",
72987
+ type: "address"
72988
+ }
72989
+ ],
72990
+ name: "destroyBlackFunds",
72991
+ outputs: [
72992
+ ],
72993
+ payable: false,
72994
+ stateMutability: "nonpayable",
72995
+ type: "function"
72996
+ },
72997
+ {
72998
+ inputs: [
72999
+ {
73000
+ name: "_initialSupply",
73001
+ type: "uint256"
73002
+ },
73003
+ {
73004
+ name: "_name",
73005
+ type: "string"
73006
+ },
73007
+ {
73008
+ name: "_symbol",
73009
+ type: "string"
73010
+ },
73011
+ {
73012
+ name: "_decimals",
73013
+ type: "uint256"
73014
+ }
73015
+ ],
73016
+ payable: false,
73017
+ stateMutability: "nonpayable",
73018
+ type: "constructor"
73019
+ },
73020
+ {
73021
+ anonymous: false,
73022
+ inputs: [
73023
+ {
73024
+ indexed: false,
73025
+ name: "amount",
73026
+ type: "uint256"
73027
+ }
73028
+ ],
73029
+ name: "Issue",
73030
+ type: "event"
73031
+ },
73032
+ {
73033
+ anonymous: false,
73034
+ inputs: [
73035
+ {
73036
+ indexed: false,
73037
+ name: "amount",
73038
+ type: "uint256"
73039
+ }
73040
+ ],
73041
+ name: "Redeem",
73042
+ type: "event"
73043
+ },
73044
+ {
73045
+ anonymous: false,
73046
+ inputs: [
73047
+ {
73048
+ indexed: false,
73049
+ name: "newAddress",
73050
+ type: "address"
73051
+ }
73052
+ ],
73053
+ name: "Deprecate",
73054
+ type: "event"
73055
+ },
73056
+ {
73057
+ anonymous: false,
73058
+ inputs: [
73059
+ {
73060
+ indexed: false,
73061
+ name: "feeBasisPoints",
73062
+ type: "uint256"
73063
+ },
73064
+ {
73065
+ indexed: false,
73066
+ name: "maxFee",
73067
+ type: "uint256"
73068
+ }
73069
+ ],
73070
+ name: "Params",
73071
+ type: "event"
73072
+ },
73073
+ {
73074
+ anonymous: false,
73075
+ inputs: [
73076
+ {
73077
+ indexed: false,
73078
+ name: "_blackListedUser",
73079
+ type: "address"
73080
+ },
73081
+ {
73082
+ indexed: false,
73083
+ name: "_balance",
73084
+ type: "uint256"
73085
+ }
73086
+ ],
73087
+ name: "DestroyedBlackFunds",
73088
+ type: "event"
73089
+ },
73090
+ {
73091
+ anonymous: false,
73092
+ inputs: [
73093
+ {
73094
+ indexed: false,
73095
+ name: "_user",
73096
+ type: "address"
73097
+ }
73098
+ ],
73099
+ name: "AddedBlackList",
73100
+ type: "event"
73101
+ },
73102
+ {
73103
+ anonymous: false,
73104
+ inputs: [
73105
+ {
73106
+ indexed: false,
73107
+ name: "_user",
73108
+ type: "address"
73109
+ }
73110
+ ],
73111
+ name: "RemovedBlackList",
73112
+ type: "event"
73113
+ },
73114
+ {
73115
+ anonymous: false,
73116
+ inputs: [
73117
+ {
73118
+ indexed: true,
73119
+ name: "owner",
73120
+ type: "address"
73121
+ },
73122
+ {
73123
+ indexed: true,
73124
+ name: "spender",
73125
+ type: "address"
73126
+ },
73127
+ {
73128
+ indexed: false,
73129
+ name: "value",
73130
+ type: "uint256"
73131
+ }
73132
+ ],
73133
+ name: "Approval",
73134
+ type: "event"
73135
+ },
73136
+ {
73137
+ anonymous: false,
73138
+ inputs: [
73139
+ {
73140
+ indexed: true,
73141
+ name: "from",
73142
+ type: "address"
73143
+ },
73144
+ {
73145
+ indexed: true,
73146
+ name: "to",
73147
+ type: "address"
73148
+ },
73149
+ {
73150
+ indexed: false,
73151
+ name: "value",
73152
+ type: "uint256"
73153
+ }
73154
+ ],
73155
+ name: "Transfer",
73156
+ type: "event"
73157
+ },
73158
+ {
73159
+ anonymous: false,
73160
+ inputs: [
73161
+ ],
73162
+ name: "Pause",
73163
+ type: "event"
73164
+ },
73165
+ {
73166
+ anonymous: false,
73167
+ inputs: [
73168
+ ],
73169
+ name: "Unpause",
73170
+ type: "event"
73171
+ }
73172
+ ];
73173
+
72454
73174
  /**
72455
73175
  * useAllowance hook: fetches the amount approved by the user for a given token
72456
73176
  * useApproval hook: returns the approval state (not approved, pending or approved) and a function to approve on chain
@@ -72529,7 +73249,9 @@ const useApproval = (amount, currency, spender, account, chainId) => {
72529
73249
  setConfirmingTxOnWallet(true);
72530
73250
  const hash = yield writeContractAsync({
72531
73251
  address: tokenAddress,
72532
- abi: ERC_20_ABI,
73252
+ abi: (tokenAddress === null || tokenAddress === void 0 ? void 0 : tokenAddress.toLowerCase()) === '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase()
73253
+ ? USDT_ETH_ABI
73254
+ : ERC_20_ABI,
72533
73255
  functionName: 'approve',
72534
73256
  args: [spender, bigishAmount],
72535
73257
  });
@@ -72864,7 +73586,7 @@ const ZapModal = ({ onDismiss, outputToken, account, chainId }) => {
72864
73586
  });
72865
73587
  });
72866
73588
  };
72867
- return (jsxs(Modal, { children: [jsx$2(ModalHeader, { onDismiss: onDismiss, children: jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsxs(Text, { sx: { fontSize: '22px', fontWeight: 700, lineHeight: '30px' }, children: ["Zap ", jsx$2(Svg, { icon: "ZapIcon" })] }), jsx$2(Flex, { onClick: onOpenSlippageModal, sx: { mr: '15px' }, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })] }) }), jsxs(Flex, { sx: { flexDirection: 'column', pt: '10px', gap: '10px' }, children: [jsx$2(Flex, { sx: { position: 'relative' }, children: jsx$2(Text, { children: "From:" }) }), jsx$2(Flex, { sx: { width: '100%', height: 'auto', justifyContent: 'space-between' }, children: jsx$2(TokenSelectorPanel, { typedValue: typedValue, setTypedValue: setTypedValue, selectedToken: inputToken, handleMaxBtn: handleMaxInput, handleCurrencySelect: handleCurrencySelect, chainId: chainId, enableZap: true, tokenBalance: inputTokenBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, bondEarnToken: outputToken }) }), jsxs(Flex, { sx: { position: 'relative', mt: '10px' }, children: [jsx$2(Text, { children: "To:" }), jsx$2(Box$1, { sx: { position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)' }, children: jsx$2(Svg, { icon: "ZapArrow" }) })] }), jsx$2(TokenSelectorPanel, { typedValue: isWrap ? typedValue : outputValue === 0 ? '' : outputValue.toFixed(18), setTypedValue: () => null, selectedToken: outputToken, handleCurrencySelect: () => null, chainId: chainId, enableZap: false, tokenBalance: outputTokenBalanceString, selectedTokenPrice: outputTokenPrice === null || outputTokenPrice === void 0 ? void 0 : outputTokenPrice.price }), jsx$2(Flex, { className: "button-container zap", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== chainId ? (jsxs(Button, { className: "switch-button zap", onClick: (event) => {
73589
+ return (jsxs(Modal, { children: [jsx$2(ModalHeader, { onDismiss: onDismiss, children: jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-between' }, children: [jsxs(Text, { sx: { fontSize: '22px', fontWeight: 700, lineHeight: '30px' }, children: ["Zap ", jsx$2(Svg, { icon: "ZapIcon" })] }), jsx$2(Flex, { onClick: onOpenSlippageModal, sx: { mr: '15px' }, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })] }) }), jsxs(Flex, { sx: { flexDirection: 'column', pt: '10px', gap: '10px' }, children: [jsx$2(Flex, { sx: { position: 'relative' }, children: jsx$2(Text, { children: "From:" }) }), jsx$2(Flex, { sx: { width: '100%', height: 'auto', justifyContent: 'space-between' }, children: jsx$2(TokenSelectorPanel, { typedValue: typedValue, setTypedValue: setTypedValue, selectedToken: inputToken, handleValueBtn: handleMaxInput, handleCurrencySelect: handleCurrencySelect, chainId: chainId, enableZap: true, tokenBalance: inputTokenBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, bondEarnToken: outputToken }) }), jsxs(Flex, { sx: { position: 'relative', mt: '10px' }, children: [jsx$2(Text, { children: "To:" }), jsx$2(Box$1, { sx: { position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)' }, children: jsx$2(Svg, { icon: "ZapArrow" }) })] }), jsx$2(TokenSelectorPanel, { typedValue: isWrap ? typedValue : outputValue === 0 ? '' : outputValue.toFixed(18), setTypedValue: () => null, selectedToken: outputToken, handleCurrencySelect: () => null, chainId: chainId, enableZap: false, tokenBalance: outputTokenBalanceString, selectedTokenPrice: outputTokenPrice === null || outputTokenPrice === void 0 ? void 0 : outputTokenPrice.price }), jsx$2(Flex, { className: "button-container zap", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== chainId ? (jsxs(Button, { className: "switch-button zap", onClick: (event) => {
72868
73590
  event.stopPropagation();
72869
73591
  switchChain({ chainId: chainId });
72870
73592
  }, children: ["Switch to ", NETWORK_LABEL[chainId]] })) : approvalState === ApprovalState.NOT_APPROVED || approvalState === ApprovalState.PENDING ? (jsx$2(Button, { onClick: handleApprove, fullWidth: true, load: approvalState === ApprovalState.PENDING, disable: approvalState === ApprovalState.PENDING, children: pendingTx || approvalState === ApprovalState.PENDING ? 'ENABLING' : 'ENABLE' })) : (jsx$2(Button, { onClick: soulZapCallback, fullWidth: true, load: pendingTx || fetchingQuote || isConfirming, disabled: pendingTx || fetchingQuote || !zapData || !hasEnoughBalance || isConfirming || zapError, children: zapError
@@ -72880,7 +73602,7 @@ const AccordionText = ({ isVisible = false }) => {
72880
73602
  if (!isVisible) {
72881
73603
  return null;
72882
73604
  }
72883
- return (jsxs(Fragment$1, { children: [jsx$2(Flex, { className: "accordion-title", children: "Bonds at Seedify are an exciting new product!" }), jsx$2(AnimatePresence, { children: jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: jsxs(Flex, { className: "accordion-body", sx: { flexDirection: 'column' }, children: [jsx$2("p", { children: "Are you a strong believer in a project? Do you want to buy project tokens at a discount compared to the market? If so, you've arrived at the right place!" }), jsx$2("p", { children: "Bonds allow you to purchase project tokens at a discounted price with a short-term linear vesting. Its a perfect solution for projects you're planning to buy and hold tokens of!" }), jsx$2("p", { children: "When you buy a Bond, you essentially are given an NFT (which you can transfer across your wallets). Whichever wallet owns the NFT will be able to Claim tokens of that project post-purchase until vesting period ends. Bonds at Seedify can range their vesting from 7 Days to 90 Days, with 30 Days being the standard." })] }) }) })] }));
73605
+ return (jsxs(Fragment$1, { children: [jsx$2(Flex, { className: "accordion-title", children: "Bonds at Seedify are an exciting new product!" }), jsx$2(AnimatePresence, { children: jsx$2(motion.div, { initial: { height: 0 }, animate: { height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { height: 0 }, sx: { overflow: 'hidden', width: '100%' }, children: jsxs(Flex, { className: "accordion-body", sx: { flexDirection: 'column' }, children: [jsx$2(Flex, { sx: { mt: '10px' }, children: "Are you a strong believer in a project? Do you want to buy project tokens at a discount compared to the market? If so, you've arrived at the right place!" }), jsx$2(Flex, { sx: { mt: '10px' }, children: "Bonds allow you to purchase project tokens at a discounted price with a short-term linear vesting. Its a perfect solution for projects you're planning to buy and hold tokens of!" }), jsx$2(Flex, { sx: { mt: '10px' }, children: "When you buy a Bond, you essentially are given an NFT (which you can transfer across your wallets). Whichever wallet owns the NFT will be able to Claim tokens of that project post-purchase until vesting period ends. Bonds at Seedify can range their vesting from 7 Days to 90 Days, with 30 Days being the standard." })] }) }) })] }));
72884
73606
  };
72885
73607
 
72886
73608
  const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account) => {
@@ -73095,7 +73817,7 @@ const SafeHTMLComponent = ({ html }) => {
73095
73817
 
73096
73818
  const ProjectDescription = ({ description }) => {
73097
73819
  const [isOpen, setIsOpen] = useState(false);
73098
- return (jsxs(Flex, { className: "modaltable-container description-container", children: [jsxs(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'], flexDirection: 'column' }, children: [jsx$2(Text, { sx: {
73820
+ return (jsxs(Flex, { className: "description-container", children: [jsxs(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'], flexDirection: 'column' }, children: [jsx$2(Text, { sx: {
73099
73821
  fontSize: ['12px', '12px', '12px', '14px'],
73100
73822
  mt: '10px',
73101
73823
  lineHeight: ['18px', '18px', '18px', '21px'],
@@ -73119,12 +73841,60 @@ const BondModalHeaderAlt = ({ bondData, onDismiss, showProjectInfoButton, }) =>
73119
73841
  }
73120
73842
  onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
73121
73843
  };
73122
- return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(Flex, { sx: { mb: '-5px', pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
73844
+ // const handleProjectViewNavigation = () => {
73845
+ // window.open(`${window.location.origin}/bonds/${bondData.billAddress}/${bondData.chainId}`, '_self')
73846
+ // track({
73847
+ // event: 'projectInfoClick',
73848
+ // chain: bondData.chainId,
73849
+ // data: {
73850
+ // cat: 'Modal',
73851
+ // bond: bondData.earnToken.symbol,
73852
+ // bondChain: bondData.chainId,
73853
+ // },
73854
+ // })
73855
+ // }
73856
+ return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(Flex, { sx: { pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
73123
73857
  };
73124
73858
 
73125
- const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
73126
- // ??
73127
- accordionTitle = 'What are Bonds?', accordionBody = 'Body', }) => {
73859
+ const ImageAndShortDescription = ({ bondData, onDismiss }) => {
73860
+ var _a;
73861
+ const SDKConfig = useSDKConfig();
73862
+ // Swiper logic for the alt view
73863
+ const [activeSlide, setActiveSlide] = useState(0);
73864
+ const { swiper, setSwiper } = useSwiper();
73865
+ const imagesLength = 3;
73866
+ const handleSlide = (event) => {
73867
+ const slideNumber = getDotPos(event.activeIndex, imagesLength);
73868
+ setActiveSlide(slideNumber);
73869
+ };
73870
+ const slideTo = (index) => {
73871
+ setActiveSlide(index);
73872
+ swiper === null || swiper === void 0 ? void 0 : swiper.slideTo(index);
73873
+ };
73874
+ return (jsxs(Flex, { sx: { maxWidth: ['unset', 'unset', 'unset', '500px'], flexDirection: 'column', alignItems: 'center' }, children: [jsxs(Flex, { sx: {
73875
+ flexDirection: 'column',
73876
+ width: '100%',
73877
+ alignItems: 'center',
73878
+ overflow: 'hidden',
73879
+ position: 'relative',
73880
+ }, children: [jsxs(Swiper, { id: "hotbondsSweper", onSwiper: setSwiper, slidesPerView: "auto", centeredSlides: true, lazy: true, preloadImages: false, onSlideChange: handleSlide, style: { width: '100%', overflow: 'visible' }, children: [jsx$2(SwiperSlide, { style: {
73881
+ width: '100%',
73882
+ display: 'flex',
73883
+ justifyContent: 'center',
73884
+ }, children: jsx$2("img", { className: "project-image", src: "https://placehold.co/400x200" }) }, 0), jsx$2(SwiperSlide, { style: {
73885
+ width: '100%',
73886
+ display: 'flex',
73887
+ justifyContent: 'center',
73888
+ }, children: jsx$2("img", { className: "project-image", src: "https://placehold.co/400x200" }) }, 1), jsx$2(SwiperSlide, { style: {
73889
+ width: '100%',
73890
+ display: 'flex',
73891
+ justifyContent: 'center',
73892
+ }, children: jsx$2("img", { className: "project-image", src: "https://placehold.co/400x200" }) }, 2)] }), jsx$2(Flex, { sx: { position: 'absolute', bottom: ['15px', '15px', '15px', '20px'], left: 'calc(50% - 28,5px)', zIndex: 2 }, children: [...Array(imagesLength)].map((_, i) => {
73893
+ return jsx$2(SwiperDots, { isActive: i === activeSlide, onClick: () => slideTo(i) }, i);
73894
+ }) })] }), jsxs(Flex, { sx: { alignItems: 'center', display: ['flex', 'flex', 'flex', 'none'], p: '10px', width: '100%' }, children: [jsxs(Flex, { sx: { width: ['50%', '50%', '50%', '100%'], alignItems: 'center' }, children: [jsx$2(Flex, { sx: { mr: '5px' }, children: jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 30, chain: bondData.chainId }) }), jsxs("h2", { className: "modal-tokenname-chainicon", sx: { margin: '0px' }, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, ' '] })] }), jsx$2(Flex, { className: "modal-marketprice-header", sx: { justifyContent: 'flex-end', alignItems: 'center' }, children: jsxs("span", { className: "modal-marketprice", children: ["Market Price: $", earnTokenPrice(bondData)] }) }), jsx$2(Flex, { className: "bondmodal-header-alt", sx: { mb: '10px' }, children: jsx$2(BondModalHeaderAlt, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }) })] }), jsx$2(Flex, { className: "description-container paragraph-spaced", sx: { px: '10px', opacity: 0.7, mt: ['0', '0', '0', '10px'] }, children: jsx$2(ProjectDescription, { description: bondData === null || bondData === void 0 ? void 0 : bondData.shortDescription }) })] }));
73895
+ };
73896
+
73897
+ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) => {
73128
73898
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
73129
73899
  const SDKConfig = useSDKConfig();
73130
73900
  // State
@@ -73314,7 +74084,7 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', }) => {
73314
74084
  window.open(`https://ape.bond/swap?outputcurrency=${bondData === null || bondData === void 0 ? void 0 : bondData.lpToken.address[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]}&outputChain=${bondData === null || bondData === void 0 ? void 0 : bondData.chainId}`, '_blank');
73315
74085
  }
73316
74086
  };
73317
- return (jsx$2(Modal, { className: "modal", onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleMaxBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
74087
+ return (jsx$2(Modal, { className: "modal", onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
73318
74088
  event.stopPropagation();
73319
74089
  switchChain({ chainId: bondData.chainId });
73320
74090
  }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
@@ -73327,15 +74097,35 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', }) => {
73327
74097
  (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
73328
74098
  !account ||
73329
74099
  !inputValue ||
73330
- parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] })] })] })) })) : (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content font-small gpt", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white' }, children: ["Dev Mode - Current view: \"alt\"", jsx$2(Text, { onClick: () => setModalVariant('standard'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsx$2(Flex, { className: "bondmodal-header-alt", sx: { mb: '20px' }, children: jsx$2(BondModalHeaderAlt, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }) }), jsxs(Flex, { className: "modaltable-container", sx: { flexDirection: 'row', gap: '20px' }, children: [jsxs(Flex, { sx: { width: '500px', flexDirection: 'column' }, children: [jsx$2("img", { src: "https://placehold.co/400x200" }), jsx$2(Flex, { className: "modaltable-container description-container paragraph-spaced", sx: { marginTop: '20px' }, children: bondData === null || bondData === void 0 ? void 0 : bondData.shortDescription })] }), jsxs(Flex, { sx: { flexDirection: 'column', width: '600px' }, children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: { minWidth: '300px' }, children: jsxs("h2", { sx: { margin: '0px' }, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, ' ', jsx$2(Svg, { width: 20, height: 20, icon: (_k = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bondData.chainId]) !== null && _k !== void 0 ? _k : 'question' })] }) }), jsxs(Flex, { sx: { justifyContent: 'space-between', flexGrow: 1 }, children: [jsx$2(TokenImage, { symbol: (_l = bondData.showcaseTokenName) !== null && _l !== void 0 ? _l : bondData.earnToken.symbol, size: 20 }), jsx$2("span", { children: bondData.earnToken.symbol }), " ", jsx$2("span", { children: "|" }), ' ', jsxs("span", { children: ["Market Price: $", earnTokenPrice(bondData)] })] })] }), jsxs(Flex, { sx: { flexDirection: 'column', marginTop: '20px' }, children: [jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleMaxBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modal-youreceive-row", sx: { justifyContent: 'space-between', alignItems: 'center' }, children: [jsxs(Flex, { className: "modal-youreceive-textbox", children: ["You will receive:", jsx$2(Flex, { className: "modal-youreceive-tokenimage", sx: { marginLeft: '15px', marginRight: '5px' }, children: jsx$2(TokenImage, { symbol: (_m = bondData.showcaseTokenName) !== null && _m !== void 0 ? _m : bondData.earnToken.symbol, size: 20 }) }), jsxs("span", { className: "modal-receive-text", children: [(lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0), ' ', bondData.earnToken.symbol, " + \u00A0", (youGet(bondData, inputValue) -
73331
- lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0)] }), jsx$2("span", { className: "text-highlight", children: "\u00A0additional" })] }), jsx$2(Flex, { className: "button-container buy", sx: { justifyContent: 'end' }, children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button button-narrow", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
73332
- event.stopPropagation();
73333
- switchChain({ chainId: bondData.chainId });
73334
- }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsxs(Button, { className: "action-button", load: load, disabled: load || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) || !account || !inputValue || parseFloat(inputValue) === 0, onClick: handleBothPurchases, children: ["buy", ' ', isZap ? (jsx$2("span", { style: { marginLeft: '8px' }, children: jsx$2(Svg, { icon: "ZapIcon" }) })) : ('')] })) : (jsx$2(Button, { className: "action-button", load: approvalState === ApprovalState.PENDING, disabled: approvalState === ApprovalState.PENDING ||
73335
- (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
73336
- !account ||
73337
- !inputValue ||
73338
- parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] }), jsx$2(Flex, { sx: { width: '100%', marginTop: '10px', marginBottom: '10px' }, children: jsx$2("hr", { className: "fading-hr" }) }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { sx: { width: '50%', flexDirection: 'column' }, children: ["Market Price: $", formatUSDNumber((youGet(bondData, inputValue) * lodashExports.toNumber(earnTokenPrice(bondData))).toString()), jsx$2("hr", { className: "fading-hr" }), jsx$2("span", { className: "text-highlight flex-inline", children: "Our price: " }), jsxs("span", { className: "flex-inline", children: ["$", formatUSDNumber((lodashExports.toNumber(inputValue) * lodashExports.toNumber(bondData.principalTokenPrice)).toString()), ' '] }), jsxs("span", { className: "text-highlight flex-inline", children: ["(discount rate ", bondData === null || bondData === void 0 ? void 0 : bondData.discount.toFixed(2), "%)"] })] }), jsx$2(Flex, { sx: { width: '50px', alignItems: 'center', justifyContent: 'center' }, children: "vs." }), jsxs(Flex, { sx: { width: '50%', flexDirection: 'column' }, children: ["If purchased from market:", ' ', (lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0), ' ', bondData.earnToken.symbol, jsx$2("hr", { className: "fading-hr" }), jsx$2("span", { className: "text-highlight flex-inline", children: "Amount you will get:" }), ' ', youGet(bondData, inputValue).toFixed(0), ' ', jsx$2("span", { className: "flex-inline", children: bondData.earnToken.symbol })] })] })] })] })] }), jsxs(Flex, { className: "footer-details", children: [jsxs(Flex, { sx: { width: '25%', justifyContent: 'center' }, children: ["Vesting start date:", ' ', new Intl.DateTimeFormat('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }).format(new Date())] }), jsxs(Flex, { sx: { width: '25%', justifyContent: 'center' }, children: ["Vesting end date:", ' ', new Intl.DateTimeFormat('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }).format(new Date(Date.now() + vestingTime((_o = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _o !== void 0 ? _o : 0).days * 86400000))] }), jsx$2(Flex, { sx: { width: '25%', justifyContent: 'center' }, children: "Vesting type: Linear" }), jsxs(Flex, { sx: { width: '25%', justifyContent: 'center' }, onClick: () => setAccordionVisible(!accordionVisible), children: ["What are bonds? \u00A0 ", jsx$2(Svg, { icon: "caret", direction: accordionVisible ? 'up' : 'down' })] })] }), accordionVisible && (jsx$2(Flex, { className: "modaltable-container accordion-container", children: jsx$2(AccordionText, { isVisible: accordionVisible }) }))] })) })) }));
74100
+ parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] })] })] })) })) : (jsx$2(Fragment$1, { children: bondData && (jsxs(Fragment$1, { children: [jsxs(Flex, { className: "modal-content font-small", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white' }, children: ["Dev Mode - Current view: \"alt\"", jsx$2(Text, { onClick: () => setModalVariant('standard'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", sx: { flexDirection: 'row', gap: ['0px', '0px', '0px', '20px'] }, children: [jsx$2(ImageAndShortDescription, { bondData: bondData, onDismiss: onDismiss }), jsxs(Flex, { sx: { flexDirection: 'column', width: '600px' }, children: [jsxs(Flex, { sx: { alignItems: 'center', display: ['none', 'none', 'none', 'flex'] }, children: [jsx$2(Flex, { sx: { width: ['50%', '50%', '50%', '50%'], ml: ['0px', '0px', '0px', '10px'] }, children: jsxs(Flex, { className: "modal-tokenname-chainicon", sx: { margin: '0px' }, children: [jsx$2(Flex, { sx: { fontSize: '26px', fontWeight: 700, mr: '4px' }, children: bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName }), jsx$2(Svg, { width: 20, height: 20, icon: (_k = NETWORK_ICONS === null || NETWORK_ICONS === void 0 ? void 0 : NETWORK_ICONS[bondData.chainId]) !== null && _k !== void 0 ? _k : 'question' })] }) }), jsxs(Flex, { className: "modal-marketprice-header", sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: (_l = bondData.showcaseTokenName) !== null && _l !== void 0 ? _l : bondData.earnToken.symbol, size: 30 }), jsx$2("span", { className: "modal-marketprice-token", children: bondData.earnToken.symbol }), jsx$2("hr", { className: "fading-hr rotate-hr" }), jsxs("span", { className: "modal-marketprice", children: ["Market Price: $", earnTokenPrice(bondData)] }), jsx$2("hr", { className: "fading-hr rotate-hr" })] }), jsx$2(Flex, { className: "bondmodal-header-alt", sx: { mb: '10px' }, children: jsx$2(BondModalHeaderAlt, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }) })] }), jsxs(Flex, { sx: { flexDirection: 'column', marginTop: '20px', mx: '10px' }, children: [jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: (value) => setInputValue(value), handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, modalVariant: modalVariant }), jsxs(Flex, { className: "modal-youreceive-row", sx: { justifyContent: 'space-between', alignItems: 'center', fontSize: '14px' }, children: [jsxs(Flex, { className: "modal-youreceive-textbox", children: [jsx$2(Flex, { sx: { opacity: 0.8 }, children: "You will receive:" }), jsxs(Flex, { children: [jsx$2(Flex, { className: "modal-youreceive-tokenimage", sx: { marginLeft: '15px', marginRight: '5px' }, children: jsx$2(TokenImage, { symbol: (_m = bondData.showcaseTokenName) !== null && _m !== void 0 ? _m : bondData.earnToken.symbol, size: 20 }) }), jsxs(Flex, { className: "modal-receive-text", sx: { opacity: 0.8 }, children: [formatNumber$2((lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0)), ' ', bondData.earnToken.symbol, " + \u00A0", formatNumber$2((youGet(bondData, inputValue) -
74101
+ lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0))] }), jsx$2("span", { className: "text-highlight", children: "\u00A0Additional" })] })] }), jsx$2(Flex, { className: "button-container buy", sx: { justifyContent: 'end' }, children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button button-narrow", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
74102
+ event.stopPropagation();
74103
+ switchChain({ chainId: bondData.chainId });
74104
+ }, children: `Switch Chain` })) : approvalState === ApprovalState.APPROVED ? (jsxs(Button, { className: "action-button", load: load, disabled: load || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) || !account || !inputValue || parseFloat(inputValue) === 0, onClick: handleBothPurchases, children: ["buy", ' ', isZap ? (jsx$2("span", { style: { marginLeft: '8px' }, children: jsx$2(Svg, { icon: "ZapIcon" }) })) : ('')] })) : (jsx$2(Button, { className: "action-button", load: approvalState === ApprovalState.PENDING, disabled: approvalState === ApprovalState.PENDING ||
74105
+ (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
74106
+ !account ||
74107
+ !inputValue ||
74108
+ parseFloat(inputValue) === 0, onClick: handleApprove, children: "enable" })) })] }), jsx$2(Flex, { sx: { width: '100%', margin: ['0', '0', '0', '10px 0'] }, children: jsx$2("hr", { className: "fading-hr" }) }), jsxs(Flex, { sx: { width: '100%', fontSize: '14px', display: ['none', 'none', 'none', 'flex'] }, children: [jsxs(Flex, { sx: { width: '50%', flexDirection: 'column', opacity: 0.8 }, children: ["Market Price: $", formatUSDNumber((youGet(bondData, inputValue) * lodashExports.toNumber(earnTokenPrice(bondData))).toString()), jsx$2("hr", { className: "fading-hr" }), jsx$2("span", { className: "text-highlight flex-inline", children: "Our price: " }), jsxs("span", { className: "flex-inline", children: ["$", formatUSDNumber((lodashExports.toNumber(inputValue) * lodashExports.toNumber(bondData.principalTokenPrice)).toString()), ' '] }), jsxs("span", { className: "text-highlight flex-inline", children: ["(discount rate ", bondData === null || bondData === void 0 ? void 0 : bondData.discount.toFixed(2), "%)"] })] }), jsx$2(Flex, { sx: { width: '50px', alignItems: 'center', justifyContent: 'center' }, children: "vs." }), jsxs(Flex, { sx: { width: '50%', flexDirection: 'column', opacity: 0.8 }, children: ["If purchased from market:", ' ', formatNumber$2((lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0)), ' ', bondData.earnToken.symbol, jsx$2("hr", { className: "fading-hr" }), jsx$2("span", { className: "text-highlight flex-inline", children: "Amount you will get:" }), ' ', formatNumber$2(youGet(bondData, inputValue).toFixed(0)), ' ', jsx$2("span", { className: "flex-inline", children: bondData.earnToken.symbol })] })] }), jsxs(Flex, { sx: {
74109
+ width: '100%',
74110
+ fontSize: '14px',
74111
+ display: ['flex', 'flex', 'flex', 'none'],
74112
+ flexDirection: 'column',
74113
+ }, children: [jsxs(Flex, { sx: { opacity: 0.8 }, children: ["Market Price: $", formatUSDNumber((youGet(bondData, inputValue) * lodashExports.toNumber(earnTokenPrice(bondData))).toString())] }), jsxs(Flex, { sx: { opacity: 0.8 }, children: ["If purchased from market:", ' ', formatNumber$2((lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0)), ' ', bondData.earnToken.symbol] }), jsxs(Flex, { sx: { mt: '10px' }, children: [jsx$2("span", { className: "text-highlight flex-inline", children: "Our price: " }), jsxs("span", { className: "flex-inline", children: ["$", formatUSDNumber((lodashExports.toNumber(inputValue) * lodashExports.toNumber(bondData.principalTokenPrice)).toString()), ' '] }), jsxs("span", { className: "text-highlight flex-inline", children: ["(discount rate ", bondData === null || bondData === void 0 ? void 0 : bondData.discount.toFixed(2), "%)"] })] }), jsxs(Flex, { sx: { mt: '10px' }, children: [jsx$2("span", { className: "text-highlight flex-inline", children: "Amount you will get:" }), ' ', formatNumber$2(youGet(bondData, inputValue).toFixed(0)), ' ', jsx$2("span", { className: "flex-inline", children: bondData.earnToken.symbol })] })] })] })] })] }), jsxs(Flex, { className: "footer-details", children: [jsxs(Flex, { sx: { width: '100%', flexDirection: 'row', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: {
74114
+ width: '100%',
74115
+ justifyContent: 'center',
74116
+ flexDirection: ['column', 'column', 'column', 'row'],
74117
+ }, children: [jsx$2(Flex, { className: "modal-footer-header", children: "Vesting start Date:\u00A0" }), jsxs(Flex, { children: [' ', new Intl.DateTimeFormat('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }).format(new Date())] })] }), jsxs(Flex, { sx: {
74118
+ width: '100%',
74119
+ justifyContent: 'center',
74120
+ flexDirection: ['column', 'column', 'column', 'row'],
74121
+ }, children: [jsx$2(Flex, { className: "modal-footer-header", sx: { justifyContent: ['flex-end', 'flex-end', 'flex-end', 'flex-start'] }, children: "Vesting end Date:\u00A0" }), jsxs(Flex, { sx: { justifyContent: ['flex-end', 'flex-end', 'flex-end', 'flex-start'] }, children: [' ', new Intl.DateTimeFormat('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }).format(new Date(Date.now() + vestingTime((_o = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _o !== void 0 ? _o : 0).days * 86400000))] })] })] }), jsx$2("hr", { className: "fading-hr hide-mobile" }), jsxs(Flex, { sx: {
74122
+ width: '100%',
74123
+ justifyContent: ['space-between', 'space-between', 'space-between', 'space-around'],
74124
+ }, children: [jsxs(Flex, { sx: { justifyContent: 'center', flexDirection: ['column', 'column', 'column', 'row'] }, children: [jsx$2(Flex, { className: "modal-footer-header", children: "Vesting type:\u00A0" }), " ", jsx$2(Flex, { children: " Linear" })] }), jsxs(Flex, { sx: {
74125
+ justifyContent: 'center',
74126
+ cursor: 'pointer',
74127
+ alignItems: 'center',
74128
+ }, onClick: () => setAccordionVisible(!accordionVisible), className: "modal-expander", children: ["What are bonds? \u00A0 ", jsx$2(Svg, { icon: "caret", direction: accordionVisible ? 'up' : 'down' })] })] })] })] }), accordionVisible && (jsx$2(Flex, { className: "modaltable-container accordion-container", children: jsx$2(AccordionText, { isVisible: accordionVisible }) }))] })) })) }));
73339
74129
  };
73340
74130
 
73341
74131
  /*
@@ -73568,7 +74358,7 @@ const BondRow = ({ bond }) => {
73568
74358
  const tokens = new BigNumber$1(tokensRemaining);
73569
74359
  return tokens.times(payoutTokenPrice);
73570
74360
  };
73571
- return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, children: [jsx$2("div", { className: "token-info-container", children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(discount)}`, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: ((_a = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _a === void 0 ? void 0 : _a.days) ? `${(_b = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _b === void 0 ? void 0 : _b.days} D` : '-' }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bond) }), style: {
74361
+ return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, children: [jsx$2("div", { className: "token-info-container bond-market", children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(discount)}`, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: ((_a = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _a === void 0 ? void 0 : _a.days) ? `${(_b = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _b === void 0 ? void 0 : _b.days} D` : '-' }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bond) }), style: {
73572
74362
  width: '127px',
73573
74363
  height: '25px',
73574
74364
  flexDirection: 'column',
@@ -73577,7 +74367,7 @@ const BondRow = ({ bond }) => {
73577
74367
  }, showTooltip: true, toolTip: `${remainingTokensFormat(bond)} ${bond.earnToken.symbol} (${formatDollar({
73578
74368
  num: remainingTokensUsd(bond).toNumber(),
73579
74369
  isPrice: true,
73580
- })})` }) }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_e = (_d = (_c = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _e !== void 0 ? _e : '', earnTokenSymbol: (_g = (_f = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _f === void 0 ? void 0 : _f.symbol) !== null && _g !== void 0 ? _g : '', bondContract: billAddress !== null && billAddress !== void 0 ? billAddress : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] })] }, billAddress));
74370
+ })})` }) }), jsx$2("div", { className: "tooltip-column", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_e = (_d = (_c = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _e !== void 0 ? _e : '', earnTokenSymbol: (_g = (_f = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _f === void 0 ? void 0 : _f.symbol) !== null && _g !== void 0 ? _g : '', bondContract: billAddress !== null && billAddress !== void 0 ? billAddress : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }) })] })] }, billAddress));
73581
74371
  };
73582
74372
 
73583
74373
  const HotBondCard = ({ bond }) => {
@@ -73596,7 +74386,7 @@ const HotBondCard = ({ bond }) => {
73596
74386
  },
73597
74387
  });
73598
74388
  };
73599
- return (jsx$2(Flex, { sx: styles$a.desktopCard, onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { bill: bond, isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bond === null || bond === void 0 ? void 0 : bond.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Discount" }), jsx$2(Flex, { className: `${getDiscountColor(discount)}`, sx: { width: '100%', justifyContent: 'center' }, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_g = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _g === void 0 ? void 0 : _g.days) ? `${(_h = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _h === void 0 ? void 0 : _h.days} D` : '-' })] })] })] }) }));
74389
+ return (jsx$2(Flex, { sx: styles$a.desktopCard, className: "hot-bond-card", onClick: handleOpenModal, children: jsxs(Flex, { sx: { flexDirection: 'column', width: '100%' }, children: [jsxs(Flex, { sx: { width: '100%', height: '75px' }, children: [jsx$2(Flex, { sx: { width: '66.66%' }, children: jsx$2(TokenInfoAndName, { bill: bond, isHotBond: true }) }), jsx$2(Flex, { className: "column column-tokenicons", sx: { width: '33.33% !important', justifyContent: 'center !important', alignItems: 'center' }, children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bond === null || bond === void 0 ? void 0 : bond.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: bond === null || bond === void 0 ? void 0 : bond.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(11%, 0%)", children: jsx$2(Svg, { icon: "more", width: "20px" }) }) })] }), jsxs(Flex, { sx: { width: '100%', justifyContent: 'space-around' }, children: [jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400 }, children: "Discount" }), jsx$2(Flex, { className: `${getDiscountColor(discount)}`, sx: { width: '100%', justifyContent: 'center' }, children: discount !== undefined ? `${discount === null || discount === void 0 ? void 0 : discount.toFixed(2)}%` : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "ARR" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' })] }), jsxs(Flex, { sx: { flexDirection: 'column', alignItems: 'center', width: '100%' }, children: [jsx$2(Flex, { sx: { opacity: 0.6, fontSize: '12px', fontWeight: 400, width: '100%', justifyContent: 'center' }, children: "Terms" }), jsx$2(Flex, { sx: { width: '100%', justifyContent: 'center' }, children: ((_g = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _g === void 0 ? void 0 : _g.days) ? `${(_h = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _h === void 0 ? void 0 : _h.days} D` : '-' })] })] })] }) }));
73600
74390
  };
73601
74391
 
73602
74392
  function useHotBondContracts() {
@@ -73636,7 +74426,7 @@ const getHotBonds = (bondData, hotBondContracts) => __awaiter$9(void 0, void 0,
73636
74426
  const HotBondCards = () => {
73637
74427
  var _a;
73638
74428
  const { data: hotBonds } = useHotBonds();
73639
- const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => { var _a; return ((_a = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _a !== void 0 ? _a : 0) > 0; });
74429
+ const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => (bond === null || bond === void 0 ? void 0 : bond.discount) > 0 && (bond === null || bond === void 0 ? void 0 : bond.discount) < 50);
73640
74430
  const [activeSlide, setActiveSlide] = useState(0);
73641
74431
  const { swiper, setSwiper } = useSwiper();
73642
74432
  const handleSlide = (event) => {
@@ -73693,7 +74483,7 @@ const BondRowsByChain = ({ bonds, hideTitles }) => {
73693
74483
  const SDKConfig = useSDKConfig();
73694
74484
  const validatedChains = (_a = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains) === null || _a === void 0 ? void 0 : _a.filter((chain) => MAINNET_CHAINS.includes(chain));
73695
74485
  return (jsx$2(Flex$1, { className: "bondrowsbychain", children: validatedChains === null || validatedChains === void 0 ? void 0 : validatedChains.map((chain) => {
73696
- return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: chain === types.ChainId.BASE || chain === types.ChainId.MAINNET }, chain));
74486
+ return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: SDKConfig.useHotBonds ? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET : false }, chain));
73697
74487
  }) }));
73698
74488
  };
73699
74489
 
@@ -73718,10 +74508,12 @@ function useUserApiStats() {
73718
74508
  const BuyAgainRow = () => {
73719
74509
  const { data: userData } = useUserApiStats();
73720
74510
  const { data: bills } = useBondsData();
74511
+ const SDKConfig = useSDKConfig();
74512
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
73721
74513
  const buyAgainBond = useMemo(() => {
73722
74514
  if (userData && (userData === null || userData === void 0 ? void 0 : userData.Sales.length) > 0) {
73723
74515
  const sortedPurchases = userData === null || userData === void 0 ? void 0 : userData.Sales.sort((a, b) => b.dollarValue - a.dollarValue);
73724
- const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => !isBondSoldOut(bill));
74516
+ const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => !isBondSoldOut(bill) && (chains === null || chains === void 0 ? void 0 : chains.includes(bill.chainId)));
73725
74517
  const highestActivePurchase = sortedPurchases === null || sortedPurchases === void 0 ? void 0 : sortedPurchases.find((purchase) => activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => {
73726
74518
  var _a;
73727
74519
  if (purchase.contractAddress.toLowerCase() === ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()))
@@ -73729,7 +74521,7 @@ const BuyAgainRow = () => {
73729
74521
  }));
73730
74522
  return activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => { var _a, _b; return ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = highestActivePurchase === null || highestActivePurchase === void 0 ? void 0 : highestActivePurchase.contractAddress) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
73731
74523
  }
73732
- }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length]);
74524
+ }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length, chains]);
73733
74525
  return buyAgainBond ? (jsx$2(AnimatePresence, { children: jsx$2(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
73734
74526
  position: 'relative',
73735
74527
  overflow: 'hidden',
@@ -73741,7 +74533,7 @@ const BuyAgainRow = () => {
73741
74533
  background: 'linear-gradient(0deg, rgba(170, 128, 249, 0.20) 0%, rgba(170, 128, 249, 0.20) 100%), var(--Neutral-Elevation-2, #1F1D29)',
73742
74534
  borderRadius: 'normal',
73743
74535
  flexDirection: 'column',
73744
- }, children: [jsx$2(Flex, { sx: {
74536
+ }, children: [jsx$2(Flex, { className: "buy-again-header", sx: {
73745
74537
  width: '100%',
73746
74538
  fontSize: '12px',
73747
74539
  fontWeight: 500,
@@ -73784,7 +74576,7 @@ const styles$7 = {
73784
74576
  const SmallRecommendationCard = ({ recommendation }) => {
73785
74577
  var _a;
73786
74578
  const vestingTime = getTimePeriods((_a = recommendation.vestingTerm) !== null && _a !== void 0 ? _a : 0, true);
73787
- return (jsxs(Flex, { sx: styles$7.smallCardContainer, onClick: () => window.open(`${window.location.origin}/bonds/${recommendation.contractAddress}/${recommendation.chainId}`, '_self'), children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$7.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$7.subTitle, children: "Discount" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
74579
+ return (jsxs(Flex, { sx: styles$7.smallCardContainer, onClick: () => window.open(`${window.location.origin}/bonds?bondAddress=${recommendation.contractAddress}&bondChain=${recommendation.chainId}`, '_self'), children: [jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: recommendation.payoutTokenName, size: 32, chain: recommendation.chainId }), jsxs(Flex, { sx: { mx: '10px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { fontSize: '14px', px: '6px' }, children: recommendation.payoutTokenName }), jsxs(Flex, { sx: styles$7.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$7.subTitle, children: "Discount" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
73788
74580
  };
73789
74581
 
73790
74582
  const RecommendationCards$1 = () => {
@@ -73827,7 +74619,7 @@ const RecommendationCards$1 = () => {
73827
74619
  color: 'grey',
73828
74620
  fontSize: ['11px'],
73829
74621
  fontWeight: 500,
73830
- }, children: "BONDS MARKETS:" }), jsx$2(RecommendationSelector, { options: options, activeOption: activeOption, setActiveOption: setActiveOption })] }), jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'] }, children: jsx$2(Image, { width: 190, height: 20, alt: "poweredBy", src: "/images/bills/powered.png", sx: {
74622
+ }, children: "BONDS MARKETS:" }), jsx$2(RecommendationSelector, { options: options, activeOption: activeOption, setActiveOption: setActiveOption })] }), jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'] }, children: jsx$2(Image$1, { width: 190, height: 20, alt: "poweredBy", src: "/images/bills/powered.png", sx: {
73831
74623
  width: '190px',
73832
74624
  height: '20px',
73833
74625
  cursor: 'pointer',
@@ -73846,7 +74638,7 @@ const FavIcon = ({ filterOption, setFilterOption, }) => {
73846
74638
  const handleFilterOption = (newOption) => {
73847
74639
  setFilterOption(newOption);
73848
74640
  };
73849
- return (jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center', minWidth: '25px', cursor: 'pointer', ml: '15px' }, onClick: () => {
74641
+ return (jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center', minWidth: '25px', cursor: 'pointer', ml: '15px' }, className: "search-fav-icon", onClick: () => {
73850
74642
  handleFilterOption(filterOption !== 'FAVORITES' ? 'FAVORITES' : 'ALL');
73851
74643
  }, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex', alignItems: 'center' }, children: filterOption === 'FAVORITES' ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22 })) : (jsx$2(Svg, { icon: "Star", width: 20, height: 20 })) }, filterOption === 'FAVORITES' ? 'StarFilled' : 'Star') }) }));
73852
74644
  };
@@ -73869,6 +74661,7 @@ const Bonds = () => {
73869
74661
  const { data: allBonds } = useBondsList();
73870
74662
  const { data: chainFilterOption, setChainFilterOption } = useChainFilterOption();
73871
74663
  const { data: tokenPrices } = useTokenPrices();
74664
+ const SDKConfig = useSDKConfig();
73872
74665
  useEffect(() => {
73873
74666
  //@ts-ignore
73874
74667
  if ((bondData === null || bondData === void 0 ? void 0 : bondData.length) === 0 && (tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.length) > 0 && (allBonds === null || allBonds === void 0 ? void 0 : allBonds.length) > 0) {
@@ -73882,13 +74675,14 @@ const Bonds = () => {
73882
74675
  const [filterOption, setFilterOption] = useState('ALL');
73883
74676
  const sortedBonds = sortBonds(sortConfig, bondData);
73884
74677
  const topTags = useTopTags(sortedBonds);
73885
- const filterOptions = ['ALL', 'FAVORITES', ...topTags, 'SOLD OUT'];
74678
+ // remove favorites for seedify
74679
+ const filterOptions = SDKConfig.referenceId !== 'seedify' ? ['ALL', 'FAVORITES', ...topTags, 'SOLD OUT'] : ['ALL', ...topTags, 'SOLD OUT'];
73886
74680
  const billsToRender = useMemo(() => {
73887
74681
  let billsToReturn = filterOption === 'SOLD OUT' ? (allBonds !== null && allBonds !== void 0 ? allBonds : []) : (sortedBonds !== null && sortedBonds !== void 0 ? sortedBonds : []);
73888
74682
  if (searchQuery) {
73889
74683
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => {
73890
74684
  var _a, _b;
73891
- return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].includes(searchQuery.toUpperCase());
74685
+ return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].some((property) => property === null || property === void 0 ? void 0 : property.includes(searchQuery.toUpperCase()));
73892
74686
  });
73893
74687
  }
73894
74688
  if (topTags.includes(filterOption)) {
@@ -73928,7 +74722,7 @@ const Bonds = () => {
73928
74722
  alignItems: 'center',
73929
74723
  flexDirection: 'column',
73930
74724
  mt: '10px',
73931
- }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), jsx$2(RecommendationCards$1, {})] }));
74725
+ }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {})] }));
73932
74726
  };
73933
74727
 
73934
74728
  var BondsViewOptions;
@@ -90502,7 +91296,7 @@ const ProjectView = ({ bondAddress, bondChain, historicalPrices }) => {
90502
91296
  p: '20px',
90503
91297
  borderRadius: '10px',
90504
91298
  mt: '5px',
90505
- }, children: [jsx$2(BondModalHeader, { bondData: bondData }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleMaxBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
91299
+ }, children: [jsx$2(BondModalHeader, { bondData: bondData }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
90506
91300
  event.stopPropagation();
90507
91301
  switchChain({ chainId: bondData.chainId });
90508
91302
  }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
@@ -90523,6 +91317,779 @@ const ProjectViewWithProviders = (props) => {
90523
91317
  return (jsx$2(Providers, { children: jsx$2(ProjectView, Object.assign({}, props)) }));
90524
91318
  };
90525
91319
 
91320
+ var domToImage = {exports: {}};
91321
+
91322
+ (function (module) {
91323
+ (function (global) {
91324
+
91325
+ var util = newUtil();
91326
+ var inliner = newInliner();
91327
+ var fontFaces = newFontFaces();
91328
+ var images = newImages();
91329
+
91330
+ // Default impl options
91331
+ var defaultOptions = {
91332
+ // Default is to fail on error, no placeholder
91333
+ imagePlaceholder: undefined,
91334
+ // Default cache bust is false, it will use the cache
91335
+ cacheBust: false
91336
+ };
91337
+
91338
+ var domtoimage = {
91339
+ toSvg: toSvg,
91340
+ toPng: toPng,
91341
+ toJpeg: toJpeg,
91342
+ toBlob: toBlob,
91343
+ toPixelData: toPixelData,
91344
+ impl: {
91345
+ fontFaces: fontFaces,
91346
+ images: images,
91347
+ util: util,
91348
+ inliner: inliner,
91349
+ options: {}
91350
+ }
91351
+ };
91352
+
91353
+ module.exports = domtoimage;
91354
+
91355
+
91356
+ /**
91357
+ * @param {Node} node - The DOM Node object to render
91358
+ * @param {Object} options - Rendering options
91359
+ * @param {Function} options.filter - Should return true if passed node should be included in the output
91360
+ * (excluding node means excluding it's children as well). Not called on the root node.
91361
+ * @param {String} options.bgcolor - color for the background, any valid CSS color value.
91362
+ * @param {Number} options.width - width to be applied to node before rendering.
91363
+ * @param {Number} options.height - height to be applied to node before rendering.
91364
+ * @param {Object} options.style - an object whose properties to be copied to node's style before rendering.
91365
+ * @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),
91366
+ defaults to 1.0.
91367
+ * @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch
91368
+ * @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url
91369
+ * @return {Promise} - A promise that is fulfilled with a SVG image data URL
91370
+ * */
91371
+ function toSvg(node, options) {
91372
+ options = options || {};
91373
+ copyOptions(options);
91374
+ return Promise.resolve(node)
91375
+ .then(function (node) {
91376
+ return cloneNode(node, options.filter, true);
91377
+ })
91378
+ .then(embedFonts)
91379
+ .then(inlineImages)
91380
+ .then(applyOptions)
91381
+ .then(function (clone) {
91382
+ return makeSvgDataUri(clone,
91383
+ options.width || util.width(node),
91384
+ options.height || util.height(node)
91385
+ );
91386
+ });
91387
+
91388
+ function applyOptions(clone) {
91389
+ if (options.bgcolor) clone.style.backgroundColor = options.bgcolor;
91390
+
91391
+ if (options.width) clone.style.width = options.width + 'px';
91392
+ if (options.height) clone.style.height = options.height + 'px';
91393
+
91394
+ if (options.style)
91395
+ Object.keys(options.style).forEach(function (property) {
91396
+ clone.style[property] = options.style[property];
91397
+ });
91398
+
91399
+ return clone;
91400
+ }
91401
+ }
91402
+
91403
+ /**
91404
+ * @param {Node} node - The DOM Node object to render
91405
+ * @param {Object} options - Rendering options, @see {@link toSvg}
91406
+ * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.
91407
+ * */
91408
+ function toPixelData(node, options) {
91409
+ return draw(node, options || {})
91410
+ .then(function (canvas) {
91411
+ return canvas.getContext('2d').getImageData(
91412
+ 0,
91413
+ 0,
91414
+ util.width(node),
91415
+ util.height(node)
91416
+ ).data;
91417
+ });
91418
+ }
91419
+
91420
+ /**
91421
+ * @param {Node} node - The DOM Node object to render
91422
+ * @param {Object} options - Rendering options, @see {@link toSvg}
91423
+ * @return {Promise} - A promise that is fulfilled with a PNG image data URL
91424
+ * */
91425
+ function toPng(node, options) {
91426
+ return draw(node, options || {})
91427
+ .then(function (canvas) {
91428
+ return canvas.toDataURL();
91429
+ });
91430
+ }
91431
+
91432
+ /**
91433
+ * @param {Node} node - The DOM Node object to render
91434
+ * @param {Object} options - Rendering options, @see {@link toSvg}
91435
+ * @return {Promise} - A promise that is fulfilled with a JPEG image data URL
91436
+ * */
91437
+ function toJpeg(node, options) {
91438
+ options = options || {};
91439
+ return draw(node, options)
91440
+ .then(function (canvas) {
91441
+ return canvas.toDataURL('image/jpeg', options.quality || 1.0);
91442
+ });
91443
+ }
91444
+
91445
+ /**
91446
+ * @param {Node} node - The DOM Node object to render
91447
+ * @param {Object} options - Rendering options, @see {@link toSvg}
91448
+ * @return {Promise} - A promise that is fulfilled with a PNG image blob
91449
+ * */
91450
+ function toBlob(node, options) {
91451
+ return draw(node, options || {})
91452
+ .then(util.canvasToBlob);
91453
+ }
91454
+
91455
+ function copyOptions(options) {
91456
+ // Copy options to impl options for use in impl
91457
+ if(typeof(options.imagePlaceholder) === 'undefined') {
91458
+ domtoimage.impl.options.imagePlaceholder = defaultOptions.imagePlaceholder;
91459
+ } else {
91460
+ domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;
91461
+ }
91462
+
91463
+ if(typeof(options.cacheBust) === 'undefined') {
91464
+ domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;
91465
+ } else {
91466
+ domtoimage.impl.options.cacheBust = options.cacheBust;
91467
+ }
91468
+ }
91469
+
91470
+ function draw(domNode, options) {
91471
+ return toSvg(domNode, options)
91472
+ .then(util.makeImage)
91473
+ .then(util.delay(100))
91474
+ .then(function (image) {
91475
+ var canvas = newCanvas(domNode);
91476
+ canvas.getContext('2d').drawImage(image, 0, 0);
91477
+ return canvas;
91478
+ });
91479
+
91480
+ function newCanvas(domNode) {
91481
+ var canvas = document.createElement('canvas');
91482
+ canvas.width = options.width || util.width(domNode);
91483
+ canvas.height = options.height || util.height(domNode);
91484
+
91485
+ if (options.bgcolor) {
91486
+ var ctx = canvas.getContext('2d');
91487
+ ctx.fillStyle = options.bgcolor;
91488
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
91489
+ }
91490
+
91491
+ return canvas;
91492
+ }
91493
+ }
91494
+
91495
+ function cloneNode(node, filter, root) {
91496
+ if (!root && filter && !filter(node)) return Promise.resolve();
91497
+
91498
+ return Promise.resolve(node)
91499
+ .then(makeNodeCopy)
91500
+ .then(function (clone) {
91501
+ return cloneChildren(node, clone, filter);
91502
+ })
91503
+ .then(function (clone) {
91504
+ return processClone(node, clone);
91505
+ });
91506
+
91507
+ function makeNodeCopy(node) {
91508
+ if (node instanceof HTMLCanvasElement) return util.makeImage(node.toDataURL());
91509
+ return node.cloneNode(false);
91510
+ }
91511
+
91512
+ function cloneChildren(original, clone, filter) {
91513
+ var children = original.childNodes;
91514
+ if (children.length === 0) return Promise.resolve(clone);
91515
+
91516
+ return cloneChildrenInOrder(clone, util.asArray(children), filter)
91517
+ .then(function () {
91518
+ return clone;
91519
+ });
91520
+
91521
+ function cloneChildrenInOrder(parent, children, filter) {
91522
+ var done = Promise.resolve();
91523
+ children.forEach(function (child) {
91524
+ done = done
91525
+ .then(function () {
91526
+ return cloneNode(child, filter);
91527
+ })
91528
+ .then(function (childClone) {
91529
+ if (childClone) parent.appendChild(childClone);
91530
+ });
91531
+ });
91532
+ return done;
91533
+ }
91534
+ }
91535
+
91536
+ function processClone(original, clone) {
91537
+ if (!(clone instanceof Element)) return clone;
91538
+
91539
+ return Promise.resolve()
91540
+ .then(cloneStyle)
91541
+ .then(clonePseudoElements)
91542
+ .then(copyUserInput)
91543
+ .then(fixSvg)
91544
+ .then(function () {
91545
+ return clone;
91546
+ });
91547
+
91548
+ function cloneStyle() {
91549
+ copyStyle(window.getComputedStyle(original), clone.style);
91550
+
91551
+ function copyStyle(source, target) {
91552
+ if (source.cssText) target.cssText = source.cssText;
91553
+ else copyProperties(source, target);
91554
+
91555
+ function copyProperties(source, target) {
91556
+ util.asArray(source).forEach(function (name) {
91557
+ target.setProperty(
91558
+ name,
91559
+ source.getPropertyValue(name),
91560
+ source.getPropertyPriority(name)
91561
+ );
91562
+ });
91563
+ }
91564
+ }
91565
+ }
91566
+
91567
+ function clonePseudoElements() {
91568
+ [':before', ':after'].forEach(function (element) {
91569
+ clonePseudoElement(element);
91570
+ });
91571
+
91572
+ function clonePseudoElement(element) {
91573
+ var style = window.getComputedStyle(original, element);
91574
+ var content = style.getPropertyValue('content');
91575
+
91576
+ if (content === '' || content === 'none') return;
91577
+
91578
+ var className = util.uid();
91579
+ clone.className = clone.className + ' ' + className;
91580
+ var styleElement = document.createElement('style');
91581
+ styleElement.appendChild(formatPseudoElementStyle(className, element, style));
91582
+ clone.appendChild(styleElement);
91583
+
91584
+ function formatPseudoElementStyle(className, element, style) {
91585
+ var selector = '.' + className + ':' + element;
91586
+ var cssText = style.cssText ? formatCssText(style) : formatCssProperties(style);
91587
+ return document.createTextNode(selector + '{' + cssText + '}');
91588
+
91589
+ function formatCssText(style) {
91590
+ var content = style.getPropertyValue('content');
91591
+ return style.cssText + ' content: ' + content + ';';
91592
+ }
91593
+
91594
+ function formatCssProperties(style) {
91595
+
91596
+ return util.asArray(style)
91597
+ .map(formatProperty)
91598
+ .join('; ') + ';';
91599
+
91600
+ function formatProperty(name) {
91601
+ return name + ': ' +
91602
+ style.getPropertyValue(name) +
91603
+ (style.getPropertyPriority(name) ? ' !important' : '');
91604
+ }
91605
+ }
91606
+ }
91607
+ }
91608
+ }
91609
+
91610
+ function copyUserInput() {
91611
+ if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;
91612
+ if (original instanceof HTMLInputElement) clone.setAttribute("value", original.value);
91613
+ }
91614
+
91615
+ function fixSvg() {
91616
+ if (!(clone instanceof SVGElement)) return;
91617
+ clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
91618
+
91619
+ if (!(clone instanceof SVGRectElement)) return;
91620
+ ['width', 'height'].forEach(function (attribute) {
91621
+ var value = clone.getAttribute(attribute);
91622
+ if (!value) return;
91623
+
91624
+ clone.style.setProperty(attribute, value);
91625
+ });
91626
+ }
91627
+ }
91628
+ }
91629
+
91630
+ function embedFonts(node) {
91631
+ return fontFaces.resolveAll()
91632
+ .then(function (cssText) {
91633
+ var styleNode = document.createElement('style');
91634
+ node.appendChild(styleNode);
91635
+ styleNode.appendChild(document.createTextNode(cssText));
91636
+ return node;
91637
+ });
91638
+ }
91639
+
91640
+ function inlineImages(node) {
91641
+ return images.inlineAll(node)
91642
+ .then(function () {
91643
+ return node;
91644
+ });
91645
+ }
91646
+
91647
+ function makeSvgDataUri(node, width, height) {
91648
+ return Promise.resolve(node)
91649
+ .then(function (node) {
91650
+ node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
91651
+ return new XMLSerializer().serializeToString(node);
91652
+ })
91653
+ .then(util.escapeXhtml)
91654
+ .then(function (xhtml) {
91655
+ return '<foreignObject x="0" y="0" width="100%" height="100%">' + xhtml + '</foreignObject>';
91656
+ })
91657
+ .then(function (foreignObject) {
91658
+ return '<svg xmlns="http://www.w3.org/2000/svg" width="' + width + '" height="' + height + '">' +
91659
+ foreignObject + '</svg>';
91660
+ })
91661
+ .then(function (svg) {
91662
+ return 'data:image/svg+xml;charset=utf-8,' + svg;
91663
+ });
91664
+ }
91665
+
91666
+ function newUtil() {
91667
+ return {
91668
+ escape: escape,
91669
+ parseExtension: parseExtension,
91670
+ mimeType: mimeType,
91671
+ dataAsUrl: dataAsUrl,
91672
+ isDataUrl: isDataUrl,
91673
+ canvasToBlob: canvasToBlob,
91674
+ resolveUrl: resolveUrl,
91675
+ getAndEncode: getAndEncode,
91676
+ uid: uid(),
91677
+ delay: delay,
91678
+ asArray: asArray,
91679
+ escapeXhtml: escapeXhtml,
91680
+ makeImage: makeImage,
91681
+ width: width,
91682
+ height: height
91683
+ };
91684
+
91685
+ function mimes() {
91686
+ /*
91687
+ * Only WOFF and EOT mime types for fonts are 'real'
91688
+ * see http://www.iana.org/assignments/media-types/media-types.xhtml
91689
+ */
91690
+ var WOFF = 'application/font-woff';
91691
+ var JPEG = 'image/jpeg';
91692
+
91693
+ return {
91694
+ 'woff': WOFF,
91695
+ 'woff2': WOFF,
91696
+ 'ttf': 'application/font-truetype',
91697
+ 'eot': 'application/vnd.ms-fontobject',
91698
+ 'png': 'image/png',
91699
+ 'jpg': JPEG,
91700
+ 'jpeg': JPEG,
91701
+ 'gif': 'image/gif',
91702
+ 'tiff': 'image/tiff',
91703
+ 'svg': 'image/svg+xml'
91704
+ };
91705
+ }
91706
+
91707
+ function parseExtension(url) {
91708
+ var match = /\.([^\.\/]*?)$/g.exec(url);
91709
+ if (match) return match[1];
91710
+ else return '';
91711
+ }
91712
+
91713
+ function mimeType(url) {
91714
+ var extension = parseExtension(url).toLowerCase();
91715
+ return mimes()[extension] || '';
91716
+ }
91717
+
91718
+ function isDataUrl(url) {
91719
+ return url.search(/^(data:)/) !== -1;
91720
+ }
91721
+
91722
+ function toBlob(canvas) {
91723
+ return new Promise(function (resolve) {
91724
+ var binaryString = window.atob(canvas.toDataURL().split(',')[1]);
91725
+ var length = binaryString.length;
91726
+ var binaryArray = new Uint8Array(length);
91727
+
91728
+ for (var i = 0; i < length; i++)
91729
+ binaryArray[i] = binaryString.charCodeAt(i);
91730
+
91731
+ resolve(new Blob([binaryArray], {
91732
+ type: 'image/png'
91733
+ }));
91734
+ });
91735
+ }
91736
+
91737
+ function canvasToBlob(canvas) {
91738
+ if (canvas.toBlob)
91739
+ return new Promise(function (resolve) {
91740
+ canvas.toBlob(resolve);
91741
+ });
91742
+
91743
+ return toBlob(canvas);
91744
+ }
91745
+
91746
+ function resolveUrl(url, baseUrl) {
91747
+ var doc = document.implementation.createHTMLDocument();
91748
+ var base = doc.createElement('base');
91749
+ doc.head.appendChild(base);
91750
+ var a = doc.createElement('a');
91751
+ doc.body.appendChild(a);
91752
+ base.href = baseUrl;
91753
+ a.href = url;
91754
+ return a.href;
91755
+ }
91756
+
91757
+ function uid() {
91758
+ var index = 0;
91759
+
91760
+ return function () {
91761
+ return 'u' + fourRandomChars() + index++;
91762
+
91763
+ function fourRandomChars() {
91764
+ /* see http://stackoverflow.com/a/6248722/2519373 */
91765
+ return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);
91766
+ }
91767
+ };
91768
+ }
91769
+
91770
+ function makeImage(uri) {
91771
+ return new Promise(function (resolve, reject) {
91772
+ var image = new Image();
91773
+ image.onload = function () {
91774
+ resolve(image);
91775
+ };
91776
+ image.onerror = reject;
91777
+ image.src = uri;
91778
+ });
91779
+ }
91780
+
91781
+ function getAndEncode(url) {
91782
+ var TIMEOUT = 30000;
91783
+ if(domtoimage.impl.options.cacheBust) {
91784
+ // Cache bypass so we dont have CORS issues with cached images
91785
+ // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
91786
+ url += ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime();
91787
+ }
91788
+
91789
+ return new Promise(function (resolve) {
91790
+ var request = new XMLHttpRequest();
91791
+
91792
+ request.onreadystatechange = done;
91793
+ request.ontimeout = timeout;
91794
+ request.responseType = 'blob';
91795
+ request.timeout = TIMEOUT;
91796
+ request.open('GET', url, true);
91797
+ request.send();
91798
+
91799
+ var placeholder;
91800
+ if(domtoimage.impl.options.imagePlaceholder) {
91801
+ var split = domtoimage.impl.options.imagePlaceholder.split(/,/);
91802
+ if(split && split[1]) {
91803
+ placeholder = split[1];
91804
+ }
91805
+ }
91806
+
91807
+ function done() {
91808
+ if (request.readyState !== 4) return;
91809
+
91810
+ if (request.status !== 200) {
91811
+ if(placeholder) {
91812
+ resolve(placeholder);
91813
+ } else {
91814
+ fail('cannot fetch resource: ' + url + ', status: ' + request.status);
91815
+ }
91816
+
91817
+ return;
91818
+ }
91819
+
91820
+ var encoder = new FileReader();
91821
+ encoder.onloadend = function () {
91822
+ var content = encoder.result.split(/,/)[1];
91823
+ resolve(content);
91824
+ };
91825
+ encoder.readAsDataURL(request.response);
91826
+ }
91827
+
91828
+ function timeout() {
91829
+ if(placeholder) {
91830
+ resolve(placeholder);
91831
+ } else {
91832
+ fail('timeout of ' + TIMEOUT + 'ms occured while fetching resource: ' + url);
91833
+ }
91834
+ }
91835
+
91836
+ function fail(message) {
91837
+ console.error(message);
91838
+ resolve('');
91839
+ }
91840
+ });
91841
+ }
91842
+
91843
+ function dataAsUrl(content, type) {
91844
+ return 'data:' + type + ';base64,' + content;
91845
+ }
91846
+
91847
+ function escape(string) {
91848
+ return string.replace(/([.*+?^${}()|\[\]\/\\])/g, '\\$1');
91849
+ }
91850
+
91851
+ function delay(ms) {
91852
+ return function (arg) {
91853
+ return new Promise(function (resolve) {
91854
+ setTimeout(function () {
91855
+ resolve(arg);
91856
+ }, ms);
91857
+ });
91858
+ };
91859
+ }
91860
+
91861
+ function asArray(arrayLike) {
91862
+ var array = [];
91863
+ var length = arrayLike.length;
91864
+ for (var i = 0; i < length; i++) array.push(arrayLike[i]);
91865
+ return array;
91866
+ }
91867
+
91868
+ function escapeXhtml(string) {
91869
+ return string.replace(/#/g, '%23').replace(/\n/g, '%0A');
91870
+ }
91871
+
91872
+ function width(node) {
91873
+ var leftBorder = px(node, 'border-left-width');
91874
+ var rightBorder = px(node, 'border-right-width');
91875
+ return node.scrollWidth + leftBorder + rightBorder;
91876
+ }
91877
+
91878
+ function height(node) {
91879
+ var topBorder = px(node, 'border-top-width');
91880
+ var bottomBorder = px(node, 'border-bottom-width');
91881
+ return node.scrollHeight + topBorder + bottomBorder;
91882
+ }
91883
+
91884
+ function px(node, styleProperty) {
91885
+ var value = window.getComputedStyle(node).getPropertyValue(styleProperty);
91886
+ return parseFloat(value.replace('px', ''));
91887
+ }
91888
+ }
91889
+
91890
+ function newInliner() {
91891
+ var URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
91892
+
91893
+ return {
91894
+ inlineAll: inlineAll,
91895
+ shouldProcess: shouldProcess,
91896
+ impl: {
91897
+ readUrls: readUrls,
91898
+ inline: inline
91899
+ }
91900
+ };
91901
+
91902
+ function shouldProcess(string) {
91903
+ return string.search(URL_REGEX) !== -1;
91904
+ }
91905
+
91906
+ function readUrls(string) {
91907
+ var result = [];
91908
+ var match;
91909
+ while ((match = URL_REGEX.exec(string)) !== null) {
91910
+ result.push(match[1]);
91911
+ }
91912
+ return result.filter(function (url) {
91913
+ return !util.isDataUrl(url);
91914
+ });
91915
+ }
91916
+
91917
+ function inline(string, url, baseUrl, get) {
91918
+ return Promise.resolve(url)
91919
+ .then(function (url) {
91920
+ return baseUrl ? util.resolveUrl(url, baseUrl) : url;
91921
+ })
91922
+ .then(get || util.getAndEncode)
91923
+ .then(function (data) {
91924
+ return util.dataAsUrl(data, util.mimeType(url));
91925
+ })
91926
+ .then(function (dataUrl) {
91927
+ return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');
91928
+ });
91929
+
91930
+ function urlAsRegex(url) {
91931
+ return new RegExp('(url\\([\'"]?)(' + util.escape(url) + ')([\'"]?\\))', 'g');
91932
+ }
91933
+ }
91934
+
91935
+ function inlineAll(string, baseUrl, get) {
91936
+ if (nothingToInline()) return Promise.resolve(string);
91937
+
91938
+ return Promise.resolve(string)
91939
+ .then(readUrls)
91940
+ .then(function (urls) {
91941
+ var done = Promise.resolve(string);
91942
+ urls.forEach(function (url) {
91943
+ done = done.then(function (string) {
91944
+ return inline(string, url, baseUrl, get);
91945
+ });
91946
+ });
91947
+ return done;
91948
+ });
91949
+
91950
+ function nothingToInline() {
91951
+ return !shouldProcess(string);
91952
+ }
91953
+ }
91954
+ }
91955
+
91956
+ function newFontFaces() {
91957
+ return {
91958
+ resolveAll: resolveAll,
91959
+ impl: {
91960
+ readAll: readAll
91961
+ }
91962
+ };
91963
+
91964
+ function resolveAll() {
91965
+ return readAll()
91966
+ .then(function (webFonts) {
91967
+ return Promise.all(
91968
+ webFonts.map(function (webFont) {
91969
+ return webFont.resolve();
91970
+ })
91971
+ );
91972
+ })
91973
+ .then(function (cssStrings) {
91974
+ return cssStrings.join('\n');
91975
+ });
91976
+ }
91977
+
91978
+ function readAll() {
91979
+ return Promise.resolve(util.asArray(document.styleSheets))
91980
+ .then(getCssRules)
91981
+ .then(selectWebFontRules)
91982
+ .then(function (rules) {
91983
+ return rules.map(newWebFont);
91984
+ });
91985
+
91986
+ function selectWebFontRules(cssRules) {
91987
+ return cssRules
91988
+ .filter(function (rule) {
91989
+ return rule.type === CSSRule.FONT_FACE_RULE;
91990
+ })
91991
+ .filter(function (rule) {
91992
+ return inliner.shouldProcess(rule.style.getPropertyValue('src'));
91993
+ });
91994
+ }
91995
+
91996
+ function getCssRules(styleSheets) {
91997
+ var cssRules = [];
91998
+ styleSheets.forEach(function (sheet) {
91999
+ try {
92000
+ util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));
92001
+ } catch (e) {
92002
+ console.log('Error while reading CSS rules from ' + sheet.href, e.toString());
92003
+ }
92004
+ });
92005
+ return cssRules;
92006
+ }
92007
+
92008
+ function newWebFont(webFontRule) {
92009
+ return {
92010
+ resolve: function resolve() {
92011
+ var baseUrl = (webFontRule.parentStyleSheet || {}).href;
92012
+ return inliner.inlineAll(webFontRule.cssText, baseUrl);
92013
+ },
92014
+ src: function () {
92015
+ return webFontRule.style.getPropertyValue('src');
92016
+ }
92017
+ };
92018
+ }
92019
+ }
92020
+ }
92021
+
92022
+ function newImages() {
92023
+ return {
92024
+ inlineAll: inlineAll,
92025
+ impl: {
92026
+ newImage: newImage
92027
+ }
92028
+ };
92029
+
92030
+ function newImage(element) {
92031
+ return {
92032
+ inline: inline
92033
+ };
92034
+
92035
+ function inline(get) {
92036
+ if (util.isDataUrl(element.src)) return Promise.resolve();
92037
+
92038
+ return Promise.resolve(element.src)
92039
+ .then(get || util.getAndEncode)
92040
+ .then(function (data) {
92041
+ return util.dataAsUrl(data, util.mimeType(element.src));
92042
+ })
92043
+ .then(function (dataUrl) {
92044
+ return new Promise(function (resolve, reject) {
92045
+ element.onload = resolve;
92046
+ element.onerror = reject;
92047
+ element.src = dataUrl;
92048
+ });
92049
+ });
92050
+ }
92051
+ }
92052
+
92053
+ function inlineAll(node) {
92054
+ if (!(node instanceof Element)) return Promise.resolve(node);
92055
+
92056
+ return inlineBackground(node)
92057
+ .then(function () {
92058
+ if (node instanceof HTMLImageElement)
92059
+ return newImage(node).inline();
92060
+ else
92061
+ return Promise.all(
92062
+ util.asArray(node.childNodes).map(function (child) {
92063
+ return inlineAll(child);
92064
+ })
92065
+ );
92066
+ });
92067
+
92068
+ function inlineBackground(node) {
92069
+ var background = node.style.getPropertyValue('background');
92070
+
92071
+ if (!background) return Promise.resolve(node);
92072
+
92073
+ return inliner.inlineAll(background)
92074
+ .then(function (inlined) {
92075
+ node.style.setProperty(
92076
+ 'background',
92077
+ inlined,
92078
+ node.style.getPropertyPriority('background')
92079
+ );
92080
+ })
92081
+ .then(function () {
92082
+ return node;
92083
+ });
92084
+ }
92085
+ }
92086
+ }
92087
+ })();
92088
+ } (domToImage));
92089
+
92090
+ var domToImageExports = domToImage.exports;
92091
+ var domtoimage = /*@__PURE__*/getDefaultExportFromCjs(domToImageExports);
92092
+
90526
92093
  function getTemplateHTML(data) {
90527
92094
  var _a, _b, _c;
90528
92095
  const isProfit = data.data.payout * +data.data.payoutTokenPrice - data.data.dollarValue > 0;