@microcosmmoney/portal-react 3.12.4 → 3.12.6

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.
@@ -158,5 +158,5 @@ function MicrocosmAuctionPage({ basePath = '', onNavigate }) {
158
158
  return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 border border-neutral-700 rounded p-2 2xs:p-3 hover:bg-neutral-700 transition-colors gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0 flex-1 flex-wrap", children: [(0, jsx_runtime_1.jsx)(Badge, { className: BADGE_VARIANTS[si.variant] || BADGE_VARIANTS.default, children: si.label }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-300 text-xs 2xs:text-sm truncate", children: bid.unit_name || `#${bid.auction_id}` }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white text-xs 2xs:text-sm font-bold font-mono whitespace-nowrap", children: [(bid.bid_amount ?? bid.amount ?? 0).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "hidden xs:flex items-center gap-3 shrink-0", children: bid.created_at && (0, jsx_runtime_1.jsx)(FormattedDateTime, { dateTime: bid.created_at, className: "text-neutral-500 text-xs font-mono" }) })] }, bid.bid_id ?? idx));
159
159
  }) }))] }) })), historyList.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { onClick: () => setShowHistory(!showHistory), className: "flex items-center justify-between cursor-pointer gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0 flex-wrap", children: [(0, jsx_runtime_1.jsx)(IconBarChart, { className: "w-3 h-3 2xs:w-4 2xs:h-4 text-neutral-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm text-neutral-300 tracking-wider", children: t('auctionHistory', 'Auction History') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-[10px] 2xs:text-xs text-neutral-500", children: [historyList.length, " ", t('auctionsCount', 'auctions')] })] }), showHistory
160
160
  ? (0, jsx_runtime_1.jsx)(IconChevronUp, { className: "w-4 h-4 text-neutral-500 shrink-0" })
161
- : (0, jsx_runtime_1.jsx)(IconChevronDown, { className: "w-4 h-4 text-neutral-500 shrink-0" })] }), showHistory && ((0, jsx_runtime_1.jsx)("div", { className: "mt-2 2xs:mt-3 sm:mt-4 space-y-1.5 2xs:space-y-2", children: historyList.map((a, idx) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 border border-neutral-700 rounded p-2 2xs:p-3 hover:bg-neutral-700 transition-colors gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 shrink-0", children: UNIT_ICONS[a.unit_type || 'station'] || UNIT_ICONS.station }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-300 text-xs 2xs:text-sm truncate", children: a.unit_name || `Territory #${a.unit_id || a.auction_id}` }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[10px] 2xs:text-xs truncate", children: UNIT_LABELS[a.unit_type || 'station'] || 'Station' })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 2xs:gap-3 sm:gap-4 shrink-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-white text-xs 2xs:text-sm font-bold font-mono whitespace-nowrap", children: [(a.current_price ?? a.final_price ?? 0).toLocaleString(), " MCC"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[10px] 2xs:text-xs", children: [a.bid_count || 0, " bids"] })] }), (0, jsx_runtime_1.jsx)(Badge, { className: a.status === 'cancelled' ? BADGE_VARIANTS.error : BADGE_VARIANTS.default, children: a.status === 'ended' ? t('ended', 'Ended') : a.status === 'cancelled' ? t('cancelled', 'Cancelled') : t('sold', 'Sold') })] })] }, a.auction_id ?? idx))) }))] }) })), (0, jsx_runtime_1.jsx)(Modal, { open: bidDialogOpen, onClose: () => setBidDialogOpen(false), children: (0, jsx_runtime_1.jsxs)("div", { className: "p-3 2xs:p-4 sm:p-6 space-y-3 2xs:space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-white font-mono font-bold flex items-center gap-2 text-sm 2xs:text-base", children: [(0, jsx_runtime_1.jsx)(IconGavel, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-cyan-400" }), t('bidDialog', 'Place Bid')] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 font-mono text-xs 2xs:text-sm mt-1 truncate", children: selectedAuction?.unit_name || `Territory #${selectedAuction?.unit_id || selectedAuction?.auction_id || selectedAuction?.id}` })] }), selectedAuction && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsx)(Badge, { className: BADGE_VARIANTS.info, children: UNIT_LABELS[selectedAuction.unit_type || 'station'] || 'Station' }), (0, jsx_runtime_1.jsx)(Badge, { className: BADGE_VARIANTS.default, children: selectedAuction.auction_type === 'first' ? t('firstAuction', 'First Auction') : selectedAuction.auction_type === 'second' ? t('secondAuction', 'Second Auction') : 'Auction' }), (0, jsx_runtime_1.jsxs)(Badge, { className: BADGE_VARIANTS.warning, children: [(0, jsx_runtime_1.jsx)(IconCrown, { className: "w-3 h-3" }), t('winnerMagistrate', 'Winner = Magistrate')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-3 2xs:p-4 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('currentHighest', 'Current Highest') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono break-all", children: [(selectedAuction.current_price ?? selectedAuction.starting_price ?? 0).toLocaleString(), ' ', (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm sm:text-base text-neutral-500", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-neutral-500 mt-1 break-all", children: [selectedAuction.bid_count || 0, " bids \u00B7 Starting price ", (selectedAuction.starting_price ?? 0).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 truncate", children: t('minIncrement', 'Min Next Bid') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-bold font-mono whitespace-nowrap", children: [((selectedAuction.current_price ?? selectedAuction.starting_price ?? 0) + (selectedAuction.bid_increment ?? 0)).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 break-words", children: [t('bidAmountLabel', 'Bid Amount'), " (", t('bidAmountMin', 'min {amount} MCC', { amount: ((selectedAuction.current_price ?? 0) + (selectedAuction.bid_increment ?? 0)).toLocaleString() }), ")"] }), (0, jsx_runtime_1.jsx)("input", { type: "number", step: selectedAuction.bid_increment ?? 1, value: bidAmount, onChange: (e) => setBidAmount(e.target.value), placeholder: t('bidAmountLabel', 'Enter bid amount'), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-2 py-2 2xs:px-3 2xs:py-2.5 rounded text-xs 2xs:text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), bidAmount && !isNaN(parseFloat(bidAmount)) && parseFloat(bidAmount) > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 truncate", children: [t('bidAmountLabel', 'Bid Amount'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-300 font-mono whitespace-nowrap", children: [parseFloat(bidAmount).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 truncate", children: [t('depositLabel', 'Deposit (50%)'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono whitespace-nowrap", children: [(parseFloat(bidAmount) * 0.5).toLocaleString(), " MCC"] })] })] })), actionError && ((0, jsx_runtime_1.jsxs)("div", { className: "text-red-500 text-[10px] 2xs:text-xs flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3 h-3 shrink-0" }), actionError] }))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-end gap-2 2xs:gap-3 pt-2", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setBidDialogOpen(false), className: "px-3 py-1.5 2xs:px-4 2xs:py-2 text-xs 2xs:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent whitespace-nowrap", children: t('cancel', 'Cancel') }), (0, jsx_runtime_1.jsx)("button", { onClick: handlePlaceBid, disabled: bidLoading || !bidAmount, className: "px-3 py-1.5 2xs:px-4 2xs:py-2 text-xs 2xs:text-sm bg-cyan-700 hover:bg-cyan-600 text-white rounded disabled:opacity-50 font-mono whitespace-nowrap", children: bidLoading ? 'Processing...' : t('confirmBid', 'Confirm Bid') })] })] }) })] }));
161
+ : (0, jsx_runtime_1.jsx)(IconChevronDown, { className: "w-4 h-4 text-neutral-500 shrink-0" })] }), showHistory && ((0, jsx_runtime_1.jsx)("div", { className: "mt-2 2xs:mt-3 sm:mt-4 space-y-1.5 2xs:space-y-2", children: historyList.map((a, idx) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between bg-neutral-800 border border-neutral-700 rounded p-2 2xs:p-3 hover:bg-neutral-700 transition-colors gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 shrink-0", children: UNIT_ICONS[a.unit_type || 'station'] || UNIT_ICONS.station }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-neutral-300 text-xs 2xs:text-sm truncate", children: a.unit_name || `Territory #${a.unit_id || a.auction_id}` }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[10px] 2xs:text-xs truncate", children: UNIT_LABELS[a.unit_type || 'station'] || 'Station' })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 2xs:gap-3 sm:gap-4 shrink-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-white text-xs 2xs:text-sm font-bold font-mono whitespace-nowrap", children: [(a.current_price ?? a.final_price ?? 0).toLocaleString(), " MCC"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[10px] 2xs:text-xs", children: [a.bid_count || 0, " bids"] })] }), (0, jsx_runtime_1.jsx)(Badge, { className: a.status === 'cancelled' ? BADGE_VARIANTS.error : BADGE_VARIANTS.default, children: a.status === 'ended' ? t('ended', 'Ended') : a.status === 'cancelled' ? t('cancelled', 'Cancelled') : t('sold', 'Sold') })] })] }, a.auction_id ?? idx))) }))] }) })), (0, jsx_runtime_1.jsx)(Modal, { open: bidDialogOpen, onClose: () => setBidDialogOpen(false), children: (0, jsx_runtime_1.jsxs)("div", { className: "p-3 2xs:p-4 sm:p-6 space-y-3 2xs:space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-white font-mono font-bold flex items-center gap-2 text-sm 2xs:text-base", children: [(0, jsx_runtime_1.jsx)(IconGavel, { className: "w-4 h-4 2xs:w-5 2xs:h-5 text-cyan-400" }), t('bidDialog', 'Place Bid')] }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 font-mono text-xs 2xs:text-sm mt-1 truncate", children: selectedAuction?.unit_name || `Territory #${selectedAuction?.unit_id || selectedAuction?.auction_id || selectedAuction?.id}` })] }), selectedAuction && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsx)(Badge, { className: BADGE_VARIANTS.info, children: UNIT_LABELS[selectedAuction.unit_type || 'station'] || 'Station' }), (0, jsx_runtime_1.jsx)(Badge, { className: BADGE_VARIANTS.default, children: selectedAuction.auction_type === 'first' ? t('firstAuction', 'First Auction') : selectedAuction.auction_type === 'second' ? t('secondAuction', 'Second Auction') : 'Auction' }), (0, jsx_runtime_1.jsxs)(Badge, { className: BADGE_VARIANTS.warning, children: [(0, jsx_runtime_1.jsx)(IconCrown, { className: "w-3 h-3" }), t('winnerMagistrate', 'Winner = Magistrate')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-neutral-800 border border-neutral-700 rounded p-3 2xs:p-4 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('currentHighest', 'Current Highest') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono", children: [(selectedAuction.current_price ?? selectedAuction.starting_price ?? 0).toLocaleString(), ' ', (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm sm:text-base text-neutral-500", children: "MCC" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-neutral-500 mt-1", children: [selectedAuction.bid_count || 0, " bids \u00B7 Starting price ", (selectedAuction.starting_price ?? 0).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 truncate", children: t('minIncrement', 'Min Next Bid') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white font-bold font-mono whitespace-nowrap", children: [((selectedAuction.current_price ?? selectedAuction.starting_price ?? 0) + (selectedAuction.bid_increment ?? 0)).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 break-words", children: [t('bidAmountLabel', 'Bid Amount'), " (", t('bidAmountMin', 'min {amount} MCC', { amount: ((selectedAuction.current_price ?? 0) + (selectedAuction.bid_increment ?? 0)).toLocaleString() }), ")"] }), (0, jsx_runtime_1.jsx)("input", { type: "number", step: selectedAuction.bid_increment ?? 1, value: bidAmount, onChange: (e) => setBidAmount(e.target.value), placeholder: t('bidAmountLabel', 'Enter bid amount'), className: "w-full bg-neutral-800 border border-neutral-600 text-white placeholder-neutral-400 px-2 py-2 2xs:px-3 2xs:py-2.5 rounded text-xs 2xs:text-sm font-mono focus:border-cyan-400 focus:outline-none" })] }), bidAmount && !isNaN(parseFloat(bidAmount)) && parseFloat(bidAmount) > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 truncate", children: [t('bidAmountLabel', 'Bid Amount'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-300 font-mono whitespace-nowrap", children: [parseFloat(bidAmount).toLocaleString(), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 truncate", children: [t('depositLabel', 'Deposit (50%)'), ":"] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono whitespace-nowrap", children: [(parseFloat(bidAmount) * 0.5).toLocaleString(), " MCC"] })] })] })), actionError && ((0, jsx_runtime_1.jsxs)("div", { className: "text-red-500 text-[10px] 2xs:text-xs flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3 h-3 shrink-0" }), actionError] }))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-end gap-2 2xs:gap-3 pt-2", children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setBidDialogOpen(false), className: "px-3 py-1.5 2xs:px-4 2xs:py-2 text-xs 2xs:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent whitespace-nowrap", children: t('cancel', 'Cancel') }), (0, jsx_runtime_1.jsx)("button", { onClick: handlePlaceBid, disabled: bidLoading || !bidAmount, className: "px-3 py-1.5 2xs:px-4 2xs:py-2 text-xs 2xs:text-sm bg-cyan-700 hover:bg-cyan-600 text-white rounded disabled:opacity-50 font-mono whitespace-nowrap", children: bidLoading ? 'Processing...' : t('confirmBid', 'Confirm Bid') })] })] }) })] }));
162
162
  }
@@ -84,19 +84,24 @@ function MicrocosmMiningPage({ basePath = '', onNavigate }) {
84
84
  const primaryWallet = walletList.find((w) => w.is_primary);
85
85
  const primaryAddress = primaryWallet?.wallet_address ?? null;
86
86
  const totalBalance = walletList.length > 0 ? walletList.reduce((sum, w) => sum + (w.mcc_balance ?? 0), 0) : mccBalance;
87
+ const [mineError, setMineError] = (0, react_1.useState)(null);
87
88
  const handleMine = (0, react_1.useCallback)(async () => {
88
- if (!primaryAddress)
89
+ setMineError(null);
90
+ if (!primaryAddress) {
91
+ setMineError(t('noBoundWallet', 'No bound wallet. Please bind a wallet in Profile first.'));
89
92
  return;
93
+ }
90
94
  try {
91
95
  await startMining({ amount: 1, wallet_address: primaryAddress });
92
96
  refreshRecords();
93
97
  }
94
98
  catch (err) {
99
+ setMineError(err instanceof Error ? err.message : String(err));
95
100
  }
96
- }, [startMining, primaryAddress, refreshRecords]);
101
+ }, [startMining, primaryAddress, refreshRecords, t]);
97
102
  const isLoading = mccStatsLoading && !mccStats;
98
103
  if (isLoading) {
99
104
  return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'Mining') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: t('subtitle', 'MCC minting via X402 protocol') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center py-12", children: [(0, jsx_runtime_1.jsx)(Spinner, { className: "mr-3" }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-sm", children: t('loadingMintData', 'Loading mining data...') })] })] }));
100
105
  }
101
- return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'Mining') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: t('subtitle', 'MCC minting via X402 protocol') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => refreshRecords(), className: "inline-flex items-center gap-1 2xs:gap-2 px-2 py-1.5 2xs:px-3 2xs:py-2 sm:px-4 sm:py-2.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent rounded-md transition-colors whitespace-nowrap flex-shrink-0", children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: mccStatsLoading ? 'animate-spin' : '' }), t('refresh', 'Refresh')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 2xs:gap-3 sm:gap-4 md:gap-6 mb-2 2xs:mb-3 sm:mb-4 md:mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2 sm:space-y-3 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center flex-wrap gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-xs bg-white/20 text-white px-1.5 py-0.5 rounded font-medium", children: t('x402Protocol', 'X402 Protocol') }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-xs bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded font-medium", children: "Solana Mainnet" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1", children: "MINING_PRICE" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col 2xs:flex-row items-start 2xs:items-baseline gap-1 2xs:gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-cyan-400 font-mono break-all", children: ["1 MCC = ", miningPrice > 0 ? fmt(miningPrice, 4) : '--', " USD"] }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded whitespace-nowrap", children: "base \u00D7 4" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col 2xs:flex-row items-start 2xs:items-center gap-1 2xs:gap-2 sm:gap-3 text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(IconShield, { className: "w-3 h-3 sm:w-3.5 sm:h-3.5 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('stablecoinDirectDesc', 'Stablecoin direct payment') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(IconZap, { className: "w-3 h-3 sm:w-3.5 sm:h-3.5 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('instantMintDesc', 'Instant on-chain minting') })] })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleMine, disabled: miningLoading || !primaryAddress, className: "inline-flex items-center justify-center gap-1.5 2xs:gap-2 px-3 py-2 2xs:px-4 2xs:py-3 sm:px-8 sm:py-4 text-xs 2xs:text-sm sm:text-base font-medium bg-cyan-700 hover:bg-cyan-600 text-white rounded-md whitespace-nowrap flex-shrink-0 disabled:opacity-50 transition-colors w-full sm:w-auto", children: [(0, jsx_runtime_1.jsx)(IconZap, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5" }), miningLoading ? t('processing', 'Processing...') : t('startMinting', 'Start Minting')] })] }), (0, jsx_runtime_1.jsx)("div", { className: "border-t border-neutral-700 pt-2 2xs:pt-3 sm:pt-4 mb-2 2xs:mb-3 sm:mb-4", children: (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3", children: "MINING STATISTICS" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "CURRENT EPOCH" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono", children: ["#", currentEpochNum] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: [fmtCompact(epochYield), " MCC / epoch"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCoins, {}), (0, jsx_runtime_1.jsxs)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: ["HALVING ", displayPhase] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono", children: [halvingRatio, ":1"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 tabular-nums truncate", children: [fmtCompact(totalMinted), " / ", fmtCompact(nextHalving)] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-1.5 2xs:mt-2 h-1 2xs:h-1.5 bg-neutral-900 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400 rounded-full transition-all", style: { width: `${Math.min(halvingProgress, 100)}%` } }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "mining_rate" }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono", children: miningRate > 0 ? `${miningRate}:1` : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "USD to MCC ratio" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "MINING VAULT" }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono", children: fmtCompact(miningVaultMcc) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "MCC available" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between mb-1.5 2xs:mb-2 sm:mb-3 gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "text-white flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 tracking-wider font-medium truncate", children: t('onChainBalance', 'On-Chain Balance') }), walletList.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-1 text-[8px] 2xs:text-[9px] sm:text-xs bg-white/20 text-white px-1 2xs:px-1.5 py-0.5 rounded flex-shrink-0", children: [(0, jsx_runtime_1.jsx)(IconCheckCircle, {}), walletList.length] }))] }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: t('onChainBalanceDesc', 'Real-time on-chain MCC balance across all bound wallets') }), walletsLoading && walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center py-8", children: [(0, jsx_runtime_1.jsx)(Spinner, { className: "mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-sm", children: t('loadingOnChainBalance', 'Loading on-chain balance...') })] })) : walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono", children: "total_balance" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white break-all", children: [fmt(mccBalance, 3), " MCC"] }), primaryAddress && ((0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 font-mono truncate", children: [primaryAddress.slice(0, 4), "...", primaryAddress.slice(-4)] }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono truncate", children: "total_on_chain" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white break-all", children: [fmt(totalBalance), " MCC"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 truncate", children: [walletList.length, " ", t('walletsTotal', 'wallets total')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono truncate", children: "primary_wallet" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white break-all", children: primaryWallet ? fmt(primaryWallet.mcc_balance ?? 0) : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 truncate font-mono", children: primaryAddress ? `${primaryAddress.slice(0, 4)}...${primaryAddress.slice(-4)}` : t('noPrimaryWallet', 'No primary wallet') })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setWalletsExpanded(!walletsExpanded), className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-400 hover:text-cyan-400 transition-colors mb-1.5 2xs:mb-2", children: [walletsExpanded ? (0, jsx_runtime_1.jsx)(IconChevronUp, {}) : (0, jsx_runtime_1.jsx)(IconChevronDown, {}), walletsExpanded ? t('collapse', 'Collapse') : t('expand', 'Expand'), " (", walletList.length, ")"] }), walletsExpanded && ((0, jsx_runtime_1.jsx)("div", { className: "space-y-1.5 2xs:space-y-2", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between px-2 py-1.5 2xs:px-3 2xs:p-2 bg-neutral-800 rounded hover:bg-neutral-700 text-[10px] 2xs:text-xs transition-colors gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-300 hover:text-white truncate font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "px-1 py-0.5 bg-cyan-400/20 text-cyan-400 rounded text-[8px] 2xs:text-[9px] flex-shrink-0", children: t('primaryLabel', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-2 flex-shrink-0", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white font-mono font-medium text-[10px] 2xs:text-xs", children: fmt(w.mcc_balance ?? 0) }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-600 hover:text-neutral-400", children: (0, jsx_runtime_1.jsx)(IconExternalLink, {}) })] })] }, w.wallet_address))) }))] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl blockchain-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowRecords(!showRecords), className: "w-full flex items-center justify-between group gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconHistory, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 tracking-wider font-medium truncate", children: t('mintRecords', 'Mining Records') }), recordsTotal > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-xs bg-neutral-500/20 text-neutral-300 px-1 2xs:px-1.5 py-0.5 rounded flex-shrink-0", children: recordsTotal }))] }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-400 group-hover:text-cyan-400 transition-colors flex-shrink-0", children: showRecords ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t('collapse', 'Collapse'), " ", (0, jsx_runtime_1.jsx)(IconChevronUp, {})] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t('expand', 'Expand'), " ", (0, jsx_runtime_1.jsx)(IconChevronDown, {})] })) })] }), showRecords && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 sm:mt-4 pt-2 2xs:pt-3 sm:pt-4 border-t border-neutral-700", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: t('allRecordsDesc', 'All x402 non-custodial minting transaction records') }), recordsLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-6 2xs:py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : records.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-[9px] 2xs:text-[10px] sm:text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-1.5 2xs:py-2 font-normal hidden xs:table-cell", children: t('colTime', 'Time') }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-1.5 2xs:py-2 font-normal hidden sm:table-cell", children: t('payment', 'Paid') }), (0, jsx_runtime_1.jsx)("th", { className: "text-left xs:text-right py-1.5 2xs:py-2 font-normal", children: t('earnedMcc', 'Minted') }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-1.5 2xs:py-2 font-normal", children: t('colStatus', 'Status') })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: records.map((r, i) => ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800 hover:bg-neutral-800/50", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-2 2xs:py-3 text-neutral-300 font-mono text-[9px] 2xs:text-[10px] sm:text-xs hidden xs:table-cell", children: formatDateTime(r.mined_at ?? r.created_at ?? r.timestamp) }), (0, jsx_runtime_1.jsxs)("td", { className: "py-2 2xs:py-3 text-right text-white font-mono hidden sm:table-cell", children: [fmt(r.paid_amount ?? r.payment_amount ?? r.stablecoin_amount ?? 0), " ", r.stablecoin ?? r.payment_type ?? 'USDC'] }), (0, jsx_runtime_1.jsxs)("td", { className: "py-2 2xs:py-3 text-left xs:text-right text-cyan-400 font-mono", children: [(0, jsx_runtime_1.jsx)("div", { className: "xs:hidden text-[8px] 2xs:text-[9px] text-neutral-500 mb-0.5 font-mono", children: formatDateTime(r.mined_at ?? r.created_at ?? r.timestamp) }), "+", fmt(r.mcc_amount ?? r.minted ?? 0), " MCC", (0, jsx_runtime_1.jsxs)("div", { className: "sm:hidden text-[8px] 2xs:text-[9px] text-neutral-500 mt-0.5 font-mono", children: [fmt(r.paid_amount ?? r.payment_amount ?? r.stablecoin_amount ?? 0), " ", r.stablecoin ?? r.payment_type ?? 'USDC'] })] }), (0, jsx_runtime_1.jsx)("td", { className: "py-2 2xs:py-3 text-right", children: (0, jsx_runtime_1.jsx)("a", { href: r.tx_signature ? `https://solscan.io/tx/${r.tx_signature}` : undefined, target: "_blank", rel: "noopener noreferrer", className: "text-[8px] 2xs:text-[9px] sm:text-xs px-1 2xs:px-1.5 py-0.5 rounded bg-white/20 text-white hover:bg-cyan-400/30 hover:text-cyan-200 transition-colors whitespace-nowrap", children: t('completed', 'confirmed') }) })] }, r.tx_signature ?? `${recordsPage}-${i}`))) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-6 2xs:py-8 text-neutral-500 text-[10px] 2xs:text-xs sm:text-sm", children: t('noMintRecords', 'No mining records yet') })), recordsTotal > RECORDS_PAGE_SIZE && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mt-2 2xs:mt-3 sm:mt-4 pt-2 2xs:pt-3 sm:pt-4 border-t border-neutral-800 text-[9px] 2xs:text-[10px] sm:text-xs gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-500 font-mono truncate", children: [recordsPage, "/", recordsTotalPages, " \u00B7 ", recordsTotal] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 2xs:gap-2 flex-shrink-0", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setRecordsPage(p => Math.max(1, p - 1)), disabled: recordsPage <= 1 || recordsLoading, className: "px-2 2xs:px-3 py-1 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-white rounded disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: ["\u2039 ", t('prevPage', 'Prev')] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setRecordsPage(p => Math.min(recordsTotalPages, p + 1)), disabled: recordsPage >= recordsTotalPages || recordsLoading, className: "px-2 2xs:px-3 py-1 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-white rounded disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: [t('nextPage', 'Next'), " \u203A"] })] })] }))] }))] }) }), s?.pool_mcc_bought != null && ((0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3", children: "POOL STATUS" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 lg:grid-cols-3 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_market_made" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono break-all", children: fmt(s.pool_mcc_bought ?? 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "MCC bought via CPMM" })] }), s?.pool_usdc_balance != null && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "stablecoin_pool" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono break-all", children: ["$", fmt((s.pool_usdc_balance ?? 0) + (s.pool_usdt_balance ?? 0))] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: ["USDT ", fmt(s.pool_usdt_balance ?? 0), " / USDC ", fmt(s.pool_usdc_balance ?? 0)] })] })), s?.pool_tvl != null && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "tvl" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono break-all", children: ["$", fmt(s.pool_tvl ?? 0)] }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "Total value locked" })] }))] })] })), stats && ((0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4 font-mono", children: "MY_MINING_STATS" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_mined" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono break-all", children: [fmt(stats.total_mined ?? 0), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_paid" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono break-all", children: [fmt(stats.total_paid ?? 0), " USDC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "mining_count" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: stats.mining_count ?? 0 })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "active_days" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: stats.active_days_30d ?? 0 })] })] })] })), (0, jsx_runtime_1.jsx)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsx)(IconShield, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white mt-0.5 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('securityNote', 'All transactions are executed on-chain via X402 protocol. Your private keys never leave your wallet. Microcosm uses non-custodial minting with atomic on-chain verification.') })] }) })] }));
106
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'Mining') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: t('subtitle', 'MCC minting via X402 protocol') })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => refreshRecords(), className: "inline-flex items-center gap-1 2xs:gap-2 px-2 py-1.5 2xs:px-3 2xs:py-2 sm:px-4 sm:py-2.5 text-[10px] 2xs:text-xs sm:text-sm border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent rounded-md transition-colors whitespace-nowrap flex-shrink-0", children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: mccStatsLoading ? 'animate-spin' : '' }), t('refresh', 'Refresh')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-3 2xs:p-4 sm:p-5 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 2xs:space-y-4 mb-3 2xs:mb-4 md:mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center flex-wrap gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs bg-white/20 text-white px-2 py-0.5 rounded font-medium whitespace-nowrap", children: t('x402Protocol', 'X402 Protocol') }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs bg-cyan-400/20 text-cyan-400 px-2 py-0.5 rounded font-medium whitespace-nowrap", children: "Solana Mainnet" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5", children: "MINING_PRICE" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-baseline gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl md:text-4xl font-bold text-cyan-400 font-mono whitespace-nowrap", children: ["1 MCC = ", miningPrice > 0 ? fmt(miningPrice, 4) : '--', " USD"] }), (0, jsx_runtime_1.jsx)("span", { className: "text-[9px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 px-1.5 py-0.5 rounded whitespace-nowrap", children: "base \u00D7 4" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center flex-wrap gap-x-4 gap-y-1 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconShield, { className: "w-3.5 h-3.5 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('stablecoinDirectDesc', 'Stablecoin direct payment') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconZap, { className: "w-3.5 h-3.5 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('instantMintDesc', 'Instant on-chain minting') })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: handleMine, disabled: miningLoading || !primaryAddress, className: "w-full inline-flex items-center justify-center gap-2 px-4 py-3 sm:py-4 text-sm sm:text-base font-medium bg-cyan-700 hover:bg-cyan-600 text-white rounded-md whitespace-nowrap disabled:opacity-50 transition-colors", children: [(0, jsx_runtime_1.jsx)(IconZap, { className: "w-4 h-4 sm:w-5 sm:h-5" }), miningLoading ? t('processing', 'Processing...') : t('startMinting', 'Start Minting')] }), mineError && ((0, jsx_runtime_1.jsx)("div", { className: "bg-red-900/20 border border-red-800 rounded p-2 2xs:p-3 text-[10px] 2xs:text-xs text-red-300", children: mineError }))] }), (0, jsx_runtime_1.jsx)("div", { className: "border-t border-neutral-700 pt-2 2xs:pt-3 sm:pt-4 mb-2 2xs:mb-3 sm:mb-4", children: (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3", children: "MINING STATISTICS" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "CURRENT EPOCH" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono", children: ["#", currentEpochNum] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: [fmtCompact(epochYield), " MCC / epoch"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCoins, {}), (0, jsx_runtime_1.jsxs)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: ["HALVING ", displayPhase] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono", children: [halvingRatio, ":1"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 tabular-nums truncate", children: [fmtCompact(totalMinted), " / ", fmtCompact(nextHalving)] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-1.5 2xs:mt-2 h-1 2xs:h-1.5 bg-neutral-900 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400 rounded-full transition-all", style: { width: `${Math.min(halvingProgress, 100)}%` } }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "mining_rate" }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-cyan-400 font-mono", children: miningRate > 0 ? `${miningRate}:1` : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "USD to MCC ratio" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 2xs:gap-1.5 sm:gap-2 mb-1.5 2xs:mb-2", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase truncate", children: "MINING VAULT" }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono", children: fmtCompact(miningVaultMcc) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "MCC available" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between mb-1.5 2xs:mb-2 sm:mb-3 gap-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "text-white flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 tracking-wider font-medium truncate", children: t('onChainBalance', 'On-Chain Balance') }), walletList.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-1 text-[8px] 2xs:text-[9px] sm:text-xs bg-white/20 text-white px-1 2xs:px-1.5 py-0.5 rounded flex-shrink-0", children: [(0, jsx_runtime_1.jsx)(IconCheckCircle, {}), walletList.length] }))] }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: t('onChainBalanceDesc', 'Real-time on-chain MCC balance across all bound wallets') }), walletsLoading && walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center py-8", children: [(0, jsx_runtime_1.jsx)(Spinner, { className: "mr-2" }), (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400 text-sm", children: t('loadingOnChainBalance', 'Loading on-chain balance...') })] })) : walletList.length === 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono", children: "total_balance" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: [fmt(mccBalance, 3), " MCC"] }), primaryAddress && ((0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 font-mono truncate", children: [primaryAddress.slice(0, 4), "...", primaryAddress.slice(-4)] }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3 mb-2 2xs:mb-3 sm:mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono truncate", children: "total_on_chain" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: [fmt(totalBalance), " MCC"] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 truncate", children: [walletList.length, " ", t('walletsTotal', 'wallets total')] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase mb-1 font-mono truncate", children: "primary_wallet" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: primaryWallet ? fmt(primaryWallet.mcc_balance ?? 0) : '--' }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mt-1 truncate font-mono", children: primaryAddress ? `${primaryAddress.slice(0, 4)}...${primaryAddress.slice(-4)}` : t('noPrimaryWallet', 'No primary wallet') })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setWalletsExpanded(!walletsExpanded), className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-400 hover:text-cyan-400 transition-colors mb-1.5 2xs:mb-2", children: [walletsExpanded ? (0, jsx_runtime_1.jsx)(IconChevronUp, {}) : (0, jsx_runtime_1.jsx)(IconChevronDown, {}), walletsExpanded ? t('collapse', 'Collapse') : t('expand', 'Expand'), " (", walletList.length, ")"] }), walletsExpanded && ((0, jsx_runtime_1.jsx)("div", { className: "space-y-1.5 2xs:space-y-2", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between px-2 py-1.5 2xs:px-3 2xs:p-2 bg-neutral-800 rounded hover:bg-neutral-700 text-[10px] 2xs:text-xs transition-colors gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3 h-3 text-neutral-500 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-300 hover:text-white truncate font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "px-1 py-0.5 bg-cyan-400/20 text-cyan-400 rounded text-[8px] 2xs:text-[9px] flex-shrink-0", children: t('primaryLabel', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 2xs:gap-2 flex-shrink-0", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-white font-mono font-medium text-[10px] 2xs:text-xs", children: fmt(w.mcc_balance ?? 0) }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-600 hover:text-neutral-400", children: (0, jsx_runtime_1.jsx)(IconExternalLink, {}) })] })] }, w.wallet_address))) }))] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl blockchain-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setShowRecords(!showRecords), className: "w-full flex items-center justify-between group gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconHistory, {}), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 tracking-wider font-medium truncate", children: t('mintRecords', 'Mining Records') }), recordsTotal > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[9px] sm:text-xs bg-neutral-500/20 text-neutral-300 px-1 2xs:px-1.5 py-0.5 rounded flex-shrink-0", children: recordsTotal }))] }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1 text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-400 group-hover:text-cyan-400 transition-colors flex-shrink-0", children: showRecords ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t('collapse', 'Collapse'), " ", (0, jsx_runtime_1.jsx)(IconChevronUp, {})] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [t('expand', 'Expand'), " ", (0, jsx_runtime_1.jsx)(IconChevronDown, {})] })) })] }), showRecords && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 sm:mt-4 pt-2 2xs:pt-3 sm:pt-4 border-t border-neutral-700", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: t('allRecordsDesc', 'All x402 non-custodial minting transaction records') }), recordsLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center py-6 2xs:py-8", children: (0, jsx_runtime_1.jsx)(Spinner, {}) })) : records.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "overflow-x-auto", children: (0, jsx_runtime_1.jsxs)("table", { className: "w-full text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { className: "text-neutral-400 text-[9px] 2xs:text-[10px] sm:text-xs border-b border-neutral-700", children: [(0, jsx_runtime_1.jsx)("th", { className: "text-left py-1.5 2xs:py-2 font-normal hidden xs:table-cell", children: t('colTime', 'Time') }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-1.5 2xs:py-2 font-normal hidden sm:table-cell", children: t('payment', 'Paid') }), (0, jsx_runtime_1.jsx)("th", { className: "text-left xs:text-right py-1.5 2xs:py-2 font-normal", children: t('earnedMcc', 'Minted') }), (0, jsx_runtime_1.jsx)("th", { className: "text-right py-1.5 2xs:py-2 font-normal", children: t('colStatus', 'Status') })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: records.map((r, i) => ((0, jsx_runtime_1.jsxs)("tr", { className: "border-b border-neutral-800 hover:bg-neutral-800/50", children: [(0, jsx_runtime_1.jsx)("td", { className: "py-2 2xs:py-3 text-neutral-300 font-mono text-[9px] 2xs:text-[10px] sm:text-xs hidden xs:table-cell", children: formatDateTime(r.mined_at ?? r.created_at ?? r.timestamp) }), (0, jsx_runtime_1.jsxs)("td", { className: "py-2 2xs:py-3 text-right text-white font-mono hidden sm:table-cell", children: [fmt(r.paid_amount ?? r.payment_amount ?? r.stablecoin_amount ?? 0), " ", r.stablecoin ?? r.payment_type ?? 'USDC'] }), (0, jsx_runtime_1.jsxs)("td", { className: "py-2 2xs:py-3 text-left xs:text-right text-cyan-400 font-mono", children: [(0, jsx_runtime_1.jsx)("div", { className: "xs:hidden text-[8px] 2xs:text-[9px] text-neutral-500 mb-0.5 font-mono", children: formatDateTime(r.mined_at ?? r.created_at ?? r.timestamp) }), "+", fmt(r.mcc_amount ?? r.minted ?? 0), " MCC", (0, jsx_runtime_1.jsxs)("div", { className: "sm:hidden text-[8px] 2xs:text-[9px] text-neutral-500 mt-0.5 font-mono", children: [fmt(r.paid_amount ?? r.payment_amount ?? r.stablecoin_amount ?? 0), " ", r.stablecoin ?? r.payment_type ?? 'USDC'] })] }), (0, jsx_runtime_1.jsx)("td", { className: "py-2 2xs:py-3 text-right", children: (0, jsx_runtime_1.jsx)("a", { href: r.tx_signature ? `https://solscan.io/tx/${r.tx_signature}` : undefined, target: "_blank", rel: "noopener noreferrer", className: "text-[8px] 2xs:text-[9px] sm:text-xs px-1 2xs:px-1.5 py-0.5 rounded bg-white/20 text-white hover:bg-cyan-400/30 hover:text-cyan-200 transition-colors whitespace-nowrap", children: t('completed', 'confirmed') }) })] }, r.tx_signature ?? `${recordsPage}-${i}`))) })] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-6 2xs:py-8 text-neutral-500 text-[10px] 2xs:text-xs sm:text-sm", children: t('noMintRecords', 'No mining records yet') })), recordsTotal > RECORDS_PAGE_SIZE && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mt-2 2xs:mt-3 sm:mt-4 pt-2 2xs:pt-3 sm:pt-4 border-t border-neutral-800 text-[9px] 2xs:text-[10px] sm:text-xs gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-500 font-mono truncate", children: [recordsPage, "/", recordsTotalPages, " \u00B7 ", recordsTotal] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1 2xs:gap-2 flex-shrink-0", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setRecordsPage(p => Math.max(1, p - 1)), disabled: recordsPage <= 1 || recordsLoading, className: "px-2 2xs:px-3 py-1 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-white rounded disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: ["\u2039 ", t('prevPage', 'Prev')] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setRecordsPage(p => Math.min(recordsTotalPages, p + 1)), disabled: recordsPage >= recordsTotalPages || recordsLoading, className: "px-2 2xs:px-3 py-1 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 hover:text-white rounded disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: [t('nextPage', 'Next'), " \u203A"] })] })] }))] }))] }) }), s?.pool_mcc_bought != null && ((0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3", children: "POOL STATUS" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 lg:grid-cols-3 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_market_made" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: fmt(s.pool_mcc_bought ?? 0) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "MCC bought via CPMM" })] }), s?.pool_usdc_balance != null && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "stablecoin_pool" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: ["$", fmt((s.pool_usdc_balance ?? 0) + (s.pool_usdt_balance ?? 0))] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: ["USDT ", fmt(s.pool_usdt_balance ?? 0), " / USDC ", fmt(s.pool_usdc_balance ?? 0)] })] })), s?.pool_tvl != null && ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "tvl" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: ["$", fmt(s.pool_tvl ?? 0)] }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-1 truncate", children: "Total value locked" })] }))] })] })), stats && ((0, jsx_runtime_1.jsxs)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-xs text-[#5EEAD4] tracking-widest uppercase mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4 font-mono", children: "MY_MINING_STATS" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_mined" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: [fmt(stats.total_mined ?? 0), " MCC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "total_paid" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: [fmt(stats.total_paid ?? 0), " USDC"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "mining_count" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: stats.mining_count ?? 0 })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-2.5 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-[#5EEAD4] tracking-widest uppercase font-mono truncate", children: "active_days" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm 2xs:text-base sm:text-lg font-bold text-white font-mono", children: stats.active_days_30d ?? 0 })] })] })] })), (0, jsx_runtime_1.jsx)("div", { className: "backdrop-blur-md bg-white/5 border border-white/10 rounded-xl p-2 2xs:p-3 sm:p-4 md:p-6 blockchain-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-neutral-400 text-[10px] 2xs:text-xs sm:text-sm", children: [(0, jsx_runtime_1.jsx)(IconShield, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 text-white mt-0.5 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('securityNote', 'All transactions are executed on-chain via X402 protocol. Your private keys never leave your wallet. Microcosm uses non-custodial minting with atomic on-chain verification.') })] }) })] }));
102
107
  }
@@ -136,7 +136,7 @@ function MicrocosmProfilePage({ walletSection, } = {}) {
136
136
  return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6 font-mono", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider truncate", children: t('title', 'Profile') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400", children: t('subtitle', 'View and manage your personal information') })] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "p-3 bg-red-900/20 border border-red-800 rounded text-sm text-red-300", children: error })), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col 2xs:flex-row items-start gap-3 2xs:gap-4 mb-4 2xs:mb-6 pb-4 2xs:pb-6 border-b border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative group shrink-0", children: [profile?.avatar_url ? ((0, jsx_runtime_1.jsx)("img", { src: profile.avatar_url, alt: "", className: "h-16 w-16 2xs:h-20 2xs:w-20 rounded bg-neutral-800 border border-neutral-700 object-cover" })) : ((0, jsx_runtime_1.jsx)("div", { className: "h-16 w-16 2xs:h-20 2xs:w-20 rounded bg-cyan-400/20 border border-cyan-400/30 flex items-center justify-center text-cyan-400 text-2xl 2xs:text-3xl font-bold", children: displayName.charAt(0).toUpperCase() })), (0, jsx_runtime_1.jsx)("button", { onClick: () => fileInputRef.current?.click(), disabled: uploadingAvatar, className: "absolute inset-0 bg-black/50 rounded opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center text-white text-xs disabled:opacity-30", children: uploadingAvatar ? '...' : t('edit', 'edit') }), (0, jsx_runtime_1.jsx)("input", { ref: fileInputRef, type: "file", accept: "image/jpeg,image/png,image/gif,image/webp", onChange: handleAvatarChange, className: "hidden" })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex-1 min-w-0 w-full", children: editing ? ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsx)("input", { type: "text", value: editName, onChange: (e) => setEditName(e.target.value), className: "w-full bg-neutral-800 border border-neutral-600 rounded px-3 py-2 text-white text-sm focus:outline-none focus:border-cyan-400", placeholder: t('displayName', 'Display name') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("button", { onClick: handleSave, disabled: saving, className: "px-3 py-1.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-sm disabled:opacity-50", children: saving ? t('saving', 'Saving...') : t('save', 'Save') }), (0, jsx_runtime_1.jsx)("button", { onClick: () => {
137
137
  setEditName(profile?.display_name || '');
138
138
  setEditing(false);
139
- }, disabled: saving, className: "px-3 py-1.5 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 rounded text-sm", children: t('cancel', 'Cancel') })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl text-white truncate", children: displayName }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setEditing(true), className: "text-xs text-neutral-500 hover:text-cyan-400", children: ["[", t('edit', 'edit'), "]"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-neutral-400 mt-1 truncate", children: profile?.email || t('noEmail', '(no email)') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1.5 2xs:gap-2 mt-2 flex-wrap", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-neutral-800 text-neutral-300 rounded text-xs border border-neutral-700", children: profile?.role || t('normalUser', 'user') }), profile?.email_verified ? ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-green-900/30 text-green-400 rounded text-xs border border-green-800", children: t('verified', 'verified') })) : ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-red-900/30 text-red-400 rounded text-xs border border-red-800", children: t('unverified', 'unverified') }))] })] })) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 gap-2 2xs:gap-3 sm:gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: "UID" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-white font-mono break-all", children: profile?.uid || userInfo?.uid || '-' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('shortId', 'Short ID') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white font-mono truncate", children: profile?.short_id || '-' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('created', 'Created') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white truncate", children: formatDate(profile?.created_at) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('lastLogin', 'Last Login') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white truncate", children: formatDate(profile?.last_login_at) })] })] })] }), levelData && ((0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('levelStatus', 'Level Status'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 2xs:space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between gap-2 p-3 2xs:p-4 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 truncate", children: t('currentLevel', 'CURRENT LEVEL') }), (0, jsx_runtime_1.jsx)("div", { className: `text-base 2xs:text-lg xs:text-xl font-bold truncate ${lvlInfo.color}`, children: lvlInfo.label }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-500 mt-1 line-clamp-2", children: lvlInfo.description })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right shrink-0 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 truncate", children: t('holdings', 'HOLDINGS') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-white font-mono", children: ["S:", levelData.holdings?.station ?? 0, " M:", levelData.holdings?.matrix ?? 0, " Se:", levelData.holdings?.sector ?? 0, " Sy:", levelData.holdings?.system ?? 0] })] })] }), levelData.next_level_requirement && ((0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400 tracking-wider", children: t('progress', 'PROGRESS') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white text-sm font-mono", children: [levelData.progress_percent ?? 0, "%"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-neutral-900 rounded-full h-2", children: (0, jsx_runtime_1.jsx)("div", { className: "h-2 rounded-full bg-cyan-400 transition-all", style: { width: `${Math.min(levelData.progress_percent ?? 0, 100)}%` } }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500 mt-2", children: levelData.next_level_requirement.description || '' }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 mt-1", children: [levelData.next_level_requirement.have, "/", levelData.next_level_requirement.need, ' ', levelData.next_level_requirement.tier, " \u2192 ", ' ', (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: levelData.next_rank })] })] }))] }) })), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('emailVerification', 'Email Verification'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('status', 'STATUS') }), profile?.email_verified ? ((0, jsx_runtime_1.jsx)("div", { className: "text-green-400 text-sm", children: t('statusVerified', 'Verified') })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-red-400 text-sm", children: t('statusUnverified', 'Unverified') }))] }), !profile?.email_verified && ((0, jsx_runtime_1.jsx)("button", { onClick: async () => {
139
+ }, disabled: saving, className: "px-3 py-1.5 border border-neutral-700 text-neutral-400 hover:bg-neutral-800 rounded text-sm", children: t('cancel', 'Cancel') })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl text-white truncate", children: displayName }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => setEditing(true), className: "text-xs text-neutral-500 hover:text-cyan-400", children: ["[", t('edit', 'edit'), "]"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-neutral-400 mt-1 truncate", children: profile?.email || t('noEmail', '(no email)') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-1.5 2xs:gap-2 mt-2 flex-wrap", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-neutral-800 text-neutral-300 rounded text-xs border border-neutral-700", children: profile?.role || t('normalUser', 'user') }), profile?.email_verified ? ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-green-900/30 text-green-400 rounded text-xs border border-green-800", children: t('verified', 'verified') })) : ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-0.5 bg-red-900/30 text-red-400 rounded text-xs border border-red-800", children: t('unverified', 'unverified') }))] })] })) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 2xs:grid-cols-2 gap-2 2xs:gap-3 sm:gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: "UID" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-white font-mono", children: profile?.uid || userInfo?.uid || '-' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('shortId', 'Short ID') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white font-mono truncate", children: profile?.short_id || '-' })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('created', 'Created') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white truncate", children: formatDate(profile?.created_at) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 sm:p-4 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('lastLogin', 'Last Login') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs 2xs:text-sm text-white truncate", children: formatDate(profile?.last_login_at) })] })] })] }), levelData && ((0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('levelStatus', 'Level Status'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 2xs:space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between gap-2 p-3 2xs:p-4 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 truncate", children: t('currentLevel', 'CURRENT LEVEL') }), (0, jsx_runtime_1.jsx)("div", { className: `text-base 2xs:text-lg xs:text-xl font-bold truncate ${lvlInfo.color}`, children: lvlInfo.label }), (0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-500 mt-1 line-clamp-2", children: lvlInfo.description })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right shrink-0 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1 truncate", children: t('holdings', 'HOLDINGS') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs text-white font-mono", children: ["S:", levelData.holdings?.station ?? 0, " M:", levelData.holdings?.matrix ?? 0, " Se:", levelData.holdings?.sector ?? 0, " Sy:", levelData.holdings?.system ?? 0] })] })] }), levelData.next_level_requirement && ((0, jsx_runtime_1.jsxs)("div", { className: "p-4 bg-neutral-800 rounded", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400 tracking-wider", children: t('progress', 'PROGRESS') }), (0, jsx_runtime_1.jsxs)("span", { className: "text-white text-sm font-mono", children: [levelData.progress_percent ?? 0, "%"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full bg-neutral-900 rounded-full h-2", children: (0, jsx_runtime_1.jsx)("div", { className: "h-2 rounded-full bg-cyan-400 transition-all", style: { width: `${Math.min(levelData.progress_percent ?? 0, 100)}%` } }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-500 mt-2", children: levelData.next_level_requirement.description || '' }), (0, jsx_runtime_1.jsxs)("div", { className: "text-xs text-neutral-400 mt-1", children: [levelData.next_level_requirement.have, "/", levelData.next_level_requirement.need, ' ', levelData.next_level_requirement.tier, " \u2192 ", ' ', (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: levelData.next_rank })] })] }))] }) })), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('emailVerification', 'Email Verification'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 tracking-wider mb-1", children: t('status', 'STATUS') }), profile?.email_verified ? ((0, jsx_runtime_1.jsx)("div", { className: "text-green-400 text-sm", children: t('statusVerified', 'Verified') })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-red-400 text-sm", children: t('statusUnverified', 'Unverified') }))] }), !profile?.email_verified && ((0, jsx_runtime_1.jsx)("button", { onClick: async () => {
140
140
  setResendingVerification(true);
141
141
  setResendMessage(null);
142
142
  try {
@@ -61,7 +61,7 @@ function MicrocosmTwoFactorSettings({} = {}) {
61
61
  };
62
62
  if (loading && !status)
63
63
  return null;
64
- return ((0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 mb-3 2xs:mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2 min-w-0", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm text-neutral-300 font-medium tracking-wider truncate", children: t('twoFactorAuth', 'TWO FACTOR AUTH') }) }), (0, jsx_runtime_1.jsx)("span", { className: `px-2 py-0.5 rounded text-[10px] 2xs:text-xs whitespace-nowrap shrink-0 ${status?.enabled ? 'bg-green-900/30 text-green-400 border border-green-800' : 'bg-neutral-800 text-neutral-400 border border-neutral-700'}`, children: status?.enabled ? t('enabled', 'enabled') : t('disabled', 'disabled') })] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "p-2 bg-red-900/20 border border-red-800 rounded text-xs text-red-300 mb-3", children: error })), step === 'idle' && !status?.enabled && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('twoFactorDesc', 'Add an extra layer of security using Google Authenticator or any TOTP app.') }), (0, jsx_runtime_1.jsx)("button", { onClick: handleBegin, disabled: loading, className: "px-3 py-1.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs disabled:opacity-50", children: loading ? t('settingUp', 'Setting up...') : t('enable2fa', 'Enable 2FA') })] })), step === 'idle' && status?.enabled && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-3 blockchain-sub-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mb-1", children: t('status', 'STATUS') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-green-400 text-sm", children: [t('active', 'Active'), " ", status.created_at ? `${t('since', 'since')} ${new Date(status.created_at).toLocaleDateString()}` : ''] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setStep('disable'), className: "px-3 py-1.5 border border-red-900 text-red-400 hover:bg-red-950 rounded text-xs", children: t('disable2fa', 'Disable 2FA') })] })), step === 'qr' && setupData && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('scanQrStep', '1. Scan this QR code with Google Authenticator or any TOTP app.') }), setupData.qr_code && ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center bg-white rounded p-3 2xs:p-4", children: (0, jsx_runtime_1.jsx)("img", { src: setupData.qr_code.startsWith('data:') ? setupData.qr_code : `data:image/png;base64,${setupData.qr_code}`, alt: "2FA QR Code", className: "w-40 h-40 2xs:w-48 2xs:h-48" }) })), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-3 blockchain-sub-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400", children: t('manualKey', 'MANUAL KEY') }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowSecret(!showSecret), className: "text-neutral-500 hover:text-neutral-300 text-xs", children: showSecret ? t('hide', 'hide') : t('show', 'show') })] }), (0, jsx_runtime_1.jsx)("code", { className: "text-xs text-cyan-400 break-all", children: showSecret ? setupData.secret : '••••••••••••••••' })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('enter6DigitCode', '2. Enter the 6-digit code from your app.') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("input", { type: "text", value: verifyCode, onChange: (e) => setVerifyCode(e.target.value.replace(/\D/g, '').slice(0, 6)), placeholder: "000000", className: "flex-1 bg-neutral-800 border border-neutral-700 text-white p-2 rounded text-center text-lg font-mono tracking-[0.5em] outline-none focus:border-cyan-500", maxLength: 6 }), (0, jsx_runtime_1.jsx)("button", { onClick: handleVerify, disabled: loading || verifyCode.length !== 6, className: "px-4 py-2 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs disabled:opacity-50", children: loading ? t('verifying', 'Verifying...') : t('verify', 'Verify') })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => {
64
+ return ((0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 mb-3 2xs:mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2 min-w-0", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs 2xs:text-sm text-neutral-300 font-medium tracking-wider truncate", children: t('twoFactorAuth', 'TWO FACTOR AUTH') }) }), (0, jsx_runtime_1.jsx)("span", { className: `px-2 py-0.5 rounded text-[10px] 2xs:text-xs whitespace-nowrap shrink-0 ${status?.enabled ? 'bg-green-900/30 text-green-400 border border-green-800' : 'bg-neutral-800 text-neutral-400 border border-neutral-700'}`, children: status?.enabled ? t('enabled', 'enabled') : t('disabled', 'disabled') })] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "p-2 bg-red-900/20 border border-red-800 rounded text-xs text-red-300 mb-3", children: error })), step === 'idle' && !status?.enabled && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('twoFactorDesc', 'Add an extra layer of security using Google Authenticator or any TOTP app.') }), (0, jsx_runtime_1.jsx)("button", { onClick: handleBegin, disabled: loading, className: "px-3 py-1.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs disabled:opacity-50", children: loading ? t('settingUp', 'Setting up...') : t('enable2fa', 'Enable 2FA') })] })), step === 'idle' && status?.enabled && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-3 blockchain-sub-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-xs text-neutral-400 mb-1", children: t('status', 'STATUS') }), (0, jsx_runtime_1.jsxs)("div", { className: "text-green-400 text-sm", children: [t('active', 'Active'), " ", status.created_at ? `${t('since', 'since')} ${new Date(status.created_at).toLocaleDateString()}` : ''] })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setStep('disable'), className: "px-3 py-1.5 border border-red-900 text-red-400 hover:bg-red-950 rounded text-xs", children: t('disable2fa', 'Disable 2FA') })] })), step === 'qr' && setupData && ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('scanQrStep', '1. Scan this QR code with Google Authenticator or any TOTP app.') }), setupData.qr_code && ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center bg-white rounded p-3 2xs:p-4", children: (0, jsx_runtime_1.jsx)("img", { src: setupData.qr_code.startsWith('data:') ? setupData.qr_code : `data:image/png;base64,${setupData.qr_code}`, alt: "2FA QR Code", className: "w-40 h-40 2xs:w-48 2xs:h-48" }) })), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-3 blockchain-sub-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-1", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-neutral-400", children: t('manualKey', 'MANUAL KEY') }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setShowSecret(!showSecret), className: "text-neutral-500 hover:text-neutral-300 text-xs", children: showSecret ? t('hide', 'hide') : t('show', 'show') })] }), (0, jsx_runtime_1.jsx)("code", { className: "text-xs text-cyan-400", children: showSecret ? setupData.secret : '••••••••••••••••' })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xs text-neutral-400", children: t('enter6DigitCode', '2. Enter the 6-digit code from your app.') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("input", { type: "text", value: verifyCode, onChange: (e) => setVerifyCode(e.target.value.replace(/\D/g, '').slice(0, 6)), placeholder: "000000", className: "flex-1 bg-neutral-800 border border-neutral-700 text-white p-2 rounded text-center text-lg font-mono tracking-[0.5em] outline-none focus:border-cyan-500", maxLength: 6 }), (0, jsx_runtime_1.jsx)("button", { onClick: handleVerify, disabled: loading || verifyCode.length !== 6, className: "px-4 py-2 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs disabled:opacity-50", children: loading ? t('verifying', 'Verifying...') : t('verify', 'Verify') })] }), (0, jsx_runtime_1.jsx)("button", { onClick: () => {
65
65
  setStep('idle');
66
66
  setVerifyCode('');
67
67
  clearSetup();
@@ -33,5 +33,5 @@ function MicrocosmReincarnationPage({ title, subtitle, } = {}) {
33
33
  const resolvedSubtitle = subtitle ?? t('subtitle', '2140 Protocol autonomous market making');
34
34
  const { data: priceData, loading } = (0, auth_react_1.useMCCPrice)({ refetchInterval: 60000 });
35
35
  const basePrice = priceData?.price ?? 0;
36
- return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6 font-mono", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider truncate", children: resolvedTitle }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: resolvedSubtitle })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 2xs:grid-cols-2 xs:grid-cols-2 sm:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "BASE PRICE" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-cyan-400 truncate", children: [loading ? '—' : formatNumber(basePrice, 4), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm font-normal text-neutral-500 ml-1", children: "USD" })] })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "PROTOCOL" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: "2140" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "EMA weighted" })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "EPOCH" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: "1h" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "Auto buyback" })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "DEX" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-cyan-400", children: "Raydium" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "CPMM pool" })] })] }), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('contractAddresses', 'Contract Addresses'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 2xs:space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: "Reincarnation Pool PDA" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs sm:text-sm text-cyan-400 break-all min-w-0 flex-1", children: POOL_ADDRESS }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 shrink-0", children: [(0, jsx_runtime_1.jsx)(CopyButton, { text: POOL_ADDRESS }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${POOL_ADDRESS}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-400 hover:text-white text-xs", children: "\u2197" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('usdtBalance', 'USDT Vault') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs text-neutral-400 break-all min-w-0 flex-1", children: USDT_VAULT }), (0, jsx_runtime_1.jsx)(CopyButton, { text: USDT_VAULT })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('usdcBalance', 'USDC Vault') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs text-neutral-400 break-all min-w-0 flex-1", children: USDC_VAULT }), (0, jsx_runtime_1.jsx)(CopyButton, { text: USDC_VAULT })] })] })] })] }) }), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('mechanism', 'Market Making Mechanism'), children: (0, jsx_runtime_1.jsxs)("div", { className: "text-xs 2xs:text-sm space-y-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "font-medium text-cyan-400 tracking-wider text-xs 2xs:text-sm sm:text-base", children: t('mechanism', 'Market Making Mechanism') }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 leading-relaxed text-xs 2xs:text-sm", children: t('mechanismDesc', 'The Reincarnation Pool is a Solana PDA-owned autonomous market maker. Every epoch (1 hour), it reads the CPMM spot price, updates an EMA-weighted oracle (weight 2140), and executes a permissionless buyback via CPMM swap. Proceeds flow to the Mining Vault for the next cycle of community mining.') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 2xs:gap-2 mt-2 2xs:mt-3 text-[10px] 2xs:text-xs", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-white/10 text-white whitespace-nowrap", children: "Raydium CPMM" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "PDA Autonomous" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "EMA Oracle" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "Permissionless" })] })] }) })] }));
36
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 sm:px-6 sm:py-6 sm:space-y-6 font-mono", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider truncate", children: resolvedTitle }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1", children: resolvedSubtitle })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 2xs:grid-cols-2 xs:grid-cols-2 sm:grid-cols-4 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "BASE PRICE" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-cyan-400 truncate", children: [loading ? '—' : formatNumber(basePrice, 4), (0, jsx_runtime_1.jsx)("span", { className: "text-[10px] 2xs:text-xs sm:text-sm font-normal text-neutral-500 ml-1", children: "USD" })] })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "PROTOCOL" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: "2140" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "EMA weighted" })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "EPOCH" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-white", children: "1h" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "Auto buyback" })] }), (0, jsx_runtime_1.jsxs)(terminal_1.TerminalCard, { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-400 tracking-wider mb-1 2xs:mb-2", children: "DEX" }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold font-mono text-cyan-400", children: "Raydium" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[8px] 2xs:text-[9px] sm:text-[10px] text-neutral-500 mt-1", children: "CPMM pool" })] })] }), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('contractAddresses', 'Contract Addresses'), children: (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2 2xs:space-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: "Reincarnation Pool PDA" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs sm:text-sm text-cyan-400 min-w-0 flex-1", children: POOL_ADDRESS }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 shrink-0", children: [(0, jsx_runtime_1.jsx)(CopyButton, { text: POOL_ADDRESS }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${POOL_ADDRESS}`, target: "_blank", rel: "noopener noreferrer", className: "text-neutral-400 hover:text-white text-xs", children: "\u2197" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('usdtBalance', 'USDT Vault') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs text-neutral-400 min-w-0 flex-1", children: USDT_VAULT }), (0, jsx_runtime_1.jsx)(CopyButton, { text: USDT_VAULT })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/5 border border-white/10 rounded-lg p-2 2xs:p-3 blockchain-sub-card min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs text-neutral-400 tracking-wider mb-1", children: t('usdcBalance', 'USDC Vault') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [(0, jsx_runtime_1.jsx)("code", { className: "text-[10px] 2xs:text-xs text-neutral-400 min-w-0 flex-1", children: USDC_VAULT }), (0, jsx_runtime_1.jsx)(CopyButton, { text: USDC_VAULT })] })] })] })] }) }), (0, jsx_runtime_1.jsx)(terminal_1.TerminalCard, { title: t('mechanism', 'Market Making Mechanism'), children: (0, jsx_runtime_1.jsxs)("div", { className: "text-xs 2xs:text-sm space-y-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "font-medium text-cyan-400 tracking-wider text-xs 2xs:text-sm sm:text-base", children: t('mechanism', 'Market Making Mechanism') }), (0, jsx_runtime_1.jsx)("p", { className: "text-neutral-400 leading-relaxed text-xs 2xs:text-sm", children: t('mechanismDesc', 'The Reincarnation Pool is a Solana PDA-owned autonomous market maker. Every epoch (1 hour), it reads the CPMM spot price, updates an EMA-weighted oracle (weight 2140), and executes a permissionless buyback via CPMM swap. Proceeds flow to the Mining Vault for the next cycle of community mining.') }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 2xs:gap-2 mt-2 2xs:mt-3 text-[10px] 2xs:text-xs", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-white/10 text-white whitespace-nowrap", children: "Raydium CPMM" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "PDA Autonomous" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "EMA Oracle" }), (0, jsx_runtime_1.jsx)("span", { className: "px-1.5 2xs:px-2 py-0.5 2xs:py-1 rounded bg-cyan-400/20 text-cyan-400 whitespace-nowrap", children: "Permissionless" })] })] }) })] }));
37
37
  }
@@ -204,9 +204,9 @@ function MicrocosmWalletPage({ basePath = '', onNavigate }) {
204
204
  }
205
205
  };
206
206
  const anyError = false;
207
- return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 xs:px-4 xs:space-y-4 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'Wallet') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1 truncate", children: t('subtitle', 'On-chain assets & balances') })] }), (0, jsx_runtime_1.jsxs)("button", { className: "flex items-center gap-1.5 2xs:gap-2 px-2 2xs:px-3 py-1.5 2xs:py-2 sm:px-4 sm:py-2.5 text-xs 2xs:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors disabled:opacity-50 whitespace-nowrap shrink-0", onClick: handleRefresh, disabled: isRefreshing || multiLoading, children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: isRefreshing || multiLoading ? 'animate-spin' : '' }), t('refresh', 'Refresh')] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "truncate", children: isAllTab ? t('totalAssetValue', 'Total Asset Value') : t('walletAssetValue', 'Wallet Asset Value') }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setHideBalance(!hideBalance), className: "hover:text-white transition-colors shrink-0", children: hideBalance ? (0, jsx_runtime_1.jsx)(IconEyeOff, {}) : (0, jsx_runtime_1.jsx)(IconEye, {}) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-baseline gap-2 mb-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono break-all", children: hideBalance ? '****' : (activeUsdValue > 0 ? fmtUSD(activeUsdValue) : '--') }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs", children: hideBalance ? '****' : t('aggregatedDesc', 'Aggregated from on-chain token balances') })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [walletList.length > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 mb-2 2xs:mb-3 sm:mb-4 overflow-x-auto pb-1", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('all'), className: `px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs rounded whitespace-nowrap transition-colors ${activeTab === 'all'
207
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "max-w-7xl mx-auto px-2 py-3 space-y-2 2xs:px-3 2xs:py-4 2xs:space-y-3 xs:px-4 xs:space-y-4 sm:px-6 sm:py-6 sm:space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl md:text-3xl font-bold text-white tracking-wider", children: t('title', 'Wallet') }), (0, jsx_runtime_1.jsx)("p", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 mt-1 truncate", children: t('subtitle', 'On-chain assets & balances') })] }), (0, jsx_runtime_1.jsxs)("button", { className: "flex items-center gap-1.5 2xs:gap-2 px-2 2xs:px-3 py-1.5 2xs:py-2 sm:px-4 sm:py-2.5 text-xs 2xs:text-sm border border-neutral-700 rounded text-neutral-400 hover:bg-neutral-800 hover:text-neutral-300 bg-transparent transition-colors disabled:opacity-50 whitespace-nowrap shrink-0", onClick: handleRefresh, disabled: isRefreshing || multiLoading, children: [(0, jsx_runtime_1.jsx)(IconRefresh, { className: isRefreshing || multiLoading ? 'animate-spin' : '' }), t('refresh', 'Refresh')] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm min-w-0", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "truncate", children: isAllTab ? t('totalAssetValue', 'Total Asset Value') : t('walletAssetValue', 'Wallet Asset Value') }), (0, jsx_runtime_1.jsx)("button", { onClick: () => setHideBalance(!hideBalance), className: "hover:text-white transition-colors shrink-0", children: hideBalance ? (0, jsx_runtime_1.jsx)(IconEyeOff, {}) : (0, jsx_runtime_1.jsx)(IconEye, {}) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-baseline gap-2 mb-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl font-bold text-white font-mono", children: hideBalance ? '****' : (activeUsdValue > 0 ? fmtUSD(activeUsdValue) : '--') }) }), (0, jsx_runtime_1.jsx)("div", { className: "text-neutral-500 text-[9px] 2xs:text-[10px] sm:text-xs", children: hideBalance ? '****' : t('aggregatedDesc', 'Aggregated from on-chain token balances') })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [walletList.length > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 mb-2 2xs:mb-3 sm:mb-4 overflow-x-auto pb-1", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab('all'), className: `px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs rounded whitespace-nowrap transition-colors ${activeTab === 'all'
208
208
  ? 'bg-cyan-700 text-white'
209
209
  : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [t('overview', 'Overview'), " (", walletList.length, " ", t('wallets', 'wallets'), ")"] }), walletList.map((w) => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => setActiveTab(w.wallet_address), className: `px-2 2xs:px-3 py-1 2xs:py-1.5 text-[10px] 2xs:text-xs rounded whitespace-nowrap transition-colors flex items-center gap-1 ${activeTab === w.wallet_address
210
210
  ? 'bg-cyan-700 text-white'
211
- : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [(0, jsx_runtime_1.jsxs)("code", { className: "font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 text-[9px] 2xs:text-[10px]", children: t('primary', 'Primary') })] }, w.wallet_address)))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('onChainAssets', 'On-Chain Assets') }), multiLoading && (0, jsx_runtime_1.jsx)(Spinner, { size: "w-3 h-3" })] }), multiLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "py-10", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Spinner, { size: "w-6 h-6" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400", children: t('syncingOnChainData', 'Syncing on-chain data...') }), (0, jsx_runtime_1.jsx)("div", { className: "w-48 h-1 bg-neutral-800 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400/60 rounded-full animate-pulse", style: { width: '60%' } }) })] }) })) : ((0, jsx_runtime_1.jsx)(AssetList, { holdings: activeHoldings, hideBalance: hideBalance, showWalletColumn: showWalletCol, isLoading: multiLoading })), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: isAllTab ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('allWalletsNote', 'Aggregated on-chain balances across {count} wallets. Low-value assets (<$1) are hidden.', { count: walletList.length }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline", children: [t('currentWallet', 'Current wallet'), ":"] }), (0, jsx_runtime_1.jsx)("code", { className: "text-neutral-400 bg-neutral-800 px-1.5 py-0.5 rounded font-mono truncate min-w-0 max-w-[140px] 2xs:max-w-[180px] sm:max-w-none", children: activeTab }), walletList.find((w) => w.wallet_address === activeTab)?.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 bg-cyan-400/20 px-1.5 py-0.5 rounded text-[9px] 2xs:text-[10px] shrink-0", children: t('primary', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${activeTab}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 text-[10px] 2xs:text-xs flex items-center gap-1 whitespace-nowrap", children: [t('viewOnSolscan', 'View on Solscan'), " ", (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('singleWalletNote', 'Showing on-chain balances for this wallet only. Low-value assets (<$1) are hidden.') })] })] })) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-cyan-400/20 rounded-xl border border-cyan-400/30 shrink-0", children: (0, jsx_runtime_1.jsx)(IconWallet, { className: "w-4 h-4 2xs:w-5 2xs:h-5 sm:w-8 sm:h-8 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider mb-0.5 2xs:mb-1", children: t('mccBalance', 'MCC Balance') }), (0, jsx_runtime_1.jsx)("div", { className: "text-lg 2xs:text-xl xs:text-2xl sm:text-3xl md:text-4xl font-bold text-white font-mono truncate", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mccBalance)) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-500 mt-0.5 2xs:mt-1 truncate", children: [mccLoading ? '' : mask(`${fmtUSD(totalUsd)}`), !mccLoading && price > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-1 2xs:ml-2 text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-600", children: ["@ ", fmtUSD(price), "/MCC"] }))] })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/mining')), className: "flex items-center gap-1 2xs:gap-2 px-2 2xs:px-3 py-1.5 2xs:py-2 sm:px-4 sm:py-2.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-[10px] 2xs:text-xs sm:text-sm transition-colors whitespace-nowrap shrink-0", children: [(0, jsx_runtime_1.jsx)(IconExternalLink, { className: "h-3 w-3 2xs:h-4 2xs:w-4" }), (0, jsx_runtime_1.jsx)("span", { className: "hidden 2xs:inline", children: t('mintRecords', 'Mining Records') }), (0, jsx_runtime_1.jsx)("span", { className: "2xs:hidden", children: t('mintRecords', 'Records') })] })] }), walletList.length > 1 && mccData?.wallets && mccData.wallets.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 space-y-1.5 2xs:space-y-2", children: mccData.wallets.map((wb) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [wb.wallet_address.slice(0, 4), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [wb.wallet_address.slice(0, 6), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [wb.wallet_address.slice(0, 8), "...", wb.wallet_address.slice(-8)] })] }), wb.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[9px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 px-1 2xs:px-1.5 py-0.5 rounded shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono font-bold whitespace-nowrap shrink-0", children: [mask(fmt(wb.balance ?? 0, 3)), " MCC"] })] }, wb.wallet_address))) }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('mcdPoints', 'MCD Points') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('currentBalance', 'Current Balance') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-cyan-400 font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdAmount, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-neutral-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('totalReceived', 'Total Received') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-white font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdTotalReceived, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3 h-3 mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [t('income', 'Income'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: mask(fmt(mcdTotalReceived, 0)) }), ' · ', t('spent', 'Spent'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: mask(fmt(mcdSpent, 0)) }), ' · ', t('mcdDistributionNote', 'MCD is distributed daily to eligible miners.')] })] }) })] }) }), activeLocks.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('lockPeriod14Days', 'Lock Period (14 days)') })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 gap-1.5 2xs:gap-2 sm:gap-3", children: activeLocks.map((lock) => ((0, jsx_runtime_1.jsx)(LockPeriodCard, { lock: lock, hideBalance: hideBalance }, lock.lock_id))) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 text-[10px] 2xs:text-xs text-neutral-500 font-mono break-all", children: [t('totalLocked', 'Total locked'), ": ", mask(fmt(lockedAmount, 2)), " MCC"] })] }) })), walletList.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('connectedWallets', 'Connected Wallets') })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-1.5 2xs:space-y-2", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsxs)("code", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline xs:hidden", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden xs:inline sm:hidden", children: [w.wallet_address.slice(0, 8), "...", w.wallet_address.slice(-8)] }), (0, jsx_runtime_1.jsx)("span", { className: "hidden sm:inline", children: w.wallet_address })] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 border border-cyan-400/30 px-1 2xs:px-1.5 py-0.5 rounded font-mono shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 transition-colors shrink-0", children: (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4" }) })] }, w.wallet_address))) })] }) }))] }));
211
+ : 'bg-neutral-800 text-neutral-400 hover:text-white hover:bg-neutral-700'}`, children: [(0, jsx_runtime_1.jsxs)("code", { className: "font-mono", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), w.is_primary && (0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 text-[9px] 2xs:text-[10px]", children: t('primary', 'Primary') })] }, w.wallet_address)))] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('onChainAssets', 'On-Chain Assets') }), multiLoading && (0, jsx_runtime_1.jsx)(Spinner, { size: "w-3 h-3" })] }), multiLoading ? ((0, jsx_runtime_1.jsx)("div", { className: "py-10", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Spinner, { size: "w-6 h-6" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-neutral-400", children: t('syncingOnChainData', 'Syncing on-chain data...') }), (0, jsx_runtime_1.jsx)("div", { className: "w-48 h-1 bg-neutral-800 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "h-full bg-cyan-400/60 rounded-full animate-pulse", style: { width: '60%' } }) })] }) })) : ((0, jsx_runtime_1.jsx)(AssetList, { holdings: activeHoldings, hideBalance: hideBalance, showWalletColumn: showWalletCol, isLoading: multiLoading })), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: isAllTab ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('allWalletsNote', 'Aggregated on-chain balances across {count} wallets. Low-value assets (<$1) are hidden.', { count: walletList.length }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "space-y-1.5 2xs:space-y-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500 min-w-0", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline", children: [t('currentWallet', 'Current wallet'), ":"] }), (0, jsx_runtime_1.jsx)("code", { className: "text-neutral-400 bg-neutral-800 px-1.5 py-0.5 rounded font-mono truncate min-w-0 max-w-[140px] 2xs:max-w-[180px] sm:max-w-none", children: activeTab }), walletList.find((w) => w.wallet_address === activeTab)?.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-cyan-400 bg-cyan-400/20 px-1.5 py-0.5 rounded text-[9px] 2xs:text-[10px] shrink-0", children: t('primary', 'Primary') }))] }), (0, jsx_runtime_1.jsxs)("a", { href: `https://solscan.io/account/${activeTab}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 text-[10px] 2xs:text-xs flex items-center gap-1 whitespace-nowrap", children: [t('viewOnSolscan', 'View on Solscan'), " ", (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3 h-3" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconInfo, { className: "mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { children: t('singleWalletNote', 'Showing on-chain balances for this wallet only. Low-value assets (<$1) are hidden.') })] })] })) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-3 2xs:p-4 sm:p-5 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-3 mb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 2xs:p-3 bg-cyan-400/20 rounded-xl border border-cyan-400/30 shrink-0", children: (0, jsx_runtime_1.jsx)(IconWallet, { className: "w-5 h-5 2xs:w-6 2xs:h-6 sm:w-8 sm:h-8 text-cyan-400" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-400 tracking-wider mb-1", children: t('mccBalance', 'MCC Balance') }), (0, jsx_runtime_1.jsx)("div", { className: "text-xl 2xs:text-2xl xs:text-3xl sm:text-4xl md:text-5xl font-bold text-white font-mono truncate", children: mccLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mccBalance)) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-500 mt-1 truncate", children: [mccLoading ? '' : mask(`${fmtUSD(totalUsd)}`), !mccLoading && price > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: "ml-2 text-[10px] 2xs:text-xs text-neutral-600", children: ["@ ", fmtUSD(price), "/MCC"] }))] })] })] }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => onNavigate?.(resolvePath('/mcc/mining')), className: "w-full flex items-center justify-center gap-2 px-4 py-2 sm:py-2.5 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-xs 2xs:text-sm transition-colors whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)(IconExternalLink, { className: "h-4 w-4" }), t('mintRecords', 'Mining Records')] }), walletList.length > 1 && mccData?.wallets && mccData.wallets.length > 1 && ((0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 space-y-1.5 2xs:space-y-2", children: mccData.wallets.map((wb) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700 text-xs 2xs:text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 min-w-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-neutral-400 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [wb.wallet_address.slice(0, 4), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline sm:hidden", children: [wb.wallet_address.slice(0, 6), "...", wb.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden sm:inline", children: [wb.wallet_address.slice(0, 8), "...", wb.wallet_address.slice(-8)] })] }), wb.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[9px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 px-1 2xs:px-1.5 py-0.5 rounded shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsxs)("span", { className: "text-cyan-400 font-mono font-bold whitespace-nowrap shrink-0", children: [mask(fmt(wb.balance ?? 0, 3)), " MCC"] })] }, wb.wallet_address))) }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg hover:border-cyan-400/50 transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('mcdPoints', 'MCD Points') })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-1.5 2xs:gap-2 sm:gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconCreditCard, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('currentBalance', 'Current Balance') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-cyan-400 font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdAmount, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 bg-neutral-800 rounded border border-neutral-700 min-w-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 mb-1.5 2xs:mb-2", children: [(0, jsx_runtime_1.jsx)(IconTrendingUp, { className: "h-3 w-3 2xs:h-4 2xs:w-4 text-neutral-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] sm:text-xs text-neutral-400 tracking-wider truncate", children: t('totalReceived', 'Total Received') })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-base 2xs:text-lg xs:text-xl sm:text-2xl font-bold text-white font-mono truncate", children: mcdLoading ? (0, jsx_runtime_1.jsx)(Spinner, {}) : mask(fmt(mcdTotalReceived, 6)) }), (0, jsx_runtime_1.jsx)("div", { className: "text-[9px] 2xs:text-[10px] sm:text-xs text-neutral-500 mt-0.5 2xs:mt-1", children: "MCD" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 2xs:mt-4 pt-2 2xs:pt-3 border-t border-neutral-700 space-y-1.5 2xs:space-y-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-1.5 2xs:gap-2 text-[10px] 2xs:text-xs text-neutral-500", children: [(0, jsx_runtime_1.jsx)(IconGift, { className: "w-3 h-3 mt-0.5 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [t('income', 'Income'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-white", children: mask(fmt(mcdTotalReceived, 0)) }), ' · ', t('spent', 'Spent'), ": ", (0, jsx_runtime_1.jsx)("span", { className: "text-neutral-400", children: mask(fmt(mcdSpent, 0)) }), ' · ', t('mcdDistributionNote', 'MCD is distributed daily to eligible miners.')] })] }) })] }) }), activeLocks.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconLock, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('lockPeriod14Days', 'Lock Period (14 days)') })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-1 gap-1.5 2xs:gap-2 sm:gap-3", children: activeLocks.map((lock) => ((0, jsx_runtime_1.jsx)(LockPeriodCard, { lock: lock, hideBalance: hideBalance }, lock.lock_id))) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 2xs:mt-3 text-[10px] 2xs:text-xs text-neutral-500 font-mono", children: [t('totalLocked', 'Total locked'), ": ", mask(fmt(lockedAmount, 2)), " MCC"] })] }) })), walletList.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "bg-neutral-900 border border-neutral-700 rounded-lg transition-colors", children: (0, jsx_runtime_1.jsxs)("div", { className: "p-2 2xs:p-3 sm:p-4 md:p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 text-neutral-400 text-xs 2xs:text-sm mb-1.5 2xs:mb-2 sm:mb-3 md:mb-4", children: [(0, jsx_runtime_1.jsx)(IconWallet, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4 sm:w-5 sm:h-5 text-cyan-400 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "tracking-wider", children: t('connectedWallets', 'Connected Wallets') })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-1.5 2xs:space-y-2", children: walletList.map((w) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2 2xs:p-3 bg-neutral-800 rounded border border-neutral-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1.5 2xs:gap-2 sm:gap-3 min-w-0", children: [(0, jsx_runtime_1.jsxs)("code", { className: "text-[10px] 2xs:text-xs sm:text-sm text-neutral-300 font-mono truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "2xs:hidden", children: [w.wallet_address.slice(0, 4), "...", w.wallet_address.slice(-4)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden 2xs:inline xs:hidden", children: [w.wallet_address.slice(0, 6), "...", w.wallet_address.slice(-6)] }), (0, jsx_runtime_1.jsxs)("span", { className: "hidden xs:inline sm:hidden", children: [w.wallet_address.slice(0, 8), "...", w.wallet_address.slice(-8)] }), (0, jsx_runtime_1.jsx)("span", { className: "hidden sm:inline", children: w.wallet_address })] }), w.is_primary && ((0, jsx_runtime_1.jsx)("span", { className: "text-[8px] 2xs:text-[10px] bg-cyan-400/20 text-cyan-400 border border-cyan-400/30 px-1 2xs:px-1.5 py-0.5 rounded font-mono shrink-0", children: "PRIMARY" }))] }), (0, jsx_runtime_1.jsx)("a", { href: `https://solscan.io/account/${w.wallet_address}`, target: "_blank", rel: "noopener noreferrer", className: "text-cyan-400 hover:text-cyan-300 transition-colors shrink-0", children: (0, jsx_runtime_1.jsx)(IconExternalLink, { className: "w-3.5 h-3.5 2xs:w-4 2xs:h-4" }) })] }, w.wallet_address))) })] }) }))] }));
212
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microcosmmoney/portal-react",
3
- "version": "3.12.4",
3
+ "version": "3.12.6",
4
4
  "description": "Microcosm Portal UI components for React/Next.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",