@loafmarkets/ui 0.1.88 → 0.1.90
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 +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +854 -390
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +856 -392
- 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,7 @@ var Orderbook = React5.forwardRef(
|
|
|
1977
1978
|
onPriceClick,
|
|
1978
1979
|
onLoafLiquidityClick,
|
|
1979
1980
|
tradeExplorerUrl,
|
|
1981
|
+
maxLevels,
|
|
1980
1982
|
className,
|
|
1981
1983
|
...props
|
|
1982
1984
|
}, ref) => {
|
|
@@ -2021,8 +2023,10 @@ var Orderbook = React5.forwardRef(
|
|
|
2021
2023
|
onTabChange?.(next);
|
|
2022
2024
|
};
|
|
2023
2025
|
const isCompact = variant === "compact" || variant === "auto" && viewportCompact;
|
|
2024
|
-
const
|
|
2025
|
-
const
|
|
2026
|
+
const effectiveLevels = maxLevels ?? LEVEL_ROWS_VISIBLE;
|
|
2027
|
+
const effectiveCompactLevels = maxLevels ?? COMPACT_ROWS_VISIBLE;
|
|
2028
|
+
const sectionHeight = isCompact ? effectiveCompactLevels * COMPACT_ROW_HEIGHT_PX : effectiveLevels * DEPTH_ROW_HEIGHT_PX;
|
|
2029
|
+
const rowCount = isCompact ? effectiveCompactLevels : effectiveLevels;
|
|
2026
2030
|
const askVisibleLevels = asks.slice(-rowCount);
|
|
2027
2031
|
const bidVisibleLevels = bids.slice(0, rowCount);
|
|
2028
2032
|
const askCumDepths = new Array(askVisibleLevels.length);
|
|
@@ -2041,7 +2045,8 @@ var Orderbook = React5.forwardRef(
|
|
|
2041
2045
|
bidCumDepths[i] = acc;
|
|
2042
2046
|
}
|
|
2043
2047
|
}
|
|
2044
|
-
const
|
|
2048
|
+
const askMaxCumDepth = Math.max(1, ...askCumDepths);
|
|
2049
|
+
const bidMaxCumDepth = Math.max(1, ...bidCumDepths);
|
|
2045
2050
|
const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
|
|
2046
2051
|
const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
|
|
2047
2052
|
const layoutProps = {
|
|
@@ -2061,7 +2066,8 @@ var Orderbook = React5.forwardRef(
|
|
|
2061
2066
|
bidVisibleLevels,
|
|
2062
2067
|
askCumDepths,
|
|
2063
2068
|
bidCumDepths,
|
|
2064
|
-
|
|
2069
|
+
askMaxCumDepth,
|
|
2070
|
+
bidMaxCumDepth,
|
|
2065
2071
|
midPrice,
|
|
2066
2072
|
midChangePercent,
|
|
2067
2073
|
midClass,
|
|
@@ -2071,14 +2077,16 @@ var Orderbook = React5.forwardRef(
|
|
|
2071
2077
|
isLoading,
|
|
2072
2078
|
seenTradeKeysRef,
|
|
2073
2079
|
tradeExplorerUrl,
|
|
2074
|
-
onPriceClick
|
|
2080
|
+
onPriceClick,
|
|
2081
|
+
levelCount: effectiveLevels,
|
|
2082
|
+
compactLevelCount: effectiveCompactLevels
|
|
2075
2083
|
};
|
|
2076
2084
|
return /* @__PURE__ */ jsx(
|
|
2077
2085
|
Card,
|
|
2078
2086
|
{
|
|
2079
2087
|
ref,
|
|
2080
2088
|
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
|
|
2089
|
+
"w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col",
|
|
2082
2090
|
isCompact && "max-w-none",
|
|
2083
2091
|
className
|
|
2084
2092
|
),
|
|
@@ -2128,7 +2136,8 @@ function DesktopOrderbookLayout({
|
|
|
2128
2136
|
bidVisibleLevels,
|
|
2129
2137
|
askCumDepths,
|
|
2130
2138
|
bidCumDepths,
|
|
2131
|
-
|
|
2139
|
+
askMaxCumDepth,
|
|
2140
|
+
bidMaxCumDepth,
|
|
2132
2141
|
midPrice,
|
|
2133
2142
|
midChangePercent,
|
|
2134
2143
|
midClass,
|
|
@@ -2138,7 +2147,9 @@ function DesktopOrderbookLayout({
|
|
|
2138
2147
|
isLoading,
|
|
2139
2148
|
seenTradeKeysRef,
|
|
2140
2149
|
tradeExplorerUrl,
|
|
2141
|
-
onPriceClick
|
|
2150
|
+
onPriceClick,
|
|
2151
|
+
levelCount: effectiveLevels,
|
|
2152
|
+
compactLevelCount: _compactLevelCount
|
|
2142
2153
|
}) {
|
|
2143
2154
|
const midRef = React5.useRef(null);
|
|
2144
2155
|
useMidPriceFlash(midRef, midPrice, "#0b1a24");
|
|
@@ -2226,7 +2237,7 @@ function DesktopOrderbookLayout({
|
|
|
2226
2237
|
{
|
|
2227
2238
|
className: "max-h-[380px] overflow-y-auto overflow-x-hidden",
|
|
2228
2239
|
style: { scrollbarGutter: "stable" },
|
|
2229
|
-
children: isLoading && tradeFiltered.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
2240
|
+
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
2241
|
const tradeKey = getTradeKey(trade, i);
|
|
2231
2242
|
const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
|
|
2232
2243
|
return /* @__PURE__ */ jsx(
|
|
@@ -2243,20 +2254,20 @@ function DesktopOrderbookLayout({
|
|
|
2243
2254
|
);
|
|
2244
2255
|
}) })
|
|
2245
2256
|
}
|
|
2246
|
-
) : /* @__PURE__ */ jsxs("div", { className: "flex flex-
|
|
2257
|
+
) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-0 overflow-hidden", children: [
|
|
2247
2258
|
/* @__PURE__ */ jsx(
|
|
2248
2259
|
"div",
|
|
2249
2260
|
{
|
|
2250
|
-
className: "flex flex-col justify-end
|
|
2261
|
+
className: "flex flex-col justify-end overflow-hidden flex-shrink-0",
|
|
2251
2262
|
style: { height: `${sectionHeight}px` },
|
|
2252
|
-
children: isLoading ? Array.from({ length:
|
|
2263
|
+
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
2264
|
DepthRow,
|
|
2254
2265
|
{
|
|
2255
2266
|
side: "ask",
|
|
2256
2267
|
price: l.price,
|
|
2257
2268
|
amount: l.amount,
|
|
2258
2269
|
cumDepth: askCumDepths[i],
|
|
2259
|
-
depthPct: askCumDepths[i] /
|
|
2270
|
+
depthPct: askCumDepths[i] / askMaxCumDepth * 100,
|
|
2260
2271
|
precision,
|
|
2261
2272
|
amountPrecision,
|
|
2262
2273
|
hasUserOrder: userAskPrices.has(l.price),
|
|
@@ -2270,7 +2281,7 @@ function DesktopOrderbookLayout({
|
|
|
2270
2281
|
"div",
|
|
2271
2282
|
{
|
|
2272
2283
|
ref: midRef,
|
|
2273
|
-
className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2",
|
|
2284
|
+
className: "grid grid-cols-2 items-center gap-3 bg-[#0b1a24] px-3 py-2 flex-shrink-0",
|
|
2274
2285
|
children: [
|
|
2275
2286
|
/* @__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
2287
|
"$",
|
|
@@ -2288,16 +2299,16 @@ function DesktopOrderbookLayout({
|
|
|
2288
2299
|
/* @__PURE__ */ jsx(
|
|
2289
2300
|
"div",
|
|
2290
2301
|
{
|
|
2291
|
-
className: "
|
|
2302
|
+
className: "flex flex-col overflow-hidden flex-shrink-0",
|
|
2292
2303
|
style: { height: `${sectionHeight}px` },
|
|
2293
|
-
children: isLoading ? Array.from({ length:
|
|
2304
|
+
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
2305
|
DepthRow,
|
|
2295
2306
|
{
|
|
2296
2307
|
side: "bid",
|
|
2297
2308
|
price: l.price,
|
|
2298
2309
|
amount: l.amount,
|
|
2299
2310
|
cumDepth: bidCumDepths[i],
|
|
2300
|
-
depthPct: bidCumDepths[i] /
|
|
2311
|
+
depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
|
|
2301
2312
|
precision,
|
|
2302
2313
|
amountPrecision,
|
|
2303
2314
|
hasUserOrder: userBidPrices.has(l.price),
|
|
@@ -2326,7 +2337,8 @@ function MobileOrderbookLayout({
|
|
|
2326
2337
|
bidVisibleLevels: visibleBids,
|
|
2327
2338
|
askCumDepths,
|
|
2328
2339
|
bidCumDepths,
|
|
2329
|
-
|
|
2340
|
+
askMaxCumDepth,
|
|
2341
|
+
bidMaxCumDepth,
|
|
2330
2342
|
midPrice,
|
|
2331
2343
|
midChangePercent,
|
|
2332
2344
|
midClass,
|
|
@@ -2336,7 +2348,9 @@ function MobileOrderbookLayout({
|
|
|
2336
2348
|
isLoading,
|
|
2337
2349
|
seenTradeKeysRef,
|
|
2338
2350
|
tradeExplorerUrl,
|
|
2339
|
-
onPriceClick
|
|
2351
|
+
onPriceClick,
|
|
2352
|
+
levelCount: _levelCount,
|
|
2353
|
+
compactLevelCount: effectiveCompactLevels
|
|
2340
2354
|
}) {
|
|
2341
2355
|
const midRef = React5.useRef(null);
|
|
2342
2356
|
useMidPriceFlash(midRef, midPrice, "transparent");
|
|
@@ -2408,13 +2422,13 @@ function MobileOrderbookLayout({
|
|
|
2408
2422
|
]
|
|
2409
2423
|
}
|
|
2410
2424
|
),
|
|
2411
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length:
|
|
2425
|
+
/* @__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
2426
|
MobileDepthRow,
|
|
2413
2427
|
{
|
|
2414
2428
|
side: "ask",
|
|
2415
2429
|
price: l.price,
|
|
2416
2430
|
amount: l.amount,
|
|
2417
|
-
depthPct: askCumDepths[i] /
|
|
2431
|
+
depthPct: askCumDepths[i] / askMaxCumDepth * 100,
|
|
2418
2432
|
precision,
|
|
2419
2433
|
amountPrecision,
|
|
2420
2434
|
hasUserOrder: userAskPrices.has(l.price),
|
|
@@ -2455,13 +2469,13 @@ function MobileOrderbookLayout({
|
|
|
2455
2469
|
]
|
|
2456
2470
|
}
|
|
2457
2471
|
),
|
|
2458
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: isLoading ? Array.from({ length:
|
|
2472
|
+
/* @__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
2473
|
MobileDepthRow,
|
|
2460
2474
|
{
|
|
2461
2475
|
side: "bid",
|
|
2462
2476
|
price: l.price,
|
|
2463
2477
|
amount: l.amount,
|
|
2464
|
-
depthPct: bidCumDepths[i] /
|
|
2478
|
+
depthPct: bidCumDepths[i] / bidMaxCumDepth * 100,
|
|
2465
2479
|
precision,
|
|
2466
2480
|
amountPrecision,
|
|
2467
2481
|
hasUserOrder: userBidPrices.has(l.price),
|
|
@@ -2481,7 +2495,7 @@ function MobileOrderbookLayout({
|
|
|
2481
2495
|
]
|
|
2482
2496
|
}
|
|
2483
2497
|
),
|
|
2484
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: isLoading && tradeFiltered.length === 0 ? Array.from({ length:
|
|
2498
|
+
/* @__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
2499
|
const tradeKey = getTradeKey(trade, i);
|
|
2486
2500
|
const explorerUrl = trade.txHash && tradeExplorerUrl ? tradeExplorerUrl(trade.txHash) : trade.txHash ? `https://sepolia.etherscan.io/tx/${trade.txHash}` : void 0;
|
|
2487
2501
|
return /* @__PURE__ */ jsx(
|
|
@@ -2521,7 +2535,8 @@ function MobileDepthRow({
|
|
|
2521
2535
|
style: {
|
|
2522
2536
|
display: "grid",
|
|
2523
2537
|
gridTemplateColumns: "1.2fr 0.8fr",
|
|
2524
|
-
|
|
2538
|
+
height: `${COMPACT_ROW_HEIGHT_PX}px`,
|
|
2539
|
+
alignItems: "center",
|
|
2525
2540
|
fontSize: "0.8rem",
|
|
2526
2541
|
position: "relative",
|
|
2527
2542
|
cursor: onPriceClick ? "pointer" : void 0
|
|
@@ -2664,7 +2679,7 @@ var PropertyTour = React5.forwardRef(
|
|
|
2664
2679
|
}
|
|
2665
2680
|
);
|
|
2666
2681
|
PropertyTour.displayName = "PropertyTour";
|
|
2667
|
-
var ITEMS_PER_PAGE =
|
|
2682
|
+
var ITEMS_PER_PAGE = 6;
|
|
2668
2683
|
var ensureAnimationsInjected = () => {
|
|
2669
2684
|
if (typeof document === "undefined") return;
|
|
2670
2685
|
if (document.getElementById("property-news-updates-animations")) return;
|
|
@@ -2709,6 +2724,21 @@ var formatDate = (value) => {
|
|
|
2709
2724
|
if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
|
|
2710
2725
|
return value.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
2711
2726
|
};
|
|
2727
|
+
var formatDateShort = (value) => {
|
|
2728
|
+
const d = typeof value === "string" ? new Date(value) : value;
|
|
2729
|
+
if (!(d instanceof Date) || Number.isNaN(d.getTime())) {
|
|
2730
|
+
if (typeof value === "string") {
|
|
2731
|
+
return value.replace(/\s*\d{4}\s*$/, "");
|
|
2732
|
+
}
|
|
2733
|
+
return "";
|
|
2734
|
+
}
|
|
2735
|
+
const diffMs = Date.now() - d.getTime();
|
|
2736
|
+
const diffS = diffMs / 1e3;
|
|
2737
|
+
if (diffS < 60) return "Just now";
|
|
2738
|
+
if (diffS < 3600) return `${Math.floor(diffS / 60)}m ago`;
|
|
2739
|
+
if (diffS < 86400) return `${Math.floor(diffS / 3600)}h ago`;
|
|
2740
|
+
return d.toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
2741
|
+
};
|
|
2712
2742
|
var formatTimeAgo = (timestamp) => {
|
|
2713
2743
|
const diff = (Date.now() - new Date(timestamp).getTime()) / 1e3;
|
|
2714
2744
|
if (diff < 60) return `${Math.floor(diff)}s ago`;
|
|
@@ -2719,7 +2749,7 @@ function getSentimentInfo(score) {
|
|
|
2719
2749
|
if (score == null) return null;
|
|
2720
2750
|
if (score > 0.15) return { arrow: "\u25B2", label: "Bullish", color: "#0ecb81" };
|
|
2721
2751
|
if (score < -0.15) return { arrow: "\u25BC", label: "Bearish", color: "#f6465d" };
|
|
2722
|
-
return { arrow: "
|
|
2752
|
+
return { arrow: "", label: "Neutral", color: "#848e9c" };
|
|
2723
2753
|
}
|
|
2724
2754
|
function NewsArticleModal({ item, onClose }) {
|
|
2725
2755
|
const sentimentInfo = getSentimentInfo(item.sentimentScore);
|
|
@@ -2801,8 +2831,7 @@ function NewsArticleModal({ item, onClose }) {
|
|
|
2801
2831
|
border: `1px solid ${sentimentInfo.color}40`
|
|
2802
2832
|
},
|
|
2803
2833
|
children: [
|
|
2804
|
-
sentimentInfo.arrow,
|
|
2805
|
-
" ",
|
|
2834
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
2806
2835
|
sentimentInfo.label
|
|
2807
2836
|
]
|
|
2808
2837
|
}
|
|
@@ -2842,7 +2871,35 @@ function NewsArticleModal({ item, onClose }) {
|
|
|
2842
2871
|
)
|
|
2843
2872
|
] }),
|
|
2844
2873
|
/* @__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." })
|
|
2874
|
+
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." }),
|
|
2875
|
+
item.url && /* @__PURE__ */ jsx("div", { style: { marginTop: "1.25rem", paddingTop: "1rem", borderTop: "1px solid rgba(255,255,255,0.08)" }, children: /* @__PURE__ */ jsxs(
|
|
2876
|
+
"a",
|
|
2877
|
+
{
|
|
2878
|
+
href: item.url,
|
|
2879
|
+
target: "_blank",
|
|
2880
|
+
rel: "noopener noreferrer",
|
|
2881
|
+
style: {
|
|
2882
|
+
display: "inline-flex",
|
|
2883
|
+
alignItems: "center",
|
|
2884
|
+
gap: "0.4rem",
|
|
2885
|
+
fontSize: "0.8rem",
|
|
2886
|
+
fontWeight: 600,
|
|
2887
|
+
color: "var(--color-accent, #f0b90b)",
|
|
2888
|
+
textDecoration: "none",
|
|
2889
|
+
transition: "opacity 0.15s"
|
|
2890
|
+
},
|
|
2891
|
+
onMouseEnter: (e) => {
|
|
2892
|
+
e.currentTarget.style.opacity = "0.8";
|
|
2893
|
+
},
|
|
2894
|
+
onMouseLeave: (e) => {
|
|
2895
|
+
e.currentTarget.style.opacity = "1";
|
|
2896
|
+
},
|
|
2897
|
+
children: [
|
|
2898
|
+
"Read full article",
|
|
2899
|
+
/* @__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" }) })
|
|
2900
|
+
]
|
|
2901
|
+
}
|
|
2902
|
+
) })
|
|
2846
2903
|
]
|
|
2847
2904
|
}
|
|
2848
2905
|
)
|
|
@@ -2912,10 +2969,10 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2912
2969
|
children: [
|
|
2913
2970
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2914
2971
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
2915
|
-
isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "
|
|
2972
|
+
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" }) }),
|
|
2916
2973
|
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" } }),
|
|
2917
2974
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2918
|
-
/* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", children: resolvedHeading }),
|
|
2975
|
+
/* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", style: { margin: 0 }, children: resolvedHeading }),
|
|
2919
2976
|
subheading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-white/60", children: subheading }) : null
|
|
2920
2977
|
] })
|
|
2921
2978
|
] }),
|
|
@@ -2930,7 +2987,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2930
2987
|
"LIVE"
|
|
2931
2988
|
] }) : null
|
|
2932
2989
|
] }),
|
|
2933
|
-
isHomeVariant && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap:
|
|
2990
|
+
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(
|
|
2934
2991
|
"button",
|
|
2935
2992
|
{
|
|
2936
2993
|
type: "button",
|
|
@@ -2939,7 +2996,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2939
2996
|
background: "transparent",
|
|
2940
2997
|
border: "none",
|
|
2941
2998
|
borderBottom: homeTab === tab ? "2px solid var(--color-accent, #f0b90b)" : "2px solid transparent",
|
|
2942
|
-
padding: "0.5rem 0
|
|
2999
|
+
padding: "0 0 0.5rem 0",
|
|
3000
|
+
marginBottom: "-1px",
|
|
2943
3001
|
fontSize: "0.75rem",
|
|
2944
3002
|
fontWeight: homeTab === tab ? 600 : 400,
|
|
2945
3003
|
color: homeTab === tab ? "var(--color-text, #fff)" : "var(--color-text-secondary, #848e9c)",
|
|
@@ -2953,7 +3011,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2953
3011
|
/* @__PURE__ */ jsx(
|
|
2954
3012
|
"div",
|
|
2955
3013
|
{
|
|
2956
|
-
className: "
|
|
3014
|
+
className: cn("flex flex-1 flex-col overflow-hidden", isHomeVariant ? "mt-2 gap-0" : "mt-4 gap-3"),
|
|
2957
3015
|
style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
|
|
2958
3016
|
children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
|
|
2959
3017
|
const maxAmount = 6e4;
|
|
@@ -2992,7 +3050,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
2992
3050
|
style: {
|
|
2993
3051
|
width: "100%",
|
|
2994
3052
|
textAlign: "left",
|
|
2995
|
-
|
|
3053
|
+
backgroundColor: "transparent",
|
|
2996
3054
|
border: "none",
|
|
2997
3055
|
cursor: "pointer",
|
|
2998
3056
|
padding: "0.75rem 0",
|
|
@@ -3001,18 +3059,28 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3001
3059
|
justifyContent: "space-between",
|
|
3002
3060
|
alignItems: "flex-start",
|
|
3003
3061
|
gap: "0.5rem",
|
|
3004
|
-
color: "inherit"
|
|
3062
|
+
color: "inherit",
|
|
3063
|
+
transition: "background-color 0.15s"
|
|
3064
|
+
},
|
|
3065
|
+
onMouseEnter: (e) => {
|
|
3066
|
+
e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.04)";
|
|
3067
|
+
const title = e.currentTarget.querySelector("h3");
|
|
3068
|
+
if (title) title.style.color = "var(--color-accent, #E6C87E)";
|
|
3069
|
+
},
|
|
3070
|
+
onMouseLeave: (e) => {
|
|
3071
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
3072
|
+
const title = e.currentTarget.querySelector("h3");
|
|
3073
|
+
if (title) title.style.color = "#f8f9fa";
|
|
3005
3074
|
},
|
|
3006
3075
|
children: [
|
|
3007
3076
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
3008
|
-
/* @__PURE__ */ jsx("h3", { style: { fontSize: "0.
|
|
3077
|
+
/* @__PURE__ */ jsx("h3", { style: { fontSize: "0.95rem", fontWeight: 500, marginBottom: "0.35rem", color: "#f8f9fa", lineHeight: 1.45, transition: "color 0.15s" }, children: item.title }),
|
|
3009
3078
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
|
|
3010
|
-
/* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children:
|
|
3079
|
+
/* @__PURE__ */ jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: formatDateShort(item.date) }),
|
|
3011
3080
|
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 }),
|
|
3012
3081
|
/* @__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" }),
|
|
3013
3082
|
sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 600, color: sentimentInfo.color }, children: [
|
|
3014
|
-
sentimentInfo.arrow,
|
|
3015
|
-
" ",
|
|
3083
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
3016
3084
|
sentimentInfo.label
|
|
3017
3085
|
] })
|
|
3018
3086
|
] })
|
|
@@ -3069,8 +3137,7 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3069
3137
|
] }),
|
|
3070
3138
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "0.3rem", flexShrink: 0 }, children: [
|
|
3071
3139
|
sentimentInfo && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.65rem", fontWeight: 700, color: sentimentInfo.color, whiteSpace: "nowrap" }, children: [
|
|
3072
|
-
sentimentInfo.arrow,
|
|
3073
|
-
" ",
|
|
3140
|
+
sentimentInfo.arrow ? `${sentimentInfo.arrow} ` : "",
|
|
3074
3141
|
sentimentInfo.label
|
|
3075
3142
|
] }),
|
|
3076
3143
|
/* @__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" })
|
|
@@ -3095,8 +3162,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3095
3162
|
type: "button",
|
|
3096
3163
|
onClick: () => setHomePage((p) => Math.max(0, p - 1)),
|
|
3097
3164
|
disabled: homePage === 0,
|
|
3098
|
-
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "
|
|
3099
|
-
children: "
|
|
3165
|
+
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)" },
|
|
3166
|
+
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" }) })
|
|
3100
3167
|
}
|
|
3101
3168
|
),
|
|
3102
3169
|
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.7rem", color: "rgba(255,255,255,0.5)" }, children: [
|
|
@@ -3110,8 +3177,8 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3110
3177
|
type: "button",
|
|
3111
3178
|
onClick: () => setHomePage((p) => Math.min(homeTotalPages - 1, p + 1)),
|
|
3112
3179
|
disabled: homePage >= homeTotalPages - 1,
|
|
3113
|
-
style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "
|
|
3114
|
-
children: "
|
|
3180
|
+
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)" },
|
|
3181
|
+
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" }) })
|
|
3115
3182
|
}
|
|
3116
3183
|
)
|
|
3117
3184
|
] }),
|
|
@@ -3122,8 +3189,9 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3122
3189
|
type: "button",
|
|
3123
3190
|
onClick: () => setPage((p) => Math.max(0, p - 1)),
|
|
3124
3191
|
disabled: page === 0,
|
|
3125
|
-
className: cn("rounded-full border border-white/15
|
|
3126
|
-
|
|
3192
|
+
className: cn("rounded-full border border-white/15 flex items-center justify-center", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
|
|
3193
|
+
style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
|
|
3194
|
+
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" }) })
|
|
3127
3195
|
}
|
|
3128
3196
|
),
|
|
3129
3197
|
/* @__PURE__ */ jsxs("span", { className: "font-medium text-white/70", children: [
|
|
@@ -3138,8 +3206,9 @@ var PropertyNewsUpdates = React5.forwardRef(
|
|
|
3138
3206
|
type: "button",
|
|
3139
3207
|
onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
|
|
3140
3208
|
disabled: page >= totalPages - 1,
|
|
3141
|
-
className: cn("rounded-full border border-white/15
|
|
3142
|
-
|
|
3209
|
+
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"),
|
|
3210
|
+
style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
|
|
3211
|
+
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" }) })
|
|
3143
3212
|
}
|
|
3144
3213
|
)
|
|
3145
3214
|
] }),
|
|
@@ -4642,14 +4711,16 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4642
4711
|
imageUrl,
|
|
4643
4712
|
imageAlt,
|
|
4644
4713
|
name,
|
|
4714
|
+
address,
|
|
4645
4715
|
location,
|
|
4646
4716
|
price,
|
|
4647
4717
|
currencySymbol = "$",
|
|
4648
4718
|
changePercent,
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4719
|
+
priceChange,
|
|
4720
|
+
beds: _beds,
|
|
4721
|
+
baths: _baths,
|
|
4722
|
+
cars: _cars,
|
|
4723
|
+
propertyTypeLabel: _propertyTypeLabel,
|
|
4653
4724
|
onTrade,
|
|
4654
4725
|
onMakeOffer,
|
|
4655
4726
|
tradeButtonLabel = "Trade",
|
|
@@ -4665,7 +4736,6 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4665
4736
|
const tradeHoverColor = "#f5dd9a";
|
|
4666
4737
|
const [isTradeInteracting, setIsTradeInteracting] = React5.useState(false);
|
|
4667
4738
|
const [isOfferInteracting, setIsOfferInteracting] = React5.useState(false);
|
|
4668
|
-
const hasAmenities = isLoading || beds != null || baths != null || cars != null || propertyTypeLabel != null;
|
|
4669
4739
|
const isTradeDisabled = !onTrade;
|
|
4670
4740
|
const isMakeOfferButtonDisabled = makeOfferDisabled || !onMakeOffer;
|
|
4671
4741
|
const showMakeOfferButton = !hideMakeOfferButton;
|
|
@@ -4678,201 +4748,112 @@ var PropertyHeroHeader = React5.forwardRef(
|
|
|
4678
4748
|
setIsOfferInteracting(state);
|
|
4679
4749
|
};
|
|
4680
4750
|
const headingStyle = {
|
|
4681
|
-
fontSize: "clamp(1.
|
|
4682
|
-
marginBottom: "0
|
|
4751
|
+
fontSize: "clamp(1.3rem, 3vw, 1.8rem)",
|
|
4752
|
+
marginBottom: "0",
|
|
4683
4753
|
color: "#ffffff",
|
|
4684
4754
|
textShadow: "0 2px 4px rgba(0, 0, 0, 0.3)",
|
|
4685
4755
|
fontWeight: 600,
|
|
4686
4756
|
lineHeight: 1.2
|
|
4687
4757
|
};
|
|
4688
|
-
return /* @__PURE__ */
|
|
4689
|
-
/* @__PURE__ */
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
statusBadge ? /* @__PURE__ */
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
/* @__PURE__ */ jsx(
|
|
4702
|
-
|
|
4703
|
-
/* @__PURE__ */ jsxs(
|
|
4704
|
-
/* @__PURE__ */ jsxs("div", {
|
|
4705
|
-
/* @__PURE__ */
|
|
4706
|
-
|
|
4707
|
-
/* @__PURE__ */ jsx(
|
|
4708
|
-
isLoading ? /* @__PURE__ */ jsx(PriceBlock, { children: /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 18 }) }) : price == null ? null : /* @__PURE__ */ jsxs(PriceBlock, { children: [
|
|
4709
|
-
formatPrice3(price, currencySymbol),
|
|
4710
|
-
changePercent == null ? null : /* @__PURE__ */ jsxs(
|
|
4711
|
-
"span",
|
|
4712
|
-
{
|
|
4713
|
-
className: cn(
|
|
4714
|
-
"ml-2 flex items-center text-[0.875rem] font-medium",
|
|
4715
|
-
isPositive ? "text-[#0ecb81]" : "text-[#f6465d]"
|
|
4716
|
-
),
|
|
4717
|
-
children: [
|
|
4718
|
-
/* @__PURE__ */ jsx(
|
|
4719
|
-
"svg",
|
|
4720
|
-
{
|
|
4721
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4722
|
-
width: "12",
|
|
4723
|
-
height: "12",
|
|
4724
|
-
viewBox: "0 0 24 24",
|
|
4725
|
-
fill: "currentColor",
|
|
4726
|
-
className: "mr-[0.15rem]",
|
|
4727
|
-
children: /* @__PURE__ */ jsx("path", { d: isPositive ? "M7 14l5-5 5 5H7z" : "M7 10l5 5 5-5H7z" })
|
|
4728
|
-
}
|
|
4729
|
-
),
|
|
4730
|
-
Math.abs(changePercent).toFixed(2),
|
|
4731
|
-
"%"
|
|
4732
|
-
]
|
|
4733
|
-
}
|
|
4734
|
-
)
|
|
4735
|
-
] })
|
|
4736
|
-
] })
|
|
4737
|
-
] }),
|
|
4738
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-6 text-[0.95rem] text-white/90 max-[768px]:hidden", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4739
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4740
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4741
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 52, height: 14 })
|
|
4742
|
-
] }),
|
|
4743
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4744
|
-
/* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4745
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 56, height: 14 })
|
|
4746
|
-
] }),
|
|
4747
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4748
|
-
/* @__PURE__ */ jsx(CarFront, { className: "mr-2 h-[18px] w-[18px] opacity-60" }),
|
|
4749
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 50, height: 14 })
|
|
4750
|
-
] }),
|
|
4751
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 60, height: 14 })
|
|
4752
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4753
|
-
beds == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4754
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "mr-2 h-[18px] w-[18px]" }),
|
|
4755
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4756
|
-
beds,
|
|
4757
|
-
" Beds"
|
|
4758
|
-
] })
|
|
4759
|
-
] }),
|
|
4760
|
-
baths == null ? null : /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
4761
|
-
/* @__PURE__ */ jsx(Bath, { className: "mr-2 h-[18px] w-[18px]" }),
|
|
4762
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4763
|
-
baths,
|
|
4764
|
-
" Baths"
|
|
4765
|
-
] })
|
|
4758
|
+
return /* @__PURE__ */ jsx(OuterWrapper, { ref, className: cn(className), ...props, children: /* @__PURE__ */ jsxs(HeroContainer, { children: [
|
|
4759
|
+
/* @__PURE__ */ jsx(
|
|
4760
|
+
HeroImage,
|
|
4761
|
+
{
|
|
4762
|
+
src: imageUrl,
|
|
4763
|
+
alt: imageAlt ?? name
|
|
4764
|
+
}
|
|
4765
|
+
),
|
|
4766
|
+
statusBadge ? /* @__PURE__ */ jsxs(StatusBadge, { $isLive: statusBadge.variant === "live", children: [
|
|
4767
|
+
statusBadge.variant === "live" ? /* @__PURE__ */ jsx(PulsingDot, {}) : null,
|
|
4768
|
+
statusBadge.label
|
|
4769
|
+
] }) : null,
|
|
4770
|
+
/* @__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: [
|
|
4771
|
+
/* @__PURE__ */ jsx(InfoCard, { children: /* @__PURE__ */ jsxs(CardLayout, { children: [
|
|
4772
|
+
/* @__PURE__ */ jsx(Thumbnail, { src: imageUrl, alt: imageAlt ?? name }),
|
|
4773
|
+
/* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsxs(InfoRow, { children: [
|
|
4774
|
+
/* @__PURE__ */ jsx(NameGroup, { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
4775
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem", flexWrap: "wrap" }, children: [
|
|
4776
|
+
/* @__PURE__ */ jsx("h1", { style: headingStyle, className: "break-words", children: name }),
|
|
4777
|
+
location ? /* @__PURE__ */ jsx(TypeBadge, { children: location }) : null
|
|
4766
4778
|
] }),
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4779
|
+
address ? /* @__PURE__ */ jsx(AddressText, { children: address }) : null
|
|
4780
|
+
] }) }),
|
|
4781
|
+
/* @__PURE__ */ jsxs(PriceGroup, { children: [
|
|
4782
|
+
isLoading ? /* @__PURE__ */ jsx(Skeleton, { width: 110, height: 24 }) : price == null ? null : /* @__PURE__ */ jsxs(PriceRow, { children: [
|
|
4783
|
+
/* @__PURE__ */ jsx(CurrencyLabel, { children: "USD" }),
|
|
4784
|
+
changePercent != null ? /* @__PURE__ */ jsx(PriceArrow, { $isPositive: isPositive, children: isPositive ? "\u25B2" : "\u25BC" }) : null,
|
|
4785
|
+
formatPrice3(price, "")
|
|
4773
4786
|
] }),
|
|
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
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
] })
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 44, height: 12 })
|
|
4845
|
-
] }),
|
|
4846
|
-
/* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4847
|
-
/* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4 opacity-60" }),
|
|
4848
|
-
/* @__PURE__ */ jsx(Skeleton, { width: 42, height: 12 })
|
|
4849
|
-
] }),
|
|
4850
|
-
/* @__PURE__ */ jsx(MobileAmenity, { children: /* @__PURE__ */ jsx(Skeleton, { width: 52, height: 12 }) })
|
|
4851
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4852
|
-
beds == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4853
|
-
/* @__PURE__ */ jsx(BedDouble, { className: "h-4 w-4" }),
|
|
4854
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4855
|
-
beds,
|
|
4856
|
-
" Beds"
|
|
4857
|
-
] })
|
|
4858
|
-
] }),
|
|
4859
|
-
baths == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4860
|
-
/* @__PURE__ */ jsx(Bath, { className: "h-4 w-4" }),
|
|
4861
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4862
|
-
baths,
|
|
4863
|
-
" Baths"
|
|
4864
|
-
] })
|
|
4865
|
-
] }),
|
|
4866
|
-
cars == null ? null : /* @__PURE__ */ jsxs(MobileAmenity, { children: [
|
|
4867
|
-
/* @__PURE__ */ jsx(CarFront, { className: "h-4 w-4" }),
|
|
4868
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4869
|
-
cars,
|
|
4870
|
-
" Cars"
|
|
4871
|
-
] })
|
|
4872
|
-
] }),
|
|
4873
|
-
propertyTypeLabel == null ? null : /* @__PURE__ */ jsx(MobileAmenity, { children: propertyTypeLabel })
|
|
4874
|
-
] }) }) : null
|
|
4875
|
-
] });
|
|
4787
|
+
changePercent != null ? /* @__PURE__ */ jsxs(PriceChangeRow, { $isPositive: isPositive, children: [
|
|
4788
|
+
priceChange != null ? `${isPositive ? "+" : ""}${priceChange.toFixed(2)} ` : null,
|
|
4789
|
+
"(",
|
|
4790
|
+
isPositive ? "+" : "",
|
|
4791
|
+
Math.abs(changePercent).toFixed(2),
|
|
4792
|
+
"%)"
|
|
4793
|
+
] }) : null
|
|
4794
|
+
] })
|
|
4795
|
+
] }) })
|
|
4796
|
+
] }) }),
|
|
4797
|
+
/* @__PURE__ */ jsxs(ActionButtons, { children: [
|
|
4798
|
+
/* @__PURE__ */ jsx(
|
|
4799
|
+
"button",
|
|
4800
|
+
{
|
|
4801
|
+
type: "button",
|
|
4802
|
+
onClick: isTradeDisabled ? void 0 : onTrade,
|
|
4803
|
+
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]",
|
|
4804
|
+
style: {
|
|
4805
|
+
backgroundColor: isTradeInteracting ? tradeHoverColor : accentColor,
|
|
4806
|
+
color: "black",
|
|
4807
|
+
padding: "0.75rem 1.5rem",
|
|
4808
|
+
borderColor: isTradeInteracting ? accentColor : "transparent",
|
|
4809
|
+
boxShadow: isTradeInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
|
|
4810
|
+
opacity: isTradeDisabled ? 0.5 : 1,
|
|
4811
|
+
cursor: isTradeDisabled ? "not-allowed" : "pointer"
|
|
4812
|
+
},
|
|
4813
|
+
onMouseEnter: () => setTradeInteraction(true),
|
|
4814
|
+
onMouseLeave: () => setTradeInteraction(false),
|
|
4815
|
+
onMouseDown: () => setTradeInteraction(true),
|
|
4816
|
+
onMouseUp: () => setTradeInteraction(false),
|
|
4817
|
+
onFocus: () => setTradeInteraction(true),
|
|
4818
|
+
onBlur: () => setTradeInteraction(false),
|
|
4819
|
+
onTouchStart: () => setTradeInteraction(true),
|
|
4820
|
+
onTouchEnd: () => setTradeInteraction(false),
|
|
4821
|
+
disabled: isTradeDisabled,
|
|
4822
|
+
"aria-disabled": isTradeDisabled,
|
|
4823
|
+
children: tradeButtonLabel
|
|
4824
|
+
}
|
|
4825
|
+
),
|
|
4826
|
+
showMakeOfferButton ? /* @__PURE__ */ jsx(
|
|
4827
|
+
"button",
|
|
4828
|
+
{
|
|
4829
|
+
type: "button",
|
|
4830
|
+
onClick: isMakeOfferButtonDisabled ? void 0 : onMakeOffer,
|
|
4831
|
+
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]",
|
|
4832
|
+
style: {
|
|
4833
|
+
backgroundColor: isOfferInteracting ? accentColor : "transparent",
|
|
4834
|
+
borderColor: accentColor,
|
|
4835
|
+
color: isOfferInteracting ? "black" : accentColor,
|
|
4836
|
+
padding: "0.75rem 1.5rem",
|
|
4837
|
+
boxShadow: isOfferInteracting ? `0 0 0 2px rgba(0,0,0,0.4), 0 0 0 4px ${accentColor}` : "none",
|
|
4838
|
+
opacity: isMakeOfferButtonDisabled ? 0.5 : 1,
|
|
4839
|
+
cursor: isMakeOfferButtonDisabled ? "not-allowed" : "pointer"
|
|
4840
|
+
},
|
|
4841
|
+
onMouseEnter: () => setOfferInteraction(true),
|
|
4842
|
+
onMouseLeave: () => setOfferInteraction(false),
|
|
4843
|
+
onMouseDown: () => setOfferInteraction(true),
|
|
4844
|
+
onMouseUp: () => setOfferInteraction(false),
|
|
4845
|
+
onFocus: () => setOfferInteraction(true),
|
|
4846
|
+
onBlur: () => setOfferInteraction(false),
|
|
4847
|
+
onTouchStart: () => setOfferInteraction(true),
|
|
4848
|
+
onTouchEnd: () => setOfferInteraction(false),
|
|
4849
|
+
disabled: isMakeOfferButtonDisabled,
|
|
4850
|
+
"aria-disabled": isMakeOfferButtonDisabled,
|
|
4851
|
+
children: makeOfferButtonLabel
|
|
4852
|
+
}
|
|
4853
|
+
) : null
|
|
4854
|
+
] })
|
|
4855
|
+
] }) })
|
|
4856
|
+
] }) });
|
|
4876
4857
|
}
|
|
4877
4858
|
);
|
|
4878
4859
|
PropertyHeroHeader.displayName = "PropertyHeroHeader";
|
|
@@ -4915,32 +4896,6 @@ var HeroContainer = styled25.div`
|
|
|
4915
4896
|
border-radius: 6px;
|
|
4916
4897
|
}
|
|
4917
4898
|
`;
|
|
4918
|
-
var MobileAmenities = styled25.div`
|
|
4919
|
-
display: none;
|
|
4920
|
-
align-items: center;
|
|
4921
|
-
justify-content: space-between;
|
|
4922
|
-
gap: 0.5rem;
|
|
4923
|
-
padding: 0.5rem 0.75rem;
|
|
4924
|
-
background: rgba(8, 8, 12, 0.85);
|
|
4925
|
-
border-radius: 12px;
|
|
4926
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
4927
|
-
color: rgba(255, 255, 255, 0.85);
|
|
4928
|
-
font-size: 0.85rem;
|
|
4929
|
-
|
|
4930
|
-
@media (max-width: 768px) {
|
|
4931
|
-
display: flex;
|
|
4932
|
-
flex-wrap: wrap;
|
|
4933
|
-
}
|
|
4934
|
-
`;
|
|
4935
|
-
var MobileAmenity = styled25.span`
|
|
4936
|
-
display: inline-flex;
|
|
4937
|
-
align-items: center;
|
|
4938
|
-
gap: 0.35rem;
|
|
4939
|
-
padding: 0.35rem 0.5rem;
|
|
4940
|
-
border-radius: 999px;
|
|
4941
|
-
background: rgba(255, 255, 255, 0.08);
|
|
4942
|
-
font-weight: 500;
|
|
4943
|
-
`;
|
|
4944
4899
|
var HeroImage = styled25.img`
|
|
4945
4900
|
width: 100%;
|
|
4946
4901
|
height: 100%;
|
|
@@ -4955,15 +4910,6 @@ var HeroImage = styled25.img`
|
|
|
4955
4910
|
transform: scale(1.0);
|
|
4956
4911
|
transform-origin: center;
|
|
4957
4912
|
`;
|
|
4958
|
-
var HeroGradient = styled25.div`
|
|
4959
|
-
position: absolute;
|
|
4960
|
-
bottom: 0;
|
|
4961
|
-
left: 0;
|
|
4962
|
-
right: 0;
|
|
4963
|
-
width: 100%;
|
|
4964
|
-
z-index: 1;
|
|
4965
|
-
background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
|
|
4966
|
-
`;
|
|
4967
4913
|
var ActionButtons = styled25.div`
|
|
4968
4914
|
display: flex;
|
|
4969
4915
|
flex-wrap: wrap;
|
|
@@ -4979,13 +4925,42 @@ var ActionButtons = styled25.div`
|
|
|
4979
4925
|
display: none;
|
|
4980
4926
|
}
|
|
4981
4927
|
`;
|
|
4928
|
+
var CardLayout = styled25.div`
|
|
4929
|
+
display: flex;
|
|
4930
|
+
align-items: center;
|
|
4931
|
+
gap: 1rem;
|
|
4932
|
+
|
|
4933
|
+
@media (max-width: 480px) {
|
|
4934
|
+
gap: 0.75rem;
|
|
4935
|
+
}
|
|
4936
|
+
`;
|
|
4937
|
+
var Thumbnail = styled25.img`
|
|
4938
|
+
width: 72px;
|
|
4939
|
+
height: 72px;
|
|
4940
|
+
border-radius: 8px;
|
|
4941
|
+
object-fit: cover;
|
|
4942
|
+
flex-shrink: 0;
|
|
4943
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
4944
|
+
|
|
4945
|
+
@media (max-width: 768px) {
|
|
4946
|
+
width: 56px;
|
|
4947
|
+
height: 56px;
|
|
4948
|
+
border-radius: 6px;
|
|
4949
|
+
}
|
|
4950
|
+
|
|
4951
|
+
@media (max-width: 480px) {
|
|
4952
|
+
width: 48px;
|
|
4953
|
+
height: 48px;
|
|
4954
|
+
}
|
|
4955
|
+
`;
|
|
4956
|
+
var CardContent2 = styled25.div`
|
|
4957
|
+
min-width: 0;
|
|
4958
|
+
flex: 1;
|
|
4959
|
+
`;
|
|
4982
4960
|
var InfoCard = styled25.div`
|
|
4983
|
-
display: inline-block;
|
|
4984
|
-
width: fit-content;
|
|
4985
|
-
max-width: 70%;
|
|
4986
4961
|
border-radius: 12px;
|
|
4987
|
-
background: rgba(0, 0, 0, 0.
|
|
4988
|
-
padding:
|
|
4962
|
+
background: rgba(0, 0, 0, 0.15);
|
|
4963
|
+
padding: 1rem 1.5rem;
|
|
4989
4964
|
color: #fff;
|
|
4990
4965
|
backdrop-filter: blur(6px);
|
|
4991
4966
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
|
@@ -4993,45 +4968,92 @@ var InfoCard = styled25.div`
|
|
|
4993
4968
|
min-width: 0;
|
|
4994
4969
|
|
|
4995
4970
|
@media (max-width: 768px) {
|
|
4996
|
-
|
|
4997
|
-
}
|
|
4998
|
-
|
|
4999
|
-
@media (max-width: 640px) {
|
|
5000
|
-
max-width: 92%;
|
|
4971
|
+
padding: 0.85rem 1.15rem;
|
|
5001
4972
|
}
|
|
5002
4973
|
|
|
5003
4974
|
@media (max-width: 480px) {
|
|
5004
|
-
|
|
4975
|
+
padding: 0.65rem 0.85rem;
|
|
5005
4976
|
}
|
|
5006
4977
|
`;
|
|
5007
|
-
var
|
|
5008
|
-
display:
|
|
5009
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
4978
|
+
var NameGroup = styled25.div`
|
|
4979
|
+
display: flex;
|
|
5010
4980
|
align-items: center;
|
|
5011
4981
|
gap: 0.75rem;
|
|
5012
|
-
width:
|
|
5013
|
-
|
|
5014
|
-
@media (max-width: 640px) {
|
|
5015
|
-
gap: 0.5rem;
|
|
5016
|
-
}
|
|
4982
|
+
min-width: 0;
|
|
4983
|
+
flex-wrap: wrap;
|
|
5017
4984
|
`;
|
|
5018
|
-
var
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
4985
|
+
var TypeBadge = styled25.span`
|
|
4986
|
+
display: inline-flex;
|
|
4987
|
+
align-items: center;
|
|
4988
|
+
padding: 0.2rem 0.5rem;
|
|
4989
|
+
border-radius: 4px;
|
|
4990
|
+
font-size: 0.7rem;
|
|
4991
|
+
font-weight: 600;
|
|
4992
|
+
letter-spacing: 0.03em;
|
|
4993
|
+
text-transform: uppercase;
|
|
4994
|
+
line-height: 1;
|
|
4995
|
+
color: #E6C87E;
|
|
4996
|
+
background: rgba(230, 200, 126, 0.12);
|
|
5024
4997
|
white-space: nowrap;
|
|
4998
|
+
flex-shrink: 0;
|
|
5025
4999
|
`;
|
|
5026
|
-
var
|
|
5000
|
+
var InfoRow = styled25.div`
|
|
5027
5001
|
display: flex;
|
|
5028
|
-
align-items:
|
|
5029
|
-
|
|
5002
|
+
align-items: baseline;
|
|
5003
|
+
justify-content: space-between;
|
|
5004
|
+
gap: 1rem;
|
|
5005
|
+
`;
|
|
5006
|
+
var PriceGroup = styled25.div`
|
|
5007
|
+
display: flex;
|
|
5008
|
+
flex-direction: column;
|
|
5009
|
+
align-items: flex-end;
|
|
5010
|
+
flex-shrink: 0;
|
|
5011
|
+
`;
|
|
5012
|
+
var PriceRow = styled25.span`
|
|
5013
|
+
display: inline-flex;
|
|
5014
|
+
align-items: baseline;
|
|
5015
|
+
font-size: clamp(1.3rem, 3vw, 1.8rem);
|
|
5030
5016
|
font-weight: 600;
|
|
5031
|
-
color:
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5017
|
+
color: #fff;
|
|
5018
|
+
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
|
|
5019
|
+
font-variant-numeric: tabular-nums;
|
|
5020
|
+
white-space: nowrap;
|
|
5021
|
+
flex-shrink: 0;
|
|
5022
|
+
`;
|
|
5023
|
+
var CurrencyLabel = styled25.span`
|
|
5024
|
+
font-size: 0.55em;
|
|
5025
|
+
font-weight: 500;
|
|
5026
|
+
color: rgba(255, 255, 255, 0.4);
|
|
5027
|
+
margin-right: 0.3em;
|
|
5028
|
+
`;
|
|
5029
|
+
var PriceArrow = styled25.span`
|
|
5030
|
+
color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
|
|
5031
|
+
font-size: 0.65em;
|
|
5032
|
+
margin: 0 0.1em;
|
|
5033
|
+
`;
|
|
5034
|
+
var AddressText = styled25.p`
|
|
5035
|
+
font-size: 1.1rem;
|
|
5036
|
+
color: rgba(255, 255, 255, 0.7);
|
|
5037
|
+
font-weight: 400;
|
|
5038
|
+
margin: 0.1rem 0 0;
|
|
5039
|
+
|
|
5040
|
+
@media (max-width: 768px) {
|
|
5041
|
+
font-size: 1rem;
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
@media (max-width: 480px) {
|
|
5045
|
+
font-size: 0.9rem;
|
|
5046
|
+
}
|
|
5047
|
+
`;
|
|
5048
|
+
var PriceChangeRow = styled25.span`
|
|
5049
|
+
display: inline-flex;
|
|
5050
|
+
align-items: center;
|
|
5051
|
+
white-space: nowrap;
|
|
5052
|
+
flex-shrink: 0;
|
|
5053
|
+
font-size: 0.85rem;
|
|
5054
|
+
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;
|
|
5055
|
+
font-variant-numeric: tabular-nums;
|
|
5056
|
+
color: ${({ $isPositive }) => $isPositive ? "#0ecb81" : "#f6465d"};
|
|
5035
5057
|
`;
|
|
5036
5058
|
var StatusBadge = styled25.div`
|
|
5037
5059
|
position: absolute;
|
|
@@ -5108,13 +5130,45 @@ var Header = ({
|
|
|
5108
5130
|
onProfileNavigate: _onProfileNavigate,
|
|
5109
5131
|
onOrdersNavigate: _onOrdersNavigate,
|
|
5110
5132
|
onWalletNavigate: _onWalletNavigate,
|
|
5111
|
-
showTradeTab = true
|
|
5133
|
+
showTradeTab = true,
|
|
5134
|
+
portfolioSummary
|
|
5112
5135
|
}) => {
|
|
5113
5136
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
|
|
5114
5137
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
5115
5138
|
const [isMoreMenuOpen, setIsMoreMenuOpen] = useState(false);
|
|
5116
5139
|
const [showLoginPopup, setShowLoginPopup] = useState(false);
|
|
5117
5140
|
const [loginPopupInitialView, setLoginPopupInitialView] = useState(void 0);
|
|
5141
|
+
const [isPortfolioBarVisible, setIsPortfolioBarVisible] = useState(() => {
|
|
5142
|
+
if (typeof localStorage === "undefined") return false;
|
|
5143
|
+
return localStorage.getItem("portfolioBarVisible") !== "false";
|
|
5144
|
+
});
|
|
5145
|
+
const portfolioPillRef = useRef(null);
|
|
5146
|
+
const [portfolioArrowLeft, setPortfolioArrowLeft] = useState(null);
|
|
5147
|
+
const togglePortfolioBar = useCallback(() => {
|
|
5148
|
+
setIsPortfolioBarVisible((prev) => {
|
|
5149
|
+
const next = !prev;
|
|
5150
|
+
try {
|
|
5151
|
+
localStorage.setItem("portfolioBarVisible", String(next));
|
|
5152
|
+
} catch {
|
|
5153
|
+
}
|
|
5154
|
+
return next;
|
|
5155
|
+
});
|
|
5156
|
+
}, []);
|
|
5157
|
+
const updatePortfolioArrow = useCallback(() => {
|
|
5158
|
+
const eye = document.getElementById("portfolio-eye-toggle");
|
|
5159
|
+
const pill = portfolioPillRef.current;
|
|
5160
|
+
if (!eye || !pill) return;
|
|
5161
|
+
const eyeRect = eye.getBoundingClientRect();
|
|
5162
|
+
const pillRect = pill.getBoundingClientRect();
|
|
5163
|
+
const offset = eyeRect.left + eyeRect.width / 2 - pillRect.left - 7;
|
|
5164
|
+
setPortfolioArrowLeft(offset);
|
|
5165
|
+
}, []);
|
|
5166
|
+
useEffect(() => {
|
|
5167
|
+
if (!isPortfolioBarVisible || !portfolioSummary) return;
|
|
5168
|
+
updatePortfolioArrow();
|
|
5169
|
+
window.addEventListener("resize", updatePortfolioArrow);
|
|
5170
|
+
return () => window.removeEventListener("resize", updatePortfolioArrow);
|
|
5171
|
+
}, [isPortfolioBarVisible, portfolioSummary, updatePortfolioArrow]);
|
|
5118
5172
|
useEffect(() => {
|
|
5119
5173
|
if (typeof window === "undefined") return;
|
|
5120
5174
|
const ua = navigator.userAgent;
|
|
@@ -5492,6 +5546,17 @@ var Header = ({
|
|
|
5492
5546
|
}
|
|
5493
5547
|
),
|
|
5494
5548
|
isAuthenticated ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
5549
|
+
portfolioSummary && /* @__PURE__ */ jsx(
|
|
5550
|
+
PortfolioEyeButton,
|
|
5551
|
+
{
|
|
5552
|
+
id: "portfolio-eye-toggle",
|
|
5553
|
+
type: "button",
|
|
5554
|
+
onClick: togglePortfolioBar,
|
|
5555
|
+
$active: isPortfolioBarVisible,
|
|
5556
|
+
title: isPortfolioBarVisible ? "Hide portfolio" : "Show portfolio",
|
|
5557
|
+
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" }) })
|
|
5558
|
+
}
|
|
5559
|
+
),
|
|
5495
5560
|
/* @__PURE__ */ jsxs(UserMenu, { children: [
|
|
5496
5561
|
/* @__PURE__ */ jsxs(
|
|
5497
5562
|
UserButton,
|
|
@@ -5563,6 +5628,51 @@ var Header = ({
|
|
|
5563
5628
|
] })
|
|
5564
5629
|
] }),
|
|
5565
5630
|
/* @__PURE__ */ jsx(HeaderSpacer, {}),
|
|
5631
|
+
isAuthenticated && portfolioSummary && isPortfolioBarVisible && (() => {
|
|
5632
|
+
const fmt = (n) => n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
5633
|
+
const isPLPositive = portfolioSummary.pnl >= 0;
|
|
5634
|
+
return /* @__PURE__ */ jsx(PortfolioBarContainer, { children: /* @__PURE__ */ jsxs(PortfolioBarPill, { ref: portfolioPillRef, children: [
|
|
5635
|
+
portfolioArrowLeft !== null && /* @__PURE__ */ jsx(PortfolioBarArrow, { style: { left: `${portfolioArrowLeft}px` } }),
|
|
5636
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5637
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Holdings" }),
|
|
5638
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { children: [
|
|
5639
|
+
"$",
|
|
5640
|
+
fmt(portfolioSummary.holdings)
|
|
5641
|
+
] })
|
|
5642
|
+
] }),
|
|
5643
|
+
/* @__PURE__ */ jsx(PBOperator, { children: "+" }),
|
|
5644
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5645
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Cash" }),
|
|
5646
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { children: [
|
|
5647
|
+
"$",
|
|
5648
|
+
fmt(portfolioSummary.cash)
|
|
5649
|
+
] })
|
|
5650
|
+
] }),
|
|
5651
|
+
/* @__PURE__ */ jsx(PBOperator, { children: "=" }),
|
|
5652
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5653
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "Portfolio" }),
|
|
5654
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { style: { color: "#D4AF37", fontWeight: 700 }, children: [
|
|
5655
|
+
"$",
|
|
5656
|
+
fmt(portfolioSummary.portfolioValue)
|
|
5657
|
+
] })
|
|
5658
|
+
] }),
|
|
5659
|
+
/* @__PURE__ */ jsx(PBDot, {}),
|
|
5660
|
+
/* @__PURE__ */ jsxs(PBMetric, { children: [
|
|
5661
|
+
/* @__PURE__ */ jsx(PBMetricLabel, { children: "P&L" }),
|
|
5662
|
+
/* @__PURE__ */ jsxs(PBMetricValue, { $positive: isPLPositive, $negative: !isPLPositive, children: [
|
|
5663
|
+
isPLPositive ? "+" : "",
|
|
5664
|
+
"$",
|
|
5665
|
+
fmt(Math.abs(portfolioSummary.pnl)),
|
|
5666
|
+
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.6rem", marginLeft: "2px", opacity: 0.7 }, children: [
|
|
5667
|
+
"(",
|
|
5668
|
+
isPLPositive ? "+" : "",
|
|
5669
|
+
portfolioSummary.pnlPercent.toFixed(2),
|
|
5670
|
+
"%)"
|
|
5671
|
+
] })
|
|
5672
|
+
] })
|
|
5673
|
+
] })
|
|
5674
|
+
] }) });
|
|
5675
|
+
})(),
|
|
5566
5676
|
LoginPopupComponent && showLoginPopup && /* @__PURE__ */ jsx(
|
|
5567
5677
|
LoginPopupComponent,
|
|
5568
5678
|
{
|
|
@@ -5648,8 +5758,19 @@ var HeaderContainer = styled25.header`
|
|
|
5648
5758
|
box-sizing: border-box;
|
|
5649
5759
|
|
|
5650
5760
|
@media (max-width: 768px) {
|
|
5651
|
-
|
|
5652
|
-
|
|
5761
|
+
top: 0.5rem;
|
|
5762
|
+
left: 0.75rem;
|
|
5763
|
+
right: 0.75rem;
|
|
5764
|
+
width: calc(100% - 1.5rem);
|
|
5765
|
+
height: 46px;
|
|
5766
|
+
min-height: 46px;
|
|
5767
|
+
padding: 0 0.75rem;
|
|
5768
|
+
border-radius: 12px;
|
|
5769
|
+
background-color: rgba(13, 17, 23, 0.92);
|
|
5770
|
+
backdrop-filter: blur(12px);
|
|
5771
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
5772
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
5773
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
5653
5774
|
}
|
|
5654
5775
|
`;
|
|
5655
5776
|
var HeaderSpacer = styled25.div`
|
|
@@ -5657,6 +5778,10 @@ var HeaderSpacer = styled25.div`
|
|
|
5657
5778
|
min-height: 56px;
|
|
5658
5779
|
min-height: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
|
|
5659
5780
|
flex-shrink: 0;
|
|
5781
|
+
|
|
5782
|
+
@media (max-width: 768px) {
|
|
5783
|
+
min-height: calc(46px + 0.5rem);
|
|
5784
|
+
}
|
|
5660
5785
|
`;
|
|
5661
5786
|
var Logo = styled25.div`
|
|
5662
5787
|
display: flex;
|
|
@@ -5990,6 +6115,151 @@ var MobileNavItem = styled25.div`
|
|
|
5990
6115
|
padding-left: 24px;
|
|
5991
6116
|
}
|
|
5992
6117
|
`;
|
|
6118
|
+
var pbShimmer = keyframes`
|
|
6119
|
+
0% { background-position: -200% 0; }
|
|
6120
|
+
100% { background-position: 200% 0; }
|
|
6121
|
+
`;
|
|
6122
|
+
var PortfolioEyeButton = styled25.button`
|
|
6123
|
+
background: ${(p) => p.$active ? "rgba(212, 175, 55, 0.15)" : "transparent"};
|
|
6124
|
+
border: none;
|
|
6125
|
+
border-radius: 6px;
|
|
6126
|
+
cursor: pointer;
|
|
6127
|
+
padding: 6px;
|
|
6128
|
+
display: flex;
|
|
6129
|
+
align-items: center;
|
|
6130
|
+
justify-content: center;
|
|
6131
|
+
color: ${(p) => p.$active ? "#D4AF37" : "rgba(255,255,255,0.5)"};
|
|
6132
|
+
transition: all 0.2s ease;
|
|
6133
|
+
margin-right: 4px;
|
|
6134
|
+
|
|
6135
|
+
&:hover {
|
|
6136
|
+
background: rgba(212, 175, 55, 0.2);
|
|
6137
|
+
color: #D4AF37;
|
|
6138
|
+
}
|
|
6139
|
+
|
|
6140
|
+
@media (max-width: 768px) {
|
|
6141
|
+
padding: 4px;
|
|
6142
|
+
margin-right: 2px;
|
|
6143
|
+
}
|
|
6144
|
+
`;
|
|
6145
|
+
var PortfolioBarContainer = styled25.div`
|
|
6146
|
+
position: fixed;
|
|
6147
|
+
top: 56px;
|
|
6148
|
+
top: calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)));
|
|
6149
|
+
left: 0;
|
|
6150
|
+
right: 0;
|
|
6151
|
+
z-index: 999;
|
|
6152
|
+
display: flex;
|
|
6153
|
+
justify-content: flex-end;
|
|
6154
|
+
align-items: flex-start;
|
|
6155
|
+
padding: 0 5%;
|
|
6156
|
+
pointer-events: none;
|
|
6157
|
+
overflow: visible;
|
|
6158
|
+
|
|
6159
|
+
&::before {
|
|
6160
|
+
content: '';
|
|
6161
|
+
position: absolute;
|
|
6162
|
+
top: 0;
|
|
6163
|
+
left: 40%;
|
|
6164
|
+
right: 0;
|
|
6165
|
+
height: 2px;
|
|
6166
|
+
background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.25) 100%);
|
|
6167
|
+
pointer-events: none;
|
|
6168
|
+
}
|
|
6169
|
+
|
|
6170
|
+
@media (max-width: 768px) {
|
|
6171
|
+
top: calc(46px + 0.5rem);
|
|
6172
|
+
padding: 0 0.75rem;
|
|
6173
|
+
justify-content: center;
|
|
6174
|
+
|
|
6175
|
+
&::before {
|
|
6176
|
+
left: 0;
|
|
6177
|
+
right: 0;
|
|
6178
|
+
background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.4) 30%, rgba(212, 175, 55, 0.4) 70%, transparent 100%);
|
|
6179
|
+
}
|
|
6180
|
+
}
|
|
6181
|
+
`;
|
|
6182
|
+
var PortfolioBarPill = styled25.div`
|
|
6183
|
+
pointer-events: auto;
|
|
6184
|
+
display: flex;
|
|
6185
|
+
align-items: center;
|
|
6186
|
+
gap: 1.25rem;
|
|
6187
|
+
padding: 0.5rem 1.5rem;
|
|
6188
|
+
border-radius: 0 0 20px 20px;
|
|
6189
|
+
background: linear-gradient(135deg, rgba(24, 26, 34, 0.98) 0%, rgba(32, 34, 42, 0.97) 100%);
|
|
6190
|
+
backdrop-filter: blur(16px);
|
|
6191
|
+
border: 1px solid rgba(212, 175, 55, 0.25);
|
|
6192
|
+
border-top: none;
|
|
6193
|
+
box-shadow:
|
|
6194
|
+
0 4px 16px rgba(0, 0, 0, 0.3),
|
|
6195
|
+
0 0 0 1px rgba(255, 255, 255, 0.03) inset,
|
|
6196
|
+
0 1px 0 rgba(212, 175, 55, 0.06) inset;
|
|
6197
|
+
position: relative;
|
|
6198
|
+
overflow: visible;
|
|
6199
|
+
|
|
6200
|
+
&::before {
|
|
6201
|
+
content: '';
|
|
6202
|
+
position: absolute;
|
|
6203
|
+
top: 0;
|
|
6204
|
+
left: 0;
|
|
6205
|
+
right: 0;
|
|
6206
|
+
height: 1px;
|
|
6207
|
+
background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
|
|
6208
|
+
background-size: 200% 100%;
|
|
6209
|
+
animation: ${pbShimmer} 4s linear infinite;
|
|
6210
|
+
}
|
|
6211
|
+
|
|
6212
|
+
@media (max-width: 768px) {
|
|
6213
|
+
gap: 0.75rem;
|
|
6214
|
+
padding: 0.4rem 1rem;
|
|
6215
|
+
border-radius: 0 0 16px 16px;
|
|
6216
|
+
}
|
|
6217
|
+
`;
|
|
6218
|
+
var PortfolioBarArrow = styled25.div`
|
|
6219
|
+
position: absolute;
|
|
6220
|
+
top: -7px;
|
|
6221
|
+
width: 14px;
|
|
6222
|
+
height: 14px;
|
|
6223
|
+
background: linear-gradient(135deg, rgba(26, 28, 36, 1) 0%, rgba(30, 32, 40, 1) 100%);
|
|
6224
|
+
border-left: 1px solid rgba(212, 175, 55, 0.3);
|
|
6225
|
+
border-top: 1px solid rgba(212, 175, 55, 0.3);
|
|
6226
|
+
transform: rotate(45deg);
|
|
6227
|
+
box-shadow: -2px -2px 6px rgba(0, 0, 0, 0.25);
|
|
6228
|
+
pointer-events: none;
|
|
6229
|
+
`;
|
|
6230
|
+
var PBMetric = styled25.div`
|
|
6231
|
+
display: flex;
|
|
6232
|
+
flex-direction: column;
|
|
6233
|
+
align-items: center;
|
|
6234
|
+
gap: 1px;
|
|
6235
|
+
white-space: nowrap;
|
|
6236
|
+
`;
|
|
6237
|
+
var PBMetricLabel = styled25.span`
|
|
6238
|
+
font-size: 0.55rem;
|
|
6239
|
+
color: rgba(255, 255, 255, 0.6);
|
|
6240
|
+
text-transform: uppercase;
|
|
6241
|
+
letter-spacing: 0.5px;
|
|
6242
|
+
font-weight: 500;
|
|
6243
|
+
`;
|
|
6244
|
+
var PBMetricValue = styled25.span`
|
|
6245
|
+
font-size: 0.75rem;
|
|
6246
|
+
font-weight: 600;
|
|
6247
|
+
color: ${(p) => p.$positive ? "#0ecb81" : p.$negative ? "#f6465d" : "#eaecef"};
|
|
6248
|
+
font-variant-numeric: tabular-nums;
|
|
6249
|
+
`;
|
|
6250
|
+
var PBDot = styled25.div`
|
|
6251
|
+
width: 3px;
|
|
6252
|
+
height: 3px;
|
|
6253
|
+
border-radius: 50%;
|
|
6254
|
+
background: rgba(212, 175, 55, 0.25);
|
|
6255
|
+
flex-shrink: 0;
|
|
6256
|
+
`;
|
|
6257
|
+
var PBOperator = styled25.span`
|
|
6258
|
+
font-size: 0.7rem;
|
|
6259
|
+
font-weight: 500;
|
|
6260
|
+
color: rgba(255, 255, 255, 0.35);
|
|
6261
|
+
flex-shrink: 0;
|
|
6262
|
+
`;
|
|
5993
6263
|
var PropertySubheader = React5.forwardRef(
|
|
5994
6264
|
({ className, tabs, activeTabId, onTabChange, actions, ...props }, ref) => {
|
|
5995
6265
|
const tabsContainerRef = React5.useRef(null);
|
|
@@ -6155,11 +6425,6 @@ var LoginPopup = ({
|
|
|
6155
6425
|
setView(initialView);
|
|
6156
6426
|
}
|
|
6157
6427
|
}, [initialView]);
|
|
6158
|
-
useEffect(() => {
|
|
6159
|
-
if (view === "kyc" && renderKycWidget) {
|
|
6160
|
-
setShowKycWidget(true);
|
|
6161
|
-
}
|
|
6162
|
-
}, [view, renderKycWidget]);
|
|
6163
6428
|
useEffect(() => {
|
|
6164
6429
|
if (!transakWidgetUrl) return;
|
|
6165
6430
|
const handleTransakMessage = (event) => {
|
|
@@ -6672,7 +6937,7 @@ var LoginPopup = ({
|
|
|
6672
6937
|
] }) });
|
|
6673
6938
|
}
|
|
6674
6939
|
if (view === "funding") {
|
|
6675
|
-
return /* @__PURE__ */ jsx(Overlay2, {
|
|
6940
|
+
return /* @__PURE__ */ jsx(Overlay2, { children: /* @__PURE__ */ jsxs(
|
|
6676
6941
|
FundingPopupContainer,
|
|
6677
6942
|
{
|
|
6678
6943
|
onClick: (event) => event.stopPropagation(),
|
|
@@ -6742,6 +7007,16 @@ var Overlay2 = styled25.div`
|
|
|
6742
7007
|
justify-content: center;
|
|
6743
7008
|
align-items: center;
|
|
6744
7009
|
z-index: 10000;
|
|
7010
|
+
animation: fadeIn 0.2s ease-in-out;
|
|
7011
|
+
|
|
7012
|
+
@keyframes fadeIn {
|
|
7013
|
+
from {
|
|
7014
|
+
opacity: 0;
|
|
7015
|
+
}
|
|
7016
|
+
to {
|
|
7017
|
+
opacity: 1;
|
|
7018
|
+
}
|
|
7019
|
+
}
|
|
6745
7020
|
`;
|
|
6746
7021
|
var PopupContainer = styled25.div`
|
|
6747
7022
|
background-color: var(--color-background, #0a0a0a);
|
|
@@ -6751,8 +7026,20 @@ var PopupContainer = styled25.div`
|
|
|
6751
7026
|
max-width: 440px;
|
|
6752
7027
|
width: 90%;
|
|
6753
7028
|
position: relative;
|
|
7029
|
+
animation: slideUp 0.3s ease-out;
|
|
6754
7030
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
6755
7031
|
|
|
7032
|
+
@keyframes slideUp {
|
|
7033
|
+
from {
|
|
7034
|
+
transform: translateY(20px);
|
|
7035
|
+
opacity: 0;
|
|
7036
|
+
}
|
|
7037
|
+
to {
|
|
7038
|
+
transform: translateY(0);
|
|
7039
|
+
opacity: 1;
|
|
7040
|
+
}
|
|
7041
|
+
}
|
|
7042
|
+
|
|
6756
7043
|
@media (max-width: 768px) {
|
|
6757
7044
|
padding: 2rem;
|
|
6758
7045
|
max-width: 90%;
|
|
@@ -6766,9 +7053,21 @@ var KycPopupContainer = styled25.div`
|
|
|
6766
7053
|
max-width: ${(props) => props.$expanded ? "680px" : "440px"};
|
|
6767
7054
|
width: 90%;
|
|
6768
7055
|
position: relative;
|
|
7056
|
+
animation: slideUp 0.3s ease-out;
|
|
6769
7057
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
6770
7058
|
transition: max-width 0.3s ease;
|
|
6771
7059
|
|
|
7060
|
+
@keyframes slideUp {
|
|
7061
|
+
from {
|
|
7062
|
+
transform: translateY(20px);
|
|
7063
|
+
opacity: 0;
|
|
7064
|
+
}
|
|
7065
|
+
to {
|
|
7066
|
+
transform: translateY(0);
|
|
7067
|
+
opacity: 1;
|
|
7068
|
+
}
|
|
7069
|
+
}
|
|
7070
|
+
|
|
6772
7071
|
@media (max-width: 768px) {
|
|
6773
7072
|
padding: 1.5rem;
|
|
6774
7073
|
max-width: 95%;
|
|
@@ -7096,9 +7395,21 @@ var FundingPopupContainer = styled25.div`
|
|
|
7096
7395
|
max-width: ${(props) => props.$hasWidget ? "900px" : "440px"};
|
|
7097
7396
|
width: 90%;
|
|
7098
7397
|
position: relative;
|
|
7398
|
+
animation: slideUp 0.3s ease-out;
|
|
7099
7399
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
7100
7400
|
overflow: hidden;
|
|
7101
7401
|
|
|
7402
|
+
@keyframes slideUp {
|
|
7403
|
+
from {
|
|
7404
|
+
transform: translateY(20px);
|
|
7405
|
+
opacity: 0;
|
|
7406
|
+
}
|
|
7407
|
+
to {
|
|
7408
|
+
transform: translateY(0);
|
|
7409
|
+
opacity: 1;
|
|
7410
|
+
}
|
|
7411
|
+
}
|
|
7412
|
+
|
|
7102
7413
|
@media (max-width: 768px) {
|
|
7103
7414
|
padding: ${(props) => props.$hasWidget ? "0" : "2rem"};
|
|
7104
7415
|
max-width: 95%;
|
|
@@ -7387,7 +7698,7 @@ var PropertyCompareBar = React5.forwardRef(
|
|
|
7387
7698
|
void 0,
|
|
7388
7699
|
pricePercentFormat
|
|
7389
7700
|
)}%`;
|
|
7390
|
-
const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(
|
|
7701
|
+
const priceContent = formattedPriceValue && propertyValueVariant === "pill" ? /* @__PURE__ */ jsxs(PriceBlock, { $variant: propertyValueVariant, children: [
|
|
7391
7702
|
/* @__PURE__ */ jsx(PriceAmount, { children: formattedPriceValue }),
|
|
7392
7703
|
formattedPriceChange || formattedPricePercent ? /* @__PURE__ */ jsxs(
|
|
7393
7704
|
PriceChange,
|
|
@@ -7700,7 +8011,7 @@ var PropertyValueChange = styled25.span`
|
|
|
7700
8011
|
font-size: 0.65rem;
|
|
7701
8012
|
}
|
|
7702
8013
|
`;
|
|
7703
|
-
var
|
|
8014
|
+
var PriceBlock = styled25.div`
|
|
7704
8015
|
display: none;
|
|
7705
8016
|
|
|
7706
8017
|
${({ $variant }) => $variant === "pill" && css`
|
|
@@ -7794,7 +8105,7 @@ function GalleryMapSection({
|
|
|
7794
8105
|
/* @__PURE__ */ jsxs(ThumbStrip, { children: [
|
|
7795
8106
|
/* @__PURE__ */ jsx(ThumbScroll, { children: images.filter((img) => img.category !== "Floorplan").map((img) => {
|
|
7796
8107
|
const actualIndex = images.indexOf(img);
|
|
7797
|
-
return /* @__PURE__ */ jsx(
|
|
8108
|
+
return /* @__PURE__ */ jsx(Thumbnail2, { "data-active": !showVideo && carouselIndex === actualIndex, onClick: () => {
|
|
7798
8109
|
stopAutoPlay();
|
|
7799
8110
|
setShowVideo(false);
|
|
7800
8111
|
setCarouselIndex(actualIndex);
|
|
@@ -7934,7 +8245,7 @@ var ThumbScroll = styled25.div`
|
|
|
7934
8245
|
scrollbar-width: none;
|
|
7935
8246
|
&::-webkit-scrollbar { display: none; }
|
|
7936
8247
|
`;
|
|
7937
|
-
var
|
|
8248
|
+
var Thumbnail2 = styled25.div`
|
|
7938
8249
|
min-width: 60px; height: 45px; border-radius: 4px; overflow: hidden;
|
|
7939
8250
|
cursor: pointer; border: 2px solid transparent; opacity: 0.6;
|
|
7940
8251
|
transition: all 0.2s ease; flex-shrink: 0;
|
|
@@ -8465,7 +8776,7 @@ function PropertyHistory() {
|
|
|
8465
8776
|
/* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: loafListing.date.replace(/\d+,\s|\s\d+$/, "") })
|
|
8466
8777
|
] }) }),
|
|
8467
8778
|
/* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
|
|
8468
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8779
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: loafListing.type, children: loafListing.type === "Sale" ? "Sold" : loafListing.type }) }),
|
|
8469
8780
|
/* @__PURE__ */ jsx("td", { children: loafListing.saleType ?? "-" }),
|
|
8470
8781
|
/* @__PURE__ */ jsx("td", { children: loafListing.agent })
|
|
8471
8782
|
] }) }) }),
|
|
@@ -8527,7 +8838,7 @@ function PropertyHistory() {
|
|
|
8527
8838
|
/* @__PURE__ */ jsx("span", { className: "text-[0.9rem] font-normal ml-3 opacity-80", children: ownershipSale.date.replace(/\d+,\s|\s\d+$/, "") })
|
|
8528
8839
|
] }) }),
|
|
8529
8840
|
ownershipSale && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs(HistoryRow, { $isOwnershipStart: true, children: [
|
|
8530
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8841
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: ownershipSale.type, children: ownershipSale.type === "Sale" ? "Sold" : ownershipSale.type }) }),
|
|
8531
8842
|
/* @__PURE__ */ jsx("td", { children: ownershipSale.saleType ?? "-" }),
|
|
8532
8843
|
/* @__PURE__ */ jsx("td", { children: ownershipSale.agent })
|
|
8533
8844
|
] }) }) }),
|
|
@@ -8536,7 +8847,7 @@ function PropertyHistory() {
|
|
|
8536
8847
|
/* @__PURE__ */ jsx("div", { className: "py-2", children: events.map((event) => /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsx(EventDetails, { event }) }, event.id)) })
|
|
8537
8848
|
] }),
|
|
8538
8849
|
otherSales.length > 0 && (historyFilter === "all" || historyFilter === "sales") && /* @__PURE__ */ jsx(SalesTable, { children: /* @__PURE__ */ jsx("tbody", { children: otherSales.map((sale) => /* @__PURE__ */ jsxs(HistoryRow, { children: [
|
|
8539
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
8850
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(TypeBadge2, { $type: sale.type, children: sale.type === "Sale" ? "Sold" : sale.type }) }),
|
|
8540
8851
|
/* @__PURE__ */ jsx("td", { children: sale.saleType ?? "-" }),
|
|
8541
8852
|
/* @__PURE__ */ jsx("td", { children: sale.agent })
|
|
8542
8853
|
] }, sale.id)) }) })
|
|
@@ -8679,7 +8990,7 @@ function EventDetails({ event }) {
|
|
|
8679
8990
|
onClick: toggleExpand,
|
|
8680
8991
|
children: [
|
|
8681
8992
|
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center flex-1 gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
8682
|
-
/* @__PURE__ */ jsx(
|
|
8993
|
+
/* @__PURE__ */ jsx(TypeBadge2, { $type: event.type, children: event.type === "Sale" ? "Sold" : event.type }),
|
|
8683
8994
|
/* @__PURE__ */ jsx("span", { className: "ml-2", children: event.date })
|
|
8684
8995
|
] }) }),
|
|
8685
8996
|
/* @__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 }) })
|
|
@@ -8923,7 +9234,7 @@ var HistoryRow = styled25.tr`
|
|
|
8923
9234
|
background-color: rgba(255, 255, 255, 0.08);
|
|
8924
9235
|
}
|
|
8925
9236
|
`;
|
|
8926
|
-
var
|
|
9237
|
+
var TypeBadge2 = styled25.span`
|
|
8927
9238
|
display: inline-block;
|
|
8928
9239
|
padding: 0.25rem 0.5rem;
|
|
8929
9240
|
border-radius: 4px;
|
|
@@ -9333,7 +9644,8 @@ function AssetSelectorBar({
|
|
|
9333
9644
|
metrics: metricsProp,
|
|
9334
9645
|
currentTokenName,
|
|
9335
9646
|
selectorItems,
|
|
9336
|
-
onSelect
|
|
9647
|
+
onSelect,
|
|
9648
|
+
trailing
|
|
9337
9649
|
}) {
|
|
9338
9650
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
9339
9651
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -9371,6 +9683,7 @@ function AssetSelectorBar({
|
|
|
9371
9683
|
] })
|
|
9372
9684
|
] })
|
|
9373
9685
|
] }, m.label)) }),
|
|
9686
|
+
trailing,
|
|
9374
9687
|
isDropdownOpen && hasItems && /* @__PURE__ */ jsx(IPODropdown, { children: selectorItems.map((item) => {
|
|
9375
9688
|
const isCurrent = item.tokenName === currentTokenName;
|
|
9376
9689
|
const status = item.status?.toUpperCase();
|
|
@@ -9603,6 +9916,7 @@ function OfferingProgressCard({
|
|
|
9603
9916
|
raisedAmount,
|
|
9604
9917
|
targetAmount,
|
|
9605
9918
|
isPrivateClient = false,
|
|
9919
|
+
variant = "default",
|
|
9606
9920
|
style,
|
|
9607
9921
|
className
|
|
9608
9922
|
}) {
|
|
@@ -9634,6 +9948,108 @@ function OfferingProgressCard({
|
|
|
9634
9948
|
const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
|
|
9635
9949
|
return () => clearInterval(interval);
|
|
9636
9950
|
}, [opensAt]);
|
|
9951
|
+
if (variant === "compact") {
|
|
9952
|
+
return /* @__PURE__ */ jsxs(CompactContainer, { style, className, children: [
|
|
9953
|
+
/* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
|
|
9954
|
+
/* @__PURE__ */ jsxs(ProgressInfo, { children: [
|
|
9955
|
+
/* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
|
|
9956
|
+
"Subscribers: ",
|
|
9957
|
+
subscriberCount.toLocaleString()
|
|
9958
|
+
] }),
|
|
9959
|
+
/* @__PURE__ */ jsxs(ProgressAmounts, { children: [
|
|
9960
|
+
/* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
|
|
9961
|
+
/* @__PURE__ */ jsxs("span", { className: "target", children: [
|
|
9962
|
+
" / ",
|
|
9963
|
+
formatCurrency3(computedTarget)
|
|
9964
|
+
] })
|
|
9965
|
+
] })
|
|
9966
|
+
] })
|
|
9967
|
+
] });
|
|
9968
|
+
}
|
|
9969
|
+
if (variant === "home") {
|
|
9970
|
+
const isPreLive = !ipoStarted && ipoStatus !== "CLOSED" && ipoStatus !== "CANCELLED";
|
|
9971
|
+
return /* @__PURE__ */ jsxs(Container, { style, className, children: [
|
|
9972
|
+
/* @__PURE__ */ jsxs(Header2, { children: [
|
|
9973
|
+
/* @__PURE__ */ jsxs("h3", { children: [
|
|
9974
|
+
/* @__PURE__ */ jsx(FaChartLine, {}),
|
|
9975
|
+
" Offering Progress"
|
|
9976
|
+
] }),
|
|
9977
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem" }, children: ipoStarted ? /* @__PURE__ */ jsxs(StatusSpan, { $color: "#0ecb81", children: [
|
|
9978
|
+
/* @__PURE__ */ jsx(StatusDot, { $color: "#0ecb81", $pulse: true }),
|
|
9979
|
+
"LIVE"
|
|
9980
|
+
] }) : /* @__PURE__ */ jsxs(StatusSpan, { $color: statusColor || "#D4AF37", children: [
|
|
9981
|
+
/* @__PURE__ */ jsx(StatusDot, { $color: statusColor || "#D4AF37" }),
|
|
9982
|
+
statusLabel || "Preparing"
|
|
9983
|
+
] }) })
|
|
9984
|
+
] }),
|
|
9985
|
+
isPreLive ? /* @__PURE__ */ jsxs(HomePreLiveRow, { children: [
|
|
9986
|
+
countdown ? /* @__PURE__ */ jsxs(HomeCountdownSide, { children: [
|
|
9987
|
+
/* @__PURE__ */ jsx(CountdownLabel, { children: "Opens In" }),
|
|
9988
|
+
/* @__PURE__ */ jsxs(CountdownDigits, { children: [
|
|
9989
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.days).padStart(2, "0") }),
|
|
9990
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "D" }),
|
|
9991
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
9992
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.hours).padStart(2, "0") }),
|
|
9993
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "H" }),
|
|
9994
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
9995
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.minutes).padStart(2, "0") }),
|
|
9996
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "M" }),
|
|
9997
|
+
/* @__PURE__ */ jsx(CountdownSeparator, { children: ":" }),
|
|
9998
|
+
/* @__PURE__ */ jsx(CountdownNumber, { children: String(countdown.seconds).padStart(2, "0") }),
|
|
9999
|
+
/* @__PURE__ */ jsx(CountdownUnitLabel, { children: "S" })
|
|
10000
|
+
] })
|
|
10001
|
+
] }) : /* @__PURE__ */ jsx(HomeCountdownSide, { children: /* @__PURE__ */ jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }) }),
|
|
10002
|
+
/* @__PURE__ */ jsxs(HomeUnitsSide, { children: [
|
|
10003
|
+
/* @__PURE__ */ jsx(HomeUnitsLabel, { children: "Units Subscribed" }),
|
|
10004
|
+
/* @__PURE__ */ jsxs(HomeUnitsValue, { children: [
|
|
10005
|
+
/* @__PURE__ */ jsx(HomeSpinner, {}),
|
|
10006
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
10007
|
+
" / ",
|
|
10008
|
+
supplyToSell.toLocaleString()
|
|
10009
|
+
] })
|
|
10010
|
+
] })
|
|
10011
|
+
] })
|
|
10012
|
+
] }) : /* @__PURE__ */ jsxs(LiveBody, { children: [
|
|
10013
|
+
/* @__PURE__ */ jsxs(LiveTopRow, { children: [
|
|
10014
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
10015
|
+
/* @__PURE__ */ jsxs(LiveLabel, { children: [
|
|
10016
|
+
"Offering Subscribed ",
|
|
10017
|
+
/* @__PURE__ */ jsx("span", { children: "\u24D8" })
|
|
10018
|
+
] }),
|
|
10019
|
+
/* @__PURE__ */ jsxs(LivePercent, { children: [
|
|
10020
|
+
percentSold.toFixed(1),
|
|
10021
|
+
"%",
|
|
10022
|
+
/* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
|
|
10023
|
+
] })
|
|
10024
|
+
] }),
|
|
10025
|
+
/* @__PURE__ */ jsxs("div", { style: { textAlign: "right" }, children: [
|
|
10026
|
+
/* @__PURE__ */ jsx(LiveLabel, { children: "Units Subscribed" }),
|
|
10027
|
+
/* @__PURE__ */ jsxs(UnitsValue, { children: [
|
|
10028
|
+
/* @__PURE__ */ jsx("span", { children: totalSold.toLocaleString() }),
|
|
10029
|
+
/* @__PURE__ */ jsxs("small", { children: [
|
|
10030
|
+
"/ ",
|
|
10031
|
+
supplyToSell.toLocaleString()
|
|
10032
|
+
] })
|
|
10033
|
+
] })
|
|
10034
|
+
] })
|
|
10035
|
+
] }),
|
|
10036
|
+
/* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
|
|
10037
|
+
/* @__PURE__ */ jsxs(ProgressInfo, { children: [
|
|
10038
|
+
/* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
|
|
10039
|
+
"Subscribers: ",
|
|
10040
|
+
subscriberCount.toLocaleString()
|
|
10041
|
+
] }),
|
|
10042
|
+
/* @__PURE__ */ jsxs(ProgressAmounts, { children: [
|
|
10043
|
+
/* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
|
|
10044
|
+
/* @__PURE__ */ jsxs("span", { className: "target", children: [
|
|
10045
|
+
" / ",
|
|
10046
|
+
formatCurrency3(computedTarget)
|
|
10047
|
+
] })
|
|
10048
|
+
] })
|
|
10049
|
+
] })
|
|
10050
|
+
] })
|
|
10051
|
+
] });
|
|
10052
|
+
}
|
|
9637
10053
|
return /* @__PURE__ */ jsxs(Container, { style, className, children: [
|
|
9638
10054
|
/* @__PURE__ */ jsxs(Header2, { children: [
|
|
9639
10055
|
/* @__PURE__ */ jsxs("h3", { children: [
|
|
@@ -9702,7 +10118,7 @@ function OfferingProgressCard({
|
|
|
9702
10118
|
/* @__PURE__ */ jsx("span", { children: "\u24D8" })
|
|
9703
10119
|
] }),
|
|
9704
10120
|
/* @__PURE__ */ jsxs(LivePercent, { children: [
|
|
9705
|
-
percentSold
|
|
10121
|
+
percentSold.toFixed(1),
|
|
9706
10122
|
"%",
|
|
9707
10123
|
/* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
|
|
9708
10124
|
] })
|
|
@@ -9935,6 +10351,59 @@ var ProgressAmounts = styled25.div`
|
|
|
9935
10351
|
.raised { color: #D4AF37; }
|
|
9936
10352
|
.target { color: rgba(255,255,255,0.3); }
|
|
9937
10353
|
`;
|
|
10354
|
+
var CompactContainer = styled25.div`
|
|
10355
|
+
width: 100%;
|
|
10356
|
+
margin: 1.5rem 0;
|
|
10357
|
+
display: flex;
|
|
10358
|
+
flex-direction: column;
|
|
10359
|
+
gap: 0.5rem;
|
|
10360
|
+
`;
|
|
10361
|
+
var HomePreLiveRow = styled25.div`
|
|
10362
|
+
display: flex;
|
|
10363
|
+
align-items: center;
|
|
10364
|
+
justify-content: space-between;
|
|
10365
|
+
padding-top: 1rem;
|
|
10366
|
+
`;
|
|
10367
|
+
var HomeCountdownSide = styled25.div`
|
|
10368
|
+
display: flex;
|
|
10369
|
+
flex-direction: column;
|
|
10370
|
+
align-items: center;
|
|
10371
|
+
flex: 1;
|
|
10372
|
+
`;
|
|
10373
|
+
var HomeUnitsSide = styled25.div`
|
|
10374
|
+
text-align: center;
|
|
10375
|
+
flex-shrink: 0;
|
|
10376
|
+
`;
|
|
10377
|
+
var HomeUnitsLabel = styled25.div`
|
|
10378
|
+
font-size: 0.6rem;
|
|
10379
|
+
color: var(--color-text-secondary);
|
|
10380
|
+
text-transform: uppercase;
|
|
10381
|
+
letter-spacing: 0.1em;
|
|
10382
|
+
margin-bottom: 0.2rem;
|
|
10383
|
+
`;
|
|
10384
|
+
var HomeUnitsValue = styled25.div`
|
|
10385
|
+
font-size: 1.1rem;
|
|
10386
|
+
font-weight: 700;
|
|
10387
|
+
font-family: monospace;
|
|
10388
|
+
span {
|
|
10389
|
+
color: var(--color-text-secondary);
|
|
10390
|
+
font-weight: 400;
|
|
10391
|
+
}
|
|
10392
|
+
`;
|
|
10393
|
+
var HomeSpinner = styled25.span`
|
|
10394
|
+
display: inline-block;
|
|
10395
|
+
width: 14px;
|
|
10396
|
+
height: 14px;
|
|
10397
|
+
border: 2px solid rgba(255, 255, 255, 0.1);
|
|
10398
|
+
border-top-color: var(--color-accent, #f0b90b);
|
|
10399
|
+
border-radius: 50%;
|
|
10400
|
+
animation: homeSpin 1s linear infinite;
|
|
10401
|
+
vertical-align: middle;
|
|
10402
|
+
margin-right: 0.15rem;
|
|
10403
|
+
@keyframes homeSpin {
|
|
10404
|
+
to { transform: rotate(360deg); }
|
|
10405
|
+
}
|
|
10406
|
+
`;
|
|
9938
10407
|
var MAX_DISPLAY_AMOUNT = 6e4;
|
|
9939
10408
|
var formatCurrency4 = (amount) => {
|
|
9940
10409
|
if (amount >= 1e6) return `$${(amount / 1e6).toFixed(2)}M`;
|
|
@@ -11612,7 +12081,14 @@ function PortfolioActivityPanel({
|
|
|
11612
12081
|
formatTimestamp(trade.executedAt)
|
|
11613
12082
|
] })
|
|
11614
12083
|
] }),
|
|
11615
|
-
|
|
12084
|
+
/* @__PURE__ */ jsx(
|
|
12085
|
+
ActivityTag,
|
|
12086
|
+
{
|
|
12087
|
+
$color: trade.side === "SELL" ? "#f6465d" : "#0ecb81",
|
|
12088
|
+
$bg: trade.side === "SELL" ? "rgba(246,70,93,0.12)" : "rgba(14,203,129,0.12)",
|
|
12089
|
+
children: sideLabel(trade.side)
|
|
12090
|
+
}
|
|
12091
|
+
),
|
|
11616
12092
|
/* @__PURE__ */ jsx(ActivityAmount, { children: formatCurrency5(trade.price * trade.quantity) })
|
|
11617
12093
|
] }, trade.tradeId))
|
|
11618
12094
|
] }),
|
|
@@ -13684,7 +14160,7 @@ function PropertyValuation({
|
|
|
13684
14160
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: [
|
|
13685
14161
|
/* @__PURE__ */ jsxs(PricingModelDetail, { children: [
|
|
13686
14162
|
/* @__PURE__ */ jsx(PropertyDetailLabel, { children: "Last Price" }),
|
|
13687
|
-
/* @__PURE__ */ jsx(PricingDetailValue, { children:
|
|
14163
|
+
/* @__PURE__ */ jsx(PricingDetailValue, { children: formatCurrency6(lastPrice) })
|
|
13688
14164
|
] }),
|
|
13689
14165
|
/* @__PURE__ */ jsxs(PricingModelDetail, { children: [
|
|
13690
14166
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
|
|
@@ -13695,11 +14171,11 @@ function PropertyValuation({
|
|
|
13695
14171
|
] })
|
|
13696
14172
|
] }),
|
|
13697
14173
|
/* @__PURE__ */ jsxs(PricingDetailValue, { style: { color: "var(--color-accent)", fontWeight: "bold" }, children: [
|
|
13698
|
-
|
|
14174
|
+
formatCurrency6(fairValue),
|
|
13699
14175
|
" ",
|
|
13700
14176
|
/* @__PURE__ */ jsxs("span", { style: { fontSize: "0.85em", fontWeight: "normal", opacity: 0.8 }, children: [
|
|
13701
14177
|
"(",
|
|
13702
|
-
|
|
14178
|
+
formatCurrency6(fairValue * tokensOutstanding, { maximumFractionDigits: 0 }),
|
|
13703
14179
|
")"
|
|
13704
14180
|
] })
|
|
13705
14181
|
] })
|
|
@@ -13716,7 +14192,7 @@ function PropertyValuation({
|
|
|
13716
14192
|
/* @__PURE__ */ jsx(GaugeIndicator, { type: "fairValue", position: 50 }),
|
|
13717
14193
|
/* @__PURE__ */ jsxs(GaugePriceTag, { position: gaugePosition, children: [
|
|
13718
14194
|
/* @__PURE__ */ jsx("span", { children: "Last Price" }),
|
|
13719
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
14195
|
+
/* @__PURE__ */ jsx("span", { children: formatCurrency6(lastPrice) })
|
|
13720
14196
|
] }),
|
|
13721
14197
|
/* @__PURE__ */ jsx(GaugeIndicator, { type: "lastPrice", position: gaugePosition })
|
|
13722
14198
|
] }),
|
|
@@ -13724,36 +14200,36 @@ function PropertyValuation({
|
|
|
13724
14200
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#4CAF50" }, children: [
|
|
13725
14201
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
13726
14202
|
"< ",
|
|
13727
|
-
|
|
14203
|
+
formatCurrency6(undervaluedThreshold)
|
|
13728
14204
|
] }),
|
|
13729
14205
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13730
14206
|
"(",
|
|
13731
|
-
|
|
14207
|
+
formatMillions(undervaluedThreshold * tokensOutstanding),
|
|
13732
14208
|
")"
|
|
13733
14209
|
] })
|
|
13734
14210
|
] }) }),
|
|
13735
14211
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "var(--color-accent)" }, children: [
|
|
13736
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
14212
|
+
/* @__PURE__ */ jsx("span", { children: formatCurrency6(fairValue) }),
|
|
13737
14213
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13738
14214
|
"(",
|
|
13739
|
-
|
|
14215
|
+
formatMillions(fairValue * tokensOutstanding),
|
|
13740
14216
|
")"
|
|
13741
14217
|
] })
|
|
13742
14218
|
] }) }),
|
|
13743
14219
|
/* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#F44336" }, children: [
|
|
13744
14220
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
13745
14221
|
"> ",
|
|
13746
|
-
|
|
14222
|
+
formatCurrency6(overvaluedThreshold)
|
|
13747
14223
|
] }),
|
|
13748
14224
|
/* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
|
|
13749
14225
|
"(",
|
|
13750
|
-
|
|
14226
|
+
formatMillions(overvaluedThreshold * tokensOutstanding),
|
|
13751
14227
|
")"
|
|
13752
14228
|
] })
|
|
13753
14229
|
] }) })
|
|
13754
14230
|
] })
|
|
13755
14231
|
] }),
|
|
13756
|
-
/* @__PURE__ */ jsxs(
|
|
14232
|
+
/* @__PURE__ */ jsxs(HiddenMobileChart, { children: [
|
|
13757
14233
|
/* @__PURE__ */ jsx("h3", { style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
|
|
13758
14234
|
/* @__PURE__ */ jsx(ChartContainer, { children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
|
|
13759
14235
|
axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
|
|
@@ -13872,7 +14348,15 @@ function PropertyValuation({
|
|
|
13872
14348
|
] })
|
|
13873
14349
|
] }) })
|
|
13874
14350
|
] })
|
|
13875
|
-
] })
|
|
14351
|
+
] }),
|
|
14352
|
+
/* @__PURE__ */ jsx("h3", { className: "desktop-only-historical-chart", style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
|
|
14353
|
+
/* @__PURE__ */ jsx(ChartContainer, { className: "desktop-only-historical-chart", children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
|
|
14354
|
+
axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
|
|
14355
|
+
/* @__PURE__ */ jsxs(ValuationSvg, { viewBox: `0 0 ${CHART_WIDTH} ${CHART_HEIGHT}`, preserveAspectRatio: "none", children: [
|
|
14356
|
+
valuationPath ? /* @__PURE__ */ jsx("path", { d: valuationPath, fill: "none", stroke: "#D4AF37", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null,
|
|
14357
|
+
fairValuePath ? /* @__PURE__ */ jsx("path", { d: fairValuePath, fill: "none", stroke: "#FFFFFF", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null
|
|
14358
|
+
] })
|
|
14359
|
+
] }) })
|
|
13876
14360
|
] })
|
|
13877
14361
|
] }),
|
|
13878
14362
|
/* @__PURE__ */ jsxs(RecentSalesSection, { children: [
|
|
@@ -13946,14 +14430,6 @@ function formatMillions(value) {
|
|
|
13946
14430
|
}
|
|
13947
14431
|
return `$${(value / 1e6).toFixed(2)}m`;
|
|
13948
14432
|
}
|
|
13949
|
-
function formatCompact(value) {
|
|
13950
|
-
if (value == null || !Number.isFinite(value)) return "\u2014";
|
|
13951
|
-
const abs = Math.abs(value);
|
|
13952
|
-
if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
|
|
13953
|
-
if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
|
|
13954
|
-
if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
|
|
13955
|
-
return formatCurrency6(value);
|
|
13956
|
-
}
|
|
13957
14433
|
function formatBedroomLabel(bedrooms) {
|
|
13958
14434
|
if (!Number.isFinite(bedrooms)) return "\u2014";
|
|
13959
14435
|
return `${bedrooms} Bed`;
|
|
@@ -14077,6 +14553,12 @@ var GaugePriceTag = styled25.div`
|
|
|
14077
14553
|
color: var(--color-accent);
|
|
14078
14554
|
}
|
|
14079
14555
|
`;
|
|
14556
|
+
var HiddenMobileChart = styled25.div`
|
|
14557
|
+
display: none;
|
|
14558
|
+
@media (max-width: 480px) {
|
|
14559
|
+
display: block;
|
|
14560
|
+
}
|
|
14561
|
+
`;
|
|
14080
14562
|
var ValuationWrapper = styled25.div`
|
|
14081
14563
|
display: flex;
|
|
14082
14564
|
flex-direction: column;
|
|
@@ -14128,10 +14610,9 @@ var PricingModelCard = styled25.div`
|
|
|
14128
14610
|
var PricingModelHeader = styled25.div`
|
|
14129
14611
|
display: flex;
|
|
14130
14612
|
justify-content: space-between;
|
|
14131
|
-
align-items:
|
|
14613
|
+
align-items: center;
|
|
14132
14614
|
margin-bottom: 1.5rem;
|
|
14133
14615
|
gap: 1rem;
|
|
14134
|
-
flex-wrap: wrap;
|
|
14135
14616
|
|
|
14136
14617
|
.valuation-info {
|
|
14137
14618
|
display: flex;
|
|
@@ -14139,7 +14620,6 @@ var PricingModelHeader = styled25.div`
|
|
|
14139
14620
|
gap: 0.25rem;
|
|
14140
14621
|
font-size: 0.85rem;
|
|
14141
14622
|
color: rgba(255, 255, 255, 0.75);
|
|
14142
|
-
flex-shrink: 0;
|
|
14143
14623
|
}
|
|
14144
14624
|
`;
|
|
14145
14625
|
var PricingModelTitle = styled25.h3`
|
|
@@ -14206,31 +14686,15 @@ var ValuationDetails = styled25.div`
|
|
|
14206
14686
|
display: flex;
|
|
14207
14687
|
justify-content: space-between;
|
|
14208
14688
|
margin-top: 1rem;
|
|
14209
|
-
gap: 0.25rem;
|
|
14210
14689
|
`;
|
|
14211
14690
|
var ValuationItem = styled25.div`
|
|
14212
14691
|
display: flex;
|
|
14213
14692
|
flex-direction: column;
|
|
14214
|
-
min-width: 0;
|
|
14215
|
-
overflow: hidden;
|
|
14216
14693
|
`;
|
|
14217
14694
|
var ValuationValue = styled25.div`
|
|
14218
14695
|
font-size: 1rem;
|
|
14219
14696
|
font-weight: 600;
|
|
14220
14697
|
color: #fff;
|
|
14221
|
-
display: flex;
|
|
14222
|
-
flex-direction: column;
|
|
14223
|
-
gap: 2px;
|
|
14224
|
-
overflow-wrap: break-word;
|
|
14225
|
-
word-break: break-word;
|
|
14226
|
-
|
|
14227
|
-
@media (max-width: 480px) {
|
|
14228
|
-
font-size: 0.72rem;
|
|
14229
|
-
|
|
14230
|
-
.valuation-amount-span {
|
|
14231
|
-
display: none;
|
|
14232
|
-
}
|
|
14233
|
-
}
|
|
14234
14698
|
`;
|
|
14235
14699
|
var ChartContainer = styled25.div`
|
|
14236
14700
|
width: 100%;
|
|
@@ -14643,7 +15107,7 @@ var ThumbnailStrip = styled25.div`
|
|
|
14643
15107
|
display: none;
|
|
14644
15108
|
}
|
|
14645
15109
|
`;
|
|
14646
|
-
var
|
|
15110
|
+
var Thumbnail3 = styled25.button`
|
|
14647
15111
|
width: 86px;
|
|
14648
15112
|
height: 64px;
|
|
14649
15113
|
border-radius: 6px;
|
|
@@ -14979,7 +15443,7 @@ function GalleryContent({ galleryImages, startIndex, title, subtitle, onClose })
|
|
|
14979
15443
|
]
|
|
14980
15444
|
}
|
|
14981
15445
|
),
|
|
14982
|
-
/* @__PURE__ */ jsx(ThumbnailStrip, { onClick: (event) => event.stopPropagation(), children: galleryImages.map((image, idx) => /* @__PURE__ */ jsx(
|
|
15446
|
+
/* @__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)) })
|
|
14983
15447
|
]
|
|
14984
15448
|
}
|
|
14985
15449
|
);
|