@ape.swap/bonds-sdk 1.1.0-test.84 → 1.1.0-test.88
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/components/uikit-sdk/Input/index.d.ts +0 -1
- package/dist/components/uikit-sdk/Tag/index.d.ts +0 -2
- package/dist/components/uikit-sdk/Tag/types.d.ts +1 -46
- package/dist/components/uikit-sdk/index.d.ts +1 -1
- package/dist/main.js +216 -678
- package/dist/styles.css +2 -2
- package/package.json +1 -2
- package/dist/components/uikit-sdk/Input/StyledInput.d.ts +0 -11
- package/dist/components/uikit-sdk/Tag/Tag.d.ts +0 -4
- package/dist/components/uikit-sdk/Tag/styles.d.ts +0 -8
- package/dist/views/YourBondsModal/styles.d.ts +0 -2
package/dist/main.js
CHANGED
|
@@ -1379,7 +1379,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1379
1379
|
|
|
1380
1380
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1381
1381
|
|
|
1382
|
-
var isDevelopment$
|
|
1382
|
+
var isDevelopment$2 = false;
|
|
1383
1383
|
|
|
1384
1384
|
/*
|
|
1385
1385
|
|
|
@@ -1461,7 +1461,7 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
1461
1461
|
_this.tags.push(tag);
|
|
1462
1462
|
};
|
|
1463
1463
|
|
|
1464
|
-
this.isSpeedy = options.speedy === undefined ? !isDevelopment$
|
|
1464
|
+
this.isSpeedy = options.speedy === undefined ? !isDevelopment$2 : options.speedy;
|
|
1465
1465
|
this.tags = [];
|
|
1466
1466
|
this.ctr = 0;
|
|
1467
1467
|
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
@@ -2139,7 +2139,7 @@ function memoize$2(fn) {
|
|
|
2139
2139
|
};
|
|
2140
2140
|
}
|
|
2141
2141
|
|
|
2142
|
-
var isBrowser$
|
|
2142
|
+
var isBrowser$4 = typeof document !== 'undefined';
|
|
2143
2143
|
|
|
2144
2144
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
2145
2145
|
var previous = 0;
|
|
@@ -2492,7 +2492,7 @@ export type Options = {
|
|
|
2492
2492
|
}
|
|
2493
2493
|
*/
|
|
2494
2494
|
|
|
2495
|
-
var getServerStylisCache = isBrowser$
|
|
2495
|
+
var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
|
2496
2496
|
return memoize$2(function () {
|
|
2497
2497
|
var cache = {};
|
|
2498
2498
|
return function (name) {
|
|
@@ -2509,7 +2509,7 @@ createCache(options
|
|
|
2509
2509
|
) {
|
|
2510
2510
|
var key = options.key;
|
|
2511
2511
|
|
|
2512
|
-
if (isBrowser$
|
|
2512
|
+
if (isBrowser$4 && key === 'css') {
|
|
2513
2513
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
2514
2514
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
2515
2515
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
@@ -2543,7 +2543,7 @@ createCache(options
|
|
|
2543
2543
|
|
|
2544
2544
|
var nodesToHydrate = [];
|
|
2545
2545
|
|
|
2546
|
-
if (isBrowser$
|
|
2546
|
+
if (isBrowser$4) {
|
|
2547
2547
|
container = options.container || document.head;
|
|
2548
2548
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
2549
2549
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
@@ -2571,7 +2571,7 @@ createCache(options
|
|
|
2571
2571
|
|
|
2572
2572
|
var omnipresentPlugins = [compat, removeLabel];
|
|
2573
2573
|
|
|
2574
|
-
if (isBrowser$
|
|
2574
|
+
if (isBrowser$4) {
|
|
2575
2575
|
var currentSheet;
|
|
2576
2576
|
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
2577
2577
|
currentSheet.insert(rule);
|
|
@@ -2689,16 +2689,6 @@ createCache(options
|
|
|
2689
2689
|
return cache;
|
|
2690
2690
|
};
|
|
2691
2691
|
|
|
2692
|
-
function _extends$2() {
|
|
2693
|
-
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
2694
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2695
|
-
var t = arguments[e];
|
|
2696
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2697
|
-
}
|
|
2698
|
-
return n;
|
|
2699
|
-
}, _extends$2.apply(null, arguments);
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
2692
|
var reactIs$1 = {exports: {}};
|
|
2703
2693
|
|
|
2704
2694
|
var reactIs_production_min = {};
|
|
@@ -2943,7 +2933,7 @@ var TYPE_STATICS = {};
|
|
|
2943
2933
|
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
2944
2934
|
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
2945
2935
|
|
|
2946
|
-
var isBrowser$
|
|
2936
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
2947
2937
|
|
|
2948
2938
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
2949
2939
|
var rawClassName = '';
|
|
@@ -2968,7 +2958,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
|
2968
2958
|
// in node since emotion-server relies on whether a style is in
|
|
2969
2959
|
// the registered cache to know whether a style is global or not
|
|
2970
2960
|
// also, note that this check will be dead code eliminated in the browser
|
|
2971
|
-
isBrowser$
|
|
2961
|
+
isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
2972
2962
|
cache.registered[className] = serialized.styles;
|
|
2973
2963
|
}
|
|
2974
2964
|
};
|
|
@@ -2983,14 +2973,14 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
2983
2973
|
do {
|
|
2984
2974
|
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
2985
2975
|
|
|
2986
|
-
if (!isBrowser$
|
|
2976
|
+
if (!isBrowser$3 && maybeStyles !== undefined) {
|
|
2987
2977
|
stylesForSSR += maybeStyles;
|
|
2988
2978
|
}
|
|
2989
2979
|
|
|
2990
2980
|
current = current.next;
|
|
2991
2981
|
} while (current !== undefined);
|
|
2992
2982
|
|
|
2993
|
-
if (!isBrowser$
|
|
2983
|
+
if (!isBrowser$3 && stylesForSSR.length !== 0) {
|
|
2994
2984
|
return stylesForSSR;
|
|
2995
2985
|
}
|
|
2996
2986
|
}
|
|
@@ -3101,7 +3091,7 @@ var unitlessKeys = {
|
|
|
3101
3091
|
strokeWidth: 1
|
|
3102
3092
|
};
|
|
3103
3093
|
|
|
3104
|
-
var isDevelopment$
|
|
3094
|
+
var isDevelopment$1 = false;
|
|
3105
3095
|
|
|
3106
3096
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
3107
3097
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
@@ -3218,12 +3208,9 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
3218
3208
|
|
|
3219
3209
|
var asString = interpolation;
|
|
3220
3210
|
|
|
3221
|
-
|
|
3211
|
+
{
|
|
3222
3212
|
return asString;
|
|
3223
3213
|
}
|
|
3224
|
-
|
|
3225
|
-
var cached = registered[asString];
|
|
3226
|
-
return cached !== undefined ? cached : asString;
|
|
3227
3214
|
}
|
|
3228
3215
|
|
|
3229
3216
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
@@ -3240,17 +3227,15 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
3240
3227
|
if (typeof value !== 'object') {
|
|
3241
3228
|
var asString = value;
|
|
3242
3229
|
|
|
3243
|
-
if (
|
|
3244
|
-
string += key + "{" + registered[asString] + "}";
|
|
3245
|
-
} else if (isProcessableValue(asString)) {
|
|
3230
|
+
if (isProcessableValue(asString)) {
|
|
3246
3231
|
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
3247
3232
|
}
|
|
3248
3233
|
} else {
|
|
3249
|
-
if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment$
|
|
3234
|
+
if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment$1) {
|
|
3250
3235
|
throw new Error(noComponentSelectorMessage);
|
|
3251
3236
|
}
|
|
3252
3237
|
|
|
3253
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null
|
|
3238
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null)) {
|
|
3254
3239
|
for (var _i = 0; _i < value.length; _i++) {
|
|
3255
3240
|
if (isProcessableValue(value[_i])) {
|
|
3256
3241
|
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
@@ -3334,19 +3319,19 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
3334
3319
|
};
|
|
3335
3320
|
}
|
|
3336
3321
|
|
|
3337
|
-
var isBrowser$
|
|
3322
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
|
3338
3323
|
|
|
3339
3324
|
var syncFallback = function syncFallback(create) {
|
|
3340
3325
|
return create();
|
|
3341
3326
|
};
|
|
3342
3327
|
|
|
3343
3328
|
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
|
3344
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$
|
|
3329
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
|
3345
3330
|
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
|
|
3346
3331
|
|
|
3347
|
-
var isDevelopment
|
|
3332
|
+
var isDevelopment = false;
|
|
3348
3333
|
|
|
3349
|
-
var isBrowser$
|
|
3334
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
3350
3335
|
|
|
3351
3336
|
/* import { type EmotionCache } from '@emotion/utils' */
|
|
3352
3337
|
var EmotionCacheContext
|
|
@@ -3381,7 +3366,7 @@ var withEmotionCache = function withEmotionCache
|
|
|
3381
3366
|
});
|
|
3382
3367
|
};
|
|
3383
3368
|
|
|
3384
|
-
if (!isBrowser$
|
|
3369
|
+
if (!isBrowser$1) {
|
|
3385
3370
|
withEmotionCache = function withEmotionCache
|
|
3386
3371
|
/* <Props> */
|
|
3387
3372
|
(func
|
|
@@ -3443,7 +3428,7 @@ var createEmotionProps = function createEmotionProps(type
|
|
|
3443
3428
|
return newProps;
|
|
3444
3429
|
};
|
|
3445
3430
|
|
|
3446
|
-
var Insertion
|
|
3431
|
+
var Insertion = function Insertion(_ref) {
|
|
3447
3432
|
var cache = _ref.cache,
|
|
3448
3433
|
serialized = _ref.serialized,
|
|
3449
3434
|
isStringTag = _ref.isStringTag;
|
|
@@ -3452,7 +3437,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
3452
3437
|
return insertStyles(cache, serialized, isStringTag);
|
|
3453
3438
|
});
|
|
3454
3439
|
|
|
3455
|
-
if (!isBrowser$
|
|
3440
|
+
if (!isBrowser$1 && rules !== undefined) {
|
|
3456
3441
|
var _ref2;
|
|
3457
3442
|
|
|
3458
3443
|
var serializedNames = serialized.name;
|
|
@@ -3498,7 +3483,7 @@ function (props, cache, ref) {
|
|
|
3498
3483
|
var newProps = {};
|
|
3499
3484
|
|
|
3500
3485
|
for (var key in props) {
|
|
3501
|
-
if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (!isDevelopment
|
|
3486
|
+
if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (!isDevelopment )) {
|
|
3502
3487
|
newProps[key] = props[key];
|
|
3503
3488
|
}
|
|
3504
3489
|
}
|
|
@@ -3509,7 +3494,7 @@ function (props, cache, ref) {
|
|
|
3509
3494
|
newProps.ref = ref;
|
|
3510
3495
|
}
|
|
3511
3496
|
|
|
3512
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion
|
|
3497
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
3513
3498
|
cache: cache,
|
|
3514
3499
|
serialized: serialized,
|
|
3515
3500
|
isStringTag: typeof WrappedComponent === 'string'
|
|
@@ -5088,7 +5073,7 @@ GlobalProps
|
|
|
5088
5073
|
var styles = props.styles;
|
|
5089
5074
|
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
|
|
5090
5075
|
|
|
5091
|
-
if (!isBrowser$
|
|
5076
|
+
if (!isBrowser$1) {
|
|
5092
5077
|
var _ref;
|
|
5093
5078
|
|
|
5094
5079
|
var serializedNames = serialized.name;
|
|
@@ -7448,7 +7433,7 @@ const pulse = keyframes$1({
|
|
|
7448
7433
|
'50%': { opacity: 0.4 },
|
|
7449
7434
|
'100%': { opacity: 1 },
|
|
7450
7435
|
});
|
|
7451
|
-
const styles$
|
|
7436
|
+
const styles$b = {
|
|
7452
7437
|
waves: {
|
|
7453
7438
|
position: 'relative',
|
|
7454
7439
|
overflow: 'hidden',
|
|
@@ -7480,7 +7465,7 @@ const styles$c = {
|
|
|
7480
7465
|
|
|
7481
7466
|
const Skeleton = (_a) => {
|
|
7482
7467
|
var { variant: variant$1 = variant.RECT, animation: animation$1 = animation.PULSE } = _a, props = __rest(_a, ["variant", "animation"]);
|
|
7483
|
-
return (jsx$2(Box$1, Object.assign({}, props, { sx: Object.assign(Object.assign({}, (animation$1 === animation.WAVES ? styles$
|
|
7468
|
+
return (jsx$2(Box$1, Object.assign({}, props, { sx: Object.assign(Object.assign({}, (animation$1 === animation.WAVES ? styles$b.waves : styles$b.pulse)), { height: props.height, width: props.width, borderRadius: variant$1 === variant.RECT ? '10px' : '50%' }) })));
|
|
7484
7469
|
};
|
|
7485
7470
|
|
|
7486
7471
|
var placements;
|
|
@@ -7518,7 +7503,7 @@ const container = (hide) => ({
|
|
|
7518
7503
|
display: hide ? 'none' : 'block',
|
|
7519
7504
|
},
|
|
7520
7505
|
});
|
|
7521
|
-
const styles$
|
|
7506
|
+
const styles$a = {
|
|
7522
7507
|
default: Object.assign({ color: 'text', fontSize: 0, lineHeight: '18px', fontWeight: 'normal' }, baseStyle),
|
|
7523
7508
|
bottomRight: {
|
|
7524
7509
|
'&::before': Object.assign(Object.assign({ position: 'absolute' }, bottomArrow), { right: '3%', borderBottomColor: 'white2' }),
|
|
@@ -7577,7 +7562,7 @@ const TooltipBubble = (_a) => {
|
|
|
7577
7562
|
const handleClick = (event) => {
|
|
7578
7563
|
event.stopPropagation();
|
|
7579
7564
|
};
|
|
7580
|
-
return (jsxs(Box$1, { sx: container(hideTooltip), onClick: handleClick, children: [jsx$2(Box$1, { sx: Object.assign({ position: 'absolute' }, (placementStyles[placement] || {})), children: jsx$2(Box$1, Object.assign({ sx: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative' }, styles$
|
|
7565
|
+
return (jsxs(Box$1, { sx: container(hideTooltip), onClick: handleClick, children: [jsx$2(Box$1, { sx: Object.assign({ position: 'absolute' }, (placementStyles[placement] || {})), children: jsx$2(Box$1, Object.assign({ sx: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative' }, styles$a.default), styles$a[placement]), backgroundColorStyle), { width, transform: transformTip }) }, props, { children: body })) }), children] }));
|
|
7581
7566
|
};
|
|
7582
7567
|
|
|
7583
7568
|
const warned = new Set();
|
|
@@ -10889,7 +10874,7 @@ class MotionValue {
|
|
|
10889
10874
|
* This will be replaced by the build step with the latest version number.
|
|
10890
10875
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
10891
10876
|
*/
|
|
10892
|
-
this.version = "11.11.
|
|
10877
|
+
this.version = "11.11.10";
|
|
10893
10878
|
/**
|
|
10894
10879
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
10895
10880
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -11209,8 +11194,6 @@ function isWillChangeMotionValue(value) {
|
|
|
11209
11194
|
}
|
|
11210
11195
|
|
|
11211
11196
|
function addValueToWillChange(visualElement, key) {
|
|
11212
|
-
if (!visualElement.applyWillChange)
|
|
11213
|
-
return;
|
|
11214
11197
|
const willChange = visualElement.getValue("willChange");
|
|
11215
11198
|
/**
|
|
11216
11199
|
* It could be that a user has set willChange to a regular MotionValue,
|
|
@@ -15578,9 +15561,9 @@ const MotionConfigContext = createContext({
|
|
|
15578
15561
|
|
|
15579
15562
|
const MotionContext = createContext({});
|
|
15580
15563
|
|
|
15581
|
-
const isBrowser
|
|
15564
|
+
const isBrowser = typeof window !== "undefined";
|
|
15582
15565
|
|
|
15583
|
-
const useIsomorphicLayoutEffect$1 = isBrowser
|
|
15566
|
+
const useIsomorphicLayoutEffect$1 = isBrowser ? useLayoutEffect : useEffect;
|
|
15584
15567
|
|
|
15585
15568
|
const LazyContext = createContext({ strict: false });
|
|
15586
15569
|
|
|
@@ -15822,7 +15805,7 @@ function createRendererMotionComponent({ preloadedFeatures, createVisualElement,
|
|
|
15822
15805
|
const { isStatic } = configAndProps;
|
|
15823
15806
|
const context = useCreateMotionContext(props);
|
|
15824
15807
|
const visualState = useVisualState(props, isStatic);
|
|
15825
|
-
if (!isStatic && isBrowser
|
|
15808
|
+
if (!isStatic && isBrowser) {
|
|
15826
15809
|
useStrictMode(configAndProps, preloadedFeatures);
|
|
15827
15810
|
const layoutProjection = getProjectionFunctionality(configAndProps);
|
|
15828
15811
|
MeasureLayout = layoutProjection.MeasureLayout;
|
|
@@ -16001,13 +15984,6 @@ function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) {
|
|
|
16001
15984
|
newValues[key] = style[key];
|
|
16002
15985
|
}
|
|
16003
15986
|
}
|
|
16004
|
-
/**
|
|
16005
|
-
* If the willChange style has been manually set as a string, set
|
|
16006
|
-
* applyWillChange to false to prevent it from automatically being applied.
|
|
16007
|
-
*/
|
|
16008
|
-
if (visualElement && style && typeof style.willChange === "string") {
|
|
16009
|
-
visualElement.applyWillChange = false;
|
|
16010
|
-
}
|
|
16011
15987
|
return newValues;
|
|
16012
15988
|
}
|
|
16013
15989
|
|
|
@@ -16040,18 +16016,9 @@ function useConstant(init) {
|
|
|
16040
16016
|
return ref.current;
|
|
16041
16017
|
}
|
|
16042
16018
|
|
|
16043
|
-
function
|
|
16044
|
-
if (transformProps.has(name)) {
|
|
16045
|
-
return "transform";
|
|
16046
|
-
}
|
|
16047
|
-
else if (acceleratedValues.has(name)) {
|
|
16048
|
-
return camelToDash(name);
|
|
16049
|
-
}
|
|
16050
|
-
}
|
|
16051
|
-
|
|
16052
|
-
function makeState({ applyWillChange = false, scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext, isStatic) {
|
|
16019
|
+
function makeState({ scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext) {
|
|
16053
16020
|
const state = {
|
|
16054
|
-
latestValues: makeLatestValues(props, context, presenceContext,
|
|
16021
|
+
latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
|
|
16055
16022
|
renderState: createRenderState(),
|
|
16056
16023
|
};
|
|
16057
16024
|
if (onMount) {
|
|
@@ -16062,24 +16029,11 @@ function makeState({ applyWillChange = false, scrapeMotionValuesFromProps, creat
|
|
|
16062
16029
|
const makeUseVisualState = (config) => (props, isStatic) => {
|
|
16063
16030
|
const context = useContext(MotionContext);
|
|
16064
16031
|
const presenceContext = useContext(PresenceContext);
|
|
16065
|
-
const make = () => makeState(config, props, context, presenceContext
|
|
16032
|
+
const make = () => makeState(config, props, context, presenceContext);
|
|
16066
16033
|
return isStatic ? make() : useConstant(make);
|
|
16067
16034
|
};
|
|
16068
|
-
function
|
|
16069
|
-
const list = Array.isArray(definition) ? definition : [definition];
|
|
16070
|
-
for (let i = 0; i < list.length; i++) {
|
|
16071
|
-
const resolved = resolveVariantFromProps(props, list[i]);
|
|
16072
|
-
if (resolved) {
|
|
16073
|
-
const { transitionEnd, transition, ...target } = resolved;
|
|
16074
|
-
callback(target, transitionEnd);
|
|
16075
|
-
}
|
|
16076
|
-
}
|
|
16077
|
-
}
|
|
16078
|
-
function makeLatestValues(props, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {
|
|
16079
|
-
var _a;
|
|
16035
|
+
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
|
|
16080
16036
|
const values = {};
|
|
16081
|
-
const willChange = new Set();
|
|
16082
|
-
const applyWillChange = shouldApplyWillChange && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.willChange) === undefined;
|
|
16083
16037
|
const motionValues = scrapeMotionValues(props, {});
|
|
16084
16038
|
for (const key in motionValues) {
|
|
16085
16039
|
values[key] = resolveMotionValue(motionValues[key]);
|
|
@@ -16104,42 +16058,31 @@ function makeLatestValues(props, context, presenceContext, shouldApplyWillChange
|
|
|
16104
16058
|
if (variantToSet &&
|
|
16105
16059
|
typeof variantToSet !== "boolean" &&
|
|
16106
16060
|
!isAnimationControls(variantToSet)) {
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16061
|
+
const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
|
|
16062
|
+
for (let i = 0; i < list.length; i++) {
|
|
16063
|
+
const resolved = resolveVariantFromProps(props, list[i]);
|
|
16064
|
+
if (resolved) {
|
|
16065
|
+
const { transitionEnd, transition, ...target } = resolved;
|
|
16066
|
+
for (const key in target) {
|
|
16067
|
+
let valueTarget = target[key];
|
|
16068
|
+
if (Array.isArray(valueTarget)) {
|
|
16069
|
+
/**
|
|
16070
|
+
* Take final keyframe if the initial animation is blocked because
|
|
16071
|
+
* we want to initialise at the end of that blocked animation.
|
|
16072
|
+
*/
|
|
16073
|
+
const index = isInitialAnimationBlocked
|
|
16074
|
+
? valueTarget.length - 1
|
|
16075
|
+
: 0;
|
|
16076
|
+
valueTarget = valueTarget[index];
|
|
16077
|
+
}
|
|
16078
|
+
if (valueTarget !== null) {
|
|
16079
|
+
values[key] = valueTarget;
|
|
16080
|
+
}
|
|
16119
16081
|
}
|
|
16120
|
-
|
|
16121
|
-
values[key] =
|
|
16082
|
+
for (const key in transitionEnd) {
|
|
16083
|
+
values[key] = transitionEnd[key];
|
|
16122
16084
|
}
|
|
16123
16085
|
}
|
|
16124
|
-
for (const key in transitionEnd) {
|
|
16125
|
-
values[key] = transitionEnd[key];
|
|
16126
|
-
}
|
|
16127
|
-
});
|
|
16128
|
-
}
|
|
16129
|
-
// Add animating values to will-change
|
|
16130
|
-
if (applyWillChange) {
|
|
16131
|
-
if (animate && initial !== false && !isAnimationControls(animate)) {
|
|
16132
|
-
forEachDefinition(props, animate, (target) => {
|
|
16133
|
-
for (const name in target) {
|
|
16134
|
-
const memberName = getWillChangeName(name);
|
|
16135
|
-
if (memberName) {
|
|
16136
|
-
willChange.add(memberName);
|
|
16137
|
-
}
|
|
16138
|
-
}
|
|
16139
|
-
});
|
|
16140
|
-
}
|
|
16141
|
-
if (willChange.size) {
|
|
16142
|
-
values.willChange = Array.from(willChange).join(",");
|
|
16143
16086
|
}
|
|
16144
16087
|
}
|
|
16145
16088
|
return values;
|
|
@@ -16407,7 +16350,6 @@ const svgMotionConfig = {
|
|
|
16407
16350
|
|
|
16408
16351
|
const htmlMotionConfig = {
|
|
16409
16352
|
useVisualState: makeUseVisualState({
|
|
16410
|
-
applyWillChange: true,
|
|
16411
16353
|
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
|
|
16412
16354
|
createRenderState: createHtmlRenderState,
|
|
16413
16355
|
}),
|
|
@@ -16639,7 +16581,7 @@ const hasReducedMotionListener = { current: false };
|
|
|
16639
16581
|
|
|
16640
16582
|
function initPrefersReducedMotion() {
|
|
16641
16583
|
hasReducedMotionListener.current = true;
|
|
16642
|
-
if (!isBrowser
|
|
16584
|
+
if (!isBrowser)
|
|
16643
16585
|
return;
|
|
16644
16586
|
if (window.matchMedia) {
|
|
16645
16587
|
const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
|
|
@@ -16667,7 +16609,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
16667
16609
|
* and warn against mismatches.
|
|
16668
16610
|
*/
|
|
16669
16611
|
if (process.env.NODE_ENV === "development") {
|
|
16670
|
-
warnOnce(nextValue.version === "11.11.
|
|
16612
|
+
warnOnce(nextValue.version === "11.11.10", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.11.10 may not work as expected.`);
|
|
16671
16613
|
}
|
|
16672
16614
|
}
|
|
16673
16615
|
else if (isMotionValue(prevValue)) {
|
|
@@ -16742,11 +16684,6 @@ class VisualElement {
|
|
|
16742
16684
|
return {};
|
|
16743
16685
|
}
|
|
16744
16686
|
constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {
|
|
16745
|
-
/**
|
|
16746
|
-
* If true, will-change will be applied to the element. Only HTMLVisualElements
|
|
16747
|
-
* currently support this.
|
|
16748
|
-
*/
|
|
16749
|
-
this.applyWillChange = false;
|
|
16750
16687
|
/**
|
|
16751
16688
|
* A reference to the current underlying Instance, e.g. a HTMLElement
|
|
16752
16689
|
* or Three.Mesh etc.
|
|
@@ -17207,7 +17144,6 @@ class HTMLVisualElement extends DOMVisualElement {
|
|
|
17207
17144
|
constructor() {
|
|
17208
17145
|
super(...arguments);
|
|
17209
17146
|
this.type = "html";
|
|
17210
|
-
this.applyWillChange = true;
|
|
17211
17147
|
this.renderInstance = renderHTML;
|
|
17212
17148
|
}
|
|
17213
17149
|
readValueFromInstance(instance, key) {
|
|
@@ -17582,7 +17518,7 @@ const AnimatePresence = ({ children, exitBeforeEnter, custom, initial = true, on
|
|
|
17582
17518
|
}) }));
|
|
17583
17519
|
};
|
|
17584
17520
|
|
|
17585
|
-
const styles$
|
|
17521
|
+
const styles$9 = {
|
|
17586
17522
|
container: {
|
|
17587
17523
|
padding: '20px',
|
|
17588
17524
|
background: 'white2',
|
|
@@ -17758,7 +17694,7 @@ const defaultStyle = {
|
|
|
17758
17694
|
transform: 'scale(0.9)',
|
|
17759
17695
|
},
|
|
17760
17696
|
};
|
|
17761
|
-
const styles$
|
|
17697
|
+
const styles$8 = {
|
|
17762
17698
|
primary: Object.assign({}, defaultStyle),
|
|
17763
17699
|
transparent: Object.assign(Object.assign({}, defaultStyle), { backgroundColor: 'transparent', backgroundRepeat: 'no-repeat', padding: '0px', border: 'none', cursor: 'pointer', svg: {
|
|
17764
17700
|
background: 'transparent',
|
|
@@ -17767,12 +17703,12 @@ const styles$9 = {
|
|
|
17767
17703
|
|
|
17768
17704
|
const IconButton = (_a) => {
|
|
17769
17705
|
var { icon = icons.DISCORD, color = 'white1', background = 'yellow', variant = iconButtonVariants.PRIMARY, iconWidth, children } = _a, props = __rest(_a, ["icon", "color", "background", "variant", "iconWidth", "children"]);
|
|
17770
|
-
return (jsx$2(Button$1, Object.assign({}, props, { variant: variant, sx: Object.assign(Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative', variant: `buttons.${variant}`, color: 'primaryBright', background }, (variant === iconButtonVariants.PRIMARY ? styles$
|
|
17706
|
+
return (jsx$2(Button$1, Object.assign({}, props, { variant: variant, sx: Object.assign(Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative', variant: `buttons.${variant}`, color: 'primaryBright', background }, (variant === iconButtonVariants.PRIMARY ? styles$8.primary : {})), (variant === iconButtonVariants.TRANSPARENT ? styles$8.transparent : {})), children: children || (jsx$2("span", { sx: { height: iconWidth, width: iconWidth }, children: jsx$2(Svg, Object.assign({ color: color, icon: icon }, props, { width: iconWidth })) })) })));
|
|
17771
17707
|
};
|
|
17772
17708
|
|
|
17773
17709
|
const ModalHeader = (_a) => {
|
|
17774
17710
|
var { children, onDismiss, hideDivider } = _a, props = __rest(_a, ["children", "onDismiss", "hideDivider"]);
|
|
17775
|
-
return (jsxs(Fragment$1, { children: [jsxs(Flex$1, Object.assign({}, props, { sx: styles$
|
|
17711
|
+
return (jsxs(Fragment$1, { children: [jsxs(Flex$1, Object.assign({}, props, { sx: styles$9.modalHead, children: [children, onDismiss && jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: onDismiss })] })), !hideDivider && jsx$2(Divider, {})] }));
|
|
17776
17712
|
};
|
|
17777
17713
|
|
|
17778
17714
|
const Modal = (_a) => {
|
|
@@ -17788,10 +17724,10 @@ const Modal = (_a) => {
|
|
|
17788
17724
|
}, transition: {
|
|
17789
17725
|
opacity: { duration: 0.2 },
|
|
17790
17726
|
transform: { duration: 0.2 },
|
|
17791
|
-
}, exit: { opacity: 0, transform: 'translate(-50%, -50%) scale(0)' } }, props, { sx: Object.assign(Object.assign({}, styles$
|
|
17727
|
+
}, exit: { opacity: 0, transform: 'translate(-50%, -50%) scale(0)' } }, props, { sx: Object.assign(Object.assign({}, styles$9.container), { zIndex }), onAnimationComplete: onAnimationComplete, children: [title && (jsx$2(ModalHeader, { onDismiss: onClose, children: jsx$2(Text, { sx: { fontSize: '22px', fontWeight: 700, lineHeight: '33px' }, children: title }) })), children] }))) }), open && jsx$2(Box$1, { sx: Object.assign(Object.assign({}, styles$9.backdrop), backdrop), onClick: onClose })] }));
|
|
17792
17728
|
};
|
|
17793
17729
|
|
|
17794
|
-
const styles$
|
|
17730
|
+
const styles$7 = {
|
|
17795
17731
|
container: {
|
|
17796
17732
|
display: 'flex',
|
|
17797
17733
|
borderRadius: '10px',
|
|
@@ -18731,24 +18667,24 @@ const QUERY_KEYS = {
|
|
|
18731
18667
|
AB_TEST_VALUE: 'ABTestValue',
|
|
18732
18668
|
USE_CURRENCY_NEW: 'useCurrencyNew',
|
|
18733
18669
|
// used values on SDK
|
|
18734
|
-
SDK_CONFIG: 'sdkConfig',
|
|
18735
|
-
BOND_RECOMMENDATIONS: 'bondRecommendations',
|
|
18736
|
-
USER_STATS: 'userStats',
|
|
18737
|
-
BONDS_DATA: 'bondsData',
|
|
18738
|
-
BONDS_LIST: 'bondsList',
|
|
18739
|
-
USER_BONDS: 'userBonds',
|
|
18740
|
-
BOND_NFT_DATA: 'bondNFTData',
|
|
18741
|
-
TOKEN_PRICES: 'tokenPrices',
|
|
18742
|
-
HOT_BONDS: 'hotBonds',
|
|
18743
|
-
HOT_BONDS_CONTRACTS: 'hotBondsContracts',
|
|
18744
|
-
CURRENCY_BALANCE: 'currencyBalance',
|
|
18745
|
-
ALLOWANCE: 'allowance',
|
|
18746
|
-
SLIPPAGE: 'slippage',
|
|
18747
|
-
ZAP_TOKEN_QUOTE: 'zapTokenQuote',
|
|
18748
|
-
ZAP_BOND_QUOTE: 'zapBondQuote',
|
|
18749
|
-
CHAIN_FILTER_OPTION: 'chainFilterOption',
|
|
18750
|
-
FAVORITE_TOKENS: 'favoriteTokens',
|
|
18751
|
-
POP_UPS: 'popUps',
|
|
18670
|
+
SDK_CONFIG: 'ApeBond-SDK-sdkConfig',
|
|
18671
|
+
BOND_RECOMMENDATIONS: 'ApeBond-SDK-bondRecommendations',
|
|
18672
|
+
USER_STATS: 'ApeBond-SDK-userStats',
|
|
18673
|
+
BONDS_DATA: 'ApeBond-SDK-bondsData',
|
|
18674
|
+
BONDS_LIST: 'ApeBond-SDK-bondsList',
|
|
18675
|
+
USER_BONDS: 'ApeBond-SDK-userBonds',
|
|
18676
|
+
BOND_NFT_DATA: 'ApeBond-SDK-bondNFTData',
|
|
18677
|
+
TOKEN_PRICES: 'ApeBond-SDK-tokenPrices',
|
|
18678
|
+
HOT_BONDS: 'ApeBond-SDK-hotBonds',
|
|
18679
|
+
HOT_BONDS_CONTRACTS: 'ApeBond-SDK-hotBondsContracts',
|
|
18680
|
+
CURRENCY_BALANCE: 'ApeBond-SDK-currencyBalance',
|
|
18681
|
+
ALLOWANCE: 'ApeBond-SDK-allowance',
|
|
18682
|
+
SLIPPAGE: 'ApeBond-SDK-slippage',
|
|
18683
|
+
ZAP_TOKEN_QUOTE: 'ApeBond-SDK-zapTokenQuote',
|
|
18684
|
+
ZAP_BOND_QUOTE: 'ApeBond-SDK-zapBondQuote',
|
|
18685
|
+
CHAIN_FILTER_OPTION: 'ApeBond-SDK-chainFilterOption',
|
|
18686
|
+
FAVORITE_TOKENS: 'ApeBond-SDK-favoriteTokens',
|
|
18687
|
+
POP_UPS: 'ApeBond-SDK-popUps',
|
|
18752
18688
|
};
|
|
18753
18689
|
|
|
18754
18690
|
function useCookie(key, defaultValue) {
|
|
@@ -18826,15 +18762,16 @@ const NETWORK_COLORS = {
|
|
|
18826
18762
|
[types.ChainId.IOTA]: '#fff',
|
|
18827
18763
|
};
|
|
18828
18764
|
const TokenInfoAndName = ({ bill, vestEnds, isHotBond, }) => {
|
|
18829
|
-
var _a, _b, _c, _d
|
|
18765
|
+
var _a, _b, _c, _d;
|
|
18830
18766
|
const tokenName = 'showcaseTokenName' in bill ? bill.showcaseTokenName : bill.earnToken.symbol;
|
|
18767
|
+
console.log(tokenName);
|
|
18831
18768
|
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: {
|
|
18832
18769
|
background: isHotBond || vestEnds ? 'transparent' : NETWORK_COLORS[bill.chainId],
|
|
18833
18770
|
} }), 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: {
|
|
18834
18771
|
display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'],
|
|
18835
18772
|
justifyContent: isHotBond ? 'center' : 'flex-start',
|
|
18836
18773
|
width: '100%',
|
|
18837
|
-
}, children: ((_b = bill.tags) === null || _b === void 0 ? void 0 : _b[0]) &&
|
|
18774
|
+
}, 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() }) })] }));
|
|
18838
18775
|
};
|
|
18839
18776
|
|
|
18840
18777
|
const MINUTE_IN_SECONDS = 60;
|
|
@@ -18881,18 +18818,6 @@ const getTimePeriods = (seconds, days) => {
|
|
|
18881
18818
|
return timeLeft;
|
|
18882
18819
|
};
|
|
18883
18820
|
|
|
18884
|
-
const useCurrentTime = () => {
|
|
18885
|
-
const [currentMillis, setCurrentMillis] = useState(new Date().getTime());
|
|
18886
|
-
useEffect(() => {
|
|
18887
|
-
const tick = () => {
|
|
18888
|
-
setCurrentMillis((prevMillis) => prevMillis + 1000);
|
|
18889
|
-
};
|
|
18890
|
-
const timerID = setInterval(() => tick(), 1000);
|
|
18891
|
-
return () => clearInterval(timerID);
|
|
18892
|
-
}, []);
|
|
18893
|
-
return currentMillis;
|
|
18894
|
-
};
|
|
18895
|
-
|
|
18896
18821
|
const getPendingVesting = (lastBlockTimestamp, vesting) => {
|
|
18897
18822
|
const currentTime = new Date().getTime() / 1000;
|
|
18898
18823
|
const vestingTime = getTimePeriods(parseInt(lastBlockTimestamp) + parseInt(vesting) - currentTime, true);
|
|
@@ -39076,7 +39001,7 @@ const totalPending = (userBill) => {
|
|
|
39076
39001
|
return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 18);
|
|
39077
39002
|
};
|
|
39078
39003
|
const vestingTimeRemaining = (userBill) => {
|
|
39079
|
-
const currentTime =
|
|
39004
|
+
const currentTime = new Date().getTime() / 1000;
|
|
39080
39005
|
return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
|
|
39081
39006
|
};
|
|
39082
39007
|
const discountEarnTokenPrice = (bond) => {
|
|
@@ -41546,301 +41471,6 @@ const useModal = (modal, closeOnOverlayClick = true, updateOnPropsChange = false
|
|
|
41546
41471
|
return [onPresentCallback, handleClose];
|
|
41547
41472
|
};
|
|
41548
41473
|
|
|
41549
|
-
// eslint-disable-next-line no-undef
|
|
41550
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
41551
|
-
|
|
41552
|
-
var isPropValid = /* #__PURE__ */memoize$2(function (prop) {
|
|
41553
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
41554
|
-
/* o */
|
|
41555
|
-
&& prop.charCodeAt(1) === 110
|
|
41556
|
-
/* n */
|
|
41557
|
-
&& prop.charCodeAt(2) < 91;
|
|
41558
|
-
}
|
|
41559
|
-
/* Z+1 */
|
|
41560
|
-
);
|
|
41561
|
-
|
|
41562
|
-
/* import type {
|
|
41563
|
-
ElementType,
|
|
41564
|
-
StatelessFunctionalComponent,
|
|
41565
|
-
AbstractComponent
|
|
41566
|
-
} from 'react' */
|
|
41567
|
-
/*
|
|
41568
|
-
export type Interpolations = Array<any>
|
|
41569
|
-
|
|
41570
|
-
export type StyledElementType<Props> =
|
|
41571
|
-
| string
|
|
41572
|
-
| AbstractComponent<{ ...Props, className: string }, mixed>
|
|
41573
|
-
|
|
41574
|
-
export type StyledOptions = {
|
|
41575
|
-
label?: string,
|
|
41576
|
-
shouldForwardProp?: string => boolean,
|
|
41577
|
-
target?: string
|
|
41578
|
-
}
|
|
41579
|
-
|
|
41580
|
-
export type StyledComponent<Props> = StatelessFunctionalComponent<Props> & {
|
|
41581
|
-
defaultProps: any,
|
|
41582
|
-
toString: () => string,
|
|
41583
|
-
withComponent: (
|
|
41584
|
-
nextTag: StyledElementType<Props>,
|
|
41585
|
-
nextOptions?: StyledOptions
|
|
41586
|
-
) => StyledComponent<Props>
|
|
41587
|
-
}
|
|
41588
|
-
|
|
41589
|
-
export type PrivateStyledComponent<Props> = StyledComponent<Props> & {
|
|
41590
|
-
__emotion_real: StyledComponent<Props>,
|
|
41591
|
-
__emotion_base: any,
|
|
41592
|
-
__emotion_styles: any,
|
|
41593
|
-
__emotion_forwardProp: any
|
|
41594
|
-
}
|
|
41595
|
-
*/
|
|
41596
|
-
|
|
41597
|
-
var testOmitPropsOnStringTag = isPropValid;
|
|
41598
|
-
|
|
41599
|
-
var testOmitPropsOnComponent = function testOmitPropsOnComponent(key
|
|
41600
|
-
/*: string */
|
|
41601
|
-
) {
|
|
41602
|
-
return key !== 'theme';
|
|
41603
|
-
};
|
|
41604
|
-
|
|
41605
|
-
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag
|
|
41606
|
-
/*: ElementType */
|
|
41607
|
-
) {
|
|
41608
|
-
return typeof tag === 'string' && // 96 is one less than the char code
|
|
41609
|
-
// for "a" so this is checking that
|
|
41610
|
-
// it's a lowercase character
|
|
41611
|
-
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
|
41612
|
-
};
|
|
41613
|
-
var composeShouldForwardProps = function composeShouldForwardProps(tag
|
|
41614
|
-
/*: PrivateStyledComponent<any> */
|
|
41615
|
-
, options
|
|
41616
|
-
/*: StyledOptions | void */
|
|
41617
|
-
, isReal
|
|
41618
|
-
/*: boolean */
|
|
41619
|
-
) {
|
|
41620
|
-
var shouldForwardProp;
|
|
41621
|
-
|
|
41622
|
-
if (options) {
|
|
41623
|
-
var optionsShouldForwardProp = options.shouldForwardProp;
|
|
41624
|
-
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName
|
|
41625
|
-
/*: string */
|
|
41626
|
-
) {
|
|
41627
|
-
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
|
41628
|
-
} : optionsShouldForwardProp;
|
|
41629
|
-
}
|
|
41630
|
-
|
|
41631
|
-
if (typeof shouldForwardProp !== 'function' && isReal) {
|
|
41632
|
-
shouldForwardProp = tag.__emotion_forwardProp;
|
|
41633
|
-
}
|
|
41634
|
-
|
|
41635
|
-
return shouldForwardProp;
|
|
41636
|
-
};
|
|
41637
|
-
/*
|
|
41638
|
-
export type CreateStyledComponent = <Props>(
|
|
41639
|
-
...args: Interpolations
|
|
41640
|
-
) => StyledComponent<Props>
|
|
41641
|
-
|
|
41642
|
-
export type CreateStyled = {
|
|
41643
|
-
<Props>(
|
|
41644
|
-
tag: StyledElementType<Props>,
|
|
41645
|
-
options?: StyledOptions
|
|
41646
|
-
): (...args: Interpolations) => StyledComponent<Props>,
|
|
41647
|
-
[key: string]: CreateStyledComponent,
|
|
41648
|
-
bind: () => CreateStyled
|
|
41649
|
-
}
|
|
41650
|
-
*/
|
|
41651
|
-
|
|
41652
|
-
var isDevelopment = false;
|
|
41653
|
-
|
|
41654
|
-
var isBrowser = typeof document !== 'undefined';
|
|
41655
|
-
|
|
41656
|
-
var Insertion = function Insertion(_ref) {
|
|
41657
|
-
var cache = _ref.cache,
|
|
41658
|
-
serialized = _ref.serialized,
|
|
41659
|
-
isStringTag = _ref.isStringTag;
|
|
41660
|
-
registerStyles(cache, serialized, isStringTag);
|
|
41661
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
41662
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
41663
|
-
});
|
|
41664
|
-
|
|
41665
|
-
if (!isBrowser && rules !== undefined) {
|
|
41666
|
-
var _ref2;
|
|
41667
|
-
|
|
41668
|
-
var serializedNames = serialized.name;
|
|
41669
|
-
var next = serialized.next;
|
|
41670
|
-
|
|
41671
|
-
while (next !== undefined) {
|
|
41672
|
-
serializedNames += ' ' + next.name;
|
|
41673
|
-
next = next.next;
|
|
41674
|
-
}
|
|
41675
|
-
|
|
41676
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
41677
|
-
__html: rules
|
|
41678
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
41679
|
-
}
|
|
41680
|
-
|
|
41681
|
-
return null;
|
|
41682
|
-
};
|
|
41683
|
-
|
|
41684
|
-
var createStyled
|
|
41685
|
-
/*: CreateStyled */
|
|
41686
|
-
= function createStyled
|
|
41687
|
-
/*: CreateStyled */
|
|
41688
|
-
(tag
|
|
41689
|
-
/*: any */
|
|
41690
|
-
, options
|
|
41691
|
-
/* ?: StyledOptions */
|
|
41692
|
-
) {
|
|
41693
|
-
|
|
41694
|
-
var isReal = tag.__emotion_real === tag;
|
|
41695
|
-
var baseTag = isReal && tag.__emotion_base || tag;
|
|
41696
|
-
var identifierName;
|
|
41697
|
-
var targetClassName;
|
|
41698
|
-
|
|
41699
|
-
if (options !== undefined) {
|
|
41700
|
-
identifierName = options.label;
|
|
41701
|
-
targetClassName = options.target;
|
|
41702
|
-
}
|
|
41703
|
-
|
|
41704
|
-
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
|
41705
|
-
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
|
41706
|
-
var shouldUseAs = !defaultShouldForwardProp('as');
|
|
41707
|
-
/* return function<Props>(): PrivateStyledComponent<Props> { */
|
|
41708
|
-
|
|
41709
|
-
return function () {
|
|
41710
|
-
var args = arguments;
|
|
41711
|
-
var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
|
|
41712
|
-
|
|
41713
|
-
if (identifierName !== undefined) {
|
|
41714
|
-
styles.push("label:" + identifierName + ";");
|
|
41715
|
-
}
|
|
41716
|
-
|
|
41717
|
-
if (args[0] == null || args[0].raw === undefined) {
|
|
41718
|
-
styles.push.apply(styles, args);
|
|
41719
|
-
} else {
|
|
41720
|
-
|
|
41721
|
-
styles.push(args[0][0]);
|
|
41722
|
-
var len = args.length;
|
|
41723
|
-
var i = 1;
|
|
41724
|
-
|
|
41725
|
-
for (; i < len; i++) {
|
|
41726
|
-
|
|
41727
|
-
styles.push(args[i], args[0][i]);
|
|
41728
|
-
}
|
|
41729
|
-
}
|
|
41730
|
-
|
|
41731
|
-
var Styled
|
|
41732
|
-
/*: PrivateStyledComponent<Props> */
|
|
41733
|
-
= withEmotionCache(function (props, cache, ref) {
|
|
41734
|
-
var FinalTag = shouldUseAs && props.as || baseTag;
|
|
41735
|
-
var className = '';
|
|
41736
|
-
var classInterpolations = [];
|
|
41737
|
-
var mergedProps = props;
|
|
41738
|
-
|
|
41739
|
-
if (props.theme == null) {
|
|
41740
|
-
mergedProps = {};
|
|
41741
|
-
|
|
41742
|
-
for (var key in props) {
|
|
41743
|
-
mergedProps[key] = props[key];
|
|
41744
|
-
}
|
|
41745
|
-
|
|
41746
|
-
mergedProps.theme = React.useContext(ThemeContext);
|
|
41747
|
-
}
|
|
41748
|
-
|
|
41749
|
-
if (typeof props.className === 'string') {
|
|
41750
|
-
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
|
41751
|
-
} else if (props.className != null) {
|
|
41752
|
-
className = props.className + " ";
|
|
41753
|
-
}
|
|
41754
|
-
|
|
41755
|
-
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
|
41756
|
-
className += cache.key + "-" + serialized.name;
|
|
41757
|
-
|
|
41758
|
-
if (targetClassName !== undefined) {
|
|
41759
|
-
className += " " + targetClassName;
|
|
41760
|
-
}
|
|
41761
|
-
|
|
41762
|
-
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
|
41763
|
-
var newProps = {};
|
|
41764
|
-
|
|
41765
|
-
for (var _key in props) {
|
|
41766
|
-
if (shouldUseAs && _key === 'as') continue;
|
|
41767
|
-
|
|
41768
|
-
if (finalShouldForwardProp(_key)) {
|
|
41769
|
-
newProps[_key] = props[_key];
|
|
41770
|
-
}
|
|
41771
|
-
}
|
|
41772
|
-
|
|
41773
|
-
newProps.className = className;
|
|
41774
|
-
|
|
41775
|
-
if (ref) {
|
|
41776
|
-
newProps.ref = ref;
|
|
41777
|
-
}
|
|
41778
|
-
|
|
41779
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
41780
|
-
cache: cache,
|
|
41781
|
-
serialized: serialized,
|
|
41782
|
-
isStringTag: typeof FinalTag === 'string'
|
|
41783
|
-
}), /*#__PURE__*/React.createElement(FinalTag, newProps));
|
|
41784
|
-
});
|
|
41785
|
-
Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
|
|
41786
|
-
Styled.defaultProps = tag.defaultProps;
|
|
41787
|
-
Styled.__emotion_real = Styled;
|
|
41788
|
-
Styled.__emotion_base = baseTag;
|
|
41789
|
-
Styled.__emotion_styles = styles;
|
|
41790
|
-
Styled.__emotion_forwardProp = shouldForwardProp;
|
|
41791
|
-
Object.defineProperty(Styled, 'toString', {
|
|
41792
|
-
value: function value() {
|
|
41793
|
-
if (targetClassName === undefined && isDevelopment) {
|
|
41794
|
-
return 'NO_COMPONENT_SELECTOR';
|
|
41795
|
-
}
|
|
41796
|
-
|
|
41797
|
-
return "." + targetClassName;
|
|
41798
|
-
}
|
|
41799
|
-
});
|
|
41800
|
-
|
|
41801
|
-
Styled.withComponent = function (nextTag
|
|
41802
|
-
/*: StyledElementType<Props> */
|
|
41803
|
-
, nextOptions
|
|
41804
|
-
/* ?: StyledOptions */
|
|
41805
|
-
) {
|
|
41806
|
-
return createStyled(nextTag, _extends$2({}, options, nextOptions, {
|
|
41807
|
-
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
41808
|
-
})).apply(void 0, styles);
|
|
41809
|
-
};
|
|
41810
|
-
|
|
41811
|
-
return Styled;
|
|
41812
|
-
};
|
|
41813
|
-
};
|
|
41814
|
-
|
|
41815
|
-
var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
|
|
41816
|
-
'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
|
|
41817
|
-
|
|
41818
|
-
var newStyled = createStyled.bind();
|
|
41819
|
-
tags.forEach(function (tagName) {
|
|
41820
|
-
newStyled[tagName] = newStyled(tagName);
|
|
41821
|
-
});
|
|
41822
|
-
|
|
41823
|
-
const StyledHeadingText = newStyled(Text) `
|
|
41824
|
-
font-size: 12px;
|
|
41825
|
-
align-self: center;
|
|
41826
|
-
@media screen and (min-width: 1180px) {
|
|
41827
|
-
font-size: 22px;
|
|
41828
|
-
}
|
|
41829
|
-
`;
|
|
41830
|
-
const TraitsContentContainer = newStyled(Flex) `
|
|
41831
|
-
justify-content: space-between;
|
|
41832
|
-
background: ${({ theme }) => theme.colors.white4};
|
|
41833
|
-
padding: 0px 15px;
|
|
41834
|
-
&:last-child {
|
|
41835
|
-
border-radius: 0px 0px 6px 6px;
|
|
41836
|
-
}
|
|
41837
|
-
@media screen and (max-width: 667px) {
|
|
41838
|
-
:first-of-type {
|
|
41839
|
-
border-radius: 6px 6px 0px 0px;
|
|
41840
|
-
}
|
|
41841
|
-
}
|
|
41842
|
-
`;
|
|
41843
|
-
|
|
41844
41474
|
const TooltipText = {
|
|
41845
41475
|
Discount: "This is the percentage discount relative to the token's current market price.",
|
|
41846
41476
|
ARR: 'This is the Annualized Rate of Return you would receive considering the current discount, adjusted for APR.',
|
|
@@ -42158,31 +41788,6 @@ const Input = (_a) => {
|
|
|
42158
41788
|
}
|
|
42159
41789
|
};
|
|
42160
41790
|
|
|
42161
|
-
newStyled(Flex) `
|
|
42162
|
-
align-items: center;
|
|
42163
|
-
background: ${({ theme }) => theme.colors.white4};
|
|
42164
|
-
border-radius: 10px;
|
|
42165
|
-
height: 72px;
|
|
42166
|
-
padding: 0px 16px;
|
|
42167
|
-
`;
|
|
42168
|
-
newStyled(Input) `
|
|
42169
|
-
width: 100%;
|
|
42170
|
-
background: none;
|
|
42171
|
-
border: 0;
|
|
42172
|
-
color: ${({ theme }) => (theme.isDark ? theme.colors.primaryBright : theme.colors.primary)};
|
|
42173
|
-
flex: 1;
|
|
42174
|
-
height: 56px;
|
|
42175
|
-
margin: 0;
|
|
42176
|
-
padding: 0;
|
|
42177
|
-
outline: none;
|
|
42178
|
-
font-weight: 800;
|
|
42179
|
-
font-size: 22px;
|
|
42180
|
-
|
|
42181
|
-
&::placeholder {
|
|
42182
|
-
color: ${({ theme }) => !theme.isDark && theme.colors.gray};
|
|
42183
|
-
}
|
|
42184
|
-
`;
|
|
42185
|
-
|
|
42186
41791
|
var BOND_NFT_ABI = [
|
|
42187
41792
|
{
|
|
42188
41793
|
anonymous: false,
|
|
@@ -43386,7 +42991,7 @@ const CardRecommendation = ({ cardIndex, bond, handleBuyBondClick, }) => {
|
|
|
43386
42991
|
height: ['160px', '160px', 'auto', 'auto'],
|
|
43387
42992
|
gap: '10px',
|
|
43388
42993
|
}, children: [jsxs(Flex, { sx: { alignItems: 'center', justifyContent: 'space-between', gap: '10px' }, children: [jsxs(Flex, { sx: { gap: '5px', justifyContent: 'center', alignItems: 'center' }, children: [jsx$2(TokenImage, { symbol: bond.payoutTokenName, chain: bond.chainId, size: 25 }), jsx$2(Text, { children: bond.payoutTokenName }), (_a = bond === null || bond === void 0 ? void 0 : bond.tags) === null || _a === void 0 ? void 0 : _a.slice(0, 1).map((tag) => {
|
|
43389
|
-
return (jsx$2(Flex, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, {
|
|
42994
|
+
return (jsx$2(Flex, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
43390
42995
|
})] }), jsxs(Flex, { sx: { flexDirection: 'column', gap: '1px', alignItems: 'end' }, children: [jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6', textDecoration: 'line-through' }, children: formatDollar({ num: bond.earnTokenPrice }) }), jsx$2(Text, { sx: { fontSize: '19px' }, children: formatDollar({ num: bond.priceUsd }) })] })] }), jsxs(Flex, { sx: { flexDirection: 'column', width: '100%', gap: '1px' }, children: [jsxs(Flex, { sx: {
|
|
43391
42996
|
background: 'white4',
|
|
43392
42997
|
justifyContent: 'space-between',
|
|
@@ -43971,7 +43576,7 @@ function offset() {
|
|
|
43971
43576
|
return null;
|
|
43972
43577
|
}
|
|
43973
43578
|
|
|
43974
|
-
function styles$
|
|
43579
|
+
function styles$6() {
|
|
43975
43580
|
const window = getWindow();
|
|
43976
43581
|
if (this[0]) return window.getComputedStyle(this[0], null);
|
|
43977
43582
|
return {};
|
|
@@ -44350,7 +43955,7 @@ const Methods = {
|
|
|
44350
43955
|
transitionEnd: transitionEnd$1,
|
|
44351
43956
|
outerWidth,
|
|
44352
43957
|
outerHeight,
|
|
44353
|
-
styles: styles$
|
|
43958
|
+
styles: styles$6,
|
|
44354
43959
|
offset,
|
|
44355
43960
|
css,
|
|
44356
43961
|
each,
|
|
@@ -48951,7 +48556,7 @@ const getDotPos = (index, carouselLength) => {
|
|
|
48951
48556
|
: index - carouselLength;
|
|
48952
48557
|
};
|
|
48953
48558
|
|
|
48954
|
-
const styles$
|
|
48559
|
+
const styles$5 = {
|
|
48955
48560
|
mainComponent: {
|
|
48956
48561
|
width: '100%',
|
|
48957
48562
|
flexDirection: 'column',
|
|
@@ -49024,7 +48629,7 @@ const CardRecommendationsMobile = ({ recommendations }) => {
|
|
|
49024
48629
|
display: 'flex',
|
|
49025
48630
|
justifyContent: 'center',
|
|
49026
48631
|
}, children: jsx$2(CardRecommendation, { cardIndex: index, bond: bond, handleBuyBondClick: () => window.open(`https://ape.bond/bonds?bondAddress=${bond.billAddress}&bondChain=${bond.chainId}`, '_blank', 'noreferrer') }, `${bond.billAddress}-${index}`) }, index));
|
|
49027
|
-
}) }), jsx$2(Flex, { sx: styles$
|
|
48632
|
+
}) }), jsx$2(Flex, { sx: styles$5.bubbleContainer, children: [...Array(recommendations === null || recommendations === void 0 ? void 0 : recommendations.length)].map((_, i) => {
|
|
49028
48633
|
return jsx$2(SwiperDots, { isActive: i === activeSlide, onClick: () => slideTo(i) }, i);
|
|
49029
48634
|
}) })] }));
|
|
49030
48635
|
};
|
|
@@ -49042,98 +48647,11 @@ const Recommendations = ({ onDismiss, billAddress }) => {
|
|
|
49042
48647
|
},
|
|
49043
48648
|
}, children: [jsxs(Flex, { sx: { flexDirection: 'column' }, children: [jsxs(Text, { sx: { fontSize: ['14px', '14px', '14px', '22px'], fontWeight: 600 }, children: ["You might also be interested in:", ' '] }), jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '16px'], fontWeight: 400, color: '#BEBEBE' }, children: "Based on yours and others users purchases." })] }), jsx$2(SwiperProvider, { children: jsx$2(CardRecommendationsMobile, { recommendations: recommendations }) }), jsx$2(Flex, { sx: { alignItems: 'center', marginBottom: '0px', cursor: 'pointer' }, onClick: () => {
|
|
49044
48649
|
window.open(`https://ape.bond/apebond-ai`, '_blank', 'noreferrer');
|
|
49045
|
-
onDismiss
|
|
48650
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
49046
48651
|
}, children: jsx$2("img", { width: 256, height: 27, alt: "poweredBy", src: "https://ape.bond/images/bills/powered.png" }) })] }), jsx$2(Flex, { sx: { mt: '20px', width: '100%', gap: '20px', display: ['none', 'none', 'none', 'flex'] }, children: recommendations &&
|
|
49047
48652
|
(recommendations === null || recommendations === void 0 ? void 0 : recommendations.map((bond, index) => (jsx$2(CardRecommendation, { cardIndex: index, bond: bond, handleBuyBondClick: () => window.open(`https://ape.bond/bonds?bondAddress=${bond.billAddress}&bondChain=${bond.chainId}`, '_blank', 'noreferrer') }, `${bond.billAddress}-${index}`)))) })] })) }));
|
|
49048
48653
|
};
|
|
49049
48654
|
|
|
49050
|
-
const YourBondsModal = ({ onDismiss, userBill }) => {
|
|
49051
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
49052
|
-
// Hooks
|
|
49053
|
-
const chainId = useChainId();
|
|
49054
|
-
const { switchChain } = useSwitchChain();
|
|
49055
|
-
const { data: bondNFTData } = useBondNFTData(userBill === null || userBill === void 0 ? void 0 : userBill.id, userBill === null || userBill === void 0 ? void 0 : userBill.billNftAddress, (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.chainId);
|
|
49056
|
-
const { writeContractAsync } = useWriteContract();
|
|
49057
|
-
// State
|
|
49058
|
-
const [imgLoaded, setImgLoaded] = useState(false);
|
|
49059
|
-
const [isOpenTraits, setIsOpenTraits] = useState(false);
|
|
49060
|
-
const [claimTxHash, setClaimTxHash] = useState(null);
|
|
49061
|
-
const [loadingTx, setLoadingTx] = useState(false);
|
|
49062
|
-
const { isLoading, isSuccess: isConfirmed } = useMonitorTxHash(claimTxHash, (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.chainId);
|
|
49063
|
-
const { addToastError } = usePopups();
|
|
49064
|
-
const load = loadingTx || (isLoading && !isConfirmed);
|
|
49065
|
-
const handleClaim = (billId, billAddress) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
49066
|
-
const address = billAddress;
|
|
49067
|
-
try {
|
|
49068
|
-
setLoadingTx(true);
|
|
49069
|
-
const tx = yield writeContractAsync({
|
|
49070
|
-
address: address,
|
|
49071
|
-
abi: BOND_ABI,
|
|
49072
|
-
functionName: 'redeem',
|
|
49073
|
-
args: [billId],
|
|
49074
|
-
}).catch();
|
|
49075
|
-
if (tx) {
|
|
49076
|
-
setClaimTxHash(tx);
|
|
49077
|
-
}
|
|
49078
|
-
setLoadingTx(false);
|
|
49079
|
-
}
|
|
49080
|
-
catch (error) {
|
|
49081
|
-
console.error('Claim Failed:', error);
|
|
49082
|
-
setLoadingTx(false);
|
|
49083
|
-
addToastError(error.message);
|
|
49084
|
-
}
|
|
49085
|
-
});
|
|
49086
|
-
// Functions to calculate display values for modal
|
|
49087
|
-
const totalPending = (userBill) => {
|
|
49088
|
-
var _a, _b, _c, _d;
|
|
49089
|
-
return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 18);
|
|
49090
|
-
};
|
|
49091
|
-
const claimable = (userBill) => {
|
|
49092
|
-
var _a, _b, _c;
|
|
49093
|
-
return getBalanceNumber(new BigNumber$1(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[userBill.bond.chainId]) !== null && _c !== void 0 ? _c : 18);
|
|
49094
|
-
};
|
|
49095
|
-
const earnTokenPrice = (bond) => {
|
|
49096
|
-
var _a;
|
|
49097
|
-
return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
|
|
49098
|
-
};
|
|
49099
|
-
const BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
|
|
49100
|
-
const attributes = (_c = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.attributes) === null || _c === void 0 ? void 0 : _c.filter((attrib) => BILL_ATTRIBUTES.includes(attrib.trait_type));
|
|
49101
|
-
const handleImageLoad = () => {
|
|
49102
|
-
setImgLoaded(true);
|
|
49103
|
-
};
|
|
49104
|
-
const [onTransferBondModal] = useModal(jsx$2(TransferBondModal, { userBill: userBill }), true, true, `transferModal${userBill === null || userBill === void 0 ? void 0 : userBill.id}}`);
|
|
49105
|
-
return (jsx$2(Modal, { className: "modal", children: jsxs(Flex$1, { className: "yourbondsmodal-content", children: [jsx$2(Flex$1, { className: "yourbondsmodal-header", children: jsx$2(Flex$1, { className: "svg-close", onClick: onDismiss, children: jsx$2(Svg, { icon: "close" }) }) }), jsxs(Flex$1, { className: "yourbondsmodal table-container", children: [jsxs(Flex$1, { className: "yourbondsmodal bondimage", children: [(bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image) && (jsx$2("img", { src: `${bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image}?img-width=720`, onLoad: handleImageLoad, style: { zIndex: 2 } })), !imgLoaded && (jsx$2(Flex$1, { sx: {
|
|
49106
|
-
position: 'absolute',
|
|
49107
|
-
top: 'calc(50% - 24px)',
|
|
49108
|
-
right: 'calc(50% - 50px)',
|
|
49109
|
-
justifyContent: 'center',
|
|
49110
|
-
alignItems: 'center',
|
|
49111
|
-
zIndex: 1,
|
|
49112
|
-
}, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_d = userBill.bond.showcaseTokenName) !== null && _d !== void 0 ? _d : userBill.bond.earnToken.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId }) }), jsx$2(Flex$1, { className: "title-container tokenname", children: jsx$2(StyledHeadingText, { children: (_e = userBill.bond) === null || _e === void 0 ? void 0 : _e.showcaseTokenName }) }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_f = userBill.bond.tags) === null || _f === void 0 ? void 0 : _f.slice(0, 1).map((tag) => {
|
|
49113
|
-
return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { variant: tag === 'Cex Fund' ? 'cex_fund' : 'liquidity', text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
49114
|
-
}) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
|
|
49115
|
-
borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
|
|
49116
|
-
}, onClick: () => setIsOpenTraits(!isOpenTraits), children: [jsxs(Flex$1, { sx: { gap: '10px', alignItems: 'center' }, children: [jsx$2(Svg, { icon: "tag", direction: "down" }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), jsx$2(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), jsx$2(AnimatePresence, { children: isOpenTraits && (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: jsx$2(Flex$1, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
|
|
49117
|
-
? attributes.map((a) => (jsxs(TraitsContentContainer, { children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)))
|
|
49118
|
-
: BILL_ATTRIBUTES.map((attrib) => {
|
|
49119
|
-
return (jsxs(TraitsContentContainer, { children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
|
|
49120
|
-
}) }) })) })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: getPendingVesting((_g = userBill.lastBlockTimestamp) !== null && _g !== void 0 ? _g : '', (_h = userBill.vesting) !== null && _h !== void 0 ? _h : '') }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: jsx$2(TokenImage, { symbol: (_j = userBill.bond.showcaseTokenName) !== null && _j !== void 0 ? _j : userBill.bond.earnToken.symbol, size: 25, chain: (_k = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _k === void 0 ? void 0 : _k.chainId }) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
49121
|
-
fontSize: ['10px', '10px', '10px', '12px'],
|
|
49122
|
-
fontWeight: [500, 500, 500, 400],
|
|
49123
|
-
paddingLeft: '10px',
|
|
49124
|
-
}, children: `($${(totalPending(userBill) * ((_l = parseFloat(earnTokenPrice(userBill.bond))) !== null && _l !== void 0 ? _l : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: jsx$2(TokenImage, { symbol: (_m = userBill.bond.showcaseTokenName) !== null && _m !== void 0 ? _m : userBill.bond.earnToken.symbol, size: 25, chain: (_o = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _o === void 0 ? void 0 : _o.chainId }) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
49125
|
-
fontSize: ['10px', '10px', '10px', '12px'],
|
|
49126
|
-
fontWeight: [500, 500, 500, 400],
|
|
49127
|
-
paddingLeft: '10px',
|
|
49128
|
-
}, children: `($${(claimable(userBill) * ((_p = parseFloat(earnTokenPrice(userBill.bond))) !== null && _p !== void 0 ? _p : 0)).toFixed(2)})` })] })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
|
|
49129
|
-
event.stopPropagation();
|
|
49130
|
-
switchChain({ chainId: userBill.bond.chainId });
|
|
49131
|
-
}, children: ["Switch to ", NETWORK_LABEL[userBill.bond.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load, load: load, onClick: (event) => {
|
|
49132
|
-
event.stopPropagation();
|
|
49133
|
-
handleClaim(userBill.id, userBill.address);
|
|
49134
|
-
}, children: "Claim" })) }), jsx$2(Flex$1, { className: "button-container transfer", children: jsx$2(Button, { className: "transfer-button", variant: "secondary", onClick: onTransferBondModal, children: "TRANSFER" }) })] })] })] }), jsx$2(Recommendations, { onDismiss: onDismiss, billAddress: userBill === null || userBill === void 0 ? void 0 : userBill.address })] }) }));
|
|
49135
|
-
};
|
|
49136
|
-
|
|
49137
48655
|
const WNATIVE = {
|
|
49138
48656
|
[types.ChainId.MAINNET]: {
|
|
49139
48657
|
symbol: 'wETH',
|
|
@@ -71207,7 +70725,91 @@ function useCurrencyPrice(currency, chainId) {
|
|
|
71207
70725
|
}), [tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices.length, token, chainId]);
|
|
71208
70726
|
}
|
|
71209
70727
|
|
|
71210
|
-
const
|
|
70728
|
+
const YourBondsModal = ({ onDismiss, userBill }) => {
|
|
70729
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
70730
|
+
// Hooks
|
|
70731
|
+
const chainId = useChainId();
|
|
70732
|
+
const { switchChain } = useSwitchChain();
|
|
70733
|
+
const { data: bondNFTData } = useBondNFTData(userBill === null || userBill === void 0 ? void 0 : userBill.id, userBill === null || userBill === void 0 ? void 0 : userBill.billNftAddress, (_a = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _a === void 0 ? void 0 : _a.chainId);
|
|
70734
|
+
const { writeContractAsync } = useWriteContract();
|
|
70735
|
+
// State
|
|
70736
|
+
const [imgLoaded, setImgLoaded] = useState(false);
|
|
70737
|
+
const [isOpenTraits, setIsOpenTraits] = useState(false);
|
|
70738
|
+
const [claimTxHash, setClaimTxHash] = useState(null);
|
|
70739
|
+
const [loadingTx, setLoadingTx] = useState(false);
|
|
70740
|
+
const { isLoading, isSuccess: isConfirmed } = useMonitorTxHash(claimTxHash, (_b = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _b === void 0 ? void 0 : _b.chainId);
|
|
70741
|
+
const { addToastError } = usePopups();
|
|
70742
|
+
const load = loadingTx || (isLoading && !isConfirmed);
|
|
70743
|
+
const handleClaim = (billId, billAddress) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
70744
|
+
const address = billAddress;
|
|
70745
|
+
try {
|
|
70746
|
+
setLoadingTx(true);
|
|
70747
|
+
const tx = yield writeContractAsync({
|
|
70748
|
+
address: address,
|
|
70749
|
+
abi: BOND_ABI,
|
|
70750
|
+
functionName: 'redeem',
|
|
70751
|
+
args: [billId],
|
|
70752
|
+
}).catch();
|
|
70753
|
+
if (tx) {
|
|
70754
|
+
setClaimTxHash(tx);
|
|
70755
|
+
}
|
|
70756
|
+
setLoadingTx(false);
|
|
70757
|
+
}
|
|
70758
|
+
catch (error) {
|
|
70759
|
+
console.error('Claim Failed:', error);
|
|
70760
|
+
setLoadingTx(false);
|
|
70761
|
+
addToastError(error.message);
|
|
70762
|
+
}
|
|
70763
|
+
});
|
|
70764
|
+
// Functions to calculate display values for modal
|
|
70765
|
+
const totalPending = (userBill) => {
|
|
70766
|
+
var _a, _b, _c, _d;
|
|
70767
|
+
return getBalanceNumber(new BigNumber$1((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[userBill.bond.chainId]) !== null && _d !== void 0 ? _d : 18);
|
|
70768
|
+
};
|
|
70769
|
+
const claimable = (userBill) => {
|
|
70770
|
+
var _a, _b, _c;
|
|
70771
|
+
return getBalanceNumber(new BigNumber$1(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[userBill.bond.chainId]) !== null && _c !== void 0 ? _c : 18);
|
|
70772
|
+
};
|
|
70773
|
+
const earnTokenPrice = useCurrencyPrice((_c = userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken) !== null && _c !== void 0 ? _c : null, (_e = (_d = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _d === void 0 ? void 0 : _d.chainId) !== null && _e !== void 0 ? _e : null);
|
|
70774
|
+
const BILL_ATTRIBUTES = ['The Legend', 'The Location', 'The Moment', 'The Trend', 'The Innovation'];
|
|
70775
|
+
const attributes = (_f = bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.attributes) === null || _f === void 0 ? void 0 : _f.filter((attrib) => BILL_ATTRIBUTES.includes(attrib.trait_type));
|
|
70776
|
+
const handleImageLoad = () => {
|
|
70777
|
+
setImgLoaded(true);
|
|
70778
|
+
};
|
|
70779
|
+
const [onTransferBondModal] = useModal(jsx$2(TransferBondModal, { userBill: userBill }), true, true, `transferModal${userBill === null || userBill === void 0 ? void 0 : userBill.id}}`);
|
|
70780
|
+
return (jsx$2(Modal, { className: "modal", children: jsxs(Flex$1, { className: "yourbondsmodal-content", children: [jsx$2(Flex$1, { className: "yourbondsmodal-header", children: jsx$2(Flex$1, { className: "svg-close", onClick: onDismiss, children: jsx$2(Svg, { icon: "close" }) }) }), jsxs(Flex$1, { className: "yourbondsmodal table-container", children: [jsxs(Flex$1, { className: "yourbondsmodal bondimage", children: [(bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image) && (jsx$2("img", { src: `${bondNFTData === null || bondNFTData === void 0 ? void 0 : bondNFTData.image}?img-width=720`, onLoad: handleImageLoad, style: { zIndex: 2 } })), !imgLoaded && (jsx$2(Flex$1, { sx: {
|
|
70781
|
+
position: 'absolute',
|
|
70782
|
+
top: 'calc(50% - 24px)',
|
|
70783
|
+
right: 'calc(50% - 50px)',
|
|
70784
|
+
justifyContent: 'center',
|
|
70785
|
+
alignItems: 'center',
|
|
70786
|
+
zIndex: 1,
|
|
70787
|
+
}, children: jsx$2(Spinner, { width: 100 }) }))] }), jsxs(Flex$1, { className: "yourbondsmodal yourbondinfo", children: [jsxs(Flex$1, { className: "yourbondinfo title-container", children: [jsx$2(Flex$1, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_g = userBill.bond.showcaseTokenName) !== null && _g !== void 0 ? _g : userBill.bond.earnToken.symbol, size: 40, chain: userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId }) }), jsx$2(Flex$1, { className: "title-container tokenname", children: (_j = (_h = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _h === void 0 ? void 0 : _h.showcaseTokenName) !== null && _j !== void 0 ? _j : userBill === null || userBill === void 0 ? void 0 : userBill.bond.earnToken.symbol }), jsx$2(Flex$1, { className: "title-container tokentags", children: (_k = userBill.bond.tags) === null || _k === void 0 ? void 0 : _k.slice(0, 1).map((tag) => {
|
|
70788
|
+
return (jsx$2(Flex$1, { sx: { marginRight: '10px' }, children: jsx$2(ListTag, { text: tag === null || tag === void 0 ? void 0 : tag.toUpperCase() }) }, tag));
|
|
70789
|
+
}) }), jsxs(Text, { sx: { color: 'text', opacity: '0.6', fontSize: ['12px', '12px', '12px', '16px'] }, children: ["#", userBill.id] })] }), jsxs(Flex$1, { className: "yourbondinfo blocks-container", children: [jsxs(Flex$1, { className: "attributes-container", children: [jsxs(Flex$1, { className: "attributes-header", sx: {
|
|
70790
|
+
borderRadius: `${isOpenTraits ? '6px 6px 0px 0px' : 'normal'}`,
|
|
70791
|
+
}, onClick: () => setIsOpenTraits(!isOpenTraits), children: [jsxs(Flex$1, { sx: { gap: '10px', alignItems: 'center' }, children: [jsx$2(Svg, { icon: "tag", direction: "down" }), jsx$2(Text, { sx: { fontSize: '12px', fontWeight: 400, color: 'text', opacity: '0.6' }, children: "Traits" })] }), jsx$2(Svg, { icon: "caret", direction: isOpenTraits ? 'up' : 'down' })] }), jsx$2(AnimatePresence, { children: isOpenTraits && (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: jsx$2(Flex$1, { sx: { flexDirection: 'column', gap: '1px' }, children: attributes
|
|
70792
|
+
? attributes.map((a) => (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.trait_type }), jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: a === null || a === void 0 ? void 0 : a.value })] }, a.value)))
|
|
70793
|
+
: BILL_ATTRIBUTES.map((attrib) => {
|
|
70794
|
+
return (jsxs(Flex$1, { sx: { background: 'white4', width: '100%', padding: '2px 8px' }, children: [jsx$2(Text, { sx: { fontSize: '10px', fontWeight: 500 }, children: attrib }), jsx$2(Skeleton, { width: "150px" })] }, attrib));
|
|
70795
|
+
}) }) })) })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-vested", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Fully Vested" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon" }), jsx$2(Flex$1, { className: "block-info text", children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: getPendingVesting((_l = userBill.lastBlockTimestamp) !== null && _l !== void 0 ? _l : '', (_m = userBill.vesting) !== null && _m !== void 0 ? _m : '') }) })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-pending", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Pending" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Pending }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: jsx$2(TokenImage, { symbol: (_o = userBill.bond.showcaseTokenName) !== null && _o !== void 0 ? _o : userBill.bond.earnToken.symbol, size: 25, chain: (_p = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _p === void 0 ? void 0 : _p.chainId }) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(totalPending(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
70796
|
+
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70797
|
+
fontWeight: [500, 500, 500, 400],
|
|
70798
|
+
paddingLeft: '10px',
|
|
70799
|
+
}, children: `($${(totalPending(userBill) * ((_q = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _q !== void 0 ? _q : 0)).toFixed(2)})` })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo-block row-claimable", children: [jsxs(Flex$1, { className: "yourbondinfo-block header", children: [jsx$2(Flex$1, { className: "yourbondinfo-block header-title", children: "Claimable" }), jsx$2(Flex$1, { className: "yourbondinfo-block header-tooltip", children: jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex$1, { children: UserBillTooltipText.Claimable }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex$1, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }) })] }), jsxs(Flex$1, { className: "yourbondinfo-block info", children: [jsx$2(Flex$1, { className: "block-info icon", children: jsx$2(TokenImage, { symbol: (_r = userBill.bond.showcaseTokenName) !== null && _r !== void 0 ? _r : userBill.bond.earnToken.symbol, size: 25, chain: (_s = userBill === null || userBill === void 0 ? void 0 : userBill.bond) === null || _s === void 0 ? void 0 : _s.chainId }) }), jsxs(Flex$1, { className: "block-info text", children: [jsx$2(Text, { sx: { fontSize: ['12px', '12px', '12px', '19px'], fontWeight: 700 }, children: formatNumberSI(parseFloat(claimable(userBill).toFixed(4)), 4) }), jsx$2(Text, { sx: {
|
|
70800
|
+
fontSize: ['10px', '10px', '10px', '12px'],
|
|
70801
|
+
fontWeight: [500, 500, 500, 400],
|
|
70802
|
+
paddingLeft: '10px',
|
|
70803
|
+
}, children: `($${(claimable(userBill) * ((_t = earnTokenPrice === null || earnTokenPrice === void 0 ? void 0 : earnTokenPrice.price) !== null && _t !== void 0 ? _t : 0)).toFixed(2)})` })] })] })] })] }), jsxs(Flex$1, { className: "yourbondinfo button-container", children: [jsx$2(Flex$1, { className: "button-container claim", children: chainId !== (userBill === null || userBill === void 0 ? void 0 : userBill.bond.chainId) ? (jsxs(Button, { className: "switch-button", disabled: claimable(userBill) === 0 || load, onClick: (event) => {
|
|
70804
|
+
event.stopPropagation();
|
|
70805
|
+
switchChain({ chainId: userBill.bond.chainId });
|
|
70806
|
+
}, children: ["Switch to ", NETWORK_LABEL[userBill.bond.chainId]] })) : (jsx$2(Button, { className: "claim-button", disabled: claimable(userBill) === 0 || load, load: load, onClick: (event) => {
|
|
70807
|
+
event.stopPropagation();
|
|
70808
|
+
handleClaim(userBill.id, userBill.address);
|
|
70809
|
+
}, children: "Claim" })) }), jsx$2(Flex$1, { className: "button-container transfer", children: jsx$2(Button, { className: "transfer-button", variant: "secondary", onClick: onTransferBondModal, children: "TRANSFER" }) })] })] })] }), jsx$2(Recommendations, { onDismiss: onDismiss, billAddress: userBill === null || userBill === void 0 ? void 0 : userBill.address })] }) }));
|
|
70810
|
+
};
|
|
70811
|
+
|
|
70812
|
+
const styles$4 = {
|
|
71211
70813
|
infoRow: {
|
|
71212
70814
|
justifyContent: 'space-between',
|
|
71213
70815
|
width: '100%',
|
|
@@ -71254,13 +70856,13 @@ const styles$5 = {
|
|
|
71254
70856
|
|
|
71255
70857
|
const ButtonsRow = ({ projectLink, twitter, bubble, audit, }) => {
|
|
71256
70858
|
const bubbleURL = `https://app.bubblemaps.io/bsc/token/${bubble}`;
|
|
71257
|
-
return (jsxs(Flex, { sx: { justifyContent: 'center' }, children: [jsx$2(Flex, { sx: styles$
|
|
70859
|
+
return (jsxs(Flex, { sx: { justifyContent: 'center' }, children: [jsx$2(Flex, { sx: styles$4.iconButton, as: Link, href: projectLink, target: "_blank", children: jsx$2(Svg, { icon: "URL", width: 18 }) }), jsx$2(Flex, { sx: styles$4.iconButton, as: Link, href: twitter, target: "_blank", children: jsx$2(Svg, { icon: "twitter", width: 18, color: "text" }) }), bubble && (jsx$2(Flex, { sx: styles$4.iconButton, as: Link, href: bubbleURL, target: "_blank", children: jsx$2(Svg, { icon: "bubble", width: 18, color: "text" }) })), audit && (jsxs(Flex, { sx: Object.assign(Object.assign({}, styles$4.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank", children: [jsx$2(Svg, { icon: "audit", width: 18, color: "text" }), jsx$2(Text, { sx: { paddingRight: '5px' }, children: 'Audit' })] }))] }));
|
|
71258
70860
|
};
|
|
71259
70861
|
|
|
71260
70862
|
const Tooltip = ({ valueTitle, valueContent, value2Title, value2Content, tokenContract, secondURL, secondURLTitle, projectLink, twitter, audit, thirdURL, thirdURLTitle, chain, }) => {
|
|
71261
70863
|
const explorerLink = BLOCK_EXPLORER[chain];
|
|
71262
70864
|
const tokenLink = `${explorerLink}/address/${tokenContract}`;
|
|
71263
|
-
return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [projectLink && twitter && (jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (jsxs(Flex, { sx: styles$
|
|
70865
|
+
return (jsxs(Flex, { sx: { flexDirection: 'column', flexWrap: 'wrap' }, children: [projectLink && twitter && (jsx$2(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (jsxs(Flex, { sx: styles$4.infoRow, children: [jsxs(Text, { sx: styles$4.titleText, children: [valueTitle, ": "] }), jsx$2(Text, { sx: styles$4.contentText, children: valueContent })] })), value2Title && (jsxs(Flex, { sx: styles$4.infoRow, children: [jsxs(Text, { sx: styles$4.titleText, children: [value2Title, ": "] }), jsx$2(Text, { sx: styles$4.contentText, children: value2Content })] })), jsx$2(Flex, { sx: { justifyContent: 'center' }, children: jsxs(Flex, { sx: { width: '144px', flexDirection: 'column' }, children: [jsx$2(Flex, { sx: styles$4.linkRow, children: jsxs(Link, { href: tokenLink, sx: styles$4.link, target: "_blank", children: ['View Token Contract', jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] }) }), secondURL && (jsx$2(Flex, { sx: styles$4.linkRow, children: jsxs(Link, { href: secondURL, sx: styles$4.link, target: "_blank", children: [secondURLTitle, jsx$2(Flex, { sx: { ml: '5px' }, children: jsx$2(Svg, { icon: "external", color: "text", width: 10 }) })] }) })), thirdURL && (jsx$2(Flex, { sx: styles$4.linkRow, children: jsx$2(Link, { href: thirdURL, sx: styles$4.link, target: "_blank", children: thirdURLTitle }) }))] }) })] }));
|
|
71264
70866
|
};
|
|
71265
70867
|
|
|
71266
70868
|
const isBondSoldOut = (bill) => {
|
|
@@ -72733,7 +72335,7 @@ const useApproval = (amount, currency, spender, account, chainId) => {
|
|
|
72733
72335
|
return [approvalState !== null && approvalState !== void 0 ? approvalState : ApprovalState.NOT_APPROVED, handleApprove];
|
|
72734
72336
|
};
|
|
72735
72337
|
|
|
72736
|
-
const version = '2.21.
|
|
72338
|
+
const version = '2.21.35';
|
|
72737
72339
|
|
|
72738
72340
|
let errorConfig = {
|
|
72739
72341
|
getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath
|
|
@@ -73014,14 +72616,10 @@ const ZapModal = ({ onDismiss, outputToken, account, chainId }) => {
|
|
|
73014
72616
|
}), [zapData, (_f = zapData === null || zapData === void 0 ? void 0 : zapData.txData) === null || _f === void 0 ? void 0 : _f.to, (_g = zapData === null || zapData === void 0 ? void 0 : zapData.txData) === null || _g === void 0 ? void 0 : _g.data]);
|
|
73015
72617
|
// Approve hook
|
|
73016
72618
|
const [approvalState, approveCallback] = useApproval(typedValue, inputToken !== null && inputToken !== void 0 ? inputToken : null, (_h = SoulZapTokenManager[chainId]) !== null && _h !== void 0 ? _h : null, account !== null && account !== void 0 ? account : null, chainId);
|
|
73017
|
-
const handleApprove = useCallback(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
73018
|
-
setPendingTx(true);
|
|
73019
|
-
yield approveCallback().finally(() => setPendingTx(false));
|
|
73020
|
-
}), []);
|
|
73021
72619
|
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) => {
|
|
73022
72620
|
event.stopPropagation();
|
|
73023
72621
|
switchChain({ chainId: chainId });
|
|
73024
|
-
}, children: ["Switch to ", NETWORK_LABEL[chainId]] })) : approvalState === ApprovalState.NOT_APPROVED || approvalState === ApprovalState.PENDING ? (jsx$2(Button, { onClick:
|
|
72622
|
+
}, children: ["Switch to ", NETWORK_LABEL[chainId]] })) : approvalState === ApprovalState.NOT_APPROVED || approvalState === ApprovalState.PENDING ? (jsx$2(Button, { onClick: approveCallback, 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
|
|
73025
72623
|
? 'something went wrong'
|
|
73026
72624
|
: fetchingQuote
|
|
73027
72625
|
? 'Loading'
|
|
@@ -73185,7 +72783,7 @@ const useSendReferenceId = () => {
|
|
|
73185
72783
|
};
|
|
73186
72784
|
|
|
73187
72785
|
const BondModalHeader = ({ bondData, onDismiss }) => {
|
|
73188
|
-
var _a, _b
|
|
72786
|
+
var _a, _b;
|
|
73189
72787
|
const [onOpenSlippageModal] = useModal(jsx$2(SlippageModal, {}));
|
|
73190
72788
|
const handleClose = () => {
|
|
73191
72789
|
if (typeof window !== 'undefined') {
|
|
@@ -73193,7 +72791,7 @@ const BondModalHeader = ({ bondData, onDismiss }) => {
|
|
|
73193
72791
|
}
|
|
73194
72792
|
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
73195
72793
|
};
|
|
73196
|
-
return (jsxs(Flex, { className: "modaltable-container title-container", children: [jsx$2(Flex, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_b = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _b === void 0 ? void 0 : _b[0]
|
|
72794
|
+
return (jsxs(Flex, { className: "modaltable-container title-container", children: [jsx$2(Flex, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_b = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _b === void 0 ? void 0 : _b[0] })] }), jsxs(Flex, { className: "title-container price-container", children: [jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bondData)] }), jsxs(Flex, { className: "price-container discounted", children: ["$", discountEarnTokenPrice(bondData)] })] }), jsx$2(Flex, { className: "slipagge-close-icons", children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose }), jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })] })) : (jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) })] }));
|
|
73197
72795
|
};
|
|
73198
72796
|
|
|
73199
72797
|
const BondCards = ({ bondData }) => {
|
|
@@ -73218,7 +72816,7 @@ function sanitizeHTML(html) {
|
|
|
73218
72816
|
const attrWhitelist = ['target', 'rel', 'style', 'href']; // Allowed attributes
|
|
73219
72817
|
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
73220
72818
|
const elements = doc.body.querySelectorAll('*');
|
|
73221
|
-
for (
|
|
72819
|
+
for (const el of elements) {
|
|
73222
72820
|
// Remove elements that are not in the whitelist
|
|
73223
72821
|
if (!tagWhitelist.includes(el.tagName.toLowerCase())) {
|
|
73224
72822
|
(_a = el === null || el === void 0 ? void 0 : el.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(el);
|
|
@@ -73259,7 +72857,7 @@ const ProjectDescription = ({ description }) => {
|
|
|
73259
72857
|
const BondModal = ({ onDismiss, bondAddress, bondChain,
|
|
73260
72858
|
// ??
|
|
73261
72859
|
accordionTitle = 'What are Bonds?', accordionBody = 'Body', accordionVisible = false, }) => {
|
|
73262
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
72860
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
73263
72861
|
const SDKConfig = useSDKConfig();
|
|
73264
72862
|
// State
|
|
73265
72863
|
const [modalVariant, setModalVariant] = useState(SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.modalVariant);
|
|
@@ -73285,10 +72883,6 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', accordionVisible = f
|
|
|
73285
72883
|
// Estimations
|
|
73286
72884
|
const normalEstimatedOutput = youGet(bondData, inputValue);
|
|
73287
72885
|
const estimatedOutput = isZap ? zapEstimatedOutput : normalEstimatedOutput;
|
|
73288
|
-
const estimatedOutputUSD = estimatedOutput * parseFloat((_h = bondData === null || bondData === void 0 ? void 0 : bondData.payoutTokenPrice) !== null && _h !== void 0 ? _h : '0');
|
|
73289
|
-
const estimatedInputUSD = parseFloat(inputValue) * ((_j = inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price) !== null && _j !== void 0 ? _j : 0);
|
|
73290
|
-
const normalPremium = premium(bondData, inputValue);
|
|
73291
|
-
isZap ? formatUSDNumber((estimatedOutputUSD - estimatedInputUSD).toString()) : normalPremium;
|
|
73292
72886
|
// Loading State
|
|
73293
72887
|
const [loadingTx, setLoadingTx] = useState(false);
|
|
73294
72888
|
const { addToastError } = usePopups();
|
|
@@ -73302,7 +72896,7 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', accordionVisible = f
|
|
|
73302
72896
|
// Modals
|
|
73303
72897
|
const [onOpenZapModal] = useModal(jsx$2(ZapModal, { outputToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, account: account, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId }), true, true, 'zapModal');
|
|
73304
72898
|
// Approve & Purchase Functions
|
|
73305
|
-
const [approvalState, approveCallback] = useApproval(inputValue, inputToken !== null && inputToken !== void 0 ? inputToken : null, (
|
|
72899
|
+
const [approvalState, approveCallback] = useApproval(inputValue, inputToken !== null && inputToken !== void 0 ? inputToken : null, (_h = (isZap ? SoulZapTokenManager === null || SoulZapTokenManager === void 0 ? void 0 : SoulZapTokenManager[bondData === null || bondData === void 0 ? void 0 : bondData.chainId] : bondData === null || bondData === void 0 ? void 0 : bondData.billAddress)) !== null && _h !== void 0 ? _h : null, account !== null && account !== void 0 ? account : null, (_j = bondData === null || bondData === void 0 ? void 0 : bondData.chainId) !== null && _j !== void 0 ? _j : null);
|
|
73306
72900
|
const handleBuyCallback = () => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
73307
72901
|
var _a, _b, _c;
|
|
73308
72902
|
const billAddress = bondData === null || bondData === void 0 ? void 0 : bondData.billAddress;
|
|
@@ -73381,7 +72975,7 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', accordionVisible = f
|
|
|
73381
72975
|
(bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
|
|
73382
72976
|
!account ||
|
|
73383
72977
|
!inputValue ||
|
|
73384
|
-
parseFloat(inputValue) === 0, onClick: approveCallback, children: ["approve ", isZap ? 'zap' : 'normal'] })) })] }), accordionVisible && (jsx$2(Flex, { className: "modaltable-container accordion-container", children: jsx$2(AccordionText, { title: accordionTitle, body: accordionBody, isVisible: accordionVisible }) }))] })] })) })) : (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content font-small gpt", children: [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: "modal-header" }), 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: (
|
|
72978
|
+
parseFloat(inputValue) === 0, onClick: approveCallback, children: ["approve ", isZap ? 'zap' : 'normal'] })) })] }), accordionVisible && (jsx$2(Flex, { className: "modaltable-container accordion-container", children: jsx$2(AccordionText, { title: accordionTitle, body: accordionBody, isVisible: accordionVisible }) }))] })] })) })) : (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content font-small gpt", children: [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: "modal-header" }), 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, { sx: { justifyContent: 'space-between', alignItems: 'center' }, children: [jsxs(Flex, { children: ["You will receive:", jsx$2(Flex, { sx: { marginLeft: '15px', marginRight: '5px' }, children: jsx$2(TokenImage, { symbol: (_m = bondData.showcaseTokenName) !== null && _m !== void 0 ? _m : bondData.earnToken.symbol, size: 20 }) }), (lodashExports.toNumber(inputValue) / lodashExports.toNumber(earnTokenPrice(bondData))).toFixed(0), ' ', bondData.earnToken.symbol, " + \u00A0", (youGet(bondData, inputValue) -
|
|
73385
72979
|
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) => {
|
|
73386
72980
|
event.stopPropagation();
|
|
73387
72981
|
switchChain({ chainId: bondData.chainId });
|
|
@@ -73389,7 +72983,7 @@ accordionTitle = 'What are Bonds?', accordionBody = 'Body', accordionVisible = f
|
|
|
73389
72983
|
(bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
|
|
73390
72984
|
!account ||
|
|
73391
72985
|
!inputValue ||
|
|
73392
|
-
parseFloat(inputValue) === 0, onClick: approveCallback, children: ["approve ", isZap ? 'zap' : 'normal'] })) })] }), 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((
|
|
72986
|
+
parseFloat(inputValue) === 0, onClick: approveCallback, children: ["approve ", isZap ? 'zap' : 'normal'] })) })] }), 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" }), jsx$2(Flex, { sx: { width: '25%', justifyContent: 'center' }, children: "What are bonds?" })] }), accordionVisible && (jsx$2(Flex, { className: "modaltable-container accordion-container", children: jsx$2(AccordionText, { title: accordionTitle, body: accordionBody, isVisible: accordionVisible }) }))] })) })) }));
|
|
73393
72987
|
};
|
|
73394
72988
|
|
|
73395
72989
|
/** CheckURL purpose is to open the buy bond modal ONLY IF a user has opened the site with a custom URL */
|
|
@@ -73445,7 +73039,7 @@ const ProgressBar = ({ value, color = 'text' }) => {
|
|
|
73445
73039
|
} }) }) }));
|
|
73446
73040
|
};
|
|
73447
73041
|
|
|
73448
|
-
const styles$
|
|
73042
|
+
const styles$3 = {
|
|
73449
73043
|
listCardContainer: {
|
|
73450
73044
|
borderRadius: 0,
|
|
73451
73045
|
flexDirection: ['column', 'column', 'column', 'row'],
|
|
@@ -73529,7 +73123,7 @@ const styles$4 = {
|
|
|
73529
73123
|
};
|
|
73530
73124
|
|
|
73531
73125
|
const ProgressBarWrapper = ({ title, value, style, showTooltip, toolTipPlacement, toolTipTransform, toolTip, }) => {
|
|
73532
|
-
return (jsxs(Flex, { sx: style, children: [jsx$2(Flex, { sx: { alignItems: 'center' }, children: jsx$2(Text, { sx: styles$
|
|
73126
|
+
return (jsxs(Flex, { sx: style, children: [jsx$2(Flex, { sx: { alignItems: 'center' }, children: jsx$2(Text, { sx: styles$3.titleText, children: `${title}` }) }), showTooltip ? (jsx$2(Flex, { sx: { alignItems: 'center', width: '100%' }, children: jsx$2(TooltipBubble, { placement: toolTipPlacement, transformTip: toolTipTransform, body: jsx$2(Flex, { sx: { justifyContent: 'center' }, children: toolTip }), width: "250px", children: jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center', width: '127px' }, children: value ? value : jsx$2(Skeleton, { sx: styles$3.skeleton }) }) }) })) : (jsx$2(Flex, { sx: { justifyContent: 'center', alignItems: 'center' }, children: value ? value : jsx$2(Skeleton, { sx: styles$3.skeleton }) }))] }));
|
|
73533
73127
|
};
|
|
73534
73128
|
var ProgressBarWrapper$1 = React__default.memo(ProgressBarWrapper);
|
|
73535
73129
|
|
|
@@ -73582,7 +73176,7 @@ const HotBondCard = ({ bond }) => {
|
|
|
73582
73176
|
const { discount } = bond;
|
|
73583
73177
|
// Modal
|
|
73584
73178
|
const [openBuyModal] = useModal(jsx$2(BondModal, { bondAddress: bond.billAddress, bondChain: bond.chainId }), true, true, `buyBondModal-${bond.billAddress}-${bond.chainId}`);
|
|
73585
|
-
return (jsx$2(Flex, { sx: styles$
|
|
73179
|
+
return (jsx$2(Flex, { sx: styles$5.desktopCard, onClick: openBuyModal, 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(Tooltip, { tokenContract: (bond === null || bond === void 0 ? void 0 : bond.earnToken.address[bond.chainId]) || '', secondURL: getBillContractURL(bond), secondURLTitle: 'View Bond Contract', thirdURL: `https://dashboard.ape.bond/bond/${(_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`, thirdURLTitle: 'View Insights', twitter: bond === null || bond === void 0 ? void 0 : bond.twitter, projectLink: bond === null || bond === void 0 ? void 0 : bond.projectLink, audit: bond === null || bond === void 0 ? void 0 : bond.audit, chain: (_b = bond.chainId) !== null && _b !== void 0 ? _b : types.ChainId.BSC }), 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: ((_c = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _c === void 0 ? void 0 : _c.days) ? `${(_d = vestingTime(bond === null || bond === void 0 ? void 0 : bond.vestingTerm)) === null || _d === void 0 ? void 0 : _d.days} D` : '-' })] })] })] }) }));
|
|
73586
73180
|
};
|
|
73587
73181
|
|
|
73588
73182
|
function useHotBondContracts() {
|
|
@@ -73633,7 +73227,7 @@ const HotBondCards = () => {
|
|
|
73633
73227
|
setActiveSlide(index);
|
|
73634
73228
|
swiper === null || swiper === void 0 ? void 0 : swiper.slideTo(index);
|
|
73635
73229
|
};
|
|
73636
|
-
return (jsxs(Flex, { sx: styles$
|
|
73230
|
+
return (jsxs(Flex, { sx: styles$5.mainComponent, children: [jsx$2(Flex, { sx: styles$5.hotBondTitle, children: "HOT BONDS" }), jsx$2(Flex, { sx: styles$5.desktopCards, children: filteredBonds === null || filteredBonds === void 0 ? void 0 : filteredBonds.slice(0, 3).map((bond, index) => {
|
|
73637
73231
|
return jsx$2(HotBondCard, { bond: bond }, `${bond.billAddress}-${index}`);
|
|
73638
73232
|
}) }), jsxs(Flex, { sx: {
|
|
73639
73233
|
flexDirection: 'column',
|
|
@@ -73652,7 +73246,7 @@ const HotBondCards = () => {
|
|
|
73652
73246
|
display: 'flex',
|
|
73653
73247
|
justifyContent: 'center',
|
|
73654
73248
|
}, children: jsx$2(HotBondCard, { bond: bond }, `${bond.billAddress}-${index}`) }, index));
|
|
73655
|
-
}) }), jsx$2(Flex, { sx: styles$
|
|
73249
|
+
}) }), jsx$2(Flex, { sx: styles$5.bubbleContainer, children: [...Array(hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.length)].map((_, i) => {
|
|
73656
73250
|
return jsx$2(SwiperDots, { isActive: i === activeSlide, onClick: () => slideTo(i) }, i);
|
|
73657
73251
|
}) })] })] }));
|
|
73658
73252
|
};
|
|
@@ -73735,7 +73329,7 @@ const BuyAgainRow = () => {
|
|
|
73735
73329
|
}, children: "BUY AGAIN" }), jsx$2(BondRow, { bond: buyAgainBond })] }) }) })) : null;
|
|
73736
73330
|
};
|
|
73737
73331
|
|
|
73738
|
-
const styles$
|
|
73332
|
+
const styles$2 = {
|
|
73739
73333
|
smallCardContainer: {
|
|
73740
73334
|
width: '100%',
|
|
73741
73335
|
p: '6px 12px',
|
|
@@ -73760,7 +73354,7 @@ const styles$3 = {
|
|
|
73760
73354
|
const SmallRecommendationCard = ({ recommendation }) => {
|
|
73761
73355
|
var _a;
|
|
73762
73356
|
const vestingTime = getTimePeriods((_a = recommendation.vestingTerm) !== null && _a !== void 0 ? _a : 0, true);
|
|
73763
|
-
return (jsxs(Flex, { sx: styles$
|
|
73357
|
+
return (jsxs(Flex, { sx: styles$2.smallCardContainer, 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$2.subTitle, children: [vestingTime.days, "D"] })] })] }), jsxs(Flex, { sx: { alignItems: 'center' }, children: [jsx$2(Flex, { sx: styles$2.subTitle, children: "Discount" }), jsxs(Flex, { sx: { fontSize: '12px', color: recommendation.discount > 0 ? 'success' : 'error', ml: '6px' }, children: [recommendation.discount.toFixed(2), "%"] })] })] }));
|
|
73764
73358
|
};
|
|
73765
73359
|
|
|
73766
73360
|
const RecommendationCards = () => {
|
|
@@ -73902,8 +73496,8 @@ const FullBondsView = () => {
|
|
|
73902
73496
|
};
|
|
73903
73497
|
|
|
73904
73498
|
const Toggle = ({ options, activeOption, handleToggle, claimableBillsAmount, }) => {
|
|
73905
|
-
return (jsx$2(Flex, { sx: styles$
|
|
73906
|
-
return (jsx$2(motion.div, { animate: { opacity: option === activeOption ? 1 : 0.6, scale: option === activeOption ? 1 : 0.9 }, exit: { opacity: 0, scale: 0.9 }, transition: { duration: 0.2, type: 'spring', stiffness: 50 }, sx: { overflow: 'hidden', width: '100%' }, children: jsx$2(Flex, { sx: Object.assign(Object.assign({}, styles$
|
|
73499
|
+
return (jsx$2(Flex, { sx: styles$7.container, children: jsx$2(AnimatePresence, { initial: false, children: options.map((option) => {
|
|
73500
|
+
return (jsx$2(motion.div, { animate: { opacity: option === activeOption ? 1 : 0.6, scale: option === activeOption ? 1 : 0.9 }, exit: { opacity: 0, scale: 0.9 }, transition: { duration: 0.2, type: 'spring', stiffness: 50 }, sx: { overflow: 'hidden', width: '100%' }, children: jsx$2(Flex, { sx: Object.assign(Object.assign({}, styles$7.switch), { background: option === activeOption ? 'primaryButton' : 'white2' }), onClick: () => handleToggle(option), children: jsxs(Text, { sx: { fontSize: '14px' }, children: [option, option === BondsViewOptions.YOURBONDS && claimableBillsAmount ? ` (${claimableBillsAmount})` : ''] }) }) }, option));
|
|
73907
73501
|
}) }) }));
|
|
73908
73502
|
};
|
|
73909
73503
|
|
|
@@ -73978,7 +73572,7 @@ const selectItemPadding = {
|
|
|
73978
73572
|
[sizes.LARGE]: 8,
|
|
73979
73573
|
};
|
|
73980
73574
|
|
|
73981
|
-
const styles$
|
|
73575
|
+
const styles$1 = {
|
|
73982
73576
|
container: {
|
|
73983
73577
|
background: 'white3',
|
|
73984
73578
|
borderRadius: '10px',
|
|
@@ -74037,7 +73631,7 @@ const Select = (_a) => {
|
|
|
74037
73631
|
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
74038
73632
|
}
|
|
74039
73633
|
};
|
|
74040
|
-
return (jsxs(Fragment$1, { children: [jsxs(Box$1, { sx: Object.assign(Object.assign({}, styles$
|
|
73634
|
+
return (jsxs(Fragment$1, { children: [jsxs(Box$1, { sx: Object.assign(Object.assign({}, styles$1.container), { width }), onClick: handleClick, className: className, children: [jsxs(Flex$1, { sx: {
|
|
74041
73635
|
padding: selectedExtraPadding[size],
|
|
74042
73636
|
pr: selectPadding[size],
|
|
74043
73637
|
columnGap: '10px',
|
|
@@ -74051,9 +73645,9 @@ const Select = (_a) => {
|
|
|
74051
73645
|
return null;
|
|
74052
73646
|
}
|
|
74053
73647
|
return React__default.cloneElement(child, Object.assign(Object.assign({}, child === null || child === void 0 ? void 0 : child.props), { active: true }));
|
|
74054
|
-
})), jsx$2(Flex$1, { sx: { minWidth: '10px' }, children: jsx$2(Svg, { icon: "caret", direction: open ? 'up' : 'down' }) })] }), jsx$2(AnimatePresence, { children: open && (jsx$2(motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { opacity: 0, height: 0 }, sx: Object.assign(Object.assign({}, styles$
|
|
73648
|
+
})), jsx$2(Flex$1, { sx: { minWidth: '10px' }, children: jsx$2(Svg, { icon: "caret", direction: open ? 'up' : 'down' }) })] }), jsx$2(AnimatePresence, { children: open && (jsx$2(motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: 'fit-content' }, transition: { opacity: { duration: 0.2 } }, exit: { opacity: 0, height: 0 }, sx: Object.assign(Object.assign({}, styles$1.ul), { zIndex: 10, top: position === positions.BOTTOM ? 'calc(100% + 5px)' : undefined, bottom: position === positions.TOP ? 'calc(100% + 5px)' : undefined }), children: React__default.Children.map(children, (child) => {
|
|
74055
73649
|
return React__default.cloneElement(child, Object.assign(Object.assign({}, child === null || child === void 0 ? void 0 : child.props), { active: false, onClick: () => { var _a; return setNativeInput((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.value); } }));
|
|
74056
|
-
}) })) }), jsx$2("input", Object.assign({ ref: inputRef, value: active || '', "aria-hidden": "true", tabIndex: -1 }, props, { sx: styles$
|
|
73650
|
+
}) })) }), jsx$2("input", Object.assign({ ref: inputRef, value: active || '', "aria-hidden": "true", tabIndex: -1 }, props, { sx: styles$1.input }))] }), open && jsx$2("div", { "aria-hidden": "true", onClick: () => setOpen(false), sx: styles$1.backdrop })] }));
|
|
74057
73651
|
};
|
|
74058
73652
|
|
|
74059
73653
|
const SelectItem = (_a) => {
|
|
@@ -74070,73 +73664,17 @@ const SelectItem = (_a) => {
|
|
|
74070
73664
|
}, children: jsx$2(Flex, { sx: style, children: children }) })));
|
|
74071
73665
|
};
|
|
74072
73666
|
|
|
74073
|
-
const
|
|
74074
|
-
|
|
74075
|
-
|
|
74076
|
-
|
|
74077
|
-
|
|
74078
|
-
|
|
74079
|
-
|
|
74080
|
-
|
|
74081
|
-
|
|
74082
|
-
|
|
74083
|
-
|
|
74084
|
-
line-height: 1.5;
|
|
74085
|
-
padding: 0 8px;
|
|
74086
|
-
white-space: nowrap;
|
|
74087
|
-
|
|
74088
|
-
svg {
|
|
74089
|
-
fill: ${getThemeTextColor};
|
|
74090
|
-
}
|
|
74091
|
-
`;
|
|
74092
|
-
const styles$1 = {
|
|
74093
|
-
listTagCont: ({ variant = 'ape' }) => ({
|
|
74094
|
-
alignItems: 'center',
|
|
74095
|
-
background: (theme) => { var _a, _b, _c, _d, _e; return (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a === void 0 ? void 0 : _a.listTagBg) === null || _b === void 0 ? void 0 : _b[variant]) !== null && _c !== void 0 ? _c : (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _d === void 0 ? void 0 : _d.listTagBg) === null || _e === void 0 ? void 0 : _e.default; },
|
|
74096
|
-
borderRadius: '3px',
|
|
74097
|
-
display: 'inline-flex',
|
|
74098
|
-
height: '15px',
|
|
74099
|
-
padding: '0 5px',
|
|
74100
|
-
}),
|
|
74101
|
-
tagText: ({ variant = 'ape' }) => ({
|
|
74102
|
-
color: (theme) => {
|
|
74103
|
-
var _a, _b, _c, _d, _e;
|
|
74104
|
-
return ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _a === void 0 ? void 0 : _a.listTagTextColor) === null || _b === void 0 ? void 0 : _b[variant])
|
|
74105
|
-
? (_d = (_c = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _c === void 0 ? void 0 : _c.listTagTextColor) === null || _d === void 0 ? void 0 : _d[variant]
|
|
74106
|
-
: (_e = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _e === void 0 ? void 0 : _e.primaryBright;
|
|
74107
|
-
},
|
|
74108
|
-
fontSize: '10px',
|
|
74109
|
-
fontWeight: 600,
|
|
74110
|
-
lineHeight: '15px',
|
|
74111
|
-
width: '100%',
|
|
74112
|
-
}),
|
|
74113
|
-
};
|
|
74114
|
-
|
|
74115
|
-
({
|
|
74116
|
-
APE: 'ape',
|
|
74117
|
-
UNI: 'uni',
|
|
74118
|
-
ARK: 'ark',
|
|
74119
|
-
NEW: 'new',
|
|
74120
|
-
HOT: 'hot',
|
|
74121
|
-
AUTO: 'auto',
|
|
74122
|
-
MAX: 'max',
|
|
74123
|
-
yield: 'yield',
|
|
74124
|
-
BETA: 'beta',
|
|
74125
|
-
LIQUIDITY: 'liquidity',
|
|
74126
|
-
RESERVE: 'reserve',
|
|
74127
|
-
LAUNCH: 'launch',
|
|
74128
|
-
bondLp: 'bondLp',
|
|
74129
|
-
migration: 'migration',
|
|
74130
|
-
CEX_FUND: 'cex_fund',
|
|
74131
|
-
[types.LiquidityDex.QuickswapV2]: 'QuickSwap v2',
|
|
74132
|
-
[types.LiquidityDex.PancakeSwapV2]: 'PancakeSwap v2',
|
|
74133
|
-
expired: 'expired',
|
|
74134
|
-
permalock: 'permalock',
|
|
74135
|
-
});
|
|
74136
|
-
const lpTags = ['ape', 'uni', 'ark'];
|
|
74137
|
-
|
|
74138
|
-
const ListTag = ({ variant, text = '', styleCustom }) => {
|
|
74139
|
-
return (jsx$2(Flex, { variant: variant, sx: Object.assign(Object.assign({}, styles$1.listTagCont({ variant })), styleCustom), children: text ? (jsx$2(Flex, { sx: styles$1.tagText({ variant }), children: text })) : (jsxs(Flex, { sx: styles$1.tagText({ variant }), children: [variant.toUpperCase().replace('_', ' '), " ", lpTags.includes(variant) && 'LP'] })) }));
|
|
73667
|
+
const ListTag = ({ text = '' }) => {
|
|
73668
|
+
return (jsx$2(Flex, { className: "list-tag", sx: {
|
|
73669
|
+
background: '#3C6AB530',
|
|
73670
|
+
color: '#3b78d3',
|
|
73671
|
+
fontSize: '10px',
|
|
73672
|
+
fontWeight: 600,
|
|
73673
|
+
lineHeight: '15px',
|
|
73674
|
+
p: '2px 6px',
|
|
73675
|
+
borderRadius: '5px',
|
|
73676
|
+
ml: '5px',
|
|
73677
|
+
}, children: text }));
|
|
74140
73678
|
};
|
|
74141
73679
|
|
|
74142
73680
|
const Context = createContext({
|