@loafmarkets/ui 0.1.102 → 0.1.103
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/index.d.mts +35 -5
- package/dist/index.d.ts +35 -5
- package/dist/index.js +1289 -745
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1291 -747
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React5 from 'react';
|
|
2
|
-
import React5__default, { createContext, useState,
|
|
2
|
+
import React5__default, { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext } from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -7,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import styled25, { keyframes, css } from 'styled-components';
|
|
9
9
|
import * as ReactDOM from 'react-dom';
|
|
10
|
-
import { Newspaper
|
|
10
|
+
import { Newspaper } from 'lucide-react';
|
|
11
11
|
import * as LightweightCharts from 'lightweight-charts';
|
|
12
12
|
import { BiChevronUp, BiChevronDown, BiX, BiCoin, BiWallet, BiCreditCard, BiCalendar, BiInfoCircle, BiPencil, BiImages, BiVideo, BiMap } from 'react-icons/bi';
|
|
13
13
|
import { FaChartLine, FaBitcoin } from 'react-icons/fa';
|
|
@@ -1770,6 +1770,11 @@ function useViewportCompact(breakpoint) {
|
|
|
1770
1770
|
return isCompact;
|
|
1771
1771
|
}
|
|
1772
1772
|
var formatNumber = (value, precision) => value.toFixed(precision);
|
|
1773
|
+
var formatTradeTime = (time) => {
|
|
1774
|
+
const d = new Date(time);
|
|
1775
|
+
if (Number.isNaN(d.getTime())) return time;
|
|
1776
|
+
return d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false });
|
|
1777
|
+
};
|
|
1773
1778
|
var FLASH_DURATION_MS = 450;
|
|
1774
1779
|
var FLASH_UP_COLOR = "rgba(14, 203, 129, 0.35)";
|
|
1775
1780
|
var FLASH_DOWN_COLOR = "rgba(246, 70, 93, 0.35)";
|
|
@@ -1839,14 +1844,12 @@ function TradeRow({
|
|
|
1839
1844
|
{
|
|
1840
1845
|
ref: rowRef,
|
|
1841
1846
|
className: "grid items-center",
|
|
1842
|
-
style: { gridTemplateColumns: "
|
|
1847
|
+
style: { gridTemplateColumns: "1fr 1fr 1fr", padding: "0.2rem 0", fontSize: "0.8rem" },
|
|
1843
1848
|
children: [
|
|
1844
|
-
/* @__PURE__ */
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
/* @__PURE__ */ jsxs("div", { style: { textAlign: "right", paddingRight: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: "4px" }, children: [
|
|
1849
|
-
formatNumber(trade.amount, amountPrecision),
|
|
1849
|
+
/* @__PURE__ */ jsx("div", { style: { color: trade.type === "buy" ? "#0ecb81" : "#f6465d" }, className: "tabular-nums", children: formatNumber(trade.price, precision) }),
|
|
1850
|
+
/* @__PURE__ */ jsx("div", { style: { textAlign: "right" }, className: "tabular-nums text-white/90", children: formatNumber(trade.amount, amountPrecision) }),
|
|
1851
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "right", paddingRight: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: "4px" }, className: "tabular-nums text-white/50", children: [
|
|
1852
|
+
trade.time != null && /* @__PURE__ */ jsx("span", { children: formatTradeTime(trade.time) }),
|
|
1850
1853
|
explorerUrl && /* @__PURE__ */ jsx(
|
|
1851
1854
|
"a",
|
|
1852
1855
|
{
|
|
@@ -1867,24 +1870,22 @@ function TradeRow({
|
|
|
1867
1870
|
"div",
|
|
1868
1871
|
{
|
|
1869
1872
|
ref: rowRef,
|
|
1870
|
-
className: "grid grid-cols-3 items-center gap-3 px-3
|
|
1873
|
+
className: "relative grid grid-cols-3 items-center gap-3 px-3 text-[0.8rem]",
|
|
1874
|
+
style: { height: `${DEPTH_ROW_HEIGHT_PX}px` },
|
|
1871
1875
|
children: [
|
|
1872
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ jsx(
|
|
1873
1877
|
"div",
|
|
1874
1878
|
{
|
|
1875
1879
|
className: cn(
|
|
1876
1880
|
"tabular-nums",
|
|
1877
1881
|
trade.type === "buy" ? "text-[#0ecb81]" : "text-[#f6465d]"
|
|
1878
1882
|
),
|
|
1879
|
-
children:
|
|
1880
|
-
"$",
|
|
1881
|
-
formatNumber(trade.price, precision)
|
|
1882
|
-
]
|
|
1883
|
+
children: formatNumber(trade.price, precision)
|
|
1883
1884
|
}
|
|
1884
1885
|
),
|
|
1885
1886
|
/* @__PURE__ */ jsx("div", { className: "text-right tabular-nums text-white/90", children: formatNumber(trade.amount, amountPrecision) }),
|
|
1886
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
1887
|
-
trade.time != null && /* @__PURE__ */ jsx("span", {
|
|
1887
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5 tabular-nums text-white/50", children: [
|
|
1888
|
+
trade.time != null && /* @__PURE__ */ jsx("span", { children: trade.time }),
|
|
1888
1889
|
explorerUrl && /* @__PURE__ */ jsx(
|
|
1889
1890
|
"a",
|
|
1890
1891
|
{
|
|
@@ -1952,8 +1953,8 @@ function DepthRow({
|
|
|
1952
1953
|
);
|
|
1953
1954
|
}
|
|
1954
1955
|
var clamp3 = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
1955
|
-
var LEVEL_ROWS_VISIBLE =
|
|
1956
|
-
var DEPTH_ROW_HEIGHT_PX =
|
|
1956
|
+
var LEVEL_ROWS_VISIBLE = 5;
|
|
1957
|
+
var DEPTH_ROW_HEIGHT_PX = 28;
|
|
1957
1958
|
var COMPACT_ROWS_VISIBLE = 5;
|
|
1958
1959
|
var COMPACT_ROW_HEIGHT_PX = 30;
|
|
1959
1960
|
var COMPACT_BREAKPOINT_PX = 1024;
|
|
@@ -1977,6 +1978,8 @@ var Orderbook = React5.forwardRef(
|
|
|
1977
1978
|
onPriceClick,
|
|
1978
1979
|
onLoafLiquidityClick,
|
|
1979
1980
|
tradeExplorerUrl,
|
|
1981
|
+
maxLevels,
|
|
1982
|
+
fillHeight = false,
|
|
1980
1983
|
className,
|
|
1981
1984
|
...props
|
|
1982
1985
|
}, ref) => {
|
|
@@ -2021,8 +2024,10 @@ var Orderbook = React5.forwardRef(
|
|
|
2021
2024
|
onTabChange?.(next);
|
|
2022
2025
|
};
|
|
2023
2026
|
const isCompact = variant === "compact" || variant === "auto" && viewportCompact;
|
|
2024
|
-
const
|
|
2025
|
-
const
|
|
2027
|
+
const effectiveLevels = maxLevels ?? LEVEL_ROWS_VISIBLE;
|
|
2028
|
+
const effectiveCompactLevels = maxLevels ?? COMPACT_ROWS_VISIBLE;
|
|
2029
|
+
const sectionHeight = isCompact ? effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX : effectiveLevels * DEPTH_ROW_HEIGHT_PX;
|
|
2030
|
+
const rowCount = isCompact ? effectiveCompactLevels : effectiveLevels;
|
|
2026
2031
|
const askVisibleLevels = asks.slice(-rowCount);
|
|
2027
2032
|
const bidVisibleLevels = bids.slice(0, rowCount);
|
|
2028
2033
|
const askCumDepths = new Array(askVisibleLevels.length);
|
|
@@ -2041,7 +2046,8 @@ var Orderbook = React5.forwardRef(
|
|
|
2041
2046
|
bidCumDepths[i] = acc;
|
|
2042
2047
|
}
|
|
2043
2048
|
}
|
|
2044
|
-
const
|
|
2049
|
+
const askMaxCumDepth = Math.max(1, ...askCumDepths);
|
|
2050
|
+
const bidMaxCumDepth = Math.max(1, ...bidCumDepths);
|
|
2045
2051
|
const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
|
|
2046
2052
|
const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
|
|
2047
2053
|
const layoutProps = {
|
|
@@ -2061,7 +2067,8 @@ var Orderbook = React5.forwardRef(
|
|
|
2061
2067
|
bidVisibleLevels,
|
|
2062
2068
|
askCumDepths,
|
|
2063
2069
|
bidCumDepths,
|
|
2064
|
-
|
|
2070
|
+
askMaxCumDepth,
|
|
2071
|
+
bidMaxCumDepth,
|
|
2065
2072
|
midPrice,
|
|
2066
2073
|
midChangePercent,
|
|
2067
2074
|
midClass,
|
|
@@ -2071,15 +2078,19 @@ var Orderbook = React5.forwardRef(
|
|
|
2071
2078
|
isLoading,
|
|
2072
2079
|
seenTradeKeysRef,
|
|
2073
2080
|
tradeExplorerUrl,
|
|
2074
|
-
onPriceClick
|
|
2081
|
+
onPriceClick,
|
|
2082
|
+
levelCount: effectiveLevels,
|
|
2083
|
+
compactLevelCount: effectiveCompactLevels,
|
|
2084
|
+
fillHeight
|
|
2075
2085
|
};
|
|
2076
2086
|
return /* @__PURE__ */ jsx(
|
|
2077
2087
|
Card,
|
|
2078
2088
|
{
|
|
2079
2089
|
ref,
|
|
2080
2090
|
className: cn(
|
|
2081
|
-
"w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col
|
|
2091
|
+
"w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col",
|
|
2082
2092
|
isCompact && "max-w-none",
|
|
2093
|
+
fillHeight && "h-full",
|
|
2083
2094
|
className
|
|
2084
2095
|
),
|
|
2085
2096
|
...props,
|
|
@@ -2128,7 +2139,8 @@ function DesktopOrderbookLayout({
|
|
|
2128
2139
|
bidVisibleLevels,
|
|
2129
2140
|
askCumDepths,
|
|
2130
2141
|
bidCumDepths,
|
|
2131
|
-
|
|
2142
|
+
askMaxCumDepth,
|
|
2143
|
+
bidMaxCumDepth,
|
|
2132
2144
|
midPrice,
|
|
2133
2145
|
midChangePercent,
|
|
2134
2146
|
midClass,
|
|
@@ -2138,7 +2150,10 @@ function DesktopOrderbookLayout({
|
|
|
2138
2150
|
isLoading,
|
|
2139
2151
|
seenTradeKeysRef,
|
|
2140
2152
|
tradeExplorerUrl,
|
|
2141
|
-
onPriceClick
|
|
2153
|
+
onPriceClick,
|
|
2154
|
+
levelCount: effectiveLevels,
|
|
2155
|
+
compactLevelCount: _compactLevelCount,
|
|
2156
|
+
fillHeight
|
|
2142
2157
|
}) {
|
|
2143
2158
|
const midRef = React5.useRef(null);
|
|
2144
2159
|
useMidPriceFlash(midRef, midPrice, "#0b1a24");
|
|
@@ -2226,7 +2241,7 @@ function DesktopOrderbookLayout({
|
|
|
2226
2241
|
{
|
|
2227
2242
|
className: "max-h-[380px] overflow-y-auto overflow-x-hidden",
|
|
2228
2243
|
style: { scrollbarGutter: "stable" },
|
|
2229
|
-
children: isLoading && tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
2244
|
+
children: isLoading && tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { children: Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `trade-skel-${i}`)) }) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-10 text-center text-sm text-white/50", children: "No trades" }) : /* @__PURE__ */ jsx("div", { children: tradeFiltered.map((trade, i) => {
|
|
2230
2245
|
const tradeKey = getTradeKey(trade, i);
|
|
2231
2246
|
const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
|
|
2232
2247
|
return /* @__PURE__ */ jsx(
|
|
@@ -2243,20 +2258,20 @@ function DesktopOrderbookLayout({
|
|
|
2243
2258
|
);
|
|
2244
2259
|
}) })
|
|
2245
2260
|
}
|
|
2246
|
-
) : /* @__PURE__ */ jsxs("div", { className: "flex flex-
|
|
2261
|
+
) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col min-h-0 overflow-hidden", fillHeight && "flex-1"), children: [
|
|
2247
2262
|
/* @__PURE__ */ jsx(
|
|
2248
2263
|
"div",
|
|
2249
2264
|
{
|
|
2250
|
-
className: "flex flex-col justify-end
|
|
2251
|
-
style: { height: `${sectionHeight}px` },
|
|
2252
|
-
children: isLoading ? Array.from({ length:
|
|
2265
|
+
className: cn("flex flex-col justify-end overflow-hidden", !fillHeight && "flex-shrink-0"),
|
|
2266
|
+
style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
|
|
2267
|
+
children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `ask-skel-${i}`)) : askVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No asks" }) : askVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
|
|
2253
2268
|
DepthRow,
|
|
2254
2269
|
{
|
|
2255
2270
|
side: "ask",
|
|
2256
2271
|
price: l.price,
|
|
2257
2272
|
amount: l.amount,
|
|
2258
2273
|
cumDepth: askCumDepths[i],
|
|
2259
|
-
depthPct: askCumDepths[i] /
|
|
2274
|
+
depthPct: askCumDepths[i] / askMaxCumDepth * 100,
|
|
2260
2275
|
precision,
|
|
2261
2276
|
amountPrecision,
|
|
2262
2277
|
hasUserOrder: userAskPrices.has(l.price),
|
|
@@ -2270,7 +2285,7 @@ function DesktopOrderbookLayout({
|
|
|
2270
2285
|
"div",
|
|
2271
2286
|
{
|
|
2272
2287
|
ref: midRef,
|
|
2273
|
-
className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2",
|
|
2288
|
+
className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2 flex-shrink-0",
|
|
2274
2289
|
children: [
|
|
2275
2290
|
/* @__PURE__ */ jsx("div", { className: cn("text-lg font-semibold tabular-nums", midClass), children: isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 20 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2276
2291
|
"$",
|
|
@@ -2288,16 +2303,16 @@ function DesktopOrderbookLayout({
|
|
|
2288
2303
|
/* @__PURE__ */ jsx(
|
|
2289
2304
|
"div",
|
|
2290
2305
|
{
|
|
2291
|
-
className: "
|
|
2292
|
-
style: { height: `${sectionHeight}px` },
|
|
2293
|
-
children: isLoading ? Array.from({ length:
|
|
2306
|
+
className: cn("flex flex-col overflow-hidden", !fillHeight && "flex-shrink-0"),
|
|
2307
|
+
style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
|
|
2308
|
+
children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `bid-skel-${i}`)) : bidVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No bids" }) : bidVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
|
|
2294
2309
|
DepthRow,
|
|
2295
2310
|
{
|
|
2296
2311
|
side: "bid",
|
|
2297
2312
|
price: l.price,
|
|
2298
2313
|
amount: l.amount,
|
|
2299
2314
|
cumDepth: bidCumDepths[i],
|
|
2300
|
-
depthPct: bidCumDepths[i] /
|
|
2315
|
+
depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
|
|
2301
2316
|
precision,
|
|
2302
2317
|
amountPrecision,
|
|
2303
2318
|
hasUserOrder: userBidPrices.has(l.price),
|
|
@@ -2326,7 +2341,8 @@ function MobileOrderbookLayout({
|
|
|
2326
2341
|
bidVisibleLevels: visibleBids,
|
|
2327
2342
|
askCumDepths,
|
|
2328
2343
|
bidCumDepths,
|
|
2329
|
-
|
|
2344
|
+
askMaxCumDepth,
|
|
2345
|
+
bidMaxCumDepth,
|
|
2330
2346
|
midPrice,
|
|
2331
2347
|
midChangePercent,
|
|
2332
2348
|
midClass,
|
|
@@ -2336,7 +2352,9 @@ function MobileOrderbookLayout({
|
|
|
2336
2352
|
isLoading,
|
|
2337
2353
|
seenTradeKeysRef,
|
|
2338
2354
|
tradeExplorerUrl,
|
|
2339
|
-
onPriceClick
|
|
2355
|
+
onPriceClick,
|
|
2356
|
+
levelCount: _levelCount,
|
|
2357
|
+
compactLevelCount: effectiveCompactLevels
|
|
2340
2358
|
}) {
|
|
2341
2359
|
const midRef = React5.useRef(null);
|
|
2342
2360
|
useMidPriceFlash(midRef, midPrice, "transparent");
|
|
@@ -2408,13 +2426,13 @@ function MobileOrderbookLayout({
|
|
|
2408
2426
|
]
|
|
2409
2427
|
}
|
|
2410
2428
|
),
|
|
2411
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length:
|
|
2429
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", height: `${effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX}px`, justifyContent: "flex-end", overflow: "hidden" }, children: isLoading ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-ask-skel-${i}`)) : visibleAsks.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No asks" }) : visibleAsks.map((l, i) => /* @__PURE__ */ jsx(
|
|
2412
2430
|
MobileDepthRow,
|
|
2413
2431
|
{
|
|
2414
2432
|
side: "ask",
|
|
2415
2433
|
price: l.price,
|
|
2416
2434
|
amount: l.amount,
|
|
2417
|
-
depthPct: askCumDepths[i] /
|
|
2435
|
+
depthPct: askCumDepths[i] / askMaxCumDepth * 100,
|
|
2418
2436
|
precision,
|
|
2419
2437
|
amountPrecision,
|
|
2420
2438
|
hasUserOrder: userAskPrices.has(l.price),
|
|
@@ -2455,13 +2473,13 @@ function MobileOrderbookLayout({
|
|
|
2455
2473
|
]
|
|
2456
2474
|
}
|
|
2457
2475
|
),
|
|
2458
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length:
|
|
2476
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", height: `${effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX}px`, overflow: "hidden" }, children: isLoading ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-bid-skel-${i}`)) : visibleBids.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "0.75rem 0", textAlign: "center", color: "rgba(255,255,255,0.4)", fontSize: "0.72rem" }, children: "No bids" }) : visibleBids.map((l, i) => /* @__PURE__ */ jsx(
|
|
2459
2477
|
MobileDepthRow,
|
|
2460
2478
|
{
|
|
2461
2479
|
side: "bid",
|
|
2462
2480
|
price: l.price,
|
|
2463
2481
|
amount: l.amount,
|
|
2464
|
-
depthPct: bidCumDepths[i] /
|
|
2482
|
+
depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
|
|
2465
2483
|
precision,
|
|
2466
2484
|
amountPrecision,
|
|
2467
2485
|
hasUserOrder: userBidPrices.has(l.price),
|
|
@@ -2481,7 +2499,7 @@ function MobileOrderbookLayout({
|
|
|
2481
2499
|
]
|
|
2482
2500
|
}
|
|
2483
2501
|
),
|
|
2484
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: isLoading && tradeFiltered.length === 0 ? Array.from({ length:
|
|
2502
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: isLoading && tradeFiltered.length === 0 ? Array.from({ length: effectiveCompactLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, { compact: true }, `m-trade-skel-${i}`)) : tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-[0.7rem] text-white/50", children: "No trades" }) : tradeFiltered.map((trade, i) => {
|
|
2485
2503
|
const tradeKey = getTradeKey(trade, i);
|
|
2486
2504
|
const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
|
|
2487
2505
|
return /* @__PURE__ */ jsx(
|
|
@@ -2521,7 +2539,8 @@ function MobileDepthRow({
|
|
|
2521
2539
|
style: {
|
|
2522
2540
|
display: "grid",
|
|
2523
2541
|
gridTemplateColumns: "1.2fr 0.8fr",
|
|
2524
|
-
|
|
2542
|
+
height: `${COMPACT_ROW_HEIGHT_PX}px`,
|
|
2543
|
+
alignItems: "center",
|
|
2525
2544
|
fontSize: "0.8rem",
|
|
2526
2545
|
position: "relative",
|
|
2527
2546
|
cursor: onPriceClick ? "pointer" : void 0
|
|
@@ -2664,7 +2683,7 @@ var PropertyTour = React5.forwardRef(
|
|
|
2664
2683
|
}
|
|
2665
2684
|
);
|
|
2666
2685
|
PropertyTour.displayName = "PropertyTour";
|
|
2667
|
-
var ITEMS_PER_PAGE =
|
|
2686
|
+
var ITEMS_PER_PAGE = 6;
|
|
2668
2687
|
var ensureAnimationsInjected = () => {
|
|
2669
2688
|
if (typeof document === "undefined") return;
|
|
2670
2689
|
if (document.getElementById("property-news-updates-animations")) return;
|
|
@@ -2709,6 +2728,22 @@ var formatDate = (value) => {
|
|
|
2709
2728
|
if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
|
|
2710
2729
|
return value.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
2711
2730
|
};
|
|
2731
|
+
var formatDateShort = (value) => {
|
|
2732
|
+
const d = typeof value === "string" ? new Date(value) : value;
|
|
2733
|
+
if (!(d instanceof Date) || Number.isNaN(d.getTime())) {
|
|
2734
|
+
if (typeof value === "string") {
|
|
2735
|
+
return value.replace(/\s*\d{4}\s*$/, "");
|
|
2736
|
+
}
|
|
2737
|
+
return "";
|
|
2738
|
+
}
|
|
2739
|
+
const diffMs = Date.now() - d.getTime();
|
|
2740
|
+
const diffS = diffMs / 1e3;
|
|
2741
|
+
if (diffS < 60) return "Just now";
|
|
2742
|
+
if (diffS < 3600) return `${Math.floor(diffS / 60)}m ago`;
|
|
2743
|
+
if (diffS < 86400) return `${Math.floor(diffS / 3600)}h ago`;
|
|
2744
|
+
const time = d.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", hour12: true });
|
|
2745
|
+
return `${time} \xB7 ${d.toLocaleDateString(void 0, { month: "short", day: "numeric" })}`;
|
|
2746
|
+
};
|
|
2712
2747
|
var formatTimeAgo = (timestamp) => {
|
|
2713
2748
|
const diff = (Date.now() - new Date(timestamp).getTime()) / 1e3;
|
|
2714
2749
|
if (diff < 60) return `${Math.floor(diff)}s ago`;
|
|
@@ -2719,7 +2754,7 @@ function getSentimentInfo(score) {
|
|
|
2719
2754
|
if (score == null) return null;
|
|
2720
2755
|
if (score > 0.15) return { arrow: "\u25B2", label: "Bullish", color: "#0ecb81" };
|
|
2721
2756
|
if (score < -0.15) return { arrow: "\u25BC", label: "Bearish", color: "#f6465d" };
|
|
2722
|
-
return { arrow: "
|
|
2757
|
+
return { arrow: "", label: "Neutral", color: "#848e9c" };
|
|
2723
2758
|
}
|
|
2724
2759
|
function NewsArticleModal({ item, onClose }) {
|
|
2725
2760
|
const sentimentInfo = getSentimentInfo(item.sentimentScore);
|
|
@@ -2801,8 +2836,7 @@ function NewsArticleModal({ item, onClose }) {
|
|
|
2801
2836
|
border: `1px solid ${sentimentInfo.color}40`
|
|
2802
2837
|
},
|
|
2803
2838
|
children: [
|
|
2804
|
-
sentimentInfo.arrow,
|
|
2805
|
-
" ",
|
|
2839
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
2806
2840
|
sentimentInfo.label
|
|
2807
2841
|
]
|
|
2808
2842
|
}
|
|
@@ -2842,7 +2876,35 @@ function NewsArticleModal({ item, onClose }) {
|
|
|
2842
2876
|
)
|
|
2843
2877
|
] }),
|
|
2844
2878
|
/* @__PURE__ */ jsx("div", { style: { height: "1px", background: "rgba(255,255,255,0.08)", marginBottom: "1.25rem" } }),
|
|
2845
|
-
item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "rgba(255,255,255,0.8)", lineHeight: 1.75, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." })
|
|
2879
|
+
item.summary ? /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "rgba(255,255,255,0.8)", lineHeight: 1.75, margin: 0 }, children: item.summary }) : /* @__PURE__ */ jsx("p", { style: { fontSize: "0.8rem", color: "rgba(255,255,255,0.35)", fontStyle: "italic", margin: 0 }, children: "Summary not available for this article." }),
|
|
2880
|
+
item.url && /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", paddingTop: "1rem", borderTop: "1px solid rgba(255,255,255,0.08)" }, children: /* @__PURE__ */ jsxs(
|
|
2881
|
+
"a",
|
|
2882
|
+
{
|
|
2883
|
+
href: item.url,
|
|
2884
|
+
target: "_blank",
|
|
2885
|
+
rel: "noopener noreferrer",
|
|
2886
|
+
style: {
|
|
2887
|
+
display: "inline-flex",
|
|
2888
|
+
alignItems: "center",
|
|
2889
|
+
gap: "0.4rem",
|
|
2890
|
+
fontSize: "0.8rem",
|
|
2891
|
+
fontWeight: 600,
|
|
2892
|
+
color: "var(--color-accent, #f0b90b)",
|
|
2893
|
+
textDecoration: "none",
|
|
2894
|
+
transition: "opacity 0.15s"
|
|
2895
|
+
},
|
|
2896
|
+
onMouseEnter: (e) => {
|
|
2897
|
+
e.currentTarget.style.opacity = "0.8";
|
|
2898
|
+
},
|
|
2899
|
+
onMouseLeave: (e) => {
|
|
2900
|
+
e.currentTarget.style.opacity = "1";
|
|
2901
|
+
},
|
|
2902
|
+
children: [
|
|
2903
|
+
"Read full article",
|
|
2904
|
+
/* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 19H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" }) })
|
|
2905
|
+
]
|
|
2906
|
+
}
|
|
2907
|
+
) })
|
|
2846
2908
|
]
|
|
2847
2909
|
}
|
|
2848
2910
|
)
|
|
@@ -2874,6 +2936,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2874
2936
|
const [homeTab, setHomeTab] = React5.useState("all");
|
|
2875
2937
|
const [homePage, setHomePage] = React5.useState(0);
|
|
2876
2938
|
const purchaseItems = purchasesProp ?? [];
|
|
2939
|
+
const [page, setPage] = React5.useState(0);
|
|
2877
2940
|
const [selectedItem, setSelectedItem] = React5.useState(null);
|
|
2878
2941
|
React5.useEffect(() => {
|
|
2879
2942
|
ensureAnimationsInjected();
|
|
@@ -2882,6 +2945,14 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2882
2945
|
setHomePage(0);
|
|
2883
2946
|
}, [homeTab]);
|
|
2884
2947
|
const hasItems = Array.isArray(items) && items.length > 0;
|
|
2948
|
+
const totalPages = React5.useMemo(
|
|
2949
|
+
() => hasItems ? Math.max(1, Math.ceil(items.length / ITEMS_PER_PAGE)) : 1,
|
|
2950
|
+
[hasItems, items.length]
|
|
2951
|
+
);
|
|
2952
|
+
React5.useEffect(() => {
|
|
2953
|
+
setPage((prev) => Math.min(prev, totalPages - 1));
|
|
2954
|
+
}, [totalPages]);
|
|
2955
|
+
const paginatedItems = hasItems ? items.slice(page * ITEMS_PER_PAGE, page * ITEMS_PER_PAGE + ITEMS_PER_PAGE) : [];
|
|
2885
2956
|
const homeFilteredItems = React5.useMemo(
|
|
2886
2957
|
() => hasItems ? items.filter((it) => homeTab === "all" || it.type === homeTab) : [],
|
|
2887
2958
|
[hasItems, items, homeTab]
|
|
@@ -2903,10 +2974,10 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2903
2974
|
children: [
|
|
2904
2975
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2905
2976
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
2906
|
-
isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "
|
|
2977
|
+
isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)", flexShrink: 0, display: "block" }, children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
|
|
2907
2978
|
isPurchaseVariant && /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "8px", height: "8px", borderRadius: "50%", backgroundColor: "#0ecb81", boxShadow: "0 0 8px rgba(14,203,129,0.8)", animation: "propertyNewsPulse 1.5s infinite" } }),
|
|
2908
2979
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2909
|
-
/* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", children: resolvedHeading }),
|
|
2980
|
+
/* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", style: { margin: 0 }, children: resolvedHeading }),
|
|
2910
2981
|
subheading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-white/60", children: subheading }) : null
|
|
2911
2982
|
] })
|
|
2912
2983
|
] }),
|
|
@@ -2921,7 +2992,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2921
2992
|
"LIVE"
|
|
2922
2993
|
] }) : null
|
|
2923
2994
|
] }),
|
|
2924
|
-
isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap:
|
|
2995
|
+
isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "1.5rem", marginTop: "0.75rem", marginBottom: "0.5rem", borderBottom: "1px solid rgba(255, 255, 255, 0.08)", paddingBottom: "0.5rem" }, children: ["all", "property", "market"].map((tab) => /* @__PURE__ */ jsx(
|
|
2925
2996
|
"button",
|
|
2926
2997
|
{
|
|
2927
2998
|
type: "button",
|
|
@@ -2930,7 +3001,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2930
3001
|
background: "transparent",
|
|
2931
3002
|
border: "none",
|
|
2932
3003
|
borderBottom: homeTab === tab ? "2px solid var(--color-accent, #f0b90b)" : "2px solid transparent",
|
|
2933
|
-
padding: "0.5rem 0
|
|
3004
|
+
padding: "0 0 0.5rem 0",
|
|
3005
|
+
marginBottom: "-1px",
|
|
2934
3006
|
fontSize: "0.75rem",
|
|
2935
3007
|
fontWeight: homeTab === tab ? 600 : 400,
|
|
2936
3008
|
color: homeTab === tab ? "var(--color-text, #fff)" : "var(--color-text-secondary, #848e9c)",
|
|
@@ -2944,7 +3016,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2944
3016
|
/* @__PURE__ */ jsx(
|
|
2945
3017
|
"div",
|
|
2946
3018
|
{
|
|
2947
|
-
className: "
|
|
3019
|
+
className: cn("flex flex-1 flex-col overflow-hidden", isHomeVariant ? "mt-2 gap-0" : "mt-4 gap-3"),
|
|
3020
|
+
style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
|
|
2948
3021
|
children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
|
|
2949
3022
|
const maxAmount = 6e4;
|
|
2950
3023
|
const barPercent = Math.min(85, Math.max(15, purchase.amount / maxAmount * 100));
|
|
@@ -2982,7 +3055,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2982
3055
|
style: {
|
|
2983
3056
|
width: "100%",
|
|
2984
3057
|
textAlign: "left",
|
|
2985
|
-
|
|
3058
|
+
backgroundColor: "transparent",
|
|
2986
3059
|
border: "none",
|
|
2987
3060
|
cursor: "pointer",
|
|
2988
3061
|
padding: "0.75rem 0",
|
|
@@ -2991,18 +3064,28 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2991
3064
|
justifyContent: "space-between",
|
|
2992
3065
|
alignItems: "flex-start",
|
|
2993
3066
|
gap: "0.5rem",
|
|
2994
|
-
color: "inherit"
|
|
3067
|
+
color: "inherit",
|
|
3068
|
+
transition: "background-color 0.15s"
|
|
3069
|
+
},
|
|
3070
|
+
onMouseEnter: (e) => {
|
|
3071
|
+
e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.04)";
|
|
3072
|
+
const title = e.currentTarget.querySelector("h3");
|
|
3073
|
+
if (title) title.style.color = "var(--color-accent, #E6C87E)";
|
|
3074
|
+
},
|
|
3075
|
+
onMouseLeave: (e) => {
|
|
3076
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
3077
|
+
const title = e.currentTarget.querySelector("h3");
|
|
3078
|
+
if (title) title.style.color = "#f8f9fa";
|
|
2995
3079
|
},
|
|
2996
3080
|
children: [
|
|
2997
3081
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
2998
|
-
/* @__PURE__ */ jsx("h3", { style: { fontSize: "0.
|
|
3082
|
+
/* @__PURE__ */ jsx("h3", { style: { fontSize: "0.95rem", fontWeight: 500, marginBottom: "0.35rem", color: "#f8f9fa", lineHeight: 1.45, transition: "color 0.15s" }, children: item.title }),
|
|
2999
3083
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
|
|
3000
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children:
|
|
3084
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: formatDateShort(item.date) }),
|
|
3001
3085
|
item.source && /* @__PURE__ */ jsx("span", { style: { padding: "0.1rem 0.4rem", borderRadius: "3px", fontSize: "0.62rem", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.07)", color: "#848e9c", whiteSpace: "nowrap" }, children: item.source }),
|
|
3002
3086
|
/* @__PURE__ */ jsx("span", { style: { padding: "0.15rem 0.4rem", borderRadius: "2px", fontSize: "0.65rem", fontWeight: 500, backgroundColor: isProperty ? "rgba(14,203,129,0.1)" : "rgba(240,185,11,0.1)", color: isProperty ? "#0ecb81" : "#f0b90b" }, children: isProperty ? "Property Update" : "Market News" }),
|
|
3003
3087
|
sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 600, color: sentimentInfo.color }, children: [
|
|
3004
|
-
sentimentInfo.arrow,
|
|
3005
|
-
" ",
|
|
3088
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
3006
3089
|
sentimentInfo.label
|
|
3007
3090
|
] })
|
|
3008
3091
|
] })
|
|
@@ -3012,11 +3095,12 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3012
3095
|
},
|
|
3013
3096
|
key
|
|
3014
3097
|
);
|
|
3015
|
-
}) : emptyState ?? /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ?
|
|
3016
|
-
const
|
|
3098
|
+
}) : emptyState ?? /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center py-10 text-center text-sm text-white/60", children: "No property news yet." }) : hasItems ? paginatedItems.map((item, index) => {
|
|
3099
|
+
const absoluteIndex = page * ITEMS_PER_PAGE + index;
|
|
3100
|
+
const key = item.displayId ?? item.id ?? `${item.title}-${absoluteIndex}`;
|
|
3017
3101
|
const catStyle = categoryStyles[item.type] ?? categoryStyles.market;
|
|
3018
|
-
const dateLabel = item.isNew ?? (highlightFirst &&
|
|
3019
|
-
const isHighlighted = item.isNew ?? (highlightFirst &&
|
|
3102
|
+
const dateLabel = item.isNew ?? (highlightFirst && absoluteIndex === 0) ? "Just now" : typeof item.date === "string" && item.date.trim().length > 0 ? item.date : formatDate(item.date);
|
|
3103
|
+
const isHighlighted = item.isNew ?? (highlightFirst && absoluteIndex === 0);
|
|
3020
3104
|
const sentimentInfo = getSentimentInfo(item.sentimentScore);
|
|
3021
3105
|
return /* @__PURE__ */ jsx(
|
|
3022
3106
|
"button",
|
|
@@ -3058,8 +3142,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3058
3142
|
] }),
|
|
3059
3143
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "0.3rem", flexShrink: 0 }, children: [
|
|
3060
3144
|
sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 700, color: sentimentInfo.color, whiteSpace: "nowrap" }, children: [
|
|
3061
|
-
sentimentInfo.arrow,
|
|
3062
|
-
" ",
|
|
3145
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
3063
3146
|
sentimentInfo.label
|
|
3064
3147
|
] }),
|
|
3065
3148
|
/* @__PURE__ */ jsx("span", { style: { padding: "0.25rem 0.6rem", borderRadius: "4px", border: `1px solid ${catStyle.borderColor}`, backgroundColor: catStyle.backgroundColor, color: catStyle.color, fontSize: "0.68rem", fontWeight: 600, textTransform: "uppercase", whiteSpace: "nowrap" }, children: item.type === "property" ? catStyle.label : "Market News" })
|
|
@@ -3071,7 +3154,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3071
3154
|
},
|
|
3072
3155
|
key
|
|
3073
3156
|
);
|
|
3074
|
-
})
|
|
3157
|
+
}) : emptyState ?? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center rounded-2xl border border-dashed border-white/20 px-6 py-10 text-center text-sm text-white/60", children: [
|
|
3075
3158
|
/* @__PURE__ */ jsx(Newspaper, { className: "mb-3 h-8 w-8 text-white/40" }),
|
|
3076
3159
|
"No property news yet. Updates will land here as soon as we receive new intelligence."
|
|
3077
3160
|
] })
|
|
@@ -3084,8 +3167,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3084
3167
|
type: "button",
|
|
3085
3168
|
onClick: () => setHomePage((p) => Math.max(0, p - 1)),
|
|
3086
3169
|
disabled: homePage === 0,
|
|
3087
|
-
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "
|
|
3088
|
-
children: "
|
|
3170
|
+
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
|
|
3171
|
+
children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
|
|
3089
3172
|
}
|
|
3090
3173
|
),
|
|
3091
3174
|
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.7rem", color: "rgba(255,255,255,0.5)" }, children: [
|
|
@@ -3099,8 +3182,38 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3099
3182
|
type: "button",
|
|
3100
3183
|
onClick: () => setHomePage((p) => Math.min(homeTotalPages - 1, p + 1)),
|
|
3101
3184
|
disabled: homePage >= homeTotalPages - 1,
|
|
3102
|
-
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "
|
|
3103
|
-
children: "
|
|
3185
|
+
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
|
|
3186
|
+
children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
|
|
3187
|
+
}
|
|
3188
|
+
)
|
|
3189
|
+
] }),
|
|
3190
|
+
!isPurchaseVariant && !isHomeVariant && hasItems && totalPages > 1 && /* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center justify-between text-xs text-white/60", children: [
|
|
3191
|
+
/* @__PURE__ */ jsx(
|
|
3192
|
+
"button",
|
|
3193
|
+
{
|
|
3194
|
+
type: "button",
|
|
3195
|
+
onClick: () => setPage((p) => Math.max(0, p - 1)),
|
|
3196
|
+
disabled: page === 0,
|
|
3197
|
+
className: cn("rounded-full border border-white/15 flex items-center justify-center", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
|
|
3198
|
+
style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
|
|
3199
|
+
children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
|
|
3200
|
+
}
|
|
3201
|
+
),
|
|
3202
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium text-white/70", children: [
|
|
3203
|
+
"Page ",
|
|
3204
|
+
page + 1,
|
|
3205
|
+
" / ",
|
|
3206
|
+
totalPages
|
|
3207
|
+
] }),
|
|
3208
|
+
/* @__PURE__ */ jsx(
|
|
3209
|
+
"button",
|
|
3210
|
+
{
|
|
3211
|
+
type: "button",
|
|
3212
|
+
onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
|
|
3213
|
+
disabled: page >= totalPages - 1,
|
|
3214
|
+
className: cn("rounded-full border border-white/15 flex items-center justify-center", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
|
|
3215
|
+
style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
|
|
3216
|
+
children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
|
|
3104
3217
|
}
|
|
3105
3218
|
)
|
|
3106
3219
|
] }),
|
|
@@ -4603,14 +4716,16 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4603
4716
|
imageUrl,
|
|
4604
4717
|
imageAlt,
|
|
4605
4718
|
name,
|
|
4719
|
+
address,
|
|
4606
4720
|
location,
|
|
4607
4721
|
price,
|
|
4608
4722
|
currencySymbol = "$",
|
|
4609
4723
|
changePercent,
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4724
|
+
priceChange,
|
|
4725
|
+
beds: _beds,
|
|
4726
|
+
baths: _baths,
|
|
4727
|
+
cars: _cars,
|
|
4728
|
+
propertyTypeLabel: _propertyTypeLabel,
|
|
4614
4729
|
onTrade,
|
|
4615
4730
|
onMakeOffer,
|
|
4616
4731
|
tradeButtonLabel = "Trade",
|
|
@@ -4626,7 +4741,6 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4626
4741
|
const tradeHoverColor = "#f5dd9a";
|
|
4627
4742
|
const [isTradeInteracting, setIsTradeInteracting] = React5.useState(false);
|
|
4628
4743
|
const [isOfferInteracting, setIsOfferInteracting] = React5.useState(false);
|
|
4629
|
-
const hasAmenities = isLoading || beds != null || baths != null || cars != null || propertyTypeLabel != null;
|
|
4630
4744
|
const isTradeDisabled = !onTrade;
|
|
4631
4745
|
const isMakeOfferButtonDisabled = makeOfferDisabled || !onMakeOffer;
|
|
4632
4746
|
const showMakeOfferButton = !hideMakeOfferButton;
|
|
@@ -4639,201 +4753,112 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4639
4753
|
setIsOfferInteracting(state);
|
|
4640
4754
|
};
|
|
4641
4755
|
const headingStyle = {
|
|
4642
|
-
fontSize: "clamp(1.
|
|
4643
|
-
marginBottom: "0
|
|
4756
|
+
fontSize: "clamp(1.3rem, 3vw, 1.8rem)",
|
|
4757
|
+
marginBottom: "0",
|
|
4644
4758
|
color: "#ffffff",
|
|
4645
4759
|
textShadow: "0 2px 4px rgba(0, 0, 0, 0.3)",
|
|
4646
4760
|
fontWeight: 600,
|
|
4647
4761
|
lineHeight: 1.2
|
|
4648
4762
|
};
|
|
4649
|
-
return /* @__PURE__ */
|
|
4650
|
-
/* @__PURE__ */
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
statusBadge ? /* @__PURE__ */
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
/* @__PURE__ */ jsx(
|
|
4663
|
-
|
|
4664
|
-
/* @__PURE__ */ jsxs(
|
|
4665
|
-
/* @__PURE__ */ jsxs("div", {
|
|
4666
|
-
/* @__PURE__ */
|
|
4667
|
-
|
|
4668
|
-
/* @__PURE__ */ jsx(
|
|
4669
|
-
isLoading ? /* @__PURE__ */ jsx(PriceBlock, { children: /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 18 }) }) : price == null ? null : /* @__PURE__ */ jsxs(PriceBlock, { children: [
|
|
4670
|
-
formatPrice3(price, currencySymbol),
|
|
4671
|
-
changePercent == null ? null : /* @__PURE__ */ jsxs(
|
|
4672
|
-
"span",
|
|
4673
|
-
{
|
|
4674
|
-
className: cn(
|
|
4675
|
-
"ml-2 flex items-center text-[0.875rem] font-medium",
|
|
4676
|
-
isPositive ? "text-[#0ecb81]" : "text-[#f6465d]"
|
|
4677
|
-
),
|
|
4678
|
-
children: [
|
|
4679
|
-
/* @__PURE__ */ jsx(
|
|
4680
|
-
"svg",
|
|
4681
|
-
{
|
|
4682
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4683
|
-
width: "12",
|
|
4684
|
-
height: "12",
|
|
4685
|
-
viewBox: "0 0 24 24",
|
|
4686
|
-
fill: "currentColor",
|
|
4687
|
-
className: "mr-[0.15rem]",
|
|
4688
|
-
children: /* @__PURE__ */ jsx("path", { d: isPositive ? "M7 14l5-5 5 5H7z" : "M7 10l5 5 5-5H7z" })
|
|
4689
|
-
}
|
|
4690
|
-
),
|
|
4691
|
-
Math.abs(changePercent).toFixed(2),
|
|
4692
|
-
"%"
|
|
4693
|
-
]
|
|
4694
|
-
}
|
|
4695
|
-
)
|
|
4696
|
-
] })
|
|
4697
|
-
] })
|
|
4698
|
-
] }),
|
|
4699
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-6 text-[0.95rem] text-white/90 max-[768px]:hidden", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4700
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4701
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4702
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 52, height: 14 })
|
|
4703
|
-
] }),
|
|
4704
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4705
|
-
/* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4706
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 56, height: 14 })
|
|
4707
|
-
] }),
|
|
4708
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4709
|
-
/* @__PURE__ */ jsx(CarFront, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4710
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 50, height: 14 })
|
|
4711
|
-
] }),
|
|
4712
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 60, height: 14 })
|
|
4713
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4714
|
-
beds == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4715
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px]" }),
|
|
4716
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4717
|
-
beds,
|
|
4718
|
-
" Beds"
|
|
4719
|
-
] })
|
|
4720
|
-
] }),
|
|
4721
|
-
baths == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4722
|
-
/* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px]" }),
|
|
4723
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4724
|
-
baths,
|
|
4725
|
-
" Baths"
|
|
4726
|
-
] })
|
|
4763
|
+
return /* @__PURE__ */ jsx(OuterWrapper, { ref, className: cn(className), ...props, children: /* @__PURE__ */ jsxs(HeroContainer, { children: [
|
|
4764
|
+
/* @__PURE__ */ jsx(
|
|
4765
|
+
HeroImage,
|
|
4766
|
+
{
|
|
4767
|
+
src: imageUrl,
|
|
4768
|
+
alt: imageAlt ?? name
|
|
4769
|
+
}
|
|
4770
|
+
),
|
|
4771
|
+
statusBadge ? /* @__PURE__ */ jsxs(StatusBadge, { $isLive: statusBadge.variant === "live", children: [
|
|
4772
|
+
statusBadge.variant === "live" ? /* @__PURE__ */ jsx(PulsingDot, {}) : null,
|
|
4773
|
+
statusBadge.label
|
|
4774
|
+
] }) : null,
|
|
4775
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 z-10 flex w-full items-end justify-center", style: { background: "linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%)" }, children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[1800px] flex-wrap items-end justify-between gap-4 p-8 max-[768px]:flex-col max-[768px]:items-start max-[768px]:gap-4 max-[768px]:p-6 max-[480px]:p-4", children: [
|
|
4776
|
+
/* @__PURE__ */ jsx(InfoCard, { children: /* @__PURE__ */ jsxs(CardLayout, { children: [
|
|
4777
|
+
/* @__PURE__ */ jsx(Thumbnail, { src: imageUrl, alt: imageAlt ?? name }),
|
|
4778
|
+
/* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsxs(InfoRow, { children: [
|
|
4779
|
+
/* @__PURE__ */ jsx(NameGroup, { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
4780
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem", flexWrap: "wrap" }, children: [
|
|
4781
|
+
/* @__PURE__ */ jsx("h1", { style: headingStyle, className: "break-words", children: name }),
|
|
4782
|
+
location ? /* @__PURE__ */ jsx(TypeBadge, { children: location }) : null
|
|
4727
4783
|
] }),
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4784
|
+
address ? /* @__PURE__ */ jsx(AddressText, { children: address }) : null
|
|
4785
|
+
] }) }),
|
|
4786
|
+
/* @__PURE__ */ jsxs(PriceGroup, { children: [
|
|
4787
|
+
isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 24 }) : price == null ? null : /* @__PURE__ */ jsxs(PriceRow, { children: [
|
|
4788
|
+
/* @__PURE__ */ jsx(CurrencyLabel, { children: "USD" }),
|
|
4789
|
+
changePercent != null ? /* @__PURE__ */ jsx(PriceArrow, { $isPositive: isPositive, children: isPositive ? "\u25B2" : "\u25BC" }) : null,
|
|
4790
|
+
formatPrice3(price, "")
|
|
4734
4791
|
] }),
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
] })
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 44, height: 12 })
|
|
4806
|
-
] }),
|
|
4807
|
-
/* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4808
|
-
/* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4 opacity-60" }),
|
|
4809
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 42, height: 12 })
|
|
4810
|
-
] }),
|
|
4811
|
-
/* @__PURE__ */ jsx(MobileAmenity, { children: /* @__PURE__ */ jsx(Skeleton, { width: 52, height: 12 }) })
|
|
4812
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4813
|
-
beds == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4814
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "h-4 w-4" }),
|
|
4815
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4816
|
-
beds,
|
|
4817
|
-
" Beds"
|
|
4818
|
-
] })
|
|
4819
|
-
] }),
|
|
4820
|
-
baths == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4821
|
-
/* @__PURE__ */ jsx(Bath, { className: "h-4 w-4" }),
|
|
4822
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4823
|
-
baths,
|
|
4824
|
-
" Baths"
|
|
4825
|
-
] })
|
|
4826
|
-
] }),
|
|
4827
|
-
cars == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4828
|
-
/* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4" }),
|
|
4829
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4830
|
-
cars,
|
|
4831
|
-
" Cars"
|
|
4832
|
-
] })
|
|
4833
|
-
] }),
|
|
4834
|
-
propertyTypeLabel == null ? null : /* @__PURE__ */ jsx(MobileAmenity, { children: propertyTypeLabel })
|
|
4835
|
-
] }) }) : null
|
|
4836
|
-
] });
|
|
4792
|
+
changePercent != null ? /* @__PURE__ */ jsxs(PriceChangeRow, { $isPositive: isPositive, children: [
|
|
4793
|
+
priceChange != null ? `${isPositive ? "+" : ""}${priceChange.toFixed(2)} ` : null,
|
|
4794
|
+
"(",
|
|
4795
|
+
isPositive ? "+" : "",
|
|
4796
|
+
Math.abs(changePercent).toFixed(2),
|
|
4797
|
+
"%)"
|
|
4798
|
+
] }) : null
|
|
4799
|
+
] })
|
|
4800
|
+
] }) })
|
|
4801
|
+
] }) }),
|
|
4802
|
+
/* @__PURE__ */ jsxs(ActionButtons, { children: [
|
|
4803
|
+
/* @__PURE__ */ jsx(
|
|
4804
|
+
"button",
|
|
4805
|
+
{
|
|
4806
|
+
type: "button",
|
|
4807
|
+
onClick: isTradeDisabled ? void 0 : onTrade,
|
|
4808
|
+
className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
|
|
4809
|
+
style: {
|
|
4810
|
+
backgroundColor: isTradeInteracting ? tradeHoverColor : accentColor,
|
|
4811
|
+
color: "black",
|
|
4812
|
+
padding: "0.75rem 1.5rem",
|
|
4813
|
+
borderColor: isTradeInteracting ? accentColor : "transparent",
|
|
4814
|
+
boxShadow: isTradeInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
|
|
4815
|
+
opacity: isTradeDisabled ? 0.5 : 1,
|
|
4816
|
+
cursor: isTradeDisabled ? "not-allowed" : "pointer"
|
|
4817
|
+
},
|
|
4818
|
+
onMouseEnter: () => setTradeInteraction(true),
|
|
4819
|
+
onMouseLeave: () => setTradeInteraction(false),
|
|
4820
|
+
onMouseDown: () => setTradeInteraction(true),
|
|
4821
|
+
onMouseUp: () => setTradeInteraction(false),
|
|
4822
|
+
onFocus: () => setTradeInteraction(true),
|
|
4823
|
+
onBlur: () => setTradeInteraction(false),
|
|
4824
|
+
onTouchStart: () => setTradeInteraction(true),
|
|
4825
|
+
onTouchEnd: () => setTradeInteraction(false),
|
|
4826
|
+
disabled: isTradeDisabled,
|
|
4827
|
+
"aria-disabled": isTradeDisabled,
|
|
4828
|
+
children: tradeButtonLabel
|
|
4829
|
+
}
|
|
4830
|
+
),
|
|
4831
|
+
showMakeOfferButton ? /* @__PURE__ */ jsx(
|
|
4832
|
+
"button",
|
|
4833
|
+
{
|
|
4834
|
+
type: "button",
|
|
4835
|
+
onClick: isMakeOfferButtonDisabled ? void 0 : onMakeOffer,
|
|
4836
|
+
className: "flex items-center justify-center rounded border font-semibold transition-all duration-200 hover:-translate-y-0.5 hover:shadow-[0_4px_8px_rgba(0,0,0,0.2)] active:translate-y-0 active:shadow-[0_2px_4px_rgba(0,0,0,0.1)] text-[0.95rem] max-[480px]:text-[0.9rem]",
|
|
4837
|
+
style: {
|
|
4838
|
+
backgroundColor: isOfferInteracting ? accentColor : "transparent",
|
|
4839
|
+
borderColor: accentColor,
|
|
4840
|
+
color: isOfferInteracting ? "black" : accentColor,
|
|
4841
|
+
padding: "0.75rem 1.5rem",
|
|
4842
|
+
boxShadow: isOfferInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
|
|
4843
|
+
opacity: isMakeOfferButtonDisabled ? 0.5 : 1,
|
|
4844
|
+
cursor: isMakeOfferButtonDisabled ? "not-allowed" : "pointer"
|
|
4845
|
+
},
|
|
4846
|
+
onMouseEnter: () => setOfferInteraction(true),
|
|
4847
|
+
onMouseLeave: () => setOfferInteraction(false),
|
|
4848
|
+
onMouseDown: () => setOfferInteraction(true),
|
|
4849
|
+
onMouseUp: () => setOfferInteraction(false),
|
|
4850
|
+
onFocus: () => setOfferInteraction(true),
|
|
4851
|
+
onBlur: () => setOfferInteraction(false),
|
|
4852
|
+
onTouchStart: () => setOfferInteraction(true),
|
|
4853
|
+
onTouchEnd: () => setOfferInteraction(false),
|
|
4854
|
+
disabled: isMakeOfferButtonDisabled,
|
|
4855
|
+
"aria-disabled": isMakeOfferButtonDisabled,
|
|
4856
|
+
children: makeOfferButtonLabel
|
|
4857
|
+
}
|
|
4858
|
+
) : null
|
|
4859
|
+
] })
|
|
4860
|
+
] }) })
|
|
4861
|
+
] }) });
|
|
4837
4862
|
}
|
|
4838
4863
|
);
|
|
4839
4864
|
PropertyHeroHeader.displayName = "PropertyHeroHeader";
|
|
@@ -4876,32 +4901,6 @@ var HeroContainer = styled25.div`
|
|
|
4876
4901
|
border-radius: 6px;
|
|
4877
4902
|
}
|
|
4878
4903
|
`;
|
|
4879
|
-
var MobileAmenities = styled25.div`
|
|
4880
|
-
display: none;
|
|
4881
|
-
align-items: center;
|
|
4882
|
-
justify-content: space-between;
|
|
4883
|
-
gap: 0.5rem;
|
|
4884
|
-
padding: 0.5rem 0.75rem;
|
|
4885
|
-
background: rgba(8, 8, 12, 0.85);
|
|
4886
|
-
border-radius: 12px;
|
|
4887
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
4888
|
-
color: rgba(255, 255, 255, 0.85);
|
|
4889
|
-
font-size: 0.85rem;
|
|
4890
|
-
|
|
4891
|
-
@media (max-width: 768px) {
|
|
4892
|
-
display: flex;
|
|
4893
|
-
flex-wrap: wrap;
|
|
4894
|
-
}
|
|
4895
|
-
`;
|
|
4896
|
-
var MobileAmenity = styled25.span`
|
|
4897
|
-
display: inline-flex;
|
|
4898
|
-
align-items: center;
|
|
4899
|
-
gap: 0.35rem;
|
|
4900
|
-
padding: 0.35rem 0.5rem;
|
|
4901
|
-
border-radius: 999px;
|
|
4902
|
-
background: rgba(255, 255, 255, 0.08);
|
|
4903
|
-
font-weight: 500;
|
|
4904
|
-
`;
|
|
4905
4904
|
var HeroImage = styled25.img`
|
|
4906
4905
|
width: 100%;
|
|
4907
4906
|
height: 100%;
|
|
@@ -4916,15 +4915,6 @@ var HeroImage = styled25.img`
|
|
|
4916
4915
|
transform: scale(1.0);
|
|
4917
4916
|
transform-origin: center;
|
|
4918
4917
|
`;
|
|
4919
|
-
var HeroGradient = styled25.div`
|
|
4920
|
-
position: absolute;
|
|
4921
|
-
bottom: 0;
|
|
4922
|
-
left: 0;
|
|
4923
|
-
right: 0;
|
|
4924
|
-
width: 100%;
|
|
4925
|
-
z-index: 1;
|
|
4926
|
-
background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
|
|
4927
|
-
`;
|
|
4928
4918
|
var ActionButtons = styled25.div`
|
|
4929
4919
|
display: flex;
|
|
4930
4920
|
flex-wrap: wrap;
|
|
@@ -4940,13 +4930,42 @@ var ActionButtons = styled25.div`
|
|
|
4940
4930
|
display: none;
|
|
4941
4931
|
}
|
|
4942
4932
|
`;
|
|
4933
|
+
var CardLayout = styled25.div`
|
|
4934
|
+
display: flex;
|
|
4935
|
+
align-items: center;
|
|
4936
|
+
gap: 1rem;
|
|
4937
|
+
|
|
4938
|
+
@media (max-width: 480px) {
|
|
4939
|
+
gap: 0.75rem;
|
|
4940
|
+
}
|
|
4941
|
+
`;
|
|
4942
|
+
var Thumbnail = styled25.img`
|
|
4943
|
+
width: 72px;
|
|
4944
|
+
height: 72px;
|
|
4945
|
+
border-radius: 8px;
|
|
4946
|
+
object-fit: cover;
|
|
4947
|
+
flex-shrink: 0;
|
|
4948
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
4949
|
+
|
|
4950
|
+
@media (max-width: 768px) {
|
|
4951
|
+
width: 56px;
|
|
4952
|
+
height: 56px;
|
|
4953
|
+
border-radius: 6px;
|
|
4954
|
+
}
|
|
4955
|
+
|
|
4956
|
+
@media (max-width: 480px) {
|
|
4957
|
+
width: 48px;
|
|
4958
|
+
height: 48px;
|
|
4959
|
+
}
|
|
4960
|
+
`;
|
|
4961
|
+
var CardContent2 = styled25.div`
|
|
4962
|
+
min-width: 0;
|
|
4963
|
+
flex: 1;
|
|
4964
|
+
`;
|
|
4943
4965
|
var InfoCard = styled25.div`
|
|
4944
|
-
display: inline-block;
|
|
4945
|
-
width: fit-content;
|
|
4946
|
-
max-width: 70%;
|
|
4947
4966
|
border-radius: 12px;
|
|
4948
|
-
background: rgba(0, 0, 0, 0.
|
|
4949
|
-
padding:
|
|
4967
|
+
background: rgba(0, 0, 0, 0.15);
|
|
4968
|
+
padding: 1rem 1.5rem;
|
|
4950
4969
|
color: #fff;
|
|
4951
4970
|
backdrop-filter: blur(6px);
|
|
4952
4971
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
|
@@ -4954,66 +4973,113 @@ var InfoCard = styled25.div`
|
|
|
4954
4973
|
min-width: 0;
|
|
4955
4974
|
|
|
4956
4975
|
@media (max-width: 768px) {
|
|
4957
|
-
|
|
4958
|
-
}
|
|
4959
|
-
|
|
4960
|
-
@media (max-width: 640px) {
|
|
4961
|
-
max-width: 92%;
|
|
4976
|
+
padding: 0.85rem 1.15rem;
|
|
4962
4977
|
}
|
|
4963
4978
|
|
|
4964
4979
|
@media (max-width: 480px) {
|
|
4965
|
-
|
|
4980
|
+
padding: 0.65rem 0.85rem;
|
|
4966
4981
|
}
|
|
4967
4982
|
`;
|
|
4968
|
-
var
|
|
4969
|
-
display:
|
|
4970
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
4983
|
+
var NameGroup = styled25.div`
|
|
4984
|
+
display: flex;
|
|
4971
4985
|
align-items: center;
|
|
4972
4986
|
gap: 0.75rem;
|
|
4973
|
-
width:
|
|
4974
|
-
|
|
4975
|
-
@media (max-width: 640px) {
|
|
4976
|
-
gap: 0.5rem;
|
|
4977
|
-
}
|
|
4987
|
+
min-width: 0;
|
|
4988
|
+
flex-wrap: wrap;
|
|
4978
4989
|
`;
|
|
4979
|
-
var
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4990
|
+
var TypeBadge = styled25.span`
|
|
4991
|
+
display: inline-flex;
|
|
4992
|
+
align-items: center;
|
|
4993
|
+
padding: 0.2rem 0.5rem;
|
|
4994
|
+
border-radius: 4px;
|
|
4995
|
+
font-size: 0.7rem;
|
|
4996
|
+
font-weight: 600;
|
|
4997
|
+
letter-spacing: 0.03em;
|
|
4998
|
+
text-transform: uppercase;
|
|
4999
|
+
line-height: 1;
|
|
5000
|
+
color: #E6C87E;
|
|
5001
|
+
background: rgba(230, 200, 126, 0.12);
|
|
4985
5002
|
white-space: nowrap;
|
|
5003
|
+
flex-shrink: 0;
|
|
4986
5004
|
`;
|
|
4987
|
-
var
|
|
5005
|
+
var InfoRow = styled25.div`
|
|
4988
5006
|
display: flex;
|
|
4989
|
-
align-items:
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
color: var(--color-accent, #f0b90b);
|
|
4993
|
-
padding-left: 1rem;
|
|
4994
|
-
border-left: 1px solid rgba(255, 255, 255, 0.25);
|
|
4995
|
-
min-height: 1.5rem;
|
|
5007
|
+
align-items: baseline;
|
|
5008
|
+
justify-content: space-between;
|
|
5009
|
+
gap: 1rem;
|
|
4996
5010
|
`;
|
|
4997
|
-
var
|
|
4998
|
-
position: absolute;
|
|
4999
|
-
top: 1rem;
|
|
5000
|
-
left: 1rem;
|
|
5011
|
+
var PriceGroup = styled25.div`
|
|
5001
5012
|
display: flex;
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5013
|
+
flex-direction: column;
|
|
5014
|
+
align-items: flex-end;
|
|
5015
|
+
flex-shrink: 0;
|
|
5016
|
+
`;
|
|
5017
|
+
var PriceRow = styled25.span`
|
|
5018
|
+
display: inline-flex;
|
|
5019
|
+
align-items: baseline;
|
|
5020
|
+
font-size: clamp(1.3rem, 3vw, 1.8rem);
|
|
5008
5021
|
font-weight: 600;
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5022
|
+
color: #fff;
|
|
5023
|
+
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
|
|
5024
|
+
font-variant-numeric: tabular-nums;
|
|
5025
|
+
white-space: nowrap;
|
|
5026
|
+
flex-shrink: 0;
|
|
5013
5027
|
`;
|
|
5014
|
-
var
|
|
5015
|
-
|
|
5016
|
-
|
|
5028
|
+
var CurrencyLabel = styled25.span`
|
|
5029
|
+
font-size: 0.55em;
|
|
5030
|
+
font-weight: 500;
|
|
5031
|
+
color: rgba(255, 255, 255, 0.4);
|
|
5032
|
+
margin-right: 0.3em;
|
|
5033
|
+
`;
|
|
5034
|
+
var PriceArrow = styled25.span`
|
|
5035
|
+
color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
|
|
5036
|
+
font-size: 0.65em;
|
|
5037
|
+
margin: 0 0.1em;
|
|
5038
|
+
`;
|
|
5039
|
+
var AddressText = styled25.p`
|
|
5040
|
+
font-size: 1.1rem;
|
|
5041
|
+
color: rgba(255, 255, 255, 0.7);
|
|
5042
|
+
font-weight: 400;
|
|
5043
|
+
margin: 0.1rem 0 0;
|
|
5044
|
+
|
|
5045
|
+
@media (max-width: 768px) {
|
|
5046
|
+
font-size: 1rem;
|
|
5047
|
+
}
|
|
5048
|
+
|
|
5049
|
+
@media (max-width: 480px) {
|
|
5050
|
+
font-size: 0.9rem;
|
|
5051
|
+
}
|
|
5052
|
+
`;
|
|
5053
|
+
var PriceChangeRow = styled25.span`
|
|
5054
|
+
display: inline-flex;
|
|
5055
|
+
align-items: center;
|
|
5056
|
+
white-space: nowrap;
|
|
5057
|
+
flex-shrink: 0;
|
|
5058
|
+
font-size: 0.85rem;
|
|
5059
|
+
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
|
|
5060
|
+
font-variant-numeric: tabular-nums;
|
|
5061
|
+
color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
|
|
5062
|
+
`;
|
|
5063
|
+
var StatusBadge = styled25.div`
|
|
5064
|
+
position: absolute;
|
|
5065
|
+
top: 1rem;
|
|
5066
|
+
left: 1rem;
|
|
5067
|
+
display: flex;
|
|
5068
|
+
align-items: center;
|
|
5069
|
+
gap: 0.5rem;
|
|
5070
|
+
background-color: ${({ $isLive }) => $isLive ? "rgba(20, 20, 20, 0.85)" : "rgba(240, 185, 11, 0.9)"};
|
|
5071
|
+
color: ${({ $isLive }) => $isLive ? "#f0b90b" : "#000"};
|
|
5072
|
+
padding: 0.5rem 1rem;
|
|
5073
|
+
border-radius: 6px;
|
|
5074
|
+
font-weight: 600;
|
|
5075
|
+
font-size: 0.875rem;
|
|
5076
|
+
z-index: 10;
|
|
5077
|
+
border: ${({ $isLive }) => $isLive ? "1px solid rgba(240, 185, 11, 0.5)" : "none"};
|
|
5078
|
+
backdrop-filter: blur(8px);
|
|
5079
|
+
`;
|
|
5080
|
+
var PulsingDot = styled25.span`
|
|
5081
|
+
display: inline-block;
|
|
5082
|
+
width: 8px;
|
|
5017
5083
|
height: 8px;
|
|
5018
5084
|
background-color: #f0b90b;
|
|
5019
5085
|
border-radius: 50%;
|
|
@@ -5069,13 +5135,45 @@ var Header = ({
|
|
|
5069
5135
|
onProfileNavigate: _onProfileNavigate,
|
|
5070
5136
|
onOrdersNavigate: _onOrdersNavigate,
|
|
5071
5137
|
onWalletNavigate: _onWalletNavigate,
|
|
5072
|
-
showTradeTab = true
|
|
5138
|
+
showTradeTab = true,
|
|
5139
|
+
portfolioSummary
|
|
5073
5140
|
}) => {
|
|
5074
5141
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
|
|
5075
5142
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
5076
5143
|
const [isMoreMenuOpen, setIsMoreMenuOpen] = useState(false);
|
|
5077
5144
|
const [showLoginPopup, setShowLoginPopup] = useState(false);
|
|
5078
5145
|
const [loginPopupInitialView, setLoginPopupInitialView] = useState(void 0);
|
|
5146
|
+
const [isPortfolioBarVisible, setIsPortfolioBarVisible] = useState(() => {
|
|
5147
|
+
if (typeof localStorage === "undefined") return false;
|
|
5148
|
+
return localStorage.getItem("portfolioBarVisible") !== "false";
|
|
5149
|
+
});
|
|
5150
|
+
const portfolioPillRef = useRef(null);
|
|
5151
|
+
const [portfolioArrowLeft, setPortfolioArrowLeft] = useState(null);
|
|
5152
|
+
const togglePortfolioBar = useCallback(() => {
|
|
5153
|
+
setIsPortfolioBarVisible((prev) => {
|
|
5154
|
+
const next = !prev;
|
|
5155
|
+
try {
|
|
5156
|
+
localStorage.setItem("portfolioBarVisible", String(next));
|
|
5157
|
+
} catch {
|
|
5158
|
+
}
|
|
5159
|
+
return next;
|
|
5160
|
+
});
|
|
5161
|
+
}, []);
|
|
5162
|
+
const updatePortfolioArrow = useCallback(() => {
|
|
5163
|
+
const eye = document.getElementById("portfolio-eye-toggle");
|
|
5164
|
+
const pill = portfolioPillRef.current;
|
|
5165
|
+
if (!eye || !pill) return;
|
|
5166
|
+
const eyeRect = eye.getBoundingClientRect();
|
|
5167
|
+
const pillRect = pill.getBoundingClientRect();
|
|
5168
|
+
const offset = eyeRect.left + eyeRect.width / 2 - pillRect.left - 7;
|
|
5169
|
+
setPortfolioArrowLeft(offset);
|
|
5170
|
+
}, []);
|
|
5171
|
+
useEffect(() => {
|
|
5172
|
+
if (!isPortfolioBarVisible || !portfolioSummary) return;
|
|
5173
|
+
updatePortfolioArrow();
|
|
5174
|
+
window.addEventListener("resize", updatePortfolioArrow);
|
|
5175
|
+
return () => window.removeEventListener("resize", updatePortfolioArrow);
|
|
5176
|
+
}, [isPortfolioBarVisible, portfolioSummary, updatePortfolioArrow]);
|
|
5079
5177
|
useEffect(() => {
|
|
5080
5178
|
if (typeof window === "undefined") return;
|
|
5081
5179
|
const ua = navigator.userAgent;
|
|
@@ -5453,6 +5551,17 @@ var Header = ({
|
|
|
5453
5551
|
}
|
|
5454
5552
|
),
|
|
5455
5553
|
isAuthenticated ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
5554
|
+
portfolioSummary && /* @__PURE__ */ jsx(
|
|
5555
|
+
PortfolioEyeButton,
|
|
5556
|
+
{
|
|
5557
|
+
id: "portfolio-eye-toggle",
|
|
5558
|
+
type: "button",
|
|
5559
|
+
onClick: togglePortfolioBar,
|
|
5560
|
+
$active: isPortfolioBarVisible,
|
|
5561
|
+
title: isPortfolioBarVisible ? "Hide portfolio" : "Show portfolio",
|
|
5562
|
+
children: isPortfolioBarVisible ? /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }) }) : /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 001 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" }) })
|
|
5563
|
+
}
|
|
5564
|
+
),
|
|
5456
5565
|
/* @__PURE__ */ jsxs(UserMenu, { children: [
|
|
5457
5566
|
/* @__PURE__ */ jsxs(
|
|
5458
5567
|
UserButton,
|
|
@@ -5524,6 +5633,51 @@ var Header = ({
|
|
|
5524
5633
|
] })
|
|
5525
5634
|
] }),
|
|
5526
5635
|
/* @__PURE__ */ jsx(HeaderSpacer, {}),
|
|
5636
|
+
isAuthenticated && portfolioSummary && isPortfolioBarVisible && (() => {
|
|
5637
|
+
const fmt = (n) => n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
5638
|
+
const isPLPositive = portfolioSummary.pnl >= 0;
|
|
5639
|
+
return /* @__PURE__ */ jsx(PortfolioBarContainer, { children: /* @__PURE__ */ jsxs(PortfolioBarPill, { ref: portfolioPillRef, children: [
|
|
5640
|
+
portfolioArrowLeft !== null && /* @__PURE__ */ jsx(PortfolioBarArrow, { style: { left: `${portfolioArrowLeft}px` } }),
|
|
5641
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5642
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Holdings" }),
|
|
5643
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { children: [
|
|
5644
|
+
"$",
|
|
5645
|
+
fmt(portfolioSummary.holdings)
|
|
5646
|
+
] })
|
|
5647
|
+
] }),
|
|
5648
|
+
/* @__PURE__ */ jsx(PBOperator, { children: "+" }),
|
|
5649
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5650
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Cash" }),
|
|
5651
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { children: [
|
|
5652
|
+
"$",
|
|
5653
|
+
fmt(portfolioSummary.cash)
|
|
5654
|
+
] })
|
|
5655
|
+
] }),
|
|
5656
|
+
/* @__PURE__ */ jsx(PBOperator, { children: "=" }),
|
|
5657
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5658
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Portfolio" }),
|
|
5659
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { style: { color: "#D4AF37", fontWeight: 700 }, children: [
|
|
5660
|
+
"$",
|
|
5661
|
+
fmt(portfolioSummary.portfolioValue)
|
|
5662
|
+
] })
|
|
5663
|
+
] }),
|
|
5664
|
+
/* @__PURE__ */ jsx(PBDot, {}),
|
|
5665
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5666
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "P&L" }),
|
|
5667
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { $positive: isPLPositive, $negative: !isPLPositive, children: [
|
|
5668
|
+
isPLPositive ? "+" : "",
|
|
5669
|
+
"$",
|
|
5670
|
+
fmt(Math.abs(portfolioSummary.pnl)),
|
|
5671
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.6rem", marginLeft: "2px", opacity: 0.7 }, children: [
|
|
5672
|
+
"(",
|
|
5673
|
+
isPLPositive ? "+" : "",
|
|
5674
|
+
portfolioSummary.pnlPercent.toFixed(2),
|
|
5675
|
+
"%)"
|
|
5676
|
+
] })
|
|
5677
|
+
] })
|
|
5678
|
+
] })
|
|
5679
|
+
] }) });
|
|
5680
|
+
})(),
|
|
5527
5681
|
LoginPopupComponent && showLoginPopup && /* @__PURE__ */ jsx(
|
|
5528
5682
|
LoginPopupComponent,
|
|
5529
5683
|
{
|
|
@@ -5609,8 +5763,19 @@ var HeaderContainer = styled25.header`
|
|
|
5609
5763
|
box-sizing: border-box;
|
|
5610
5764
|
|
|
5611
5765
|
@media (max-width: 768px) {
|
|
5612
|
-
|
|
5613
|
-
|
|
5766
|
+
top: 0.5rem;
|
|
5767
|
+
left: 0.75rem;
|
|
5768
|
+
right: 0.75rem;
|
|
5769
|
+
width: calc(100% - 1.5rem);
|
|
5770
|
+
height: 46px;
|
|
5771
|
+
min-height: 46px;
|
|
5772
|
+
padding: 0 0.75rem;
|
|
5773
|
+
border-radius: 12px;
|
|
5774
|
+
background-color: rgba(13, 17, 23, 0.92);
|
|
5775
|
+
backdrop-filter: blur(12px);
|
|
5776
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
5777
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
5778
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
5614
5779
|
}
|
|
5615
5780
|
`;
|
|
5616
5781
|
var HeaderSpacer = styled25.div`
|
|
@@ -5618,6 +5783,10 @@ var HeaderSpacer = styled25.div`
|
|
|
5618
5783
|
min-height: 56px;
|
|
5619
5784
|
min-height: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
|
|
5620
5785
|
flex-shrink: 0;
|
|
5786
|
+
|
|
5787
|
+
@media (max-width: 768px) {
|
|
5788
|
+
min-height: calc(46px + 0.5rem);
|
|
5789
|
+
}
|
|
5621
5790
|
`;
|
|
5622
5791
|
var Logo = styled25.div`
|
|
5623
5792
|
display: flex;
|
|
@@ -5951,6 +6120,151 @@ var MobileNavItem = styled25.div`
|
|
|
5951
6120
|
padding-left: 24px;
|
|
5952
6121
|
}
|
|
5953
6122
|
`;
|
|
6123
|
+
var pbShimmer = keyframes`
|
|
6124
|
+
0% { background-position: -200% 0; }
|
|
6125
|
+
100% { background-position: 200% 0; }
|
|
6126
|
+
`;
|
|
6127
|
+
var PortfolioEyeButton = styled25.button`
|
|
6128
|
+
background: ${(p) => p.$active ? "rgba(212, 175, 55, 0.15)" : "transparent"};
|
|
6129
|
+
border: none;
|
|
6130
|
+
border-radius: 6px;
|
|
6131
|
+
cursor: pointer;
|
|
6132
|
+
padding: 6px;
|
|
6133
|
+
display: flex;
|
|
6134
|
+
align-items: center;
|
|
6135
|
+
justify-content: center;
|
|
6136
|
+
color: ${(p) => p.$active ? "#D4AF37" : "rgba(255,255,255,0.5)"};
|
|
6137
|
+
transition: all 0.2s ease;
|
|
6138
|
+
margin-right: 4px;
|
|
6139
|
+
|
|
6140
|
+
&:hover {
|
|
6141
|
+
background: rgba(212, 175, 55, 0.2);
|
|
6142
|
+
color: #D4AF37;
|
|
6143
|
+
}
|
|
6144
|
+
|
|
6145
|
+
@media (max-width: 768px) {
|
|
6146
|
+
padding: 4px;
|
|
6147
|
+
margin-right: 2px;
|
|
6148
|
+
}
|
|
6149
|
+
`;
|
|
6150
|
+
var PortfolioBarContainer = styled25.div`
|
|
6151
|
+
position: fixed;
|
|
6152
|
+
top: 56px;
|
|
6153
|
+
top: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
|
|
6154
|
+
left: 0;
|
|
6155
|
+
right: 0;
|
|
6156
|
+
z-index: 999;
|
|
6157
|
+
display: flex;
|
|
6158
|
+
justify-content: flex-end;
|
|
6159
|
+
align-items: flex-start;
|
|
6160
|
+
padding: 0 5%;
|
|
6161
|
+
pointer-events: none;
|
|
6162
|
+
overflow: visible;
|
|
6163
|
+
|
|
6164
|
+
&::before {
|
|
6165
|
+
content: '';
|
|
6166
|
+
position: absolute;
|
|
6167
|
+
top: 0;
|
|
6168
|
+
left: 40%;
|
|
6169
|
+
right: 0;
|
|
6170
|
+
height: 2px;
|
|
6171
|
+
background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.25) 100%);
|
|
6172
|
+
pointer-events: none;
|
|
6173
|
+
}
|
|
6174
|
+
|
|
6175
|
+
@media (max-width: 768px) {
|
|
6176
|
+
top: calc(46px + 0.5rem);
|
|
6177
|
+
padding: 0 0.75rem;
|
|
6178
|
+
justify-content: center;
|
|
6179
|
+
|
|
6180
|
+
&::before {
|
|
6181
|
+
left: 0;
|
|
6182
|
+
right: 0;
|
|
6183
|
+
background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.4) 30%, rgba(212, 175, 55, 0.4) 70%, transparent 100%);
|
|
6184
|
+
}
|
|
6185
|
+
}
|
|
6186
|
+
`;
|
|
6187
|
+
var PortfolioBarPill = styled25.div`
|
|
6188
|
+
pointer-events: auto;
|
|
6189
|
+
display: flex;
|
|
6190
|
+
align-items: center;
|
|
6191
|
+
gap: 1.25rem;
|
|
6192
|
+
padding: 0.5rem 1.5rem;
|
|
6193
|
+
border-radius: 0 0 20px 20px;
|
|
6194
|
+
background: linear-gradient(135deg, rgba(24, 26, 34, 0.98) 0%, rgba(32, 34, 42, 0.97) 100%);
|
|
6195
|
+
backdrop-filter: blur(16px);
|
|
6196
|
+
border: 1px solid rgba(212, 175, 55, 0.25);
|
|
6197
|
+
border-top: none;
|
|
6198
|
+
box-shadow:
|
|
6199
|
+
0 4px 16px rgba(0, 0, 0, 0.3),
|
|
6200
|
+
0 0 0 1px rgba(255, 255, 255, 0.03) inset,
|
|
6201
|
+
0 1px 0 rgba(212, 175, 55, 0.06) inset;
|
|
6202
|
+
position: relative;
|
|
6203
|
+
overflow: visible;
|
|
6204
|
+
|
|
6205
|
+
&::before {
|
|
6206
|
+
content: '';
|
|
6207
|
+
position: absolute;
|
|
6208
|
+
top: 0;
|
|
6209
|
+
left: 0;
|
|
6210
|
+
right: 0;
|
|
6211
|
+
height: 1px;
|
|
6212
|
+
background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
|
|
6213
|
+
background-size: 200% 100%;
|
|
6214
|
+
animation: ${pbShimmer} 4s linear infinite;
|
|
6215
|
+
}
|
|
6216
|
+
|
|
6217
|
+
@media (max-width: 768px) {
|
|
6218
|
+
gap: 0.75rem;
|
|
6219
|
+
padding: 0.4rem 1rem;
|
|
6220
|
+
border-radius: 0 0 16px 16px;
|
|
6221
|
+
}
|
|
6222
|
+
`;
|
|
6223
|
+
var PortfolioBarArrow = styled25.div`
|
|
6224
|
+
position: absolute;
|
|
6225
|
+
top: -7px;
|
|
6226
|
+
width: 14px;
|
|
6227
|
+
height: 14px;
|
|
6228
|
+
background: linear-gradient(135deg, rgba(26, 28, 36, 1) 0%, rgba(30, 32, 40, 1) 100%);
|
|
6229
|
+
border-left: 1px solid rgba(212, 175, 55, 0.3);
|
|
6230
|
+
border-top: 1px solid rgba(212, 175, 55, 0.3);
|
|
6231
|
+
transform: rotate(45deg);
|
|
6232
|
+
box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.25);
|
|
6233
|
+
pointer-events: none;
|
|
6234
|
+
`;
|
|
6235
|
+
var PBMetric = styled25.div`
|
|
6236
|
+
display: flex;
|
|
6237
|
+
flex-direction: column;
|
|
6238
|
+
align-items: center;
|
|
6239
|
+
gap: 1px;
|
|
6240
|
+
white-space: nowrap;
|
|
6241
|
+
`;
|
|
6242
|
+
var PBMetricLabel = styled25.span`
|
|
6243
|
+
font-size: 0.55rem;
|
|
6244
|
+
color: rgba(255, 255, 255, 0.6);
|
|
6245
|
+
text-transform: uppercase;
|
|
6246
|
+
letter-spacing: 0.5px;
|
|
6247
|
+
font-weight: 500;
|
|
6248
|
+
`;
|
|
6249
|
+
var PBMetricValue = styled25.span`
|
|
6250
|
+
font-size: 0.75rem;
|
|
6251
|
+
font-weight: 600;
|
|
6252
|
+
color: ${(p) => p.$positive ? "#0ecb81" : p.$negative ? "#f6465d" : "#eaecef"};
|
|
6253
|
+
font-variant-numeric: tabular-nums;
|
|
6254
|
+
`;
|
|
6255
|
+
var PBDot = styled25.div`
|
|
6256
|
+
width: 3px;
|
|
6257
|
+
height: 3px;
|
|
6258
|
+
border-radius: 50%;
|
|
6259
|
+
background: rgba(212, 175, 55, 0.25);
|
|
6260
|
+
flex-shrink: 0;
|
|
6261
|
+
`;
|
|
6262
|
+
var PBOperator = styled25.span`
|
|
6263
|
+
font-size: 0.7rem;
|
|
6264
|
+
font-weight: 500;
|
|
6265
|
+
color: rgba(255, 255, 255, 0.35);
|
|
6266
|
+
flex-shrink: 0;
|
|
6267
|
+
`;
|
|
5954
6268
|
var PropertySubheader = React5.forwardRef(
|
|
5955
6269
|
({ className, tabs, activeTabId, onTabChange, actions, ...props }, ref) => {
|
|
5956
6270
|
const tabsContainerRef = React5.useRef(null);
|
|
@@ -6076,191 +6390,6 @@ var PropertySubheader = React5.forwardRef(
|
|
|
6076
6390
|
}
|
|
6077
6391
|
);
|
|
6078
6392
|
PropertySubheader.displayName = "PropertySubheader";
|
|
6079
|
-
var slideIn = keyframes`
|
|
6080
|
-
from { transform: translateX(110%); opacity: 0; }
|
|
6081
|
-
to { transform: translateX(0); opacity: 1; }
|
|
6082
|
-
`;
|
|
6083
|
-
var slideOut = keyframes`
|
|
6084
|
-
from { transform: translateX(0); opacity: 1; }
|
|
6085
|
-
to { transform: translateX(110%); opacity: 0; }
|
|
6086
|
-
`;
|
|
6087
|
-
var progressShrink = keyframes`
|
|
6088
|
-
from { width: 100%; }
|
|
6089
|
-
to { width: 0%; }
|
|
6090
|
-
`;
|
|
6091
|
-
var VARIANT_COLORS = {
|
|
6092
|
-
success: { accent: "#0ecb81", icon: "\u2713" },
|
|
6093
|
-
error: { accent: "#f6465d", icon: "\u2715" },
|
|
6094
|
-
info: { accent: "#E6C656", icon: "\u2139" },
|
|
6095
|
-
pending: { accent: "#7EB3E6", icon: "\u25CC" }
|
|
6096
|
-
};
|
|
6097
|
-
var Wrapper = styled25.div`
|
|
6098
|
-
position: relative;
|
|
6099
|
-
display: flex;
|
|
6100
|
-
flex-direction: column;
|
|
6101
|
-
gap: 0;
|
|
6102
|
-
width: 340px;
|
|
6103
|
-
background: #0d0f1a;
|
|
6104
|
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
6105
|
-
border-radius: 10px;
|
|
6106
|
-
overflow: hidden;
|
|
6107
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
|
|
6108
|
-
animation: ${({ $exiting }) => $exiting ? css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
|
|
6109
|
-
pointer-events: all;
|
|
6110
|
-
`;
|
|
6111
|
-
var Body = styled25.div`
|
|
6112
|
-
display: flex;
|
|
6113
|
-
align-items: flex-start;
|
|
6114
|
-
gap: 12px;
|
|
6115
|
-
padding: 14px 16px 12px;
|
|
6116
|
-
`;
|
|
6117
|
-
var IconDot = styled25.div`
|
|
6118
|
-
flex-shrink: 0;
|
|
6119
|
-
width: 28px;
|
|
6120
|
-
height: 28px;
|
|
6121
|
-
border-radius: 50%;
|
|
6122
|
-
background: ${({ $color }) => $color}1a;
|
|
6123
|
-
border: 1px solid ${({ $color }) => $color}55;
|
|
6124
|
-
display: flex;
|
|
6125
|
-
align-items: center;
|
|
6126
|
-
justify-content: center;
|
|
6127
|
-
font-size: 0.75rem;
|
|
6128
|
-
font-weight: 700;
|
|
6129
|
-
color: ${({ $color }) => $color};
|
|
6130
|
-
margin-top: 1px;
|
|
6131
|
-
`;
|
|
6132
|
-
var Content = styled25.div`
|
|
6133
|
-
flex: 1;
|
|
6134
|
-
min-width: 0;
|
|
6135
|
-
`;
|
|
6136
|
-
var Title = styled25.p`
|
|
6137
|
-
margin: 0 0 2px;
|
|
6138
|
-
font-size: 0.8rem;
|
|
6139
|
-
font-weight: 600;
|
|
6140
|
-
color: #fff;
|
|
6141
|
-
letter-spacing: 0.01em;
|
|
6142
|
-
`;
|
|
6143
|
-
var Amount = styled25.p`
|
|
6144
|
-
margin: 0 0 6px;
|
|
6145
|
-
font-size: 1.05rem;
|
|
6146
|
-
font-weight: 700;
|
|
6147
|
-
color: #E6C656;
|
|
6148
|
-
letter-spacing: -0.01em;
|
|
6149
|
-
`;
|
|
6150
|
-
var TxRow = styled25.a`
|
|
6151
|
-
display: inline-flex;
|
|
6152
|
-
align-items: center;
|
|
6153
|
-
gap: 5px;
|
|
6154
|
-
font-family: 'IBM Plex Mono', 'Space Mono', monospace;
|
|
6155
|
-
font-size: 0.68rem;
|
|
6156
|
-
color: rgba(255, 255, 255, 0.4);
|
|
6157
|
-
text-decoration: none;
|
|
6158
|
-
transition: color 0.15s;
|
|
6159
|
-
&:hover {
|
|
6160
|
-
color: #7EB3E6;
|
|
6161
|
-
}
|
|
6162
|
-
`;
|
|
6163
|
-
var TxArrow = styled25.span`
|
|
6164
|
-
font-size: 0.6rem;
|
|
6165
|
-
opacity: 0.6;
|
|
6166
|
-
`;
|
|
6167
|
-
var CloseBtn = styled25.button`
|
|
6168
|
-
flex-shrink: 0;
|
|
6169
|
-
background: none;
|
|
6170
|
-
border: none;
|
|
6171
|
-
padding: 2px 4px;
|
|
6172
|
-
cursor: pointer;
|
|
6173
|
-
color: rgba(255, 255, 255, 0.25);
|
|
6174
|
-
font-size: 0.9rem;
|
|
6175
|
-
line-height: 1;
|
|
6176
|
-
transition: color 0.15s;
|
|
6177
|
-
&:hover { color: rgba(255, 255, 255, 0.7); }
|
|
6178
|
-
`;
|
|
6179
|
-
var ProgressBar = styled25.div`
|
|
6180
|
-
height: 2px;
|
|
6181
|
-
background: rgba(255, 255, 255, 0.06);
|
|
6182
|
-
position: relative;
|
|
6183
|
-
&::after {
|
|
6184
|
-
content: '';
|
|
6185
|
-
position: absolute;
|
|
6186
|
-
left: 0;
|
|
6187
|
-
top: 0;
|
|
6188
|
-
height: 100%;
|
|
6189
|
-
background: ${({ $color }) => $color};
|
|
6190
|
-
animation: ${css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
|
|
6191
|
-
}
|
|
6192
|
-
`;
|
|
6193
|
-
var Container = styled25.div`
|
|
6194
|
-
position: fixed;
|
|
6195
|
-
bottom: 24px;
|
|
6196
|
-
right: 24px;
|
|
6197
|
-
z-index: 9999;
|
|
6198
|
-
display: flex;
|
|
6199
|
-
flex-direction: column-reverse;
|
|
6200
|
-
gap: 10px;
|
|
6201
|
-
pointer-events: none;
|
|
6202
|
-
`;
|
|
6203
|
-
var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
|
|
6204
|
-
function truncateHash(hash) {
|
|
6205
|
-
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
6206
|
-
}
|
|
6207
|
-
function ToastItem({ toast, onDismiss }) {
|
|
6208
|
-
const [exiting, setExiting] = useState(false);
|
|
6209
|
-
const timerRef = useRef(null);
|
|
6210
|
-
const dismiss = useCallback(() => {
|
|
6211
|
-
setExiting(true);
|
|
6212
|
-
setTimeout(() => onDismiss(toast.id), 280);
|
|
6213
|
-
}, [onDismiss, toast.id]);
|
|
6214
|
-
useEffect(() => {
|
|
6215
|
-
const duration2 = toast.duration ?? 6e3;
|
|
6216
|
-
if (duration2 > 0) {
|
|
6217
|
-
timerRef.current = setTimeout(dismiss, duration2);
|
|
6218
|
-
}
|
|
6219
|
-
return () => {
|
|
6220
|
-
if (timerRef.current) clearTimeout(timerRef.current);
|
|
6221
|
-
};
|
|
6222
|
-
}, [dismiss, toast.duration]);
|
|
6223
|
-
const { accent, icon } = VARIANT_COLORS[toast.variant];
|
|
6224
|
-
const duration = toast.duration ?? 6e3;
|
|
6225
|
-
const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
|
|
6226
|
-
const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
|
|
6227
|
-
return /* @__PURE__ */ jsxs(Wrapper, { $exiting: exiting, children: [
|
|
6228
|
-
/* @__PURE__ */ jsxs(Body, { children: [
|
|
6229
|
-
/* @__PURE__ */ jsx(IconDot, { $color: accent, children: icon }),
|
|
6230
|
-
/* @__PURE__ */ jsxs(Content, { children: [
|
|
6231
|
-
/* @__PURE__ */ jsx(Title, { children: toast.title }),
|
|
6232
|
-
toast.amount && /* @__PURE__ */ jsx(Amount, { children: toast.amount }),
|
|
6233
|
-
toast.txHash && txUrl && /* @__PURE__ */ jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
|
|
6234
|
-
truncateHash(toast.txHash),
|
|
6235
|
-
/* @__PURE__ */ jsx(TxArrow, { children: "\u2197" })
|
|
6236
|
-
] })
|
|
6237
|
-
] }),
|
|
6238
|
-
/* @__PURE__ */ jsx(CloseBtn, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
|
|
6239
|
-
] }),
|
|
6240
|
-
duration > 0 && /* @__PURE__ */ jsx(ProgressBar, { $color: accent, $duration: duration })
|
|
6241
|
-
] });
|
|
6242
|
-
}
|
|
6243
|
-
var ToastContext = createContext(null);
|
|
6244
|
-
function ToastProvider({ children }) {
|
|
6245
|
-
const [toasts, setToasts] = useState([]);
|
|
6246
|
-
const addToast = useCallback((data) => {
|
|
6247
|
-
const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
|
|
6248
|
-
setToasts((prev) => [...prev, { ...data, id }]);
|
|
6249
|
-
return id;
|
|
6250
|
-
}, []);
|
|
6251
|
-
const dismiss = useCallback((id) => {
|
|
6252
|
-
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
6253
|
-
}, []);
|
|
6254
|
-
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
|
|
6255
|
-
children,
|
|
6256
|
-
/* @__PURE__ */ jsx(Container, { children: toasts.map((t) => /* @__PURE__ */ jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
|
|
6257
|
-
] });
|
|
6258
|
-
}
|
|
6259
|
-
function useToast() {
|
|
6260
|
-
const ctx = useContext(ToastContext);
|
|
6261
|
-
if (!ctx) throw new Error("useToast must be used within a ToastProvider");
|
|
6262
|
-
return ctx;
|
|
6263
|
-
}
|
|
6264
6393
|
var DEFAULT_LOGO_SRC = Loaf_logo_Banner_default;
|
|
6265
6394
|
var DEFAULT_LOGO_ALT = "Loaf";
|
|
6266
6395
|
var OTP_INPUT_LENGTH = 6;
|
|
@@ -6288,7 +6417,6 @@ var LoginPopup = ({
|
|
|
6288
6417
|
const [error, setError] = useState("");
|
|
6289
6418
|
const [loading, setLoading] = useState(false);
|
|
6290
6419
|
const [isSignUp, setIsSignUp] = useState(false);
|
|
6291
|
-
const { toast } = useToast();
|
|
6292
6420
|
const [fundingAmount] = useState("");
|
|
6293
6421
|
const [kycLoading, setKycLoading] = useState(false);
|
|
6294
6422
|
const [showKycWidget, setShowKycWidget] = useState(false);
|
|
@@ -6302,11 +6430,6 @@ var LoginPopup = ({
|
|
|
6302
6430
|
setView(initialView);
|
|
6303
6431
|
}
|
|
6304
6432
|
}, [initialView]);
|
|
6305
|
-
useEffect(() => {
|
|
6306
|
-
if (view === "kyc" && renderKycWidget) {
|
|
6307
|
-
setShowKycWidget(true);
|
|
6308
|
-
}
|
|
6309
|
-
}, [view, renderKycWidget]);
|
|
6310
6433
|
useEffect(() => {
|
|
6311
6434
|
if (!transakWidgetUrl) return;
|
|
6312
6435
|
const handleTransakMessage = (event) => {
|
|
@@ -6509,19 +6632,10 @@ var LoginPopup = ({
|
|
|
6509
6632
|
};
|
|
6510
6633
|
const handleKycWidgetResult = (result) => {
|
|
6511
6634
|
setShowKycWidget(false);
|
|
6512
|
-
onClose();
|
|
6513
6635
|
if (result.passed) {
|
|
6514
|
-
|
|
6515
|
-
variant: "success",
|
|
6516
|
-
title: "KYC submitted \u2014 pending review",
|
|
6517
|
-
amount: "Your documents are under review. Please check back in a few minutes."
|
|
6518
|
-
});
|
|
6636
|
+
setView("kyc-success");
|
|
6519
6637
|
} else {
|
|
6520
|
-
|
|
6521
|
-
variant: "error",
|
|
6522
|
-
title: "Verification unsuccessful",
|
|
6523
|
-
amount: "Your identity check didn't pass. Please contact support if you believe this is an error."
|
|
6524
|
-
});
|
|
6638
|
+
setView("kyc-failed");
|
|
6525
6639
|
}
|
|
6526
6640
|
};
|
|
6527
6641
|
const handleKycWidgetClose = () => {
|
|
@@ -6612,7 +6726,7 @@ var LoginPopup = ({
|
|
|
6612
6726
|
if (view === "main") {
|
|
6613
6727
|
return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
6614
6728
|
/* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
6615
|
-
/* @__PURE__ */ jsxs(
|
|
6729
|
+
/* @__PURE__ */ jsxs(Title, { children: [
|
|
6616
6730
|
/* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
|
|
6617
6731
|
"Welcome to Loaf"
|
|
6618
6732
|
] }),
|
|
@@ -6673,7 +6787,7 @@ var LoginPopup = ({
|
|
|
6673
6787
|
/* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
|
|
6674
6788
|
"Back"
|
|
6675
6789
|
] }),
|
|
6676
|
-
/* @__PURE__ */ jsxs(
|
|
6790
|
+
/* @__PURE__ */ jsxs(Title, { children: [
|
|
6677
6791
|
/* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
|
|
6678
6792
|
isSignUp ? "Sign up with Email" : "Sign in with Email"
|
|
6679
6793
|
] }),
|
|
@@ -6712,7 +6826,7 @@ var LoginPopup = ({
|
|
|
6712
6826
|
/* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
|
|
6713
6827
|
"Back"
|
|
6714
6828
|
] }),
|
|
6715
|
-
/* @__PURE__ */ jsxs(
|
|
6829
|
+
/* @__PURE__ */ jsxs(Title, { children: [
|
|
6716
6830
|
/* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
|
|
6717
6831
|
"Enter Verification Code"
|
|
6718
6832
|
] }),
|
|
@@ -6828,7 +6942,7 @@ var LoginPopup = ({
|
|
|
6828
6942
|
] }) });
|
|
6829
6943
|
}
|
|
6830
6944
|
if (view === "funding") {
|
|
6831
|
-
return /* @__PURE__ */ jsx(Overlay2, {
|
|
6945
|
+
return /* @__PURE__ */ jsx(Overlay2, { children: /* @__PURE__ */ jsxs(
|
|
6832
6946
|
FundingPopupContainer,
|
|
6833
6947
|
{
|
|
6834
6948
|
onClick: (event) => event.stopPropagation(),
|
|
@@ -6898,6 +7012,16 @@ var Overlay2 = styled25.div`
|
|
|
6898
7012
|
justify-content: center;
|
|
6899
7013
|
align-items: center;
|
|
6900
7014
|
z-index: 10000;
|
|
7015
|
+
animation: fadeIn 0.2s ease-in-out;
|
|
7016
|
+
|
|
7017
|
+
@keyframes fadeIn {
|
|
7018
|
+
from {
|
|
7019
|
+
opacity: 0;
|
|
7020
|
+
}
|
|
7021
|
+
to {
|
|
7022
|
+
opacity: 1;
|
|
7023
|
+
}
|
|
7024
|
+
}
|
|
6901
7025
|
`;
|
|
6902
7026
|
var PopupContainer = styled25.div`
|
|
6903
7027
|
background-color: var(--color-background, #0a0a0a);
|
|
@@ -6907,8 +7031,20 @@ var PopupContainer = styled25.div`
|
|
|
6907
7031
|
max-width: 440px;
|
|
6908
7032
|
width: 90%;
|
|
6909
7033
|
position: relative;
|
|
7034
|
+
animation: slideUp 0.3s ease-out;
|
|
6910
7035
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
6911
7036
|
|
|
7037
|
+
@keyframes slideUp {
|
|
7038
|
+
from {
|
|
7039
|
+
transform: translateY(20px);
|
|
7040
|
+
opacity: 0;
|
|
7041
|
+
}
|
|
7042
|
+
to {
|
|
7043
|
+
transform: translateY(0);
|
|
7044
|
+
opacity: 1;
|
|
7045
|
+
}
|
|
7046
|
+
}
|
|
7047
|
+
|
|
6912
7048
|
@media (max-width: 768px) {
|
|
6913
7049
|
padding: 2rem;
|
|
6914
7050
|
max-width: 90%;
|
|
@@ -6922,9 +7058,21 @@ var KycPopupContainer = styled25.div`
|
|
|
6922
7058
|
max-width: ${(props) => props.$expanded ? "680px" : "440px"};
|
|
6923
7059
|
width: 90%;
|
|
6924
7060
|
position: relative;
|
|
7061
|
+
animation: slideUp 0.3s ease-out;
|
|
6925
7062
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
6926
7063
|
transition: max-width 0.3s ease;
|
|
6927
7064
|
|
|
7065
|
+
@keyframes slideUp {
|
|
7066
|
+
from {
|
|
7067
|
+
transform: translateY(20px);
|
|
7068
|
+
opacity: 0;
|
|
7069
|
+
}
|
|
7070
|
+
to {
|
|
7071
|
+
transform: translateY(0);
|
|
7072
|
+
opacity: 1;
|
|
7073
|
+
}
|
|
7074
|
+
}
|
|
7075
|
+
|
|
6928
7076
|
@media (max-width: 768px) {
|
|
6929
7077
|
padding: 1.5rem;
|
|
6930
7078
|
max-width: 95%;
|
|
@@ -6983,7 +7131,7 @@ var CloseButton = styled25.button`
|
|
|
6983
7131
|
color: var(--color-accent, #e6c656);
|
|
6984
7132
|
}
|
|
6985
7133
|
`;
|
|
6986
|
-
var
|
|
7134
|
+
var Title = styled25.h2`
|
|
6987
7135
|
font-size: 1.75rem;
|
|
6988
7136
|
font-weight: 600;
|
|
6989
7137
|
color: var(--color-text, #eaecef);
|
|
@@ -7252,9 +7400,21 @@ var FundingPopupContainer = styled25.div`
|
|
|
7252
7400
|
max-width: ${(props) => props.$hasWidget ? "900px" : "440px"};
|
|
7253
7401
|
width: 90%;
|
|
7254
7402
|
position: relative;
|
|
7403
|
+
animation: slideUp 0.3s ease-out;
|
|
7255
7404
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
7256
7405
|
overflow: hidden;
|
|
7257
7406
|
|
|
7407
|
+
@keyframes slideUp {
|
|
7408
|
+
from {
|
|
7409
|
+
transform: translateY(20px);
|
|
7410
|
+
opacity: 0;
|
|
7411
|
+
}
|
|
7412
|
+
to {
|
|
7413
|
+
transform: translateY(0);
|
|
7414
|
+
opacity: 1;
|
|
7415
|
+
}
|
|
7416
|
+
}
|
|
7417
|
+
|
|
7258
7418
|
@media (max-width: 768px) {
|
|
7259
7419
|
padding: ${(props) => props.$hasWidget ? "0" : "2rem"};
|
|
7260
7420
|
max-width: 95%;
|
|
@@ -7543,7 +7703,7 @@ var PropertyCompareBar = React5.forwardRef(
|
|
|
7543
7703
|
void 0,
|
|
7544
7704
|
pricePercentFormat
|
|
7545
7705
|
)}%`;
|
|
7546
|
-
const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(
|
|
7706
|
+
const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(PriceBlock, { $variant: propertyValueVariant, children: [
|
|
7547
7707
|
/* @__PURE__ */ jsx(PriceAmount, { children: formattedPriceValue }),
|
|
7548
7708
|
formattedPriceChange || formattedPricePercent ? /* @__PURE__ */ jsxs(
|
|
7549
7709
|
PriceChange,
|
|
@@ -7856,7 +8016,7 @@ var PropertyValueChange = styled25.span`
|
|
|
7856
8016
|
font-size: 0.65rem;
|
|
7857
8017
|
}
|
|
7858
8018
|
`;
|
|
7859
|
-
var
|
|
8019
|
+
var PriceBlock = styled25.div`
|
|
7860
8020
|
display: none;
|
|
7861
8021
|
|
|
7862
8022
|
${({ $variant }) => $variant === "pill" && css`
|
|
@@ -7950,7 +8110,7 @@ function GalleryMapSection({
|
|
|
7950
8110
|
/* @__PURE__ */ jsxs(ThumbStrip, { children: [
|
|
7951
8111
|
/* @__PURE__ */ jsx(ThumbScroll, { children: images.filter((img) => img.category !== "Floorplan").map((img) => {
|
|
7952
8112
|
const actualIndex = images.indexOf(img);
|
|
7953
|
-
return /* @__PURE__ */ jsx(
|
|
8113
|
+
return /* @__PURE__ */ jsx(Thumbnail2, { "data-active": !showVideo && carouselIndex === actualIndex, onClick: () => {
|
|
7954
8114
|
stopAutoPlay();
|
|
7955
8115
|
setShowVideo(false);
|
|
7956
8116
|
setCarouselIndex(actualIndex);
|
|
@@ -8090,7 +8250,7 @@ var ThumbScroll = styled25.div`
|
|
|
8090
8250
|
scrollbar-width: none;
|
|
8091
8251
|
&::-webkit-scrollbar { display: none; }
|
|
8092
8252
|
`;
|
|
8093
|
-
var
|
|
8253
|
+
var Thumbnail2 = styled25.div`
|
|
8094
8254
|
min-width: 60px; height: 45px; border-radius: 4px; overflow: hidden;
|
|
8095
8255
|
cursor: pointer; border: 2px solid transparent; opacity: 0.6;
|
|
8096
8256
|
transition: all 0.2s ease; flex-shrink: 0;
|
|
@@ -8621,7 +8781,7 @@ function PropertyHistory() {
|
|
|
8621
8781
|
/* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: loafListing.date.replace(/\d+,\s|\s\d+$/, "") })
|
|
8622
8782
|
] }) }),
|
|
8623
8783
|
/* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
|
|
8624
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8784
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: loafListing.type, children: loafListing.type === "Sale" ? "Sold" : loafListing.type }) }),
|
|
8625
8785
|
/* @__PURE__ */ jsx("td", { children: loafListing.saleType ?? "-" }),
|
|
8626
8786
|
/* @__PURE__ */ jsx("td", { children: loafListing.agent })
|
|
8627
8787
|
] }) }) }),
|
|
@@ -8683,7 +8843,7 @@ function PropertyHistory() {
|
|
|
8683
8843
|
/* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: ownershipSale.date.replace(/\d+,\s|\s\d+$/, "") })
|
|
8684
8844
|
] }) }),
|
|
8685
8845
|
ownershipSale && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
|
|
8686
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8846
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: ownershipSale.type, children: ownershipSale.type === "Sale" ? "Sold" : ownershipSale.type }) }),
|
|
8687
8847
|
/* @__PURE__ */ jsx("td", { children: ownershipSale.saleType ?? "-" }),
|
|
8688
8848
|
/* @__PURE__ */ jsx("td", { children: ownershipSale.agent })
|
|
8689
8849
|
] }) }) }),
|
|
@@ -8692,7 +8852,7 @@ function PropertyHistory() {
|
|
|
8692
8852
|
/* @__PURE__ */ jsx("div", { className: "py-2", children: events.map((event) => /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsx(EventDetails, { event }) }, event.id)) })
|
|
8693
8853
|
] }),
|
|
8694
8854
|
otherSales.length > 0 && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: otherSales.map((sale) => /* @__PURE__ */ jsxs(HistoryRow, { children: [
|
|
8695
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8855
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: sale.type, children: sale.type === "Sale" ? "Sold" : sale.type }) }),
|
|
8696
8856
|
/* @__PURE__ */ jsx("td", { children: sale.saleType ?? "-" }),
|
|
8697
8857
|
/* @__PURE__ */ jsx("td", { children: sale.agent })
|
|
8698
8858
|
] }, sale.id)) }) })
|
|
@@ -8835,7 +8995,7 @@ function EventDetails({ event }) {
|
|
|
8835
8995
|
onClick: toggleExpand,
|
|
8836
8996
|
children: [
|
|
8837
8997
|
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center flex-1 gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
8838
|
-
/* @__PURE__ */ jsx(
|
|
8998
|
+
/* @__PURE__ */ jsx(TypeBadge2, { $type: event.type, children: event.type === "Sale" ? "Sold" : event.type }),
|
|
8839
8999
|
/* @__PURE__ */ jsx("span", { className: "ml-2", children: event.date })
|
|
8840
9000
|
] }) }),
|
|
8841
9001
|
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-[var(--color-text-secondary)] w-6 h-6 rounded-full transition-colors duration-200 hover:bg-white/10", children: expanded ? /* @__PURE__ */ jsx(BiChevronUp, { size: 20 }) : /* @__PURE__ */ jsx(BiChevronDown, { size: 20 }) })
|
|
@@ -9079,7 +9239,7 @@ var HistoryRow = styled25.tr`
|
|
|
9079
9239
|
background-color: rgba(255, 255, 255, 0.08);
|
|
9080
9240
|
}
|
|
9081
9241
|
`;
|
|
9082
|
-
var
|
|
9242
|
+
var TypeBadge2 = styled25.span`
|
|
9083
9243
|
display: inline-block;
|
|
9084
9244
|
padding: 0.25rem 0.5rem;
|
|
9085
9245
|
border-radius: 4px;
|
|
@@ -9489,7 +9649,9 @@ function AssetSelectorBar({
|
|
|
9489
9649
|
metrics: metricsProp,
|
|
9490
9650
|
currentTokenName,
|
|
9491
9651
|
selectorItems,
|
|
9492
|
-
onSelect
|
|
9652
|
+
onSelect,
|
|
9653
|
+
trailing,
|
|
9654
|
+
imageUrl
|
|
9493
9655
|
}) {
|
|
9494
9656
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
9495
9657
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -9498,6 +9660,7 @@ function AssetSelectorBar({
|
|
|
9498
9660
|
...offeringValuation != null ? [{ label: "Offering Valuation", value: `$${offeringValuation.toLocaleString()}` }] : []
|
|
9499
9661
|
];
|
|
9500
9662
|
return /* @__PURE__ */ jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxs(IPOAssetSelector, { children: [
|
|
9663
|
+
imageUrl && /* @__PURE__ */ jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
|
|
9501
9664
|
/* @__PURE__ */ jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxs(AssetName, { children: [
|
|
9502
9665
|
propertyName,
|
|
9503
9666
|
hasItems && /* @__PURE__ */ jsx(
|
|
@@ -9518,7 +9681,7 @@ function AssetSelectorBar({
|
|
|
9518
9681
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
9519
9682
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
9520
9683
|
/* @__PURE__ */ jsx(MetricLabel2, { children: m.label }),
|
|
9521
|
-
/* @__PURE__ */ jsx(MetricValue, { $accent: !!m.accent, children: m.value })
|
|
9684
|
+
/* @__PURE__ */ jsx(MetricValue, { $accent: !!m.accent, $secondary: !!m.secondary, children: m.value })
|
|
9522
9685
|
] }),
|
|
9523
9686
|
m.change != null && /* @__PURE__ */ jsxs(MetricChange, { $positive: m.change >= 0, children: [
|
|
9524
9687
|
m.change >= 0 ? "\u2191" : "\u2193",
|
|
@@ -9527,11 +9690,12 @@ function AssetSelectorBar({
|
|
|
9527
9690
|
] })
|
|
9528
9691
|
] })
|
|
9529
9692
|
] }, m.label)) }),
|
|
9693
|
+
trailing,
|
|
9530
9694
|
isDropdownOpen && hasItems && /* @__PURE__ */ jsx(IPODropdown, { children: selectorItems.map((item) => {
|
|
9531
9695
|
const isCurrent = item.tokenName === currentTokenName;
|
|
9532
9696
|
const status = item.status?.toUpperCase();
|
|
9533
9697
|
const statusLabel = status === "PENDING" ? "Coming Soon" : status === "CLOSED" ? "Closed" : status === "CANCELLED" ? "Cancelled" : null;
|
|
9534
|
-
return /* @__PURE__ */
|
|
9698
|
+
return /* @__PURE__ */ jsx(
|
|
9535
9699
|
IPOOption,
|
|
9536
9700
|
{
|
|
9537
9701
|
onClick: () => {
|
|
@@ -9542,16 +9706,19 @@ function AssetSelectorBar({
|
|
|
9542
9706
|
},
|
|
9543
9707
|
$selected: isCurrent,
|
|
9544
9708
|
style: { cursor: isCurrent ? "default" : "pointer" },
|
|
9545
|
-
children: [
|
|
9546
|
-
/* @__PURE__ */
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9709
|
+
children: /* @__PURE__ */ jsxs(IPOOptionInner, { children: [
|
|
9710
|
+
item.imageUrl && /* @__PURE__ */ jsx(IPOOptionThumb, { src: item.imageUrl, alt: item.streetAddress }),
|
|
9711
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
9712
|
+
/* @__PURE__ */ jsxs(IPOOptionName, { children: [
|
|
9713
|
+
item.streetAddress,
|
|
9714
|
+
item.ticker ? ` (${item.ticker})` : ""
|
|
9715
|
+
] }),
|
|
9716
|
+
/* @__PURE__ */ jsxs(IPOOptionLocation, { children: [
|
|
9717
|
+
item.suburb,
|
|
9718
|
+
statusLabel && /* @__PURE__ */ jsx("span", { children: statusLabel })
|
|
9719
|
+
] })
|
|
9553
9720
|
] })
|
|
9554
|
-
]
|
|
9721
|
+
] })
|
|
9555
9722
|
},
|
|
9556
9723
|
item.tokenName
|
|
9557
9724
|
);
|
|
@@ -9586,6 +9753,20 @@ var IPOAssetSelector = styled25.div`
|
|
|
9586
9753
|
padding: 0.6rem 0.75rem;
|
|
9587
9754
|
}
|
|
9588
9755
|
`;
|
|
9756
|
+
var AssetThumbnail = styled25.img`
|
|
9757
|
+
width: 40px;
|
|
9758
|
+
height: 40px;
|
|
9759
|
+
border-radius: 8px;
|
|
9760
|
+
object-fit: cover;
|
|
9761
|
+
flex-shrink: 0;
|
|
9762
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
9763
|
+
|
|
9764
|
+
@media (max-width: 768px) {
|
|
9765
|
+
width: 32px;
|
|
9766
|
+
height: 32px;
|
|
9767
|
+
border-radius: 6px;
|
|
9768
|
+
}
|
|
9769
|
+
`;
|
|
9589
9770
|
var AssetSelectorDropdown = styled25.div`
|
|
9590
9771
|
display: flex;
|
|
9591
9772
|
align-items: center;
|
|
@@ -9653,16 +9834,16 @@ var MetricLabel2 = styled25.span`
|
|
|
9653
9834
|
}
|
|
9654
9835
|
`;
|
|
9655
9836
|
var MetricValue = styled25.span`
|
|
9656
|
-
font-size: 1.25rem;
|
|
9657
|
-
font-weight: 700;
|
|
9658
|
-
color: ${(p) => p.$accent ? "#D4AF37" : "#fff"};
|
|
9837
|
+
font-size: ${(p) => p.$secondary ? "0.95rem" : "1.25rem"};
|
|
9838
|
+
font-weight: ${(p) => p.$secondary ? "600" : "700"};
|
|
9839
|
+
color: ${(p) => p.$accent ? "#D4AF37" : p.$secondary ? "rgba(255,255,255,0.7)" : "#fff"};
|
|
9659
9840
|
|
|
9660
9841
|
@media (max-width: 768px) {
|
|
9661
|
-
font-size: 1.05rem;
|
|
9842
|
+
font-size: ${(p) => p.$secondary ? "0.85rem" : "1.05rem"};
|
|
9662
9843
|
}
|
|
9663
9844
|
|
|
9664
9845
|
@media (max-width: 480px) {
|
|
9665
|
-
font-size: 0.95rem;
|
|
9846
|
+
font-size: ${(p) => p.$secondary ? "0.8rem" : "0.95rem"};
|
|
9666
9847
|
}
|
|
9667
9848
|
`;
|
|
9668
9849
|
var MetricChange = styled25.span`
|
|
@@ -9724,6 +9905,19 @@ var IPOOption = styled25.div`
|
|
|
9724
9905
|
&:hover { background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, transparent 100%); }
|
|
9725
9906
|
${(p) => p.$selected && `background: linear-gradient(90deg, rgba(56,97,251,0.15) 0%, transparent 100%);`}
|
|
9726
9907
|
`;
|
|
9908
|
+
var IPOOptionInner = styled25.div`
|
|
9909
|
+
display: flex;
|
|
9910
|
+
align-items: center;
|
|
9911
|
+
gap: 1rem;
|
|
9912
|
+
`;
|
|
9913
|
+
var IPOOptionThumb = styled25.img`
|
|
9914
|
+
width: 36px;
|
|
9915
|
+
height: 36px;
|
|
9916
|
+
border-radius: 6px;
|
|
9917
|
+
object-fit: cover;
|
|
9918
|
+
flex-shrink: 0;
|
|
9919
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
9920
|
+
`;
|
|
9727
9921
|
var IPOOptionName = styled25.div`
|
|
9728
9922
|
font-weight: 600;
|
|
9729
9923
|
font-size: 1rem;
|
|
@@ -9759,6 +9953,7 @@ function OfferingProgressCard({
|
|
|
9759
9953
|
raisedAmount,
|
|
9760
9954
|
targetAmount,
|
|
9761
9955
|
isPrivateClient = false,
|
|
9956
|
+
variant = "default",
|
|
9762
9957
|
style,
|
|
9763
9958
|
className
|
|
9764
9959
|
}) {
|
|
@@ -9790,7 +9985,109 @@ function OfferingProgressCard({
|
|
|
9790
9985
|
const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
|
|
9791
9986
|
return () => clearInterval(interval);
|
|
9792
9987
|
}, [opensAt]);
|
|
9793
|
-
|
|
9988
|
+
if (variant === "compact") {
|
|
9989
|
+
return /* @__PURE__ */ jsxs(CompactContainer, { style, className, children: [
|
|
9990
|
+
/* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
|
|
9991
|
+
/* @__PURE__ */ jsxs(ProgressInfo, { children: [
|
|
9992
|
+
/* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
|
|
9993
|
+
"Subscribers: ",
|
|
9994
|
+
subscriberCount.toLocaleString()
|
|
9995
|
+
] }),
|
|
9996
|
+
/* @__PURE__ */ jsxs(ProgressAmounts, { children: [
|
|
9997
|
+
/* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
|
|
9998
|
+
/* @__PURE__ */ jsxs("span", { className: "target", children: [
|
|
9999
|
+
" / ",
|
|
10000
|
+
formatCurrency3(computedTarget)
|
|
10001
|
+
] })
|
|
10002
|
+
] })
|
|
10003
|
+
] })
|
|
10004
|
+
] });
|
|
10005
|
+
}
|
|
10006
|
+
if (variant === "home") {
|
|
10007
|
+
const isPreLive = !ipoStarted && ipoStatus !== "CLOSED" && ipoStatus !== "CANCELLED";
|
|
10008
|
+
return /* @__PURE__ */ jsxs(Container, { style, className, children: [
|
|
10009
|
+
/* @__PURE__ */ jsxs(Header2, { children: [
|
|
10010
|
+
/* @__PURE__ */ jsxs("h3", { children: [
|
|
10011
|
+
/* @__PURE__ */ jsx(FaChartLine, {}),
|
|
10012
|
+
" Offering Progress"
|
|
10013
|
+
] }),
|
|
10014
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem" }, children: ipoStarted ? /* @__PURE__ */ jsxs(StatusSpan, { $color: "#0ecb81", children: [
|
|
10015
|
+
/* @__PURE__ */ jsx(StatusDot, { $color: "#0ecb81", $pulse: true }),
|
|
10016
|
+
"LIVE"
|
|
10017
|
+
] }) : /* @__PURE__ */ jsxs(StatusSpan, { $color: statusColor || "#D4AF37", children: [
|
|
10018
|
+
/* @__PURE__ */ jsx(StatusDot, { $color: statusColor || "#D4AF37" }),
|
|
10019
|
+
statusLabel || "Preparing"
|
|
10020
|
+
] }) })
|
|
10021
|
+
] }),
|
|
10022
|
+
isPreLive ? /* @__PURE__ */ jsxs(HomePreLiveRow, { children: [
|
|
10023
|
+
countdown ? /* @__PURE__ */ jsxs(HomeCountdownSide, { children: [
|
|
10024
|
+
/* @__PURE__ */ jsx(CountdownLabel, { children: "Opens In" }),
|
|
10025
|
+
/* @__PURE__ */ jsxs(CountdownDigits, { children: [
|
|
10026
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.days).padStart(2, "0") }),
|
|
10027
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "D" }),
|
|
10028
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
10029
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.hours).padStart(2, "0") }),
|
|
10030
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "H" }),
|
|
10031
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
10032
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.minutes).padStart(2, "0") }),
|
|
10033
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "M" }),
|
|
10034
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
10035
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.seconds).padStart(2, "0") }),
|
|
10036
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "S" })
|
|
10037
|
+
] })
|
|
10038
|
+
] }) : /* @__PURE__ */ jsx(HomeCountdownSide, { children: /* @__PURE__ */ jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }) }),
|
|
10039
|
+
/* @__PURE__ */ jsxs(HomeUnitsSide, { children: [
|
|
10040
|
+
/* @__PURE__ */ jsx(HomeUnitsLabel, { children: "Units Subscribed" }),
|
|
10041
|
+
/* @__PURE__ */ jsxs(HomeUnitsValue, { children: [
|
|
10042
|
+
/* @__PURE__ */ jsx(HomeSpinner, {}),
|
|
10043
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
10044
|
+
" / ",
|
|
10045
|
+
supplyToSell.toLocaleString()
|
|
10046
|
+
] })
|
|
10047
|
+
] })
|
|
10048
|
+
] })
|
|
10049
|
+
] }) : /* @__PURE__ */ jsxs(LiveBody, { children: [
|
|
10050
|
+
/* @__PURE__ */ jsxs(LiveTopRow, { children: [
|
|
10051
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
10052
|
+
/* @__PURE__ */ jsxs(LiveLabel, { children: [
|
|
10053
|
+
"Offering Subscribed ",
|
|
10054
|
+
/* @__PURE__ */ jsx("span", { children: "\u24D8" })
|
|
10055
|
+
] }),
|
|
10056
|
+
/* @__PURE__ */ jsxs(LivePercent, { children: [
|
|
10057
|
+
percentSold.toFixed(1),
|
|
10058
|
+
"%",
|
|
10059
|
+
/* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
|
|
10060
|
+
] })
|
|
10061
|
+
] }),
|
|
10062
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "right" }, children: [
|
|
10063
|
+
/* @__PURE__ */ jsx(LiveLabel, { children: "Units Subscribed" }),
|
|
10064
|
+
/* @__PURE__ */ jsxs(UnitsValue, { children: [
|
|
10065
|
+
/* @__PURE__ */ jsx("span", { children: totalSold.toLocaleString() }),
|
|
10066
|
+
/* @__PURE__ */ jsxs("small", { children: [
|
|
10067
|
+
"/ ",
|
|
10068
|
+
supplyToSell.toLocaleString()
|
|
10069
|
+
] })
|
|
10070
|
+
] })
|
|
10071
|
+
] })
|
|
10072
|
+
] }),
|
|
10073
|
+
/* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
|
|
10074
|
+
/* @__PURE__ */ jsxs(ProgressInfo, { children: [
|
|
10075
|
+
/* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
|
|
10076
|
+
"Subscribers: ",
|
|
10077
|
+
subscriberCount.toLocaleString()
|
|
10078
|
+
] }),
|
|
10079
|
+
/* @__PURE__ */ jsxs(ProgressAmounts, { children: [
|
|
10080
|
+
/* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
|
|
10081
|
+
/* @__PURE__ */ jsxs("span", { className: "target", children: [
|
|
10082
|
+
" / ",
|
|
10083
|
+
formatCurrency3(computedTarget)
|
|
10084
|
+
] })
|
|
10085
|
+
] })
|
|
10086
|
+
] })
|
|
10087
|
+
] })
|
|
10088
|
+
] });
|
|
10089
|
+
}
|
|
10090
|
+
return /* @__PURE__ */ jsxs(Container, { style, className, children: [
|
|
9794
10091
|
/* @__PURE__ */ jsxs(Header2, { children: [
|
|
9795
10092
|
/* @__PURE__ */ jsxs("h3", { children: [
|
|
9796
10093
|
/* @__PURE__ */ jsx(FaChartLine, {}),
|
|
@@ -9858,7 +10155,7 @@ function OfferingProgressCard({
|
|
|
9858
10155
|
/* @__PURE__ */ jsx("span", { children: "\u24D8" })
|
|
9859
10156
|
] }),
|
|
9860
10157
|
/* @__PURE__ */ jsxs(LivePercent, { children: [
|
|
9861
|
-
percentSold
|
|
10158
|
+
percentSold.toFixed(1),
|
|
9862
10159
|
"%",
|
|
9863
10160
|
/* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
|
|
9864
10161
|
] })
|
|
@@ -9891,7 +10188,7 @@ function OfferingProgressCard({
|
|
|
9891
10188
|
] })
|
|
9892
10189
|
] });
|
|
9893
10190
|
}
|
|
9894
|
-
var
|
|
10191
|
+
var Container = styled25.div`
|
|
9895
10192
|
background-color: var(--color-card-darker, #111);
|
|
9896
10193
|
border-radius: 8px;
|
|
9897
10194
|
padding: 1.5rem;
|
|
@@ -10091,6 +10388,59 @@ var ProgressAmounts = styled25.div`
|
|
|
10091
10388
|
.raised { color: #D4AF37; }
|
|
10092
10389
|
.target { color: rgba(255,255,255,0.3); }
|
|
10093
10390
|
`;
|
|
10391
|
+
var CompactContainer = styled25.div`
|
|
10392
|
+
width: 100%;
|
|
10393
|
+
margin: 1.5rem 0;
|
|
10394
|
+
display: flex;
|
|
10395
|
+
flex-direction: column;
|
|
10396
|
+
gap: 0.5rem;
|
|
10397
|
+
`;
|
|
10398
|
+
var HomePreLiveRow = styled25.div`
|
|
10399
|
+
display: flex;
|
|
10400
|
+
align-items: center;
|
|
10401
|
+
justify-content: space-between;
|
|
10402
|
+
padding-top: 1rem;
|
|
10403
|
+
`;
|
|
10404
|
+
var HomeCountdownSide = styled25.div`
|
|
10405
|
+
display: flex;
|
|
10406
|
+
flex-direction: column;
|
|
10407
|
+
align-items: center;
|
|
10408
|
+
flex: 1;
|
|
10409
|
+
`;
|
|
10410
|
+
var HomeUnitsSide = styled25.div`
|
|
10411
|
+
text-align: center;
|
|
10412
|
+
flex-shrink: 0;
|
|
10413
|
+
`;
|
|
10414
|
+
var HomeUnitsLabel = styled25.div`
|
|
10415
|
+
font-size: 0.6rem;
|
|
10416
|
+
color: var(--color-text-secondary);
|
|
10417
|
+
text-transform: uppercase;
|
|
10418
|
+
letter-spacing: 0.1em;
|
|
10419
|
+
margin-bottom: 0.2rem;
|
|
10420
|
+
`;
|
|
10421
|
+
var HomeUnitsValue = styled25.div`
|
|
10422
|
+
font-size: 1.1rem;
|
|
10423
|
+
font-weight: 700;
|
|
10424
|
+
font-family: monospace;
|
|
10425
|
+
span {
|
|
10426
|
+
color: var(--color-text-secondary);
|
|
10427
|
+
font-weight: 400;
|
|
10428
|
+
}
|
|
10429
|
+
`;
|
|
10430
|
+
var HomeSpinner = styled25.span`
|
|
10431
|
+
display: inline-block;
|
|
10432
|
+
width: 14px;
|
|
10433
|
+
height: 14px;
|
|
10434
|
+
border: 2px solid rgba(255, 255, 255, 0.1);
|
|
10435
|
+
border-top-color: var(--color-accent, #f0b90b);
|
|
10436
|
+
border-radius: 50%;
|
|
10437
|
+
animation: homeSpin 1s linear infinite;
|
|
10438
|
+
vertical-align: middle;
|
|
10439
|
+
margin-right: 0.15rem;
|
|
10440
|
+
@keyframes homeSpin {
|
|
10441
|
+
to { transform: rotate(360deg); }
|
|
10442
|
+
}
|
|
10443
|
+
`;
|
|
10094
10444
|
var MAX_DISPLAY_AMOUNT = 6e4;
|
|
10095
10445
|
var formatCurrency4 = (amount) => {
|
|
10096
10446
|
if (amount >= 1e6) return `$${(amount / 1e6).toFixed(2)}M`;
|
|
@@ -10380,53 +10730,238 @@ var PurchaseItem = styled25.div`
|
|
|
10380
10730
|
padding: 0.4rem 0.6rem;
|
|
10381
10731
|
}
|
|
10382
10732
|
`;
|
|
10383
|
-
var PurchaseInfo = styled25.div`
|
|
10384
|
-
display: flex;
|
|
10385
|
-
flex-direction: column;
|
|
10733
|
+
var PurchaseInfo = styled25.div`
|
|
10734
|
+
display: flex;
|
|
10735
|
+
flex-direction: column;
|
|
10736
|
+
min-width: 0;
|
|
10737
|
+
`;
|
|
10738
|
+
var PurchaseName = styled25.div`
|
|
10739
|
+
font-weight: 500;
|
|
10740
|
+
font-size: 0.875rem;
|
|
10741
|
+
color: #fff;
|
|
10742
|
+
white-space: nowrap;
|
|
10743
|
+
overflow: hidden;
|
|
10744
|
+
text-overflow: ellipsis;
|
|
10745
|
+
`;
|
|
10746
|
+
var PurchaseTime = styled25.div`
|
|
10747
|
+
font-size: 0.7rem;
|
|
10748
|
+
color: var(--color-text-secondary);
|
|
10749
|
+
margin-top: 0.125rem;
|
|
10750
|
+
`;
|
|
10751
|
+
var PurchaseAmount = styled25.div`
|
|
10752
|
+
font-weight: 600;
|
|
10753
|
+
font-size: 0.875rem;
|
|
10754
|
+
color: #fff;
|
|
10755
|
+
white-space: nowrap;
|
|
10756
|
+
margin-left: 1rem;
|
|
10757
|
+
`;
|
|
10758
|
+
var LiveIndicatorDot = styled25.span`
|
|
10759
|
+
display: inline-block;
|
|
10760
|
+
width: 8px;
|
|
10761
|
+
height: 8px;
|
|
10762
|
+
background-color: ${(p) => p.$active ? "#0ecb81" : "#848e9c"};
|
|
10763
|
+
border-radius: 50%;
|
|
10764
|
+
position: relative;
|
|
10765
|
+
&:after {
|
|
10766
|
+
content: '';
|
|
10767
|
+
position: absolute;
|
|
10768
|
+
width: 100%;
|
|
10769
|
+
height: 100%;
|
|
10770
|
+
border-radius: 50%;
|
|
10771
|
+
background-color: ${(p) => p.$active ? "#0ecb81" : "transparent"};
|
|
10772
|
+
animation: ${(p) => p.$active ? "liveGlow 2s infinite" : "none"};
|
|
10773
|
+
}
|
|
10774
|
+
@keyframes liveGlow {
|
|
10775
|
+
0% { box-shadow: 0 0 0 0 rgba(14,203,129,0.4); }
|
|
10776
|
+
70% { box-shadow: 0 0 0 10px rgba(14,203,129,0); }
|
|
10777
|
+
100% { box-shadow: 0 0 0 0 rgba(14,203,129,0); }
|
|
10778
|
+
}
|
|
10779
|
+
`;
|
|
10780
|
+
var slideIn = keyframes`
|
|
10781
|
+
from { transform: translateX(110%); opacity: 0; }
|
|
10782
|
+
to { transform: translateX(0); opacity: 1; }
|
|
10783
|
+
`;
|
|
10784
|
+
var slideOut = keyframes`
|
|
10785
|
+
from { transform: translateX(0); opacity: 1; }
|
|
10786
|
+
to { transform: translateX(110%); opacity: 0; }
|
|
10787
|
+
`;
|
|
10788
|
+
var progressShrink = keyframes`
|
|
10789
|
+
from { width: 100%; }
|
|
10790
|
+
to { width: 0%; }
|
|
10791
|
+
`;
|
|
10792
|
+
var VARIANT_COLORS = {
|
|
10793
|
+
success: { accent: "#0ecb81", icon: "\u2713" },
|
|
10794
|
+
error: { accent: "#f6465d", icon: "\u2715" },
|
|
10795
|
+
info: { accent: "#E6C656", icon: "\u2139" },
|
|
10796
|
+
pending: { accent: "#7EB3E6", icon: "\u25CC" }
|
|
10797
|
+
};
|
|
10798
|
+
var Wrapper = styled25.div`
|
|
10799
|
+
position: relative;
|
|
10800
|
+
display: flex;
|
|
10801
|
+
flex-direction: column;
|
|
10802
|
+
gap: 0;
|
|
10803
|
+
width: 340px;
|
|
10804
|
+
background: #0d0f1a;
|
|
10805
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
10806
|
+
border-radius: 10px;
|
|
10807
|
+
overflow: hidden;
|
|
10808
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
|
|
10809
|
+
animation: ${({ $exiting }) => $exiting ? css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
|
|
10810
|
+
pointer-events: all;
|
|
10811
|
+
`;
|
|
10812
|
+
var Body = styled25.div`
|
|
10813
|
+
display: flex;
|
|
10814
|
+
align-items: flex-start;
|
|
10815
|
+
gap: 12px;
|
|
10816
|
+
padding: 14px 16px 12px;
|
|
10817
|
+
`;
|
|
10818
|
+
var IconDot = styled25.div`
|
|
10819
|
+
flex-shrink: 0;
|
|
10820
|
+
width: 28px;
|
|
10821
|
+
height: 28px;
|
|
10822
|
+
border-radius: 50%;
|
|
10823
|
+
background: ${({ $color }) => $color}1a;
|
|
10824
|
+
border: 1px solid ${({ $color }) => $color}55;
|
|
10825
|
+
display: flex;
|
|
10826
|
+
align-items: center;
|
|
10827
|
+
justify-content: center;
|
|
10828
|
+
font-size: 0.75rem;
|
|
10829
|
+
font-weight: 700;
|
|
10830
|
+
color: ${({ $color }) => $color};
|
|
10831
|
+
margin-top: 1px;
|
|
10832
|
+
`;
|
|
10833
|
+
var Content = styled25.div`
|
|
10834
|
+
flex: 1;
|
|
10386
10835
|
min-width: 0;
|
|
10387
10836
|
`;
|
|
10388
|
-
var
|
|
10389
|
-
|
|
10390
|
-
font-size: 0.
|
|
10837
|
+
var Title2 = styled25.p`
|
|
10838
|
+
margin: 0 0 2px;
|
|
10839
|
+
font-size: 0.8rem;
|
|
10840
|
+
font-weight: 600;
|
|
10391
10841
|
color: #fff;
|
|
10392
|
-
|
|
10393
|
-
overflow: hidden;
|
|
10394
|
-
text-overflow: ellipsis;
|
|
10842
|
+
letter-spacing: 0.01em;
|
|
10395
10843
|
`;
|
|
10396
|
-
var
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10844
|
+
var Amount = styled25.p`
|
|
10845
|
+
margin: 0 0 6px;
|
|
10846
|
+
font-size: 1.05rem;
|
|
10847
|
+
font-weight: 700;
|
|
10848
|
+
color: #E6C656;
|
|
10849
|
+
letter-spacing: -0.01em;
|
|
10400
10850
|
`;
|
|
10401
|
-
var
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10851
|
+
var TxRow = styled25.a`
|
|
10852
|
+
display: inline-flex;
|
|
10853
|
+
align-items: center;
|
|
10854
|
+
gap: 5px;
|
|
10855
|
+
font-family: 'IBM Plex Mono', 'Space Mono', monospace;
|
|
10856
|
+
font-size: 0.68rem;
|
|
10857
|
+
color: rgba(255, 255, 255, 0.4);
|
|
10858
|
+
text-decoration: none;
|
|
10859
|
+
transition: color 0.15s;
|
|
10860
|
+
&:hover {
|
|
10861
|
+
color: #7EB3E6;
|
|
10862
|
+
}
|
|
10407
10863
|
`;
|
|
10408
|
-
var
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10864
|
+
var TxArrow = styled25.span`
|
|
10865
|
+
font-size: 0.6rem;
|
|
10866
|
+
opacity: 0.6;
|
|
10867
|
+
`;
|
|
10868
|
+
var CloseBtn = styled25.button`
|
|
10869
|
+
flex-shrink: 0;
|
|
10870
|
+
background: none;
|
|
10871
|
+
border: none;
|
|
10872
|
+
padding: 2px 4px;
|
|
10873
|
+
cursor: pointer;
|
|
10874
|
+
color: rgba(255, 255, 255, 0.25);
|
|
10875
|
+
font-size: 0.9rem;
|
|
10876
|
+
line-height: 1;
|
|
10877
|
+
transition: color 0.15s;
|
|
10878
|
+
&:hover { color: rgba(255, 255, 255, 0.7); }
|
|
10879
|
+
`;
|
|
10880
|
+
var ProgressBar = styled25.div`
|
|
10881
|
+
height: 2px;
|
|
10882
|
+
background: rgba(255, 255, 255, 0.06);
|
|
10414
10883
|
position: relative;
|
|
10415
|
-
|
|
10884
|
+
&::after {
|
|
10416
10885
|
content: '';
|
|
10417
10886
|
position: absolute;
|
|
10418
|
-
|
|
10887
|
+
left: 0;
|
|
10888
|
+
top: 0;
|
|
10419
10889
|
height: 100%;
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
animation: ${(p) => p.$active ? "liveGlow 2s infinite" : "none"};
|
|
10423
|
-
}
|
|
10424
|
-
@keyframes liveGlow {
|
|
10425
|
-
0% { box-shadow: 0 0 0 0 rgba(14,203,129,0.4); }
|
|
10426
|
-
70% { box-shadow: 0 0 0 10px rgba(14,203,129,0); }
|
|
10427
|
-
100% { box-shadow: 0 0 0 0 rgba(14,203,129,0); }
|
|
10890
|
+
background: ${({ $color }) => $color};
|
|
10891
|
+
animation: ${css`${progressShrink} ${({ $duration }) => $duration}ms linear forwards`};
|
|
10428
10892
|
}
|
|
10429
10893
|
`;
|
|
10894
|
+
var Container2 = styled25.div`
|
|
10895
|
+
position: fixed;
|
|
10896
|
+
bottom: 24px;
|
|
10897
|
+
right: 24px;
|
|
10898
|
+
z-index: 9999;
|
|
10899
|
+
display: flex;
|
|
10900
|
+
flex-direction: column-reverse;
|
|
10901
|
+
gap: 10px;
|
|
10902
|
+
pointer-events: none;
|
|
10903
|
+
`;
|
|
10904
|
+
var DEFAULT_EXPLORER = "https://sepolia.basescan.org/tx/";
|
|
10905
|
+
function truncateHash(hash) {
|
|
10906
|
+
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
10907
|
+
}
|
|
10908
|
+
function ToastItem({ toast, onDismiss }) {
|
|
10909
|
+
const [exiting, setExiting] = useState(false);
|
|
10910
|
+
const timerRef = useRef(null);
|
|
10911
|
+
const dismiss = useCallback(() => {
|
|
10912
|
+
setExiting(true);
|
|
10913
|
+
setTimeout(() => onDismiss(toast.id), 280);
|
|
10914
|
+
}, [onDismiss, toast.id]);
|
|
10915
|
+
useEffect(() => {
|
|
10916
|
+
const duration2 = toast.duration ?? 6e3;
|
|
10917
|
+
if (duration2 > 0) {
|
|
10918
|
+
timerRef.current = setTimeout(dismiss, duration2);
|
|
10919
|
+
}
|
|
10920
|
+
return () => {
|
|
10921
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
10922
|
+
};
|
|
10923
|
+
}, [dismiss, toast.duration]);
|
|
10924
|
+
const { accent, icon } = VARIANT_COLORS[toast.variant];
|
|
10925
|
+
const duration = toast.duration ?? 6e3;
|
|
10926
|
+
const explorerBase = toast.explorerUrl ?? DEFAULT_EXPLORER;
|
|
10927
|
+
const txUrl = toast.txHash ? `${explorerBase}${toast.txHash}` : void 0;
|
|
10928
|
+
return /* @__PURE__ */ jsxs(Wrapper, { $exiting: exiting, children: [
|
|
10929
|
+
/* @__PURE__ */ jsxs(Body, { children: [
|
|
10930
|
+
/* @__PURE__ */ jsx(IconDot, { $color: accent, children: icon }),
|
|
10931
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
10932
|
+
/* @__PURE__ */ jsx(Title2, { children: toast.title }),
|
|
10933
|
+
toast.amount && /* @__PURE__ */ jsx(Amount, { children: toast.amount }),
|
|
10934
|
+
toast.txHash && txUrl && /* @__PURE__ */ jsxs(TxRow, { href: txUrl, target: "_blank", rel: "noopener noreferrer", children: [
|
|
10935
|
+
truncateHash(toast.txHash),
|
|
10936
|
+
/* @__PURE__ */ jsx(TxArrow, { children: "\u2197" })
|
|
10937
|
+
] })
|
|
10938
|
+
] }),
|
|
10939
|
+
/* @__PURE__ */ jsx(CloseBtn, { type: "button", onClick: dismiss, "aria-label": "Dismiss", children: "\u2715" })
|
|
10940
|
+
] }),
|
|
10941
|
+
duration > 0 && /* @__PURE__ */ jsx(ProgressBar, { $color: accent, $duration: duration })
|
|
10942
|
+
] });
|
|
10943
|
+
}
|
|
10944
|
+
var ToastContext = createContext(null);
|
|
10945
|
+
function ToastProvider({ children }) {
|
|
10946
|
+
const [toasts, setToasts] = useState([]);
|
|
10947
|
+
const addToast = useCallback((data) => {
|
|
10948
|
+
const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
|
|
10949
|
+
setToasts((prev) => [...prev, { ...data, id }]);
|
|
10950
|
+
return id;
|
|
10951
|
+
}, []);
|
|
10952
|
+
const dismiss = useCallback((id) => {
|
|
10953
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
10954
|
+
}, []);
|
|
10955
|
+
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
|
|
10956
|
+
children,
|
|
10957
|
+
/* @__PURE__ */ jsx(Container2, { children: toasts.map((t) => /* @__PURE__ */ jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
|
|
10958
|
+
] });
|
|
10959
|
+
}
|
|
10960
|
+
function useToast() {
|
|
10961
|
+
const ctx = useContext(ToastContext);
|
|
10962
|
+
if (!ctx) throw new Error("useToast must be used within a ToastProvider");
|
|
10963
|
+
return ctx;
|
|
10964
|
+
}
|
|
10430
10965
|
function OrderPanel({
|
|
10431
10966
|
statusLabel,
|
|
10432
10967
|
statusColor,
|
|
@@ -11326,6 +11861,7 @@ function PortfolioActivityPanel({
|
|
|
11326
11861
|
positions = [],
|
|
11327
11862
|
showPositionsTab = false,
|
|
11328
11863
|
onPositionClick,
|
|
11864
|
+
onClosePosition,
|
|
11329
11865
|
offeringOrders = [],
|
|
11330
11866
|
openOrders = [],
|
|
11331
11867
|
orderHistory = [],
|
|
@@ -11423,50 +11959,52 @@ function PortfolioActivityPanel({
|
|
|
11423
11959
|
] }),
|
|
11424
11960
|
activeTab === "positions" && showPositionsTab && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11425
11961
|
positions.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "No positions yet. Subscribe to an offering or buy on the secondary market." }),
|
|
11426
|
-
positions.length > 0 && /* @__PURE__ */
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11962
|
+
positions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11963
|
+
/* @__PURE__ */ jsxs(PositionsHeader, { $hasClose: !!onClosePosition, children: [
|
|
11964
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Asset" }),
|
|
11965
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Size" }),
|
|
11966
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Value" }),
|
|
11967
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Entry Price" }),
|
|
11968
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Mark Price" }),
|
|
11969
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "PNL (%)" }),
|
|
11970
|
+
onClosePosition && /* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Close" })
|
|
11971
|
+
] }),
|
|
11972
|
+
pageSlice(positions).map((pos) => {
|
|
11973
|
+
const currentValue = pos.quantity * pos.marketPrice;
|
|
11974
|
+
const costBasis = pos.quantity * pos.averageEntryPrice;
|
|
11975
|
+
const pnl = pos.propertyPnl ?? currentValue - costBasis;
|
|
11976
|
+
const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
|
|
11977
|
+
const isPositive = pnl >= 0;
|
|
11978
|
+
return /* @__PURE__ */ jsxs(PositionsRow, { $hasClose: !!onClosePosition, onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: [
|
|
11979
|
+
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx(HoldingsProperty, { children: pos.tokenName }) }),
|
|
11980
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatNumber2(pos.quantity) }) }),
|
|
11981
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(currentValue) }) }),
|
|
11982
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.8rem" }, children: formatCurrency5(pos.averageEntryPrice) }) }),
|
|
11983
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(pos.marketPrice) }) }),
|
|
11984
|
+
/* @__PURE__ */ jsxs(PositionsCell, { $align: "right", children: [
|
|
11985
|
+
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11986
|
+
isPositive ? "+" : "-",
|
|
11987
|
+
formatCurrency5(Math.abs(pnl))
|
|
11441
11988
|
] }),
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
pos.quantity.toFixed(2),
|
|
11448
|
-
" ",
|
|
11449
|
-
pos.tokenName
|
|
11450
|
-
] }),
|
|
11451
|
-
/* @__PURE__ */ jsxs(HoldingsAvgEntry, { children: [
|
|
11452
|
-
"Avg ",
|
|
11453
|
-
formatCurrency5(pos.averageEntryPrice)
|
|
11454
|
-
] })
|
|
11455
|
-
] }),
|
|
11456
|
-
/* @__PURE__ */ jsxs(HoldingsPnL, { children: [
|
|
11457
|
-
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11458
|
-
isPositive ? "+" : "-",
|
|
11459
|
-
"$",
|
|
11460
|
-
Math.abs(pnl).toFixed(2)
|
|
11989
|
+
/* @__PURE__ */ jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11990
|
+
isPositive ? "+" : "",
|
|
11991
|
+
pnlPercent.toFixed(1),
|
|
11992
|
+
"%"
|
|
11993
|
+
] })
|
|
11461
11994
|
] }),
|
|
11462
|
-
/* @__PURE__ */
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11995
|
+
onClosePosition && /* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsxs(CloseActions, { children: [
|
|
11996
|
+
/* @__PURE__ */ jsx(CloseBtn2, { onClick: (e) => {
|
|
11997
|
+
e.stopPropagation();
|
|
11998
|
+
onClosePosition(pos.tokenName, "limit", pos.quantity, pos.marketPrice);
|
|
11999
|
+
}, children: "Limit" }),
|
|
12000
|
+
/* @__PURE__ */ jsx(CloseBtn2, { onClick: (e) => {
|
|
12001
|
+
e.stopPropagation();
|
|
12002
|
+
onClosePosition(pos.tokenName, "market", pos.quantity, pos.marketPrice);
|
|
12003
|
+
}, children: "Market" })
|
|
12004
|
+
] }) })
|
|
12005
|
+
] }, pos.tokenName);
|
|
12006
|
+
})
|
|
12007
|
+
] })
|
|
11470
12008
|
] }),
|
|
11471
12009
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11472
12010
|
offeringOrders.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
@@ -11583,7 +12121,14 @@ function PortfolioActivityPanel({
|
|
|
11583
12121
|
formatTimestamp(trade.executedAt)
|
|
11584
12122
|
] })
|
|
11585
12123
|
] }),
|
|
11586
|
-
|
|
12124
|
+
/* @__PURE__ */ jsx(
|
|
12125
|
+
ActivityTag,
|
|
12126
|
+
{
|
|
12127
|
+
$color: trade.side === "SELL" ? "#f6465d" : "#0ecb81",
|
|
12128
|
+
$bg: trade.side === "SELL" ? "rgba(246,70,93,0.12)" : "rgba(14,203,129,0.12)",
|
|
12129
|
+
children: sideLabel(trade.side)
|
|
12130
|
+
}
|
|
12131
|
+
),
|
|
11587
12132
|
/* @__PURE__ */ jsx(ActivityAmount, { children: formatCurrency5(trade.price * trade.quantity) })
|
|
11588
12133
|
] }, trade.tradeId))
|
|
11589
12134
|
] }),
|
|
@@ -11761,8 +12306,8 @@ var ActivityPrimary = styled25.span`
|
|
|
11761
12306
|
font-weight: 500;
|
|
11762
12307
|
`;
|
|
11763
12308
|
var ActivitySecondary = styled25.span`
|
|
11764
|
-
font-size: 0.
|
|
11765
|
-
color: rgba(255, 255, 255, 0.
|
|
12309
|
+
font-size: 0.6rem;
|
|
12310
|
+
color: rgba(255, 255, 255, 0.35);
|
|
11766
12311
|
`;
|
|
11767
12312
|
var ActivityTag = styled25.span`
|
|
11768
12313
|
font-size: 0.58rem;
|
|
@@ -11841,53 +12386,42 @@ var PaginationLabel = styled25.span`
|
|
|
11841
12386
|
font-size: 0.8rem;
|
|
11842
12387
|
color: rgba(255, 255, 255, 0.4);
|
|
11843
12388
|
`;
|
|
11844
|
-
var
|
|
12389
|
+
var PositionsHeader = styled25.div`
|
|
12390
|
+
display: grid;
|
|
12391
|
+
grid-template-columns: ${(p) => p.$hasClose ? "1.2fr 0.8fr 1fr 1fr 1fr 1.2fr auto" : "1.2fr 0.8fr 1fr 1fr 1fr 1.2fr"};
|
|
12392
|
+
gap: 0 0.5rem;
|
|
12393
|
+
padding: 0.4rem 0.5rem;
|
|
12394
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
12395
|
+
`;
|
|
12396
|
+
var PositionsHeaderCell = styled25.div`
|
|
12397
|
+
font-size: 0.68rem;
|
|
12398
|
+
font-weight: 500;
|
|
12399
|
+
color: rgba(255, 255, 255, 0.4);
|
|
12400
|
+
text-align: ${(p) => p.$align || "left"};
|
|
12401
|
+
white-space: nowrap;
|
|
12402
|
+
`;
|
|
12403
|
+
var PositionsRow = styled25.div`
|
|
11845
12404
|
display: grid;
|
|
11846
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
12405
|
+
grid-template-columns: ${(p) => p.$hasClose ? "1.2fr 0.8fr 1fr 1fr 1fr 1.2fr auto" : "1.2fr 0.8fr 1fr 1fr 1fr 1.2fr"};
|
|
11847
12406
|
align-items: center;
|
|
11848
|
-
|
|
11849
|
-
|
|
12407
|
+
gap: 0 0.5rem;
|
|
12408
|
+
padding: 0.5rem 0.5rem;
|
|
11850
12409
|
cursor: pointer;
|
|
11851
|
-
|
|
12410
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
12411
|
+
&:last-child { border-bottom: none; }
|
|
12412
|
+
&:hover { background: rgba(255, 255, 255, 0.02); }
|
|
11852
12413
|
`;
|
|
11853
|
-
var
|
|
12414
|
+
var PositionsCell = styled25.div`
|
|
11854
12415
|
display: flex;
|
|
11855
12416
|
flex-direction: column;
|
|
11856
|
-
|
|
12417
|
+
align-items: ${(p) => p.$align === "right" ? "flex-end" : "flex-start"};
|
|
12418
|
+
gap: 0.1rem;
|
|
11857
12419
|
`;
|
|
11858
12420
|
var HoldingsProperty = styled25.div`
|
|
11859
|
-
font-size: 0.
|
|
12421
|
+
font-size: 0.8rem;
|
|
11860
12422
|
font-weight: 600;
|
|
11861
12423
|
color: #fff;
|
|
11862
12424
|
`;
|
|
11863
|
-
var HoldingsPortfolio = styled25.div`
|
|
11864
|
-
font-size: 0.7rem;
|
|
11865
|
-
color: rgba(255, 255, 255, 0.5);
|
|
11866
|
-
span {
|
|
11867
|
-
color: var(--color-accent, #E6C87E);
|
|
11868
|
-
font-weight: 500;
|
|
11869
|
-
}
|
|
11870
|
-
`;
|
|
11871
|
-
var HoldingsQuantity = styled25.div`
|
|
11872
|
-
display: flex;
|
|
11873
|
-
flex-direction: column;
|
|
11874
|
-
align-items: center;
|
|
11875
|
-
gap: 0.15rem;
|
|
11876
|
-
font-size: 0.85rem;
|
|
11877
|
-
font-weight: 500;
|
|
11878
|
-
color: #fff;
|
|
11879
|
-
`;
|
|
11880
|
-
var HoldingsAvgEntry = styled25.div`
|
|
11881
|
-
font-size: 0.7rem;
|
|
11882
|
-
color: var(--color-accent, #E6C87E);
|
|
11883
|
-
font-weight: 500;
|
|
11884
|
-
`;
|
|
11885
|
-
var HoldingsPnL = styled25.div`
|
|
11886
|
-
display: flex;
|
|
11887
|
-
flex-direction: column;
|
|
11888
|
-
align-items: flex-end;
|
|
11889
|
-
gap: 0.15rem;
|
|
11890
|
-
`;
|
|
11891
12425
|
var PnLAmount = styled25.div`
|
|
11892
12426
|
font-size: 0.85rem;
|
|
11893
12427
|
font-weight: 600;
|
|
@@ -11991,6 +12525,28 @@ var CancelConfirmProceed = styled25.button`
|
|
|
11991
12525
|
cursor: not-allowed;
|
|
11992
12526
|
}
|
|
11993
12527
|
`;
|
|
12528
|
+
var CloseActions = styled25.div`
|
|
12529
|
+
display: flex;
|
|
12530
|
+
gap: 0.35rem;
|
|
12531
|
+
align-items: center;
|
|
12532
|
+
`;
|
|
12533
|
+
var CloseBtn2 = styled25.button`
|
|
12534
|
+
background: transparent;
|
|
12535
|
+
border: 1px solid rgba(246, 70, 93, 0.25);
|
|
12536
|
+
border-radius: 4px;
|
|
12537
|
+
padding: 0.15rem 0.5rem;
|
|
12538
|
+
font-size: 0.62rem;
|
|
12539
|
+
font-weight: 600;
|
|
12540
|
+
color: #f6465d;
|
|
12541
|
+
cursor: pointer;
|
|
12542
|
+
white-space: nowrap;
|
|
12543
|
+
transition: all 0.15s ease;
|
|
12544
|
+
|
|
12545
|
+
&:hover {
|
|
12546
|
+
background: rgba(246, 70, 93, 0.1);
|
|
12547
|
+
border-color: rgba(246, 70, 93, 0.5);
|
|
12548
|
+
}
|
|
12549
|
+
`;
|
|
11994
12550
|
function NewsOrdersSection({ newsItems, newsConnectionStatus, activityData }) {
|
|
11995
12551
|
return /* @__PURE__ */ jsxs(Row2, { children: [
|
|
11996
12552
|
/* @__PURE__ */ jsx(
|
|
@@ -13655,7 +14211,7 @@ function PropertyValuation({
|
|
|
13655
14211
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: [
|
|
13656
14212
|
/* @__PURE__ */ jsxs(PricingModelDetail, { children: [
|
|
13657
14213
|
/* @__PURE__ */ jsx(PropertyDetailLabel, { children: "Last Price" }),
|
|
13658
|
-
/* @__PURE__ */ jsx(PricingDetailValue, { children:
|
|
14214
|
+
/* @__PURE__ */ jsx(PricingDetailValue, { children: formatCurrency6(lastPrice) })
|
|
13659
14215
|
] }),
|
|
13660
14216
|
/* @__PURE__ */ jsxs(PricingModelDetail, { children: [
|
|
13661
14217
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
|
|
@@ -13666,11 +14222,11 @@ function PropertyValuation({
|
|
|
13666
14222
|
] })
|
|
13667
14223
|
] }),
|
|
13668
14224
|
/* @__PURE__ */ jsxs(PricingDetailValue, { style: { color: "var(--color-accent)", fontWeight: "bold" }, children: [
|
|
13669
|
-
|
|
14225
|
+
formatCurrency6(fairValue),
|
|
13670
14226
|
" ",
|
|
13671
14227
|
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.85em", fontWeight: "normal", opacity: 0.8 }, children: [
|
|
13672
14228
|
"(",
|
|
13673
|
-
|
|
14229
|
+
formatCurrency6(fairValue * tokensOutstanding, { maximumFractionDigits: 0 }),
|
|
13674
14230
|
")"
|
|
13675
14231
|
] })
|
|
13676
14232
|
] })
|
|
@@ -13687,7 +14243,7 @@ function PropertyValuation({
|
|
|
13687
14243
|
/* @__PURE__ */ jsx(GaugeIndicator, { type: "fairValue", position: 50 }),
|
|
13688
14244
|
/* @__PURE__ */ jsxs(GaugePriceTag, { position: gaugePosition, children: [
|
|
13689
14245
|
/* @__PURE__ */ jsx("span", { children: "Last Price" }),
|
|
13690
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
14246
|
+
/* @__PURE__ */ jsx("span", { children: formatCurrency6(lastPrice) })
|
|
13691
14247
|
] }),
|
|
13692
14248
|
/* @__PURE__ */ jsx(GaugeIndicator, { type: "lastPrice", position: gaugePosition })
|
|
13693
14249
|
] }),
|
|
@@ -13695,36 +14251,36 @@ function PropertyValuation({
|
|
|
13695
14251
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#4CAF50" }, children: [
|
|
13696
14252
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
13697
14253
|
"< ",
|
|
13698
|
-
|
|
14254
|
+
formatCurrency6(undervaluedThreshold)
|
|
13699
14255
|
] }),
|
|
13700
14256
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13701
14257
|
"(",
|
|
13702
|
-
|
|
14258
|
+
formatMillions(undervaluedThreshold * tokensOutstanding),
|
|
13703
14259
|
")"
|
|
13704
14260
|
] })
|
|
13705
14261
|
] }) }),
|
|
13706
14262
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "var(--color-accent)" }, children: [
|
|
13707
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
14263
|
+
/* @__PURE__ */ jsx("span", { children: formatCurrency6(fairValue) }),
|
|
13708
14264
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13709
14265
|
"(",
|
|
13710
|
-
|
|
14266
|
+
formatMillions(fairValue * tokensOutstanding),
|
|
13711
14267
|
")"
|
|
13712
14268
|
] })
|
|
13713
14269
|
] }) }),
|
|
13714
14270
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#F44336" }, children: [
|
|
13715
14271
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
13716
14272
|
"> ",
|
|
13717
|
-
|
|
14273
|
+
formatCurrency6(overvaluedThreshold)
|
|
13718
14274
|
] }),
|
|
13719
14275
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13720
14276
|
"(",
|
|
13721
|
-
|
|
14277
|
+
formatMillions(overvaluedThreshold * tokensOutstanding),
|
|
13722
14278
|
")"
|
|
13723
14279
|
] })
|
|
13724
14280
|
] }) })
|
|
13725
14281
|
] })
|
|
13726
14282
|
] }),
|
|
13727
|
-
/* @__PURE__ */ jsxs(
|
|
14283
|
+
/* @__PURE__ */ jsxs(HiddenMobileChart, { children: [
|
|
13728
14284
|
/* @__PURE__ */ jsx("h3", { style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
|
|
13729
14285
|
/* @__PURE__ */ jsx(ChartContainer, { children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
|
|
13730
14286
|
axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
|
|
@@ -13843,7 +14399,15 @@ function PropertyValuation({
|
|
|
13843
14399
|
] })
|
|
13844
14400
|
] }) })
|
|
13845
14401
|
] })
|
|
13846
|
-
] })
|
|
14402
|
+
] }),
|
|
14403
|
+
/* @__PURE__ */ jsx("h3", { className: "desktop-only-historical-chart", style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
|
|
14404
|
+
/* @__PURE__ */ jsx(ChartContainer, { className: "desktop-only-historical-chart", children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
|
|
14405
|
+
axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
|
|
14406
|
+
/* @__PURE__ */ jsxs(ValuationSvg, { viewBox: `0 0 ${CHART_WIDTH} ${CHART_HEIGHT}`, preserveAspectRatio: "none", children: [
|
|
14407
|
+
valuationPath ? /* @__PURE__ */ jsx("path", { d: valuationPath, fill: "none", stroke: "#D4AF37", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null,
|
|
14408
|
+
fairValuePath ? /* @__PURE__ */ jsx("path", { d: fairValuePath, fill: "none", stroke: "#FFFFFF", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null
|
|
14409
|
+
] })
|
|
14410
|
+
] }) })
|
|
13847
14411
|
] })
|
|
13848
14412
|
] }),
|
|
13849
14413
|
/* @__PURE__ */ jsxs(RecentSalesSection, { children: [
|
|
@@ -13917,14 +14481,6 @@ function formatMillions(value) {
|
|
|
13917
14481
|
}
|
|
13918
14482
|
return `$${(value / 1e6).toFixed(2)}m`;
|
|
13919
14483
|
}
|
|
13920
|
-
function formatCompact(value) {
|
|
13921
|
-
if (value == null || !Number.isFinite(value)) return "\u2014";
|
|
13922
|
-
const abs = Math.abs(value);
|
|
13923
|
-
if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
|
|
13924
|
-
if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
|
|
13925
|
-
if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
|
|
13926
|
-
return formatCurrency6(value);
|
|
13927
|
-
}
|
|
13928
14484
|
function formatBedroomLabel(bedrooms) {
|
|
13929
14485
|
if (!Number.isFinite(bedrooms)) return "\u2014";
|
|
13930
14486
|
return `${bedrooms} Bed`;
|
|
@@ -14048,6 +14604,12 @@ var GaugePriceTag = styled25.div`
|
|
|
14048
14604
|
color: var(--color-accent);
|
|
14049
14605
|
}
|
|
14050
14606
|
`;
|
|
14607
|
+
var HiddenMobileChart = styled25.div`
|
|
14608
|
+
display: none;
|
|
14609
|
+
@media (max-width: 480px) {
|
|
14610
|
+
display: block;
|
|
14611
|
+
}
|
|
14612
|
+
`;
|
|
14051
14613
|
var ValuationWrapper = styled25.div`
|
|
14052
14614
|
display: flex;
|
|
14053
14615
|
flex-direction: column;
|
|
@@ -14099,10 +14661,9 @@ var PricingModelCard = styled25.div`
|
|
|
14099
14661
|
var PricingModelHeader = styled25.div`
|
|
14100
14662
|
display: flex;
|
|
14101
14663
|
justify-content: space-between;
|
|
14102
|
-
align-items:
|
|
14664
|
+
align-items: center;
|
|
14103
14665
|
margin-bottom: 1.5rem;
|
|
14104
14666
|
gap: 1rem;
|
|
14105
|
-
flex-wrap: wrap;
|
|
14106
14667
|
|
|
14107
14668
|
.valuation-info {
|
|
14108
14669
|
display: flex;
|
|
@@ -14110,7 +14671,6 @@ var PricingModelHeader = styled25.div`
|
|
|
14110
14671
|
gap: 0.25rem;
|
|
14111
14672
|
font-size: 0.85rem;
|
|
14112
14673
|
color: rgba(255, 255, 255, 0.75);
|
|
14113
|
-
flex-shrink: 0;
|
|
14114
14674
|
}
|
|
14115
14675
|
`;
|
|
14116
14676
|
var PricingModelTitle = styled25.h3`
|
|
@@ -14177,31 +14737,15 @@ var ValuationDetails = styled25.div`
|
|
|
14177
14737
|
display: flex;
|
|
14178
14738
|
justify-content: space-between;
|
|
14179
14739
|
margin-top: 1rem;
|
|
14180
|
-
gap: 0.25rem;
|
|
14181
14740
|
`;
|
|
14182
14741
|
var ValuationItem = styled25.div`
|
|
14183
14742
|
display: flex;
|
|
14184
14743
|
flex-direction: column;
|
|
14185
|
-
min-width: 0;
|
|
14186
|
-
overflow: hidden;
|
|
14187
14744
|
`;
|
|
14188
14745
|
var ValuationValue = styled25.div`
|
|
14189
14746
|
font-size: 1rem;
|
|
14190
14747
|
font-weight: 600;
|
|
14191
14748
|
color: #fff;
|
|
14192
|
-
display: flex;
|
|
14193
|
-
flex-direction: column;
|
|
14194
|
-
gap: 2px;
|
|
14195
|
-
overflow-wrap: break-word;
|
|
14196
|
-
word-break: break-word;
|
|
14197
|
-
|
|
14198
|
-
@media (max-width: 480px) {
|
|
14199
|
-
font-size: 0.72rem;
|
|
14200
|
-
|
|
14201
|
-
.valuation-amount-span {
|
|
14202
|
-
display: none;
|
|
14203
|
-
}
|
|
14204
|
-
}
|
|
14205
14749
|
`;
|
|
14206
14750
|
var ChartContainer = styled25.div`
|
|
14207
14751
|
width: 100%;
|
|
@@ -14614,7 +15158,7 @@ var ThumbnailStrip = styled25.div`
|
|
|
14614
15158
|
display: none;
|
|
14615
15159
|
}
|
|
14616
15160
|
`;
|
|
14617
|
-
var
|
|
15161
|
+
var Thumbnail3 = styled25.button`
|
|
14618
15162
|
width: 86px;
|
|
14619
15163
|
height: 64px;
|
|
14620
15164
|
border-radius: 6px;
|
|
@@ -14950,7 +15494,7 @@ function GalleryContent({ galleryImages, startIndex, title, subtitle, onClose })
|
|
|
14950
15494
|
]
|
|
14951
15495
|
}
|
|
14952
15496
|
),
|
|
14953
|
-
/* @__PURE__ */ jsx(ThumbnailStrip, { onClick: (event) => event.stopPropagation(), children: galleryImages.map((image, idx) => /* @__PURE__ */ jsx(
|
|
15497
|
+
/* @__PURE__ */ jsx(ThumbnailStrip, { onClick: (event) => event.stopPropagation(), children: galleryImages.map((image, idx) => /* @__PURE__ */ jsx(Thumbnail3, { $active: idx === currentIndex, onClick: () => setCurrentIndex(idx), "aria-label": `Preview ${image.label}`, children: /* @__PURE__ */ jsx("img", { src: image.src, alt: image.alt }) }, image.alt)) })
|
|
14954
15498
|
]
|
|
14955
15499
|
}
|
|
14956
15500
|
);
|