@cedros/login-react 0.0.47 → 0.0.48

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminWithdrawalHistory-CgYehfMH.js","sources":["../src/components/deposit/admin/AdminWithdrawalStats.tsx","../src/components/deposit/admin/AdminWithdrawalQueueParts.tsx","../src/components/deposit/admin/AdminWithdrawalQueue.tsx","../src/components/deposit/admin/AdminPrivacyPeriodDeposits.tsx","../src/components/deposit/admin/AdminWithdrawalHistory.tsx"],"sourcesContent":["/**\n * Admin withdrawal statistics component\n *\n * Shows high-level withdrawal pipeline stats in a single row.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositStatsResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\nimport { StatsBar } from '../../admin/StatsBar';\n\nexport interface AdminWithdrawalStatsProps {\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when stats are loaded */\n onLoad?: (stats: AdminDepositStatsResponse) => void;\n}\n\nexport function AdminWithdrawalStats({\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n}: AdminWithdrawalStatsProps) {\n const { getStats, isLoading, error, clearError } = useAdminDeposits();\n\n const [stats, setStats] = useState<AdminDepositStatsResponse | null>(null);\n const [loadError, setLoadError] = useState<string | null>(null);\n\n const fetchStats = useCallback(async () => {\n try {\n const result = await getStats();\n setStats(result);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load stats';\n setLoadError(message);\n }\n }, [getStats, onLoad]);\n\n useEffect(() => {\n fetchStats();\n }, [fetchStats]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchStats();\n }, [refreshSignal, fetchStats]);\n\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n const interval = setInterval(fetchStats, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchStats]);\n\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n if (errorMessage) {\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchStats();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n if (isLoading && !stats) {\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <StatsBar\n stats={[\n { label: 'Total Withdrawn', value: 0 },\n { label: 'Pending Withdraw', value: 0 },\n { label: 'In Privacy Period', value: 0 },\n { label: 'Microbatch (SOL)', value: '0.0000' },\n ]}\n isLoading\n />\n </div>\n );\n }\n\n if (!stats) return null;\n\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <StatsBar\n stats={[\n { label: 'Total Withdrawn', value: stats.totalWithdrawnCount },\n { label: 'Pending Withdraw', value: stats.pendingWithdrawalCount },\n { label: 'In Privacy Period', value: stats.inPrivacyPeriodCount ?? 0 },\n { label: 'Microbatch (SOL)', value: stats.readyForWithdrawalSol?.toFixed(4) ?? '0.0000' },\n ]}\n isLoading={isLoading}\n onRefresh={fetchStats}\n />\n </div>\n );\n}\n","/**\n * Sub-components for AdminWithdrawalQueue.\n *\n * Extracted to keep AdminWithdrawalQueue.tsx within the 500-line file budget.\n */\n\nimport type { AdminDepositItem } from '../../../types/deposit';\n\n// ---------------------------------------------------------------------------\n// Shared helpers (re-exported so AdminWithdrawalQueue can import from here)\n// ---------------------------------------------------------------------------\n\nexport function formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nexport function formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\nexport function getTimeElapsed(dateString: string): string {\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffDays > 0) return `${diffDays}d ago`;\n if (diffHours > 0) return `${diffHours}h ago`;\n if (diffMins > 0) return `${diffMins}m ago`;\n return 'just now';\n}\n\nexport function isWithinPrivacyPeriod(withdrawalAvailableAt: string | undefined): boolean {\n if (!withdrawalAvailableAt) return true;\n return new Date(withdrawalAvailableAt) > new Date();\n}\n\n// ---------------------------------------------------------------------------\n// EarlyWithdrawalModal\n// ---------------------------------------------------------------------------\n\ninterface EarlyWithdrawalModalProps {\n item: AdminDepositItem;\n processingId: string | null;\n onConfirm: (item: AdminDepositItem, force: true) => void;\n onCancel: () => void;\n}\n\n/**\n * Confirmation dialog shown before processing a withdrawal that is still\n * within its privacy period.\n */\nexport function EarlyWithdrawalModal({\n item,\n processingId,\n onConfirm,\n onCancel,\n}: EarlyWithdrawalModalProps) {\n return (\n <div\n className=\"cedros-admin-modal-overlay\"\n onClick={onCancel}\n onKeyDown={(e) => e.key === 'Escape' && onCancel()}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"early-withdrawal-title\"\n >\n <div\n className=\"cedros-admin-modal cedros-admin-modal-warning\"\n onClick={(e) => e.stopPropagation()}\n onKeyDown={() => {}}\n role=\"document\"\n >\n <h3 id=\"early-withdrawal-title\" className=\"cedros-admin-modal-title\">\n Early Withdrawal Warning\n </h3>\n <div className=\"cedros-admin-modal-content\">\n <p className=\"cedros-admin-modal-warning-text\">\n <strong>This deposit is still within its privacy period.</strong>\n </p>\n <p>\n Processing this withdrawal early may compromise user privacy. The privacy period exists\n to provide plausible deniability for deposits.\n </p>\n <p className=\"cedros-admin-modal-details\">\n User: {truncateId(item.userId)}\n <br />\n Amount: {formatAmount(item.amountLamports)}\n <br />\n Available at: {item.withdrawalAvailableAt ? formatDate(item.withdrawalAvailableAt) : '—'}\n </p>\n <p>Are you sure you want to process this withdrawal early?</p>\n </div>\n <div className=\"cedros-admin-modal-actions\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={onCancel}\n >\n Cancel\n </button>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-danger\"\n onClick={() => onConfirm(item, true)}\n disabled={processingId === item.id}\n >\n {processingId === item.id ? 'Processing...' : 'Process Early'}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// WithdrawalRow\n// ---------------------------------------------------------------------------\n\ninterface WithdrawalRowProps {\n item: AdminDepositItem;\n processingId: string | null;\n processingAll: boolean;\n onItemClick?: (item: AdminDepositItem) => void;\n onProcess: (item: AdminDepositItem) => void;\n}\n\n/**\n * A single row in the withdrawal queue table.\n */\nexport function WithdrawalRow({\n item,\n processingId,\n processingAll,\n onItemClick,\n onProcess,\n}: WithdrawalRowProps) {\n const withinPrivacyPeriod = isWithinPrivacyPeriod(item.withdrawalAvailableAt);\n const isProcessing = processingId === item.id;\n\n return (\n <div\n key={item.id}\n className={`cedros-admin-withdrawal-row ${withinPrivacyPeriod ? 'cedros-admin-withdrawal-row-early' : ''}`}\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-withdrawal-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-withdrawal-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-withdrawal-td\">\n {item.withdrawalAvailableAt ? formatDate(item.withdrawalAvailableAt) : '—'}\n </div>\n <div className=\"cedros-admin-withdrawal-td cedros-admin-withdrawal-waiting\">\n {item.withdrawalAvailableAt\n ? withinPrivacyPeriod\n ? 'In privacy period'\n : getTimeElapsed(item.withdrawalAvailableAt)\n : '—'}\n </div>\n <div className=\"cedros-admin-withdrawal-td cedros-admin-withdrawal-td-action\">\n <button\n type=\"button\"\n className={`cedros-button cedros-button-sm ${withinPrivacyPeriod ? 'cedros-button-warning' : 'cedros-button-primary'}`}\n onClick={(e) => {\n e.stopPropagation();\n onProcess(item);\n }}\n disabled={isProcessing || processingAll}\n title={\n withinPrivacyPeriod\n ? 'Early withdrawal (requires confirmation)'\n : 'Process this withdrawal'\n }\n >\n {isProcessing ? '...' : withinPrivacyPeriod ? 'Early' : 'Process'}\n </button>\n </div>\n </div>\n );\n}\n","/**\n * Admin withdrawal queue component\n *\n * Shows deposits that are ready for withdrawal (privacy period elapsed).\n * Includes buttons to process individual or all withdrawals.\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type {\n AdminDepositItem,\n AdminDepositListResponse,\n ProcessWithdrawalResponse,\n ProcessAllWithdrawalsResponse,\n} from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\nimport {\n isWithinPrivacyPeriod,\n EarlyWithdrawalModal,\n WithdrawalRow,\n} from './AdminWithdrawalQueueParts';\n\ntype QueueSortField = 'userId' | 'amountLamports' | 'withdrawalAvailableAt';\ntype SortOrder = 'asc' | 'desc';\n\nexport interface AdminWithdrawalQueueProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a withdrawal item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n /** Callback when a withdrawal is processed */\n onWithdrawalProcessed?: (response: ProcessWithdrawalResponse) => void;\n /** Callback when all withdrawals are processed */\n onAllProcessed?: (response: ProcessAllWithdrawalsResponse) => void;\n}\n\n/**\n * Admin withdrawal queue display\n *\n * Shows deposits ready for withdrawal processing with action buttons.\n */\nexport function AdminWithdrawalQueue({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n onWithdrawalProcessed,\n onAllProcessed,\n}: AdminWithdrawalQueueProps) {\n const {\n listPendingWithdrawals,\n processWithdrawal,\n processAllWithdrawals,\n isLoading,\n error,\n clearError,\n } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n const [sortField, setSortField] = useState<QueueSortField>('withdrawalAvailableAt');\n const [sortOrder, setSortOrder] = useState<SortOrder>('asc');\n\n const toggleSort = (field: QueueSortField) => {\n if (sortField === field) {\n setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');\n } else {\n setSortField(field);\n setSortOrder(field === 'withdrawalAvailableAt' ? 'asc' : 'desc');\n }\n };\n\n const sortedItems = useMemo(() => {\n return [...items].sort((a, b) => {\n let aVal: string | number;\n let bVal: string | number;\n\n switch (sortField) {\n case 'userId':\n aVal = a.userId.toLowerCase();\n bVal = b.userId.toLowerCase();\n break;\n case 'amountLamports':\n aVal = a.amountLamports ?? 0;\n bVal = b.amountLamports ?? 0;\n break;\n case 'withdrawalAvailableAt':\n aVal = a.withdrawalAvailableAt ? new Date(a.withdrawalAvailableAt).getTime() : 0;\n bVal = b.withdrawalAvailableAt ? new Date(b.withdrawalAvailableAt).getTime() : 0;\n break;\n default:\n return 0;\n }\n\n if (aVal < bVal) return sortOrder === 'asc' ? -1 : 1;\n if (aVal > bVal) return sortOrder === 'asc' ? 1 : -1;\n return 0;\n });\n }, [items, sortField, sortOrder]);\n\n // Processing state\n const [processingId, setProcessingId] = useState<string | null>(null);\n const [processingAll, setProcessingAll] = useState(false);\n const [processResult, setProcessResult] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n\n // Early withdrawal confirmation modal\n const [earlyWithdrawalItem, setEarlyWithdrawalItem] = useState<AdminDepositItem | null>(null);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listPendingWithdrawals({ limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load pending withdrawals';\n setLoadError(message);\n }\n }, [pageSize, offset, listPendingWithdrawals, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n // Clear result message after 5 seconds\n useEffect(() => {\n if (!processResult) return;\n const timer = setTimeout(() => setProcessResult(null), 5000);\n return () => clearTimeout(timer);\n }, [processResult]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n const handleProcessSingle = async (item: AdminDepositItem, force = false) => {\n // Check if within privacy period and not forcing\n if (!force && isWithinPrivacyPeriod(item.withdrawalAvailableAt)) {\n setEarlyWithdrawalItem(item);\n return;\n }\n\n setProcessingId(item.id);\n setProcessResult(null);\n\n try {\n const result = await processWithdrawal(item.id, { force });\n if (result.success) {\n setProcessResult({\n type: 'success',\n message: `Withdrawal processed: ${result.txSignature?.slice(0, 12)}...`,\n });\n onWithdrawalProcessed?.(result);\n await fetchItems();\n } else {\n setProcessResult({\n type: 'error',\n message: result.error || 'Failed to process withdrawal',\n });\n }\n } catch (err) {\n setProcessResult({\n type: 'error',\n message: err instanceof Error ? err.message : 'Failed to process withdrawal',\n });\n } finally {\n setProcessingId(null);\n setEarlyWithdrawalItem(null);\n }\n };\n\n const handleProcessAll = async () => {\n if (items.length === 0) return;\n\n setProcessingAll(true);\n setProcessResult(null);\n\n try {\n const result = await processAllWithdrawals();\n if (result.totalSucceeded > 0) {\n setProcessResult({\n type: 'success',\n message: `Processed ${result.totalSucceeded}/${result.totalProcessed} withdrawals`,\n });\n } else if (result.totalFailed > 0) {\n setProcessResult({\n type: 'error',\n message: `Failed to process ${result.totalFailed} withdrawals`,\n });\n }\n onAllProcessed?.(result);\n await fetchItems();\n } catch (err) {\n setProcessResult({\n type: 'error',\n message: err instanceof Error ? err.message : 'Failed to process withdrawals',\n });\n } finally {\n setProcessingAll(false);\n }\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0 && !processingId && !processingAll) {\n return (\n <div\n className={`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading withdrawal queue...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-withdrawal-queue ${className}`}>\n {earlyWithdrawalItem && (\n <EarlyWithdrawalModal\n item={earlyWithdrawalItem}\n processingId={processingId}\n onConfirm={handleProcessSingle}\n onCancel={() => setEarlyWithdrawalItem(null)}\n />\n )}\n\n {processResult && (\n <div\n className={`cedros-admin-result cedros-admin-result-${processResult.type}`}\n role=\"status\"\n aria-live=\"polite\"\n >\n {processResult.message}\n </div>\n )}\n\n <div className=\"cedros-admin-withdrawal-queue-header\">\n <h4 className=\"cedros-admin-withdrawal-queue-title\">Pending Withdrawals</h4>\n <div className=\"cedros-admin-withdrawal-queue-actions\">\n <span className=\"cedros-admin-queue-count\">{total} pending</span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading || processingAll}\n title=\"Refresh queue\"\n aria-label=\"Refresh queue\"\n >\n {isLoading && !processingAll ? '...' : '↻'}\n </button>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-primary cedros-button-sm\"\n onClick={handleProcessAll}\n disabled={isLoading || processingAll || items.length === 0}\n title=\"Process all ready withdrawals\"\n >\n {processingAll ? 'Processing...' : 'Process All'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No pending withdrawals.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-withdrawal-table\">\n <div className=\"cedros-admin-withdrawal-thead\">\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'userId' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('userId')}\n aria-label=\"Sort by user\"\n >\n User{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'userId' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'amountLamports' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('amountLamports')}\n aria-label=\"Sort by amount\"\n >\n Amount{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'amountLamports' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'withdrawalAvailableAt' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('withdrawalAvailableAt')}\n aria-label=\"Sort by ready since\"\n >\n Ready Since{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'withdrawalAvailableAt'\n ? sortOrder === 'asc'\n ? '↑'\n : '↓'\n : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">Waiting</div>\n <div className=\"cedros-admin-withdrawal-th cedros-admin-withdrawal-th-action\">\n Action\n </div>\n </div>\n {sortedItems.map((item) => (\n <WithdrawalRow\n key={item.id}\n item={item}\n processingId={processingId}\n processingAll={processingAll}\n onItemClick={onItemClick}\n onProcess={handleProcessSingle}\n />\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n","/**\n * Admin privacy period deposits component\n *\n * Shows deposits that are still in the privacy period (completed but not yet ready for withdrawal).\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositItem, AdminDepositListResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\n\nexport interface AdminPrivacyPeriodDepositsProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a deposit item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n}\n\nfunction formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nfunction formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\nfunction getTimeRemaining(dateString: string): string {\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = date.getTime() - now.getTime();\n\n if (diffMs <= 0) return 'Ready';\n\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffDays > 0) {\n const remainingHours = diffHours % 24;\n return remainingHours > 0 ? `${diffDays}d ${remainingHours}h` : `${diffDays}d`;\n }\n if (diffHours > 0) {\n const remainingMins = diffMins % 60;\n return remainingMins > 0 ? `${diffHours}h ${remainingMins}m` : `${diffHours}h`;\n }\n return `${diffMins}m`;\n}\n\n/**\n * Admin privacy period deposits display\n *\n * Shows deposits that are still in the privacy period (not yet available for withdrawal).\n */\nexport function AdminPrivacyPeriodDeposits({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n}: AdminPrivacyPeriodDepositsProps) {\n const { listInPrivacyPeriod, isLoading, error, clearError } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listInPrivacyPeriod({ limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load deposits';\n setLoadError(message);\n }\n }, [pageSize, offset, listInPrivacyPeriod, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0) {\n return (\n <div\n className={`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading deposits...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-privacy-deposits ${className}`}>\n <div className=\"cedros-admin-privacy-deposits-header\">\n <h4 className=\"cedros-admin-privacy-deposits-title\">In Privacy Period</h4>\n <div className=\"cedros-admin-privacy-deposits-actions\">\n <span className=\"cedros-admin-queue-count\">\n {total} deposit{total !== 1 ? 's' : ''}\n </span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading}\n title=\"Refresh list\"\n aria-label=\"Refresh list\"\n >\n {isLoading ? '...' : '↻'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No deposits in privacy period.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-privacy-table\">\n <div className=\"cedros-admin-privacy-thead\">\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by user\"\n >\n User <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by amount\"\n >\n Amount <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by deposited\"\n >\n Deposited <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by ready in\"\n >\n Ready In <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n </div>\n {items.map((item) => (\n <div\n key={item.id}\n className=\"cedros-admin-privacy-row\"\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-privacy-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-privacy-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-privacy-td\">\n {item.completedAt ? formatDate(item.completedAt) : '—'}\n </div>\n <div className=\"cedros-admin-privacy-td cedros-admin-privacy-remaining\">\n {item.withdrawalAvailableAt ? getTimeRemaining(item.withdrawalAvailableAt) : '—'}\n </div>\n </div>\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n","/**\n * Admin withdrawal history component\n *\n * Shows deposits that have been fully withdrawn (processed).\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositItem, AdminDepositListResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\n\ntype WithdrawalSortField = 'userId' | 'amountLamports' | 'completedAt' | 'withdrawalTxSignature';\ntype SortOrder = 'asc' | 'desc';\n\nexport interface AdminWithdrawalHistoryProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a withdrawal item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n}\n\nfunction formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nfunction formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction truncateSignature(sig: string): string {\n if (sig.length <= 16) return sig;\n return `${sig.slice(0, 8)}...${sig.slice(-6)}`;\n}\n\nfunction truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\n/**\n * Admin withdrawal history display\n *\n * Shows deposits that have been fully withdrawn.\n */\nexport function AdminWithdrawalHistory({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n}: AdminWithdrawalHistoryProps) {\n const { listDeposits, isLoading, error, clearError } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n const [sortField, setSortField] = useState<WithdrawalSortField>('completedAt');\n const [sortOrder, setSortOrder] = useState<SortOrder>('desc');\n\n const toggleSort = (field: WithdrawalSortField) => {\n if (sortField === field) {\n setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');\n } else {\n setSortField(field);\n setSortOrder('desc');\n }\n };\n\n const sortedItems = useMemo(() => {\n return [...items].sort((a, b) => {\n let aVal: string | number;\n let bVal: string | number;\n\n switch (sortField) {\n case 'userId':\n aVal = a.userId.toLowerCase();\n bVal = b.userId.toLowerCase();\n break;\n case 'amountLamports':\n aVal = a.amountLamports ?? 0;\n bVal = b.amountLamports ?? 0;\n break;\n case 'completedAt':\n aVal = a.completedAt ? new Date(a.completedAt).getTime() : 0;\n bVal = b.completedAt ? new Date(b.completedAt).getTime() : 0;\n break;\n case 'withdrawalTxSignature':\n aVal = a.withdrawalTxSignature || '';\n bVal = b.withdrawalTxSignature || '';\n break;\n default:\n return 0;\n }\n\n if (aVal < bVal) return sortOrder === 'asc' ? -1 : 1;\n if (aVal > bVal) return sortOrder === 'asc' ? 1 : -1;\n return 0;\n });\n }, [items, sortField, sortOrder]);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listDeposits({ status: 'withdrawn', limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load withdrawal history';\n setLoadError(message);\n }\n }, [pageSize, offset, listDeposits, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0) {\n return (\n <div\n className={`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading withdrawal history...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-withdrawal-history ${className}`}>\n <div className=\"cedros-admin-withdrawal-history-header\">\n <h4 className=\"cedros-admin-withdrawal-history-title\">Withdrawal History</h4>\n <div className=\"cedros-admin-withdrawal-history-actions\">\n <span className=\"cedros-admin-queue-count\">\n {total} withdrawal{total !== 1 ? 's' : ''}\n </span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading}\n title=\"Refresh list\"\n aria-label=\"Refresh list\"\n >\n {isLoading ? '...' : '↻'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No withdrawals processed yet.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-history-table\">\n <div className=\"cedros-admin-history-thead\">\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'userId' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('userId')}\n aria-label=\"Sort by user\"\n >\n User{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'userId' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'amountLamports' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('amountLamports')}\n aria-label=\"Sort by amount\"\n >\n Amount{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'amountLamports' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'completedAt' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('completedAt')}\n aria-label=\"Sort by processed\"\n >\n Processed{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'completedAt' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'withdrawalTxSignature' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('withdrawalTxSignature')}\n aria-label=\"Sort by transaction\"\n >\n Transaction{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'withdrawalTxSignature'\n ? sortOrder === 'asc'\n ? '↑'\n : '↓'\n : '↕'}\n </span>\n </button>\n </div>\n </div>\n {sortedItems.map((item) => (\n <div\n key={item.id}\n className=\"cedros-admin-history-row\"\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-history-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-history-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-history-td\">\n {item.completedAt ? formatDate(item.completedAt) : '—'}\n </div>\n <div className=\"cedros-admin-history-td\">\n {item.withdrawalTxSignature ? (\n <a\n href={`https://orbmarkets.io/tx/${item.withdrawalTxSignature}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cedros-admin-tx-link\"\n onClick={(e) => e.stopPropagation()}\n title={item.withdrawalTxSignature}\n >\n {truncateSignature(item.withdrawalTxSignature)}\n </a>\n ) : (\n '—'\n )}\n </div>\n </div>\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"names":["AdminWithdrawalStats","refreshInterval","refreshSignal","className","onLoad","getStats","isLoading","error","clearError","useAdminDeposits","stats","setStats","useState","loadError","setLoadError","fetchStats","useCallback","result","err","message","useEffect","interval","errorMessage","jsxs","jsx","StatsBar","formatAmount","lamports","formatDate","dateString","truncateId","id","getTimeElapsed","date","diffMs","diffMins","diffHours","diffDays","isWithinPrivacyPeriod","withdrawalAvailableAt","EarlyWithdrawalModal","item","processingId","onConfirm","onCancel","e","WithdrawalRow","processingAll","onItemClick","onProcess","withinPrivacyPeriod","isProcessing","AdminWithdrawalQueue","pageSize","onWithdrawalProcessed","onAllProcessed","listPendingWithdrawals","processWithdrawal","processAllWithdrawals","items","setItems","total","setTotal","offset","setOffset","sortField","setSortField","sortOrder","setSortOrder","toggleSort","field","sortedItems","useMemo","a","b","aVal","bVal","setProcessingId","setProcessingAll","processResult","setProcessResult","earlyWithdrawalItem","setEarlyWithdrawalItem","fetchItems","timer","totalPages","currentPage","goToPage","page","newOffset","handleProcessSingle","force","handleProcessAll","Fragment","getTimeRemaining","now","remainingHours","remainingMins","AdminPrivacyPeriodDeposits","listInPrivacyPeriod","truncateSignature","sig","AdminWithdrawalHistory","listDeposits"],"mappings":";;;;AAwBO,SAASA,GAAqB;AAAA,EACnC,iBAAAC,IAAkB;AAAA,EAClB,eAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,QAAAC;AACF,GAA8B;AAC5B,QAAM,EAAE,UAAAC,GAAU,WAAAC,GAAW,OAAAC,GAAO,YAAAC,EAAA,IAAeC,EAAA,GAE7C,CAACC,GAAOC,CAAQ,IAAIC,EAA2C,IAAI,GACnE,CAACC,GAAWC,CAAY,IAAIF,EAAwB,IAAI,GAExDG,IAAaC,EAAY,YAAY;AACzC,QAAI;AACF,YAAMC,IAAS,MAAMZ,EAAA;AACrB,MAAAM,EAASM,CAAM,GACfb,IAASa,CAAM,GACfH,EAAa,IAAI;AAAA,IACnB,SAASI,GAAK;AACZ,YAAMC,IACJD,KAAO,OAAOA,KAAQ,YAAY,aAAaA,IAC3C,OAAQA,EAA6B,OAAO,IAC5C;AACN,MAAAJ,EAAaK,CAAO;AAAA,IACtB;AAAA,EACF,GAAG,CAACd,GAAUD,CAAM,CAAC;AAErB,EAAAgB,EAAU,MAAM;AACd,IAAAL,EAAA;AAAA,EACF,GAAG,CAACA,CAAU,CAAC,GAEfK,EAAU,MAAM;AACd,IAAIlB,MAAkB,UACtBa,EAAA;AAAA,EACF,GAAG,CAACb,GAAea,CAAU,CAAC,GAE9BK,EAAU,MAAM;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AAA,CACF;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),t=require("react"),H=require("./useAdminDeposits-CpLd68oP.cjs"),J=require("./StatsBar-DTUZCwDD.cjs");function se({refreshInterval:s=0,refreshSignal:n,className:c="",onLoad:o}){const{getStats:l,isLoading:i,error:y,clearError:w}=H.useAdminDeposits(),[v,W]=t.useState(null),[g,N]=t.useState(null),b=t.useCallback(async()=>{try{const u=await l();W(u),o?.(u),N(null)}catch(u){const S=u&&typeof u=="object"&&"message"in u?String(u.message):"Failed to load stats";N(S)}},[l,o]);t.useEffect(()=>{b()},[b]),t.useEffect(()=>{n!==void 0&&b()},[n,b]),t.useEffect(()=>{if(n!==void 0||s<=0)return;const u=setInterval(b,s);return()=>clearInterval(u)},[s,n,b]);const C=g||y;return C?e.jsxs("div",{className:`cedros-admin-stats ${c}`,children:[e.jsx("p",{className:"cedros-admin-error",children:C}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline",onClick:()=>{w(),N(null),b()},children:"Retry"})]}):i&&!v?e.jsx("div",{className:`cedros-admin-stats ${c}`,children:e.jsx(J.StatsBar,{stats:[{label:"Total Withdrawn",value:0},{label:"Pending Withdraw",value:0},{label:"In Privacy Period",value:0},{label:"Microbatch (SOL)",value:"0.0000"}],isLoading:!0})}):v?e.jsx("div",{className:`cedros-admin-stats ${c}`,children:e.jsx(J.StatsBar,{stats:[{label:"Total Withdrawn",value:v.totalWithdrawnCount},{label:"Pending Withdraw",value:v.pendingWithdrawalCount},{label:"In Privacy Period",value:v.inPrivacyPeriodCount??0},{label:"Microbatch (SOL)",value:v.readyForWithdrawalSol?.toFixed(4)??"0.0000"}],isLoading:i,onRefresh:b})}):null}function X(s){return s==null?"—":`${(s/1e9).toFixed(4)} SOL`}function Y(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Z(s){return s.length<=12?s:`${s.slice(0,6)}...${s.slice(-4)}`}function te(s){const n=new Date(s),o=new Date().getTime()-n.getTime(),l=Math.floor(o/6e4),i=Math.floor(l/60),y=Math.floor(i/24);return y>0?`${y}d ago`:i>0?`${i}h ago`:l>0?`${l}m ago`:"just now"}function z(s){return s?new Date(s)>new Date:!0}function ae({item:s,processingId:n,onConfirm:c,onCancel:o}){return e.jsx("div",{className:"cedros-admin-modal-overlay",onClick:o,onKeyDown:l=>l.key==="Escape"&&o(),role:"dialog","aria-modal":"true","aria-labelledby":"early-withdrawal-title",children:e.jsxs("div",{className:"cedros-admin-modal cedros-admin-modal-warning",onClick:l=>l.stopPropagation(),onKeyDown:()=>{},role:"document",children:[e.jsx("h3",{id:"early-withdrawal-title",className:"cedros-admin-modal-title",children:"Early Withdrawal Warning"}),e.jsxs("div",{className:"cedros-admin-modal-content",children:[e.jsx("p",{className:"cedros-admin-modal-warning-text",children:e.jsx("strong",{children:"This deposit is still within its privacy period."})}),e.jsx("p",{children:"Processing this withdrawal early may compromise user privacy. The privacy period exists to provide plausible deniability for deposits."}),e.jsxs("p",{className:"cedros-admin-modal-details",children:["User: ",Z(s.userId),e.jsx("br",{}),"Amount: ",X(s.amountLamports),e.jsx("br",{}),"Available at: ",s.withdrawalAvailableAt?Y(s.withdrawalAvailableAt):"—"]}),e.jsx("p",{children:"Are you sure you want to process this withdrawal early?"})]}),e.jsxs("div",{className:"cedros-admin-modal-actions",children:[e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline",onClick:o,children:"Cancel"}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-danger",onClick:()=>c(s,!0),disabled:n===s.id,children:n===s.id?"Processing...":"Process Early"})]})]})})}function re({item:s,processingId:n,processingAll:c,onItemClick:o,onProcess:l}){const i=z(s.withdrawalAvailableAt),y=n===s.id;return e.jsxs("div",{className:`cedros-admin-withdrawal-row ${i?"cedros-admin-withdrawal-row-early":""}`,onClick:()=>o?.(s),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),o?.(s))},role:o?"button":void 0,tabIndex:o?0:void 0,children:[e.jsx("div",{className:"cedros-admin-withdrawal-td",title:s.userId,children:Z(s.userId)}),e.jsx("div",{className:"cedros-admin-withdrawal-td",children:X(s.amountLamports)}),e.jsx("div",{className:"cedros-admin-withdrawal-td",children:s.withdrawalAvailableAt?Y(s.withdrawalAvailableAt):"—"}),e.jsx("div",{className:"cedros-admin-withdrawal-td cedros-admin-withdrawal-waiting",children:s.withdrawalAvailableAt?i?"In privacy period":te(s.withdrawalAvailableAt):"—"}),e.jsx("div",{className:"cedros-admin-withdrawal-td cedros-admin-withdrawal-td-action",children:e.jsx("button",{type:"button",className:`cedros-button cedros-button-sm ${i?"cedros-button-warning":"cedros-button-primary"}`,onClick:w=>{w.stopPropagation(),l(s)},disabled:y||c,title:i?"Early withdrawal (requires confirmation)":"Process this withdrawal",children:y?"...":i?"Early":"Process"})})]},s.id)}function ne({pageSize:s=20,refreshInterval:n=0,refreshSignal:c,className:o="",onLoad:l,onItemClick:i,onWithdrawalProcessed:y,onAllProcessed:w}){const{listPendingWithdrawals:v,processWithdrawal:W,processAllWithdrawals:g,isLoading:N,error:b,clearError:C}=H.useAdminDeposits(),[u,S]=t.useState([]),[I,k]=t.useState(0),[m,T]=t.useState(0),[f,E]=t.useState(null),[x,d]=t.useState("withdrawalAvailableAt"),[h,F]=t.useState("asc"),D=a=>{x===a?F(h==="asc"?"desc":"asc"):(d(a),F(a==="withdrawalAvailableAt"?"asc":"desc"))},_=t.useMemo(()=>[...u].sort((a,P)=>{let j,O;switch(x){case"userId":j=a.userId.toLowerCase(),O=P.userId.toLowerCase();break;case"amountLamports":j=a.amountLamports??0,O=P.amountLamports??0;break;case"withdrawalAvailableAt":j=a.withdrawalAvailableAt?new Date(a.withdrawalAvailableAt).getTime():0,O=P.withdrawalAvailableAt?new Date(P.withdrawalAvailableAt).getTime():0;break;default:return 0}return j<O?h==="asc"?-1:1:j>O?h==="asc"?1:-1:0}),[u,x,h]),[q,r]=t.useState(null),[p,L]=t.useState(!1),[A,M]=t.useState(null),[V,K]=t.useState(null),$=t.useCallback(async()=>{try{const a=await v({limit:s,offset:m});S(a.deposits),k(a.total),l?.(a),E(null)}catch(a){const P=a&&typeof a=="object"&&"message"in a?String(a.message):"Failed to load pending withdrawals";E(P)}},[s,m,v,l]);t.useEffect(()=>{T(0)},[s]),t.useEffect(()=>{$()},[$]),t.useEffect(()=>{c!==void 0&&$()},[c,$]),t.useEffect(()=>{if(c!==void 0||n<=0)return;const a=setInterval($,n);return()=>clearInterval(a)},[n,c,$]),t.useEffect(()=>{if(!A)return;const a=setTimeout(()=>M(null),5e3);return()=>clearTimeout(a)},[A]);const U=Math.ceil(I/s),R=Math.floor(m/s)+1,B=a=>{const P=(a-1)*s;T(Math.max(0,Math.min(P,Math.max(0,I-1))))},Q=async(a,P=!1)=>{if(!P&&z(a.withdrawalAvailableAt)){K(a);return}r(a.id),M(null);try{const j=await W(a.id,{force:P});j.success?(M({type:"success",message:`Withdrawal processed: ${j.txSignature?.slice(0,12)}...`}),y?.(j),await $()):M({type:"error",message:j.error||"Failed to process withdrawal"})}catch(j){M({type:"error",message:j instanceof Error?j.message:"Failed to process withdrawal"})}finally{r(null),K(null)}},ee=async()=>{if(u.length!==0){L(!0),M(null);try{const a=await g();a.totalSucceeded>0?M({type:"success",message:`Processed ${a.totalSucceeded}/${a.totalProcessed} withdrawals`}):a.totalFailed>0&&M({type:"error",message:`Failed to process ${a.totalFailed} withdrawals`}),w?.(a),await $()}catch(a){M({type:"error",message:a instanceof Error?a.message:"Failed to process withdrawals"})}finally{L(!1)}}},G=f||b;return G?e.jsxs("div",{className:`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-error ${o}`,children:[e.jsx("p",{className:"cedros-admin-error",children:G}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline",onClick:()=>{C(),E(null),$()},children:"Retry"})]}):N&&u.length===0&&!q&&!p?e.jsxs("div",{className:`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-loading ${o}`,children:[e.jsx("span",{className:"cedros-admin-loading-indicator"}),e.jsx("span",{className:"cedros-admin-loading-text",children:"Loading withdrawal queue..."})]}):e.jsxs("div",{className:`cedros-admin-withdrawal-queue ${o}`,children:[V&&e.jsx(ae,{item:V,processingId:q,onConfirm:Q,onCancel:()=>K(null)}),A&&e.jsx("div",{className:`cedros-admin-result cedros-admin-result-${A.type}`,role:"status","aria-live":"polite",children:A.message}),e.jsxs("div",{className:"cedros-admin-withdrawal-queue-header",children:[e.jsx("h4",{className:"cedros-admin-withdrawal-queue-title",children:"Pending Withdrawals"}),e.jsxs("div",{className:"cedros-admin-withdrawal-queue-actions",children:[e.jsxs("span",{className:"cedros-admin-queue-count",children:[I," pending"]}),e.jsx("button",{type:"button",className:"cedros-admin__stats-bar-refresh",onClick:$,disabled:N||p,title:"Refresh queue","aria-label":"Refresh queue",children:N&&!p?"...":"↻"}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-primary cedros-button-sm",onClick:ee,disabled:N||p||u.length===0,title:"Process all ready withdrawals",children:p?"Processing...":"Process All"})]})]}),u.length===0?e.jsx("div",{className:"cedros-admin-empty",children:e.jsx("p",{className:"cedros-admin-empty-message",children:"No pending withdrawals."})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"cedros-admin-withdrawal-table",children:[e.jsxs("div",{className:"cedros-admin-withdrawal-thead",children:[e.jsx("div",{className:"cedros-admin-withdrawal-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${x==="userId"?"cedros-admin-sort-active":""}`,onClick:()=>D("userId"),"aria-label":"Sort by user",children:["User"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:x==="userId"?h==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-withdrawal-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${x==="amountLamports"?"cedros-admin-sort-active":""}`,onClick:()=>D("amountLamports"),"aria-label":"Sort by amount",children:["Amount"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:x==="amountLamports"?h==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-withdrawal-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${x==="withdrawalAvailableAt"?"cedros-admin-sort-active":""}`,onClick:()=>D("withdrawalAvailableAt"),"aria-label":"Sort by ready since",children:["Ready Since"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:x==="withdrawalAvailableAt"?h==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-withdrawal-th",children:"Waiting"}),e.jsx("div",{className:"cedros-admin-withdrawal-th cedros-admin-withdrawal-th-action",children:"Action"})]}),_.map(a=>e.jsx(re,{item:a,processingId:q,processingAll:p,onItemClick:i,onProcess:Q},a.id))]}),U>1&&e.jsxs("div",{className:"cedros-admin-pagination",children:[e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>B(R-1),disabled:R<=1,children:"Previous"}),e.jsxs("span",{className:"cedros-admin-page-info",children:["Page ",R," of ",U," (",I," total)"]}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>B(R+1),disabled:R>=U,children:"Next"})]})]})]})}function ie(s){return s==null?"—":`${(s/1e9).toFixed(4)} SOL`}function oe(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function de(s){return s.length<=12?s:`${s.slice(0,6)}...${s.slice(-4)}`}function ce(s){const n=new Date(s),c=new Date,o=n.getTime()-c.getTime();if(o<=0)return"Ready";const l=Math.floor(o/6e4),i=Math.floor(l/60),y=Math.floor(i/24);if(y>0){const w=i%24;return w>0?`${y}d ${w}h`:`${y}d`}if(i>0){const w=l%60;return w>0?`${i}h ${w}m`:`${i}h`}return`${l}m`}function le({pageSize:s=20,refreshInterval:n=0,refreshSignal:c,className:o="",onLoad:l,onItemClick:i}){const{listInPrivacyPeriod:y,isLoading:w,error:v,clearError:W}=H.useAdminDeposits(),[g,N]=t.useState([]),[b,C]=t.useState(0),[u,S]=t.useState(0),[I,k]=t.useState(null),m=t.useCallback(async()=>{try{const d=await y({limit:s,offset:u});N(d.deposits),C(d.total),l?.(d),k(null)}catch(d){const h=d&&typeof d=="object"&&"message"in d?String(d.message):"Failed to load deposits";k(h)}},[s,u,y,l]);t.useEffect(()=>{S(0)},[s]),t.useEffect(()=>{m()},[m]),t.useEffect(()=>{c!==void 0&&m()},[c,m]),t.useEffect(()=>{if(c!==void 0||n<=0)return;const d=setInterval(m,n);return()=>clearInterval(d)},[n,c,m]);const T=Math.ceil(b/s),f=Math.floor(u/s)+1,E=d=>{const h=(d-1)*s;S(Math.max(0,Math.min(h,Math.max(0,b-1))))},x=I||v;return x?e.jsxs("div",{className:`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-error ${o}`,children:[e.jsx("p",{className:"cedros-admin-error",children:x}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline",onClick:()=>{W(),k(null),m()},children:"Retry"})]}):w&&g.length===0?e.jsxs("div",{className:`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-loading ${o}`,children:[e.jsx("span",{className:"cedros-admin-loading-indicator"}),e.jsx("span",{className:"cedros-admin-loading-text",children:"Loading deposits..."})]}):e.jsxs("div",{className:`cedros-admin-privacy-deposits ${o}`,children:[e.jsxs("div",{className:"cedros-admin-privacy-deposits-header",children:[e.jsx("h4",{className:"cedros-admin-privacy-deposits-title",children:"In Privacy Period"}),e.jsxs("div",{className:"cedros-admin-privacy-deposits-actions",children:[e.jsxs("span",{className:"cedros-admin-queue-count",children:[b," deposit",b!==1?"s":""]}),e.jsx("button",{type:"button",className:"cedros-admin__stats-bar-refresh",onClick:m,disabled:w,title:"Refresh list","aria-label":"Refresh list",children:w?"...":"↻"})]})]}),g.length===0?e.jsx("div",{className:"cedros-admin-empty",children:e.jsx("p",{className:"cedros-admin-empty-message",children:"No deposits in privacy period."})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"cedros-admin-privacy-table",children:[e.jsxs("div",{className:"cedros-admin-privacy-thead",children:[e.jsx("div",{className:"cedros-admin-privacy-th",children:e.jsxs("button",{type:"button",className:"cedros-admin-sort-button","aria-label":"Sort by user",children:["User ",e.jsx("span",{className:"cedros-admin-sort-icon",children:"↕"})]})}),e.jsx("div",{className:"cedros-admin-privacy-th",children:e.jsxs("button",{type:"button",className:"cedros-admin-sort-button","aria-label":"Sort by amount",children:["Amount ",e.jsx("span",{className:"cedros-admin-sort-icon",children:"↕"})]})}),e.jsx("div",{className:"cedros-admin-privacy-th",children:e.jsxs("button",{type:"button",className:"cedros-admin-sort-button","aria-label":"Sort by deposited",children:["Deposited ",e.jsx("span",{className:"cedros-admin-sort-icon",children:"↕"})]})}),e.jsx("div",{className:"cedros-admin-privacy-th",children:e.jsxs("button",{type:"button",className:"cedros-admin-sort-button","aria-label":"Sort by ready in",children:["Ready In ",e.jsx("span",{className:"cedros-admin-sort-icon",children:"↕"})]})})]}),g.map(d=>e.jsxs("div",{className:"cedros-admin-privacy-row",onClick:()=>i?.(d),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i?.(d))},role:i?"button":void 0,tabIndex:i?0:void 0,children:[e.jsx("div",{className:"cedros-admin-privacy-td",title:d.userId,children:de(d.userId)}),e.jsx("div",{className:"cedros-admin-privacy-td",children:ie(d.amountLamports)}),e.jsx("div",{className:"cedros-admin-privacy-td",children:d.completedAt?oe(d.completedAt):"—"}),e.jsx("div",{className:"cedros-admin-privacy-td cedros-admin-privacy-remaining",children:d.withdrawalAvailableAt?ce(d.withdrawalAvailableAt):"—"})]},d.id))]}),T>1&&e.jsxs("div",{className:"cedros-admin-pagination",children:[e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>E(f-1),disabled:f<=1,children:"Previous"}),e.jsxs("span",{className:"cedros-admin-page-info",children:["Page ",f," of ",T," (",b," total)"]}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>E(f+1),disabled:f>=T,children:"Next"})]})]})]})}function ue(s){return s==null?"—":`${(s/1e9).toFixed(4)} SOL`}function me(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function he(s){return s.length<=16?s:`${s.slice(0,8)}...${s.slice(-6)}`}function we(s){return s.length<=12?s:`${s.slice(0,6)}...${s.slice(-4)}`}function be({pageSize:s=20,refreshInterval:n=0,refreshSignal:c,className:o="",onLoad:l,onItemClick:i}){const{listDeposits:y,isLoading:w,error:v,clearError:W}=H.useAdminDeposits(),[g,N]=t.useState([]),[b,C]=t.useState(0),[u,S]=t.useState(0),[I,k]=t.useState(null),[m,T]=t.useState("completedAt"),[f,E]=t.useState("desc"),x=r=>{m===r?E(f==="asc"?"desc":"asc"):(T(r),E("desc"))},d=t.useMemo(()=>[...g].sort((r,p)=>{let L,A;switch(m){case"userId":L=r.userId.toLowerCase(),A=p.userId.toLowerCase();break;case"amountLamports":L=r.amountLamports??0,A=p.amountLamports??0;break;case"completedAt":L=r.completedAt?new Date(r.completedAt).getTime():0,A=p.completedAt?new Date(p.completedAt).getTime():0;break;case"withdrawalTxSignature":L=r.withdrawalTxSignature||"",A=p.withdrawalTxSignature||"";break;default:return 0}return L<A?f==="asc"?-1:1:L>A?f==="asc"?1:-1:0}),[g,m,f]),h=t.useCallback(async()=>{try{const r=await y({status:"withdrawn",limit:s,offset:u});N(r.deposits),C(r.total),l?.(r),k(null)}catch(r){const p=r&&typeof r=="object"&&"message"in r?String(r.message):"Failed to load withdrawal history";k(p)}},[s,u,y,l]);t.useEffect(()=>{S(0)},[s]),t.useEffect(()=>{h()},[h]),t.useEffect(()=>{c!==void 0&&h()},[c,h]),t.useEffect(()=>{if(c!==void 0||n<=0)return;const r=setInterval(h,n);return()=>clearInterval(r)},[n,c,h]);const F=Math.ceil(b/s),D=Math.floor(u/s)+1,_=r=>{const p=(r-1)*s;S(Math.max(0,Math.min(p,Math.max(0,b-1))))},q=I||v;return q?e.jsxs("div",{className:`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-error ${o}`,children:[e.jsx("p",{className:"cedros-admin-error",children:q}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline",onClick:()=>{W(),k(null),h()},children:"Retry"})]}):w&&g.length===0?e.jsxs("div",{className:`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-loading ${o}`,children:[e.jsx("span",{className:"cedros-admin-loading-indicator"}),e.jsx("span",{className:"cedros-admin-loading-text",children:"Loading withdrawal history..."})]}):e.jsxs("div",{className:`cedros-admin-withdrawal-history ${o}`,children:[e.jsxs("div",{className:"cedros-admin-withdrawal-history-header",children:[e.jsx("h4",{className:"cedros-admin-withdrawal-history-title",children:"Withdrawal History"}),e.jsxs("div",{className:"cedros-admin-withdrawal-history-actions",children:[e.jsxs("span",{className:"cedros-admin-queue-count",children:[b," withdrawal",b!==1?"s":""]}),e.jsx("button",{type:"button",className:"cedros-admin__stats-bar-refresh",onClick:h,disabled:w,title:"Refresh list","aria-label":"Refresh list",children:w?"...":"↻"})]})]}),g.length===0?e.jsx("div",{className:"cedros-admin-empty",children:e.jsx("p",{className:"cedros-admin-empty-message",children:"No withdrawals processed yet."})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"cedros-admin-history-table",children:[e.jsxs("div",{className:"cedros-admin-history-thead",children:[e.jsx("div",{className:"cedros-admin-history-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${m==="userId"?"cedros-admin-sort-active":""}`,onClick:()=>x("userId"),"aria-label":"Sort by user",children:["User"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:m==="userId"?f==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-history-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${m==="amountLamports"?"cedros-admin-sort-active":""}`,onClick:()=>x("amountLamports"),"aria-label":"Sort by amount",children:["Amount"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:m==="amountLamports"?f==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-history-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${m==="completedAt"?"cedros-admin-sort-active":""}`,onClick:()=>x("completedAt"),"aria-label":"Sort by processed",children:["Processed"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:m==="completedAt"?f==="asc"?"↑":"↓":"↕"})]})}),e.jsx("div",{className:"cedros-admin-history-th",children:e.jsxs("button",{type:"button",className:`cedros-admin-sort-button ${m==="withdrawalTxSignature"?"cedros-admin-sort-active":""}`,onClick:()=>x("withdrawalTxSignature"),"aria-label":"Sort by transaction",children:["Transaction"," ",e.jsx("span",{className:"cedros-admin-sort-icon",children:m==="withdrawalTxSignature"?f==="asc"?"↑":"↓":"↕"})]})})]}),d.map(r=>e.jsxs("div",{className:"cedros-admin-history-row",onClick:()=>i?.(r),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),i?.(r))},role:i?"button":void 0,tabIndex:i?0:void 0,children:[e.jsx("div",{className:"cedros-admin-history-td",title:r.userId,children:we(r.userId)}),e.jsx("div",{className:"cedros-admin-history-td",children:ue(r.amountLamports)}),e.jsx("div",{className:"cedros-admin-history-td",children:r.completedAt?me(r.completedAt):"—"}),e.jsx("div",{className:"cedros-admin-history-td",children:r.withdrawalTxSignature?e.jsx("a",{href:`https://orbmarkets.io/tx/${r.withdrawalTxSignature}`,target:"_blank",rel:"noopener noreferrer",className:"cedros-admin-tx-link",onClick:p=>p.stopPropagation(),title:r.withdrawalTxSignature,children:he(r.withdrawalTxSignature)}):"—"})]},r.id))]}),F>1&&e.jsxs("div",{className:"cedros-admin-pagination",children:[e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>_(D-1),disabled:D<=1,children:"Previous"}),e.jsxs("span",{className:"cedros-admin-page-info",children:["Page ",D," of ",F," (",b," total)"]}),e.jsx("button",{type:"button",className:"cedros-button cedros-button-outline cedros-button-sm",onClick:()=>_(D+1),disabled:D>=F,children:"Next"})]})]})]})}exports.AdminPrivacyPeriodDeposits=le;exports.AdminWithdrawalHistory=be;exports.AdminWithdrawalQueue=ne;exports.AdminWithdrawalStats=se;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminWithdrawalHistory-zDUhPDNi.cjs","sources":["../src/components/deposit/admin/AdminWithdrawalStats.tsx","../src/components/deposit/admin/AdminWithdrawalQueueParts.tsx","../src/components/deposit/admin/AdminWithdrawalQueue.tsx","../src/components/deposit/admin/AdminPrivacyPeriodDeposits.tsx","../src/components/deposit/admin/AdminWithdrawalHistory.tsx"],"sourcesContent":["/**\n * Admin withdrawal statistics component\n *\n * Shows high-level withdrawal pipeline stats in a single row.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositStatsResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\nimport { StatsBar } from '../../admin/StatsBar';\n\nexport interface AdminWithdrawalStatsProps {\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when stats are loaded */\n onLoad?: (stats: AdminDepositStatsResponse) => void;\n}\n\nexport function AdminWithdrawalStats({\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n}: AdminWithdrawalStatsProps) {\n const { getStats, isLoading, error, clearError } = useAdminDeposits();\n\n const [stats, setStats] = useState<AdminDepositStatsResponse | null>(null);\n const [loadError, setLoadError] = useState<string | null>(null);\n\n const fetchStats = useCallback(async () => {\n try {\n const result = await getStats();\n setStats(result);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load stats';\n setLoadError(message);\n }\n }, [getStats, onLoad]);\n\n useEffect(() => {\n fetchStats();\n }, [fetchStats]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchStats();\n }, [refreshSignal, fetchStats]);\n\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n const interval = setInterval(fetchStats, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchStats]);\n\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n if (errorMessage) {\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchStats();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n if (isLoading && !stats) {\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <StatsBar\n stats={[\n { label: 'Total Withdrawn', value: 0 },\n { label: 'Pending Withdraw', value: 0 },\n { label: 'In Privacy Period', value: 0 },\n { label: 'Microbatch (SOL)', value: '0.0000' },\n ]}\n isLoading\n />\n </div>\n );\n }\n\n if (!stats) return null;\n\n return (\n <div className={`cedros-admin-stats ${className}`}>\n <StatsBar\n stats={[\n { label: 'Total Withdrawn', value: stats.totalWithdrawnCount },\n { label: 'Pending Withdraw', value: stats.pendingWithdrawalCount },\n { label: 'In Privacy Period', value: stats.inPrivacyPeriodCount ?? 0 },\n { label: 'Microbatch (SOL)', value: stats.readyForWithdrawalSol?.toFixed(4) ?? '0.0000' },\n ]}\n isLoading={isLoading}\n onRefresh={fetchStats}\n />\n </div>\n );\n}\n","/**\n * Sub-components for AdminWithdrawalQueue.\n *\n * Extracted to keep AdminWithdrawalQueue.tsx within the 500-line file budget.\n */\n\nimport type { AdminDepositItem } from '../../../types/deposit';\n\n// ---------------------------------------------------------------------------\n// Shared helpers (re-exported so AdminWithdrawalQueue can import from here)\n// ---------------------------------------------------------------------------\n\nexport function formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nexport function formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\nexport function getTimeElapsed(dateString: string): string {\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffDays > 0) return `${diffDays}d ago`;\n if (diffHours > 0) return `${diffHours}h ago`;\n if (diffMins > 0) return `${diffMins}m ago`;\n return 'just now';\n}\n\nexport function isWithinPrivacyPeriod(withdrawalAvailableAt: string | undefined): boolean {\n if (!withdrawalAvailableAt) return true;\n return new Date(withdrawalAvailableAt) > new Date();\n}\n\n// ---------------------------------------------------------------------------\n// EarlyWithdrawalModal\n// ---------------------------------------------------------------------------\n\ninterface EarlyWithdrawalModalProps {\n item: AdminDepositItem;\n processingId: string | null;\n onConfirm: (item: AdminDepositItem, force: true) => void;\n onCancel: () => void;\n}\n\n/**\n * Confirmation dialog shown before processing a withdrawal that is still\n * within its privacy period.\n */\nexport function EarlyWithdrawalModal({\n item,\n processingId,\n onConfirm,\n onCancel,\n}: EarlyWithdrawalModalProps) {\n return (\n <div\n className=\"cedros-admin-modal-overlay\"\n onClick={onCancel}\n onKeyDown={(e) => e.key === 'Escape' && onCancel()}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"early-withdrawal-title\"\n >\n <div\n className=\"cedros-admin-modal cedros-admin-modal-warning\"\n onClick={(e) => e.stopPropagation()}\n onKeyDown={() => {}}\n role=\"document\"\n >\n <h3 id=\"early-withdrawal-title\" className=\"cedros-admin-modal-title\">\n Early Withdrawal Warning\n </h3>\n <div className=\"cedros-admin-modal-content\">\n <p className=\"cedros-admin-modal-warning-text\">\n <strong>This deposit is still within its privacy period.</strong>\n </p>\n <p>\n Processing this withdrawal early may compromise user privacy. The privacy period exists\n to provide plausible deniability for deposits.\n </p>\n <p className=\"cedros-admin-modal-details\">\n User: {truncateId(item.userId)}\n <br />\n Amount: {formatAmount(item.amountLamports)}\n <br />\n Available at: {item.withdrawalAvailableAt ? formatDate(item.withdrawalAvailableAt) : '—'}\n </p>\n <p>Are you sure you want to process this withdrawal early?</p>\n </div>\n <div className=\"cedros-admin-modal-actions\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={onCancel}\n >\n Cancel\n </button>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-danger\"\n onClick={() => onConfirm(item, true)}\n disabled={processingId === item.id}\n >\n {processingId === item.id ? 'Processing...' : 'Process Early'}\n </button>\n </div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// WithdrawalRow\n// ---------------------------------------------------------------------------\n\ninterface WithdrawalRowProps {\n item: AdminDepositItem;\n processingId: string | null;\n processingAll: boolean;\n onItemClick?: (item: AdminDepositItem) => void;\n onProcess: (item: AdminDepositItem) => void;\n}\n\n/**\n * A single row in the withdrawal queue table.\n */\nexport function WithdrawalRow({\n item,\n processingId,\n processingAll,\n onItemClick,\n onProcess,\n}: WithdrawalRowProps) {\n const withinPrivacyPeriod = isWithinPrivacyPeriod(item.withdrawalAvailableAt);\n const isProcessing = processingId === item.id;\n\n return (\n <div\n key={item.id}\n className={`cedros-admin-withdrawal-row ${withinPrivacyPeriod ? 'cedros-admin-withdrawal-row-early' : ''}`}\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-withdrawal-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-withdrawal-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-withdrawal-td\">\n {item.withdrawalAvailableAt ? formatDate(item.withdrawalAvailableAt) : '—'}\n </div>\n <div className=\"cedros-admin-withdrawal-td cedros-admin-withdrawal-waiting\">\n {item.withdrawalAvailableAt\n ? withinPrivacyPeriod\n ? 'In privacy period'\n : getTimeElapsed(item.withdrawalAvailableAt)\n : '—'}\n </div>\n <div className=\"cedros-admin-withdrawal-td cedros-admin-withdrawal-td-action\">\n <button\n type=\"button\"\n className={`cedros-button cedros-button-sm ${withinPrivacyPeriod ? 'cedros-button-warning' : 'cedros-button-primary'}`}\n onClick={(e) => {\n e.stopPropagation();\n onProcess(item);\n }}\n disabled={isProcessing || processingAll}\n title={\n withinPrivacyPeriod\n ? 'Early withdrawal (requires confirmation)'\n : 'Process this withdrawal'\n }\n >\n {isProcessing ? '...' : withinPrivacyPeriod ? 'Early' : 'Process'}\n </button>\n </div>\n </div>\n );\n}\n","/**\n * Admin withdrawal queue component\n *\n * Shows deposits that are ready for withdrawal (privacy period elapsed).\n * Includes buttons to process individual or all withdrawals.\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type {\n AdminDepositItem,\n AdminDepositListResponse,\n ProcessWithdrawalResponse,\n ProcessAllWithdrawalsResponse,\n} from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\nimport {\n isWithinPrivacyPeriod,\n EarlyWithdrawalModal,\n WithdrawalRow,\n} from './AdminWithdrawalQueueParts';\n\ntype QueueSortField = 'userId' | 'amountLamports' | 'withdrawalAvailableAt';\ntype SortOrder = 'asc' | 'desc';\n\nexport interface AdminWithdrawalQueueProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a withdrawal item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n /** Callback when a withdrawal is processed */\n onWithdrawalProcessed?: (response: ProcessWithdrawalResponse) => void;\n /** Callback when all withdrawals are processed */\n onAllProcessed?: (response: ProcessAllWithdrawalsResponse) => void;\n}\n\n/**\n * Admin withdrawal queue display\n *\n * Shows deposits ready for withdrawal processing with action buttons.\n */\nexport function AdminWithdrawalQueue({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n onWithdrawalProcessed,\n onAllProcessed,\n}: AdminWithdrawalQueueProps) {\n const {\n listPendingWithdrawals,\n processWithdrawal,\n processAllWithdrawals,\n isLoading,\n error,\n clearError,\n } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n const [sortField, setSortField] = useState<QueueSortField>('withdrawalAvailableAt');\n const [sortOrder, setSortOrder] = useState<SortOrder>('asc');\n\n const toggleSort = (field: QueueSortField) => {\n if (sortField === field) {\n setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');\n } else {\n setSortField(field);\n setSortOrder(field === 'withdrawalAvailableAt' ? 'asc' : 'desc');\n }\n };\n\n const sortedItems = useMemo(() => {\n return [...items].sort((a, b) => {\n let aVal: string | number;\n let bVal: string | number;\n\n switch (sortField) {\n case 'userId':\n aVal = a.userId.toLowerCase();\n bVal = b.userId.toLowerCase();\n break;\n case 'amountLamports':\n aVal = a.amountLamports ?? 0;\n bVal = b.amountLamports ?? 0;\n break;\n case 'withdrawalAvailableAt':\n aVal = a.withdrawalAvailableAt ? new Date(a.withdrawalAvailableAt).getTime() : 0;\n bVal = b.withdrawalAvailableAt ? new Date(b.withdrawalAvailableAt).getTime() : 0;\n break;\n default:\n return 0;\n }\n\n if (aVal < bVal) return sortOrder === 'asc' ? -1 : 1;\n if (aVal > bVal) return sortOrder === 'asc' ? 1 : -1;\n return 0;\n });\n }, [items, sortField, sortOrder]);\n\n // Processing state\n const [processingId, setProcessingId] = useState<string | null>(null);\n const [processingAll, setProcessingAll] = useState(false);\n const [processResult, setProcessResult] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n\n // Early withdrawal confirmation modal\n const [earlyWithdrawalItem, setEarlyWithdrawalItem] = useState<AdminDepositItem | null>(null);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listPendingWithdrawals({ limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load pending withdrawals';\n setLoadError(message);\n }\n }, [pageSize, offset, listPendingWithdrawals, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n // Clear result message after 5 seconds\n useEffect(() => {\n if (!processResult) return;\n const timer = setTimeout(() => setProcessResult(null), 5000);\n return () => clearTimeout(timer);\n }, [processResult]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n const handleProcessSingle = async (item: AdminDepositItem, force = false) => {\n // Check if within privacy period and not forcing\n if (!force && isWithinPrivacyPeriod(item.withdrawalAvailableAt)) {\n setEarlyWithdrawalItem(item);\n return;\n }\n\n setProcessingId(item.id);\n setProcessResult(null);\n\n try {\n const result = await processWithdrawal(item.id, { force });\n if (result.success) {\n setProcessResult({\n type: 'success',\n message: `Withdrawal processed: ${result.txSignature?.slice(0, 12)}...`,\n });\n onWithdrawalProcessed?.(result);\n await fetchItems();\n } else {\n setProcessResult({\n type: 'error',\n message: result.error || 'Failed to process withdrawal',\n });\n }\n } catch (err) {\n setProcessResult({\n type: 'error',\n message: err instanceof Error ? err.message : 'Failed to process withdrawal',\n });\n } finally {\n setProcessingId(null);\n setEarlyWithdrawalItem(null);\n }\n };\n\n const handleProcessAll = async () => {\n if (items.length === 0) return;\n\n setProcessingAll(true);\n setProcessResult(null);\n\n try {\n const result = await processAllWithdrawals();\n if (result.totalSucceeded > 0) {\n setProcessResult({\n type: 'success',\n message: `Processed ${result.totalSucceeded}/${result.totalProcessed} withdrawals`,\n });\n } else if (result.totalFailed > 0) {\n setProcessResult({\n type: 'error',\n message: `Failed to process ${result.totalFailed} withdrawals`,\n });\n }\n onAllProcessed?.(result);\n await fetchItems();\n } catch (err) {\n setProcessResult({\n type: 'error',\n message: err instanceof Error ? err.message : 'Failed to process withdrawals',\n });\n } finally {\n setProcessingAll(false);\n }\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0 && !processingId && !processingAll) {\n return (\n <div\n className={`cedros-admin-withdrawal-queue cedros-admin-withdrawal-queue-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading withdrawal queue...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-withdrawal-queue ${className}`}>\n {earlyWithdrawalItem && (\n <EarlyWithdrawalModal\n item={earlyWithdrawalItem}\n processingId={processingId}\n onConfirm={handleProcessSingle}\n onCancel={() => setEarlyWithdrawalItem(null)}\n />\n )}\n\n {processResult && (\n <div\n className={`cedros-admin-result cedros-admin-result-${processResult.type}`}\n role=\"status\"\n aria-live=\"polite\"\n >\n {processResult.message}\n </div>\n )}\n\n <div className=\"cedros-admin-withdrawal-queue-header\">\n <h4 className=\"cedros-admin-withdrawal-queue-title\">Pending Withdrawals</h4>\n <div className=\"cedros-admin-withdrawal-queue-actions\">\n <span className=\"cedros-admin-queue-count\">{total} pending</span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading || processingAll}\n title=\"Refresh queue\"\n aria-label=\"Refresh queue\"\n >\n {isLoading && !processingAll ? '...' : '↻'}\n </button>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-primary cedros-button-sm\"\n onClick={handleProcessAll}\n disabled={isLoading || processingAll || items.length === 0}\n title=\"Process all ready withdrawals\"\n >\n {processingAll ? 'Processing...' : 'Process All'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No pending withdrawals.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-withdrawal-table\">\n <div className=\"cedros-admin-withdrawal-thead\">\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'userId' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('userId')}\n aria-label=\"Sort by user\"\n >\n User{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'userId' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'amountLamports' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('amountLamports')}\n aria-label=\"Sort by amount\"\n >\n Amount{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'amountLamports' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'withdrawalAvailableAt' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('withdrawalAvailableAt')}\n aria-label=\"Sort by ready since\"\n >\n Ready Since{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'withdrawalAvailableAt'\n ? sortOrder === 'asc'\n ? '↑'\n : '↓'\n : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-withdrawal-th\">Waiting</div>\n <div className=\"cedros-admin-withdrawal-th cedros-admin-withdrawal-th-action\">\n Action\n </div>\n </div>\n {sortedItems.map((item) => (\n <WithdrawalRow\n key={item.id}\n item={item}\n processingId={processingId}\n processingAll={processingAll}\n onItemClick={onItemClick}\n onProcess={handleProcessSingle}\n />\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n","/**\n * Admin privacy period deposits component\n *\n * Shows deposits that are still in the privacy period (completed but not yet ready for withdrawal).\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositItem, AdminDepositListResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\n\nexport interface AdminPrivacyPeriodDepositsProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a deposit item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n}\n\nfunction formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nfunction formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\nfunction getTimeRemaining(dateString: string): string {\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = date.getTime() - now.getTime();\n\n if (diffMs <= 0) return 'Ready';\n\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffDays > 0) {\n const remainingHours = diffHours % 24;\n return remainingHours > 0 ? `${diffDays}d ${remainingHours}h` : `${diffDays}d`;\n }\n if (diffHours > 0) {\n const remainingMins = diffMins % 60;\n return remainingMins > 0 ? `${diffHours}h ${remainingMins}m` : `${diffHours}h`;\n }\n return `${diffMins}m`;\n}\n\n/**\n * Admin privacy period deposits display\n *\n * Shows deposits that are still in the privacy period (not yet available for withdrawal).\n */\nexport function AdminPrivacyPeriodDeposits({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n}: AdminPrivacyPeriodDepositsProps) {\n const { listInPrivacyPeriod, isLoading, error, clearError } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listInPrivacyPeriod({ limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load deposits';\n setLoadError(message);\n }\n }, [pageSize, offset, listInPrivacyPeriod, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0) {\n return (\n <div\n className={`cedros-admin-privacy-deposits cedros-admin-privacy-deposits-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading deposits...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-privacy-deposits ${className}`}>\n <div className=\"cedros-admin-privacy-deposits-header\">\n <h4 className=\"cedros-admin-privacy-deposits-title\">In Privacy Period</h4>\n <div className=\"cedros-admin-privacy-deposits-actions\">\n <span className=\"cedros-admin-queue-count\">\n {total} deposit{total !== 1 ? 's' : ''}\n </span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading}\n title=\"Refresh list\"\n aria-label=\"Refresh list\"\n >\n {isLoading ? '...' : '↻'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No deposits in privacy period.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-privacy-table\">\n <div className=\"cedros-admin-privacy-thead\">\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by user\"\n >\n User <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by amount\"\n >\n Amount <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by deposited\"\n >\n Deposited <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n <div className=\"cedros-admin-privacy-th\">\n <button\n type=\"button\"\n className=\"cedros-admin-sort-button\"\n aria-label=\"Sort by ready in\"\n >\n Ready In <span className=\"cedros-admin-sort-icon\">↕</span>\n </button>\n </div>\n </div>\n {items.map((item) => (\n <div\n key={item.id}\n className=\"cedros-admin-privacy-row\"\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-privacy-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-privacy-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-privacy-td\">\n {item.completedAt ? formatDate(item.completedAt) : '—'}\n </div>\n <div className=\"cedros-admin-privacy-td cedros-admin-privacy-remaining\">\n {item.withdrawalAvailableAt ? getTimeRemaining(item.withdrawalAvailableAt) : '—'}\n </div>\n </div>\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n","/**\n * Admin withdrawal history component\n *\n * Shows deposits that have been fully withdrawn (processed).\n * Requires system admin privileges.\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport { useAdminDeposits } from '../../../hooks/useAdminDeposits';\nimport type { AdminDepositItem, AdminDepositListResponse } from '../../../types/deposit';\nimport { FeatureDisabledMessage } from './FeatureDisabledMessage';\nimport { isFeatureDisabledError } from './featureDisabled';\n\ntype WithdrawalSortField = 'userId' | 'amountLamports' | 'completedAt' | 'withdrawalTxSignature';\ntype SortOrder = 'asc' | 'desc';\n\nexport interface AdminWithdrawalHistoryProps {\n /** Number of items per page (default: 20) */\n pageSize?: number;\n /** Auto-refresh interval in milliseconds (0 to disable) */\n refreshInterval?: number;\n /** External refresh signal from parent coordinator */\n refreshSignal?: number;\n /** Additional CSS classes */\n className?: string;\n /** Callback when list is loaded */\n onLoad?: (response: AdminDepositListResponse) => void;\n /** Callback when a withdrawal item is clicked */\n onItemClick?: (item: AdminDepositItem) => void;\n}\n\nfunction formatAmount(lamports: number | null): string {\n if (lamports === null || lamports === undefined) return '—';\n const solAmount = lamports / 1_000_000_000;\n return `${solAmount.toFixed(4)} SOL`;\n}\n\nfunction formatDate(dateString: string): string {\n const date = new Date(dateString);\n return date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction truncateSignature(sig: string): string {\n if (sig.length <= 16) return sig;\n return `${sig.slice(0, 8)}...${sig.slice(-6)}`;\n}\n\nfunction truncateId(id: string): string {\n if (id.length <= 12) return id;\n return `${id.slice(0, 6)}...${id.slice(-4)}`;\n}\n\n/**\n * Admin withdrawal history display\n *\n * Shows deposits that have been fully withdrawn.\n */\nexport function AdminWithdrawalHistory({\n pageSize = 20,\n refreshInterval = 0,\n refreshSignal,\n className = '',\n onLoad,\n onItemClick,\n}: AdminWithdrawalHistoryProps) {\n const { listDeposits, isLoading, error, clearError } = useAdminDeposits();\n\n const [items, setItems] = useState<AdminDepositItem[]>([]);\n const [total, setTotal] = useState(0);\n const [offset, setOffset] = useState(0);\n const [loadError, setLoadError] = useState<string | null>(null);\n const [sortField, setSortField] = useState<WithdrawalSortField>('completedAt');\n const [sortOrder, setSortOrder] = useState<SortOrder>('desc');\n\n const toggleSort = (field: WithdrawalSortField) => {\n if (sortField === field) {\n setSortOrder(sortOrder === 'asc' ? 'desc' : 'asc');\n } else {\n setSortField(field);\n setSortOrder('desc');\n }\n };\n\n const sortedItems = useMemo(() => {\n return [...items].sort((a, b) => {\n let aVal: string | number;\n let bVal: string | number;\n\n switch (sortField) {\n case 'userId':\n aVal = a.userId.toLowerCase();\n bVal = b.userId.toLowerCase();\n break;\n case 'amountLamports':\n aVal = a.amountLamports ?? 0;\n bVal = b.amountLamports ?? 0;\n break;\n case 'completedAt':\n aVal = a.completedAt ? new Date(a.completedAt).getTime() : 0;\n bVal = b.completedAt ? new Date(b.completedAt).getTime() : 0;\n break;\n case 'withdrawalTxSignature':\n aVal = a.withdrawalTxSignature || '';\n bVal = b.withdrawalTxSignature || '';\n break;\n default:\n return 0;\n }\n\n if (aVal < bVal) return sortOrder === 'asc' ? -1 : 1;\n if (aVal > bVal) return sortOrder === 'asc' ? 1 : -1;\n return 0;\n });\n }, [items, sortField, sortOrder]);\n\n const fetchItems = useCallback(async () => {\n try {\n const result = await listDeposits({ status: 'withdrawn', limit: pageSize, offset });\n setItems(result.deposits);\n setTotal(result.total);\n onLoad?.(result);\n setLoadError(null);\n } catch (err) {\n const message =\n err && typeof err === 'object' && 'message' in err\n ? String((err as { message: unknown }).message)\n : 'Failed to load withdrawal history';\n setLoadError(message);\n }\n }, [pageSize, offset, listDeposits, onLoad]);\n\n // Reset offset when page size changes\n useEffect(() => {\n setOffset(0);\n }, [pageSize]);\n\n // Fetch on mount and when dependencies change\n useEffect(() => {\n fetchItems();\n }, [fetchItems]);\n\n useEffect(() => {\n if (refreshSignal === undefined) return;\n fetchItems();\n }, [refreshSignal, fetchItems]);\n\n // Auto-refresh\n useEffect(() => {\n if (refreshSignal !== undefined) return;\n if (refreshInterval <= 0) return;\n\n const interval = setInterval(fetchItems, refreshInterval);\n return () => clearInterval(interval);\n }, [refreshInterval, refreshSignal, fetchItems]);\n\n const totalPages = Math.ceil(total / pageSize);\n const currentPage = Math.floor(offset / pageSize) + 1;\n\n const goToPage = (page: number) => {\n const newOffset = (page - 1) * pageSize;\n setOffset(Math.max(0, Math.min(newOffset, Math.max(0, total - 1))));\n };\n\n // Feature disabled state\n const errorMessage = loadError || error;\n if (isFeatureDisabledError(errorMessage)) {\n return <FeatureDisabledMessage feature=\"Privacy Cash\" className={className} />;\n }\n\n // Error state\n if (errorMessage) {\n return (\n <div\n className={`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-error ${className}`}\n >\n <p className=\"cedros-admin-error\">{errorMessage}</p>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline\"\n onClick={() => {\n clearError();\n setLoadError(null);\n fetchItems();\n }}\n >\n Retry\n </button>\n </div>\n );\n }\n\n // Loading state (initial load only)\n if (isLoading && items.length === 0) {\n return (\n <div\n className={`cedros-admin-withdrawal-history cedros-admin-withdrawal-history-loading ${className}`}\n >\n <span className=\"cedros-admin-loading-indicator\" />\n <span className=\"cedros-admin-loading-text\">Loading withdrawal history...</span>\n </div>\n );\n }\n\n return (\n <div className={`cedros-admin-withdrawal-history ${className}`}>\n <div className=\"cedros-admin-withdrawal-history-header\">\n <h4 className=\"cedros-admin-withdrawal-history-title\">Withdrawal History</h4>\n <div className=\"cedros-admin-withdrawal-history-actions\">\n <span className=\"cedros-admin-queue-count\">\n {total} withdrawal{total !== 1 ? 's' : ''}\n </span>\n <button\n type=\"button\"\n className=\"cedros-admin__stats-bar-refresh\"\n onClick={fetchItems}\n disabled={isLoading}\n title=\"Refresh list\"\n aria-label=\"Refresh list\"\n >\n {isLoading ? '...' : '↻'}\n </button>\n </div>\n </div>\n\n {items.length === 0 ? (\n <div className=\"cedros-admin-empty\">\n <p className=\"cedros-admin-empty-message\">No withdrawals processed yet.</p>\n </div>\n ) : (\n <>\n <div className=\"cedros-admin-history-table\">\n <div className=\"cedros-admin-history-thead\">\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'userId' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('userId')}\n aria-label=\"Sort by user\"\n >\n User{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'userId' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'amountLamports' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('amountLamports')}\n aria-label=\"Sort by amount\"\n >\n Amount{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'amountLamports' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'completedAt' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('completedAt')}\n aria-label=\"Sort by processed\"\n >\n Processed{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'completedAt' ? (sortOrder === 'asc' ? '↑' : '↓') : '↕'}\n </span>\n </button>\n </div>\n <div className=\"cedros-admin-history-th\">\n <button\n type=\"button\"\n className={`cedros-admin-sort-button ${sortField === 'withdrawalTxSignature' ? 'cedros-admin-sort-active' : ''}`}\n onClick={() => toggleSort('withdrawalTxSignature')}\n aria-label=\"Sort by transaction\"\n >\n Transaction{' '}\n <span className=\"cedros-admin-sort-icon\">\n {sortField === 'withdrawalTxSignature'\n ? sortOrder === 'asc'\n ? '↑'\n : '↓'\n : '↕'}\n </span>\n </button>\n </div>\n </div>\n {sortedItems.map((item) => (\n <div\n key={item.id}\n className=\"cedros-admin-history-row\"\n onClick={() => onItemClick?.(item)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onItemClick?.(item);\n }\n }}\n role={onItemClick ? 'button' : undefined}\n tabIndex={onItemClick ? 0 : undefined}\n >\n <div className=\"cedros-admin-history-td\" title={item.userId}>\n {truncateId(item.userId)}\n </div>\n <div className=\"cedros-admin-history-td\">{formatAmount(item.amountLamports)}</div>\n <div className=\"cedros-admin-history-td\">\n {item.completedAt ? formatDate(item.completedAt) : '—'}\n </div>\n <div className=\"cedros-admin-history-td\">\n {item.withdrawalTxSignature ? (\n <a\n href={`https://orbmarkets.io/tx/${item.withdrawalTxSignature}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"cedros-admin-tx-link\"\n onClick={(e) => e.stopPropagation()}\n title={item.withdrawalTxSignature}\n >\n {truncateSignature(item.withdrawalTxSignature)}\n </a>\n ) : (\n '—'\n )}\n </div>\n </div>\n ))}\n </div>\n\n {totalPages > 1 && (\n <div className=\"cedros-admin-pagination\">\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage - 1)}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <span className=\"cedros-admin-page-info\">\n Page {currentPage} of {totalPages} ({total} total)\n </span>\n <button\n type=\"button\"\n className=\"cedros-button cedros-button-outline cedros-button-sm\"\n onClick={() => goToPage(currentPage + 1)}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"names":["AdminWithdrawalStats","refreshInterval","refreshSignal","className","onLoad","getStats","isLoading","error","clearError","useAdminDeposits","stats","setStats","useState","loadError","setLoadError","fetchStats","useCallback","result","err","message","useEffect","interval","errorMessage","jsxs","jsx","StatsBar","formatAmount","lamports","formatDate","dateString","truncateId","id","getTimeElapsed","date","diffMs","diffMins","diffHours","diffDays","isWithinPrivacyPeriod","withdrawalAvailableAt","EarlyWithdrawalModal","item","processingId","onConfirm","onCancel","e","WithdrawalRow","processingAll","onItemClick","onProcess","withinPrivacyPeriod","isProcessing","AdminWithdrawalQueue","pageSize","onWithdrawalProcessed","onAllProcessed","listPendingWithdrawals","processWithdrawal","processAllWithdrawals","items","setItems","total","setTotal","offset","setOffset","sortField","setSortField","sortOrder","setSortOrder","toggleSort","field","sortedItems","useMemo","b","aVal","bVal","setProcessingId","setProcessingAll","processResult","setProcessResult","earlyWithdrawalItem","setEarlyWithdrawalItem","fetchItems","timer","totalPages","currentPage","goToPage","page","newOffset","handleProcessSingle","force","handleProcessAll","Fragment","getTimeRemaining","now","remainingHours","remainingMins","AdminPrivacyPeriodDeposits","listInPrivacyPeriod","truncateSignature","sig","AdminWithdrawalHistory","listDeposits","a"],"mappings":"uJAwBO,SAASA,GAAqB,CACnC,gBAAAC,EAAkB,EAClB,cAAAC,EACA,UAAAC,EAAY,GACZ,OAAAC,CACF,EAA8B,CAC5B,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,WAAAC,CAAA,EAAeC,EAAAA,iBAAA,EAE7C,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAA2C,IAAI,EACnE,CAACC,EAAWC,CAAY,EAAIF,EAAAA,SAAwB,IAAI,EAExDG,EAAaC,EAAAA,YAAY,SAAY,CACzC,GAAI,CACF,MAAMC,EAAS,MAAMZ,EAAA,EACrBM,EAASM,CAAM,EACfb,IAASa,CAAM,EACfH,EAAa,IAAI,CACnB,OAASI,EAAK,CACZ,MAAMC,EACJD,GAAO,OAAOA,GAAQ,UAAY,YAAaA,EAC3C,OAAQA,EAA6B,OAAO,EAC5C,uBACNJ,EAAaK,CAAO,CACtB,CACF,EAAG,CAACd,EAAUD,CAAM,CAAC,EAErBgB,EAAAA,UAAU,IAAM,CACdL,EAAA,CACF,EAAG,CAACA,CAAU,CAAC,EAEfK,EAAAA,UAAU,IAAM,CACVlB,IAAk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AC,SAAA,CACC,KAAK,SACL,UAAU,uDACV,QAAS,IAAM8D,EAASD,EAAc,CAAC,EACvC,SAAUA,GAAe,EAC1B,SAAA,UAAA,CAAA,EAGD9D,EAAAA,KAAC,OAAA,CAAK,UAAU,yBAAyB,SAAA,CAAA,QACjC8D,EAAY,OAAKD,EAAW,KAAGvB,EAAM,SAAA,EAC7C,EACArC,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAU,uDACV,QAAS,IAAM8D,EAASD,EAAc,CAAC,EACvC,SAAUA,GAAeD,EAC1B,SAAA,MAAA,CAAA,CAED,CAAA,CACF,CAAA,CAAA,CAEJ,CAAA,EAEJ,CAEJ"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
2
  import { useState as n, useEffect as c } from "react";
3
- import { A as l, a as h, b as m, c as p } from "./AdminWithdrawalHistory-C76bkbjX.js";
3
+ import { A as l, a as h, b as m, c as p } from "./AdminWithdrawalHistory-CgYehfMH.js";
4
4
  function _({
5
5
  pageSize: e = 20,
6
6
  refreshInterval: i = 0
@@ -1 +1 @@
1
- {"version":3,"file":"WithdrawalsSection-BN-FjTEV.js","sources":["../src/admin/sections/WithdrawalsSection.tsx"],"sourcesContent":["/**\n * Withdrawals Section - Plugin wrapper\n *\n * Admin withdrawal pipeline: privacy period, queue, and history.\n */\n\nimport React, { useEffect, useState } from 'react';\nimport type { AdminSectionProps } from '../types';\nimport {\n AdminPrivacyPeriodDeposits,\n AdminWithdrawalQueue,\n AdminWithdrawalHistory,\n AdminWithdrawalStats,\n} from '../../components/deposit/admin';\n\nexport default function WithdrawalsSection({\n pageSize = 20,\n refreshInterval = 0,\n}: AdminSectionProps): React.JSX.Element {\n const [refreshSignal, setRefreshSignal] = useState(0);\n\n useEffect(() => {\n if (refreshInterval <= 0) return;\n const interval = window.setInterval(() => {\n setRefreshSignal((prev) => prev + 1);\n }, refreshInterval);\n return () => window.clearInterval(interval);\n }, [refreshInterval]);\n\n return (\n <div className=\"cedros-dashboard__withdrawals\">\n <AdminWithdrawalStats refreshSignal={refreshSignal} />\n <p className=\"cedros-dashboard__text-muted\">\n Track deposits through the withdrawal pipeline: privacy period, ready for processing, and\n completed.\n </p>\n\n {/* Pipeline view: Privacy Period -> Ready -> Completed */}\n <div className=\"cedros-dashboard__pipeline\">\n <AdminPrivacyPeriodDeposits pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalQueue pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalHistory pageSize={pageSize} refreshSignal={refreshSignal} />\n </div>\n </div>\n );\n}\n"],"names":["WithdrawalsSection","pageSize","refreshInterval","refreshSignal","setRefreshSignal","useState","useEffect","interval","prev","jsxs","jsx","AdminWithdrawalStats","AdminPrivacyPeriodDeposits","AdminWithdrawalQueue","AdminWithdrawalHistory"],"mappings":";;;AAeA,SAAwBA,EAAmB;AAAA,EACzC,UAAAC,IAAW;AAAA,EACX,iBAAAC,IAAkB;AACpB,GAAyC;AACvC,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,CAAC;AAEpD,SAAAC,EAAU,MAAM;AACd,QAAIJ,KAAmB,EAAG;AAC1B,UAAMK,IAAW,OAAO,YAAY,MAAM;AACxC,MAAAH,EAAiB,CAACI,MAASA,IAAO,CAAC;AAAA,IACrC,GAAGN,CAAe;AAClB,WAAO,MAAM,OAAO,cAAcK,CAAQ;AAAA,EAC5C,GAAG,CAACL,CAAe,CAAC,GAGlB,gBAAAO,EAAC,OAAA,EAAI,WAAU,iCACb,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAqB,eAAAR,GAA8B;AAAA,IACpD,gBAAAO,EAAC,KAAA,EAAE,WAAU,gCAA+B,UAAA,wGAG5C;AAAA,IAGA,gBAAAD,EAAC,OAAA,EAAI,WAAU,8BACb,UAAA;AAAA,MAAA,gBAAAC,EAACE,GAAA,EAA2B,UAAAX,GAAoB,eAAAE,EAAA,CAA8B;AAAA,MAC9E,gBAAAO,EAACG,GAAA,EAAqB,UAAAZ,GAAoB,eAAAE,EAAA,CAA8B;AAAA,MACxE,gBAAAO,EAACI,GAAA,EAAuB,UAAAb,GAAoB,eAAAE,EAAA,CAA8B;AAAA,IAAA,EAAA,CAC5E;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"WithdrawalsSection-BCG_-DAP.js","sources":["../src/admin/sections/WithdrawalsSection.tsx"],"sourcesContent":["/**\n * Withdrawals Section - Plugin wrapper\n *\n * Admin withdrawal pipeline: privacy period, queue, and history.\n */\n\nimport React, { useEffect, useState } from 'react';\nimport type { AdminSectionProps } from '../types';\nimport {\n AdminPrivacyPeriodDeposits,\n AdminWithdrawalQueue,\n AdminWithdrawalHistory,\n AdminWithdrawalStats,\n} from '../../components/deposit/admin';\n\nexport default function WithdrawalsSection({\n pageSize = 20,\n refreshInterval = 0,\n}: AdminSectionProps): React.JSX.Element {\n const [refreshSignal, setRefreshSignal] = useState(0);\n\n useEffect(() => {\n if (refreshInterval <= 0) return;\n const interval = window.setInterval(() => {\n setRefreshSignal((prev) => prev + 1);\n }, refreshInterval);\n return () => window.clearInterval(interval);\n }, [refreshInterval]);\n\n return (\n <div className=\"cedros-dashboard__withdrawals\">\n <AdminWithdrawalStats refreshSignal={refreshSignal} />\n <p className=\"cedros-dashboard__text-muted\">\n Track deposits through the withdrawal pipeline: privacy period, ready for processing, and\n completed.\n </p>\n\n {/* Pipeline view: Privacy Period -> Ready -> Completed */}\n <div className=\"cedros-dashboard__pipeline\">\n <AdminPrivacyPeriodDeposits pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalQueue pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalHistory pageSize={pageSize} refreshSignal={refreshSignal} />\n </div>\n </div>\n );\n}\n"],"names":["WithdrawalsSection","pageSize","refreshInterval","refreshSignal","setRefreshSignal","useState","useEffect","interval","prev","jsxs","jsx","AdminWithdrawalStats","AdminPrivacyPeriodDeposits","AdminWithdrawalQueue","AdminWithdrawalHistory"],"mappings":";;;AAeA,SAAwBA,EAAmB;AAAA,EACzC,UAAAC,IAAW;AAAA,EACX,iBAAAC,IAAkB;AACpB,GAAyC;AACvC,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,CAAC;AAEpD,SAAAC,EAAU,MAAM;AACd,QAAIJ,KAAmB,EAAG;AAC1B,UAAMK,IAAW,OAAO,YAAY,MAAM;AACxC,MAAAH,EAAiB,CAACI,MAASA,IAAO,CAAC;AAAA,IACrC,GAAGN,CAAe;AAClB,WAAO,MAAM,OAAO,cAAcK,CAAQ;AAAA,EAC5C,GAAG,CAACL,CAAe,CAAC,GAGlB,gBAAAO,EAAC,OAAA,EAAI,WAAU,iCACb,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAqB,eAAAR,GAA8B;AAAA,IACpD,gBAAAO,EAAC,KAAA,EAAE,WAAU,gCAA+B,UAAA,wGAG5C;AAAA,IAGA,gBAAAD,EAAC,OAAA,EAAI,WAAU,8BACb,UAAA;AAAA,MAAA,gBAAAC,EAACE,GAAA,EAA2B,UAAAX,GAAoB,eAAAE,EAAA,CAA8B;AAAA,MAC9E,gBAAAO,EAACG,GAAA,EAAqB,UAAAZ,GAAoB,eAAAE,EAAA,CAA8B;AAAA,MACxE,gBAAAO,EAACI,GAAA,EAAuB,UAAAb,GAAoB,eAAAE,EAAA,CAA8B;AAAA,IAAA,EAAA,CAC5E;AAAA,EAAA,GACF;AAEJ;"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),s=require("./AdminWithdrawalHistory-B2EY2ZmH.cjs");function c({pageSize:t=20,refreshInterval:i=0}){const[r,d]=a.useState(0);return a.useEffect(()=>{if(i<=0)return;const n=window.setInterval(()=>{d(o=>o+1)},i);return()=>window.clearInterval(n)},[i]),e.jsxs("div",{className:"cedros-dashboard__withdrawals",children:[e.jsx(s.AdminWithdrawalStats,{refreshSignal:r}),e.jsx("p",{className:"cedros-dashboard__text-muted",children:"Track deposits through the withdrawal pipeline: privacy period, ready for processing, and completed."}),e.jsxs("div",{className:"cedros-dashboard__pipeline",children:[e.jsx(s.AdminPrivacyPeriodDeposits,{pageSize:t,refreshSignal:r}),e.jsx(s.AdminWithdrawalQueue,{pageSize:t,refreshSignal:r}),e.jsx(s.AdminWithdrawalHistory,{pageSize:t,refreshSignal:r})]})]})}exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),s=require("./AdminWithdrawalHistory-zDUhPDNi.cjs");function c({pageSize:t=20,refreshInterval:i=0}){const[r,d]=a.useState(0);return a.useEffect(()=>{if(i<=0)return;const n=window.setInterval(()=>{d(o=>o+1)},i);return()=>window.clearInterval(n)},[i]),e.jsxs("div",{className:"cedros-dashboard__withdrawals",children:[e.jsx(s.AdminWithdrawalStats,{refreshSignal:r}),e.jsx("p",{className:"cedros-dashboard__text-muted",children:"Track deposits through the withdrawal pipeline: privacy period, ready for processing, and completed."}),e.jsxs("div",{className:"cedros-dashboard__pipeline",children:[e.jsx(s.AdminPrivacyPeriodDeposits,{pageSize:t,refreshSignal:r}),e.jsx(s.AdminWithdrawalQueue,{pageSize:t,refreshSignal:r}),e.jsx(s.AdminWithdrawalHistory,{pageSize:t,refreshSignal:r})]})]})}exports.default=c;
@@ -1 +1 @@
1
- {"version":3,"file":"WithdrawalsSection-BhuCwFat.cjs","sources":["../src/admin/sections/WithdrawalsSection.tsx"],"sourcesContent":["/**\n * Withdrawals Section - Plugin wrapper\n *\n * Admin withdrawal pipeline: privacy period, queue, and history.\n */\n\nimport React, { useEffect, useState } from 'react';\nimport type { AdminSectionProps } from '../types';\nimport {\n AdminPrivacyPeriodDeposits,\n AdminWithdrawalQueue,\n AdminWithdrawalHistory,\n AdminWithdrawalStats,\n} from '../../components/deposit/admin';\n\nexport default function WithdrawalsSection({\n pageSize = 20,\n refreshInterval = 0,\n}: AdminSectionProps): React.JSX.Element {\n const [refreshSignal, setRefreshSignal] = useState(0);\n\n useEffect(() => {\n if (refreshInterval <= 0) return;\n const interval = window.setInterval(() => {\n setRefreshSignal((prev) => prev + 1);\n }, refreshInterval);\n return () => window.clearInterval(interval);\n }, [refreshInterval]);\n\n return (\n <div className=\"cedros-dashboard__withdrawals\">\n <AdminWithdrawalStats refreshSignal={refreshSignal} />\n <p className=\"cedros-dashboard__text-muted\">\n Track deposits through the withdrawal pipeline: privacy period, ready for processing, and\n completed.\n </p>\n\n {/* Pipeline view: Privacy Period -> Ready -> Completed */}\n <div className=\"cedros-dashboard__pipeline\">\n <AdminPrivacyPeriodDeposits pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalQueue pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalHistory pageSize={pageSize} refreshSignal={refreshSignal} />\n </div>\n </div>\n );\n}\n"],"names":["WithdrawalsSection","pageSize","refreshInterval","refreshSignal","setRefreshSignal","useState","useEffect","interval","prev","jsxs","jsx","AdminWithdrawalStats","AdminPrivacyPeriodDeposits","AdminWithdrawalQueue","AdminWithdrawalHistory"],"mappings":"2LAeA,SAAwBA,EAAmB,CACzC,SAAAC,EAAW,GACX,gBAAAC,EAAkB,CACpB,EAAyC,CACvC,KAAM,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAAS,CAAC,EAEpDC,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIJ,GAAmB,EAAG,OAC1B,MAAMK,EAAW,OAAO,YAAY,IAAM,CACxCH,EAAkBI,GAASA,EAAO,CAAC,CACrC,EAAGN,CAAe,EAClB,MAAO,IAAM,OAAO,cAAcK,CAAQ,CAC5C,EAAG,CAACL,CAAe,CAAC,EAGlBO,EAAAA,KAAC,MAAA,CAAI,UAAU,gCACb,SAAA,CAAAC,MAACC,EAAAA,sBAAqB,cAAAR,EAA8B,EACpDO,EAAAA,IAAC,IAAA,CAAE,UAAU,+BAA+B,SAAA,uGAG5C,EAGAD,EAAAA,KAAC,MAAA,CAAI,UAAU,6BACb,SAAA,CAAAC,EAAAA,IAACE,EAAAA,2BAAA,CAA2B,SAAAX,EAAoB,cAAAE,CAAA,CAA8B,EAC9EO,EAAAA,IAACG,EAAAA,qBAAA,CAAqB,SAAAZ,EAAoB,cAAAE,CAAA,CAA8B,EACxEO,EAAAA,IAACI,EAAAA,uBAAA,CAAuB,SAAAb,EAAoB,cAAAE,CAAA,CAA8B,CAAA,CAAA,CAC5E,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"WithdrawalsSection-DKpL2mt8.cjs","sources":["../src/admin/sections/WithdrawalsSection.tsx"],"sourcesContent":["/**\n * Withdrawals Section - Plugin wrapper\n *\n * Admin withdrawal pipeline: privacy period, queue, and history.\n */\n\nimport React, { useEffect, useState } from 'react';\nimport type { AdminSectionProps } from '../types';\nimport {\n AdminPrivacyPeriodDeposits,\n AdminWithdrawalQueue,\n AdminWithdrawalHistory,\n AdminWithdrawalStats,\n} from '../../components/deposit/admin';\n\nexport default function WithdrawalsSection({\n pageSize = 20,\n refreshInterval = 0,\n}: AdminSectionProps): React.JSX.Element {\n const [refreshSignal, setRefreshSignal] = useState(0);\n\n useEffect(() => {\n if (refreshInterval <= 0) return;\n const interval = window.setInterval(() => {\n setRefreshSignal((prev) => prev + 1);\n }, refreshInterval);\n return () => window.clearInterval(interval);\n }, [refreshInterval]);\n\n return (\n <div className=\"cedros-dashboard__withdrawals\">\n <AdminWithdrawalStats refreshSignal={refreshSignal} />\n <p className=\"cedros-dashboard__text-muted\">\n Track deposits through the withdrawal pipeline: privacy period, ready for processing, and\n completed.\n </p>\n\n {/* Pipeline view: Privacy Period -> Ready -> Completed */}\n <div className=\"cedros-dashboard__pipeline\">\n <AdminPrivacyPeriodDeposits pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalQueue pageSize={pageSize} refreshSignal={refreshSignal} />\n <AdminWithdrawalHistory pageSize={pageSize} refreshSignal={refreshSignal} />\n </div>\n </div>\n );\n}\n"],"names":["WithdrawalsSection","pageSize","refreshInterval","refreshSignal","setRefreshSignal","useState","useEffect","interval","prev","jsxs","jsx","AdminWithdrawalStats","AdminPrivacyPeriodDeposits","AdminWithdrawalQueue","AdminWithdrawalHistory"],"mappings":"2LAeA,SAAwBA,EAAmB,CACzC,SAAAC,EAAW,GACX,gBAAAC,EAAkB,CACpB,EAAyC,CACvC,KAAM,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAAS,CAAC,EAEpDC,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIJ,GAAmB,EAAG,OAC1B,MAAMK,EAAW,OAAO,YAAY,IAAM,CACxCH,EAAkBI,GAASA,EAAO,CAAC,CACrC,EAAGN,CAAe,EAClB,MAAO,IAAM,OAAO,cAAcK,CAAQ,CAC5C,EAAG,CAACL,CAAe,CAAC,EAGlBO,EAAAA,KAAC,MAAA,CAAI,UAAU,gCACb,SAAA,CAAAC,MAACC,EAAAA,sBAAqB,cAAAR,EAA8B,EACpDO,EAAAA,IAAC,IAAA,CAAE,UAAU,+BAA+B,SAAA,uGAG5C,EAGAD,EAAAA,KAAC,MAAA,CAAI,UAAU,6BACb,SAAA,CAAAC,EAAAA,IAACE,EAAAA,2BAAA,CAA2B,SAAAX,EAAoB,cAAAE,CAAA,CAA8B,EAC9EO,EAAAA,IAACG,EAAAA,qBAAA,CAAqB,SAAAZ,EAAoB,cAAAE,CAAA,CAA8B,EACxEO,EAAAA,IAACI,EAAAA,uBAAA,CAAuB,SAAAb,EAAoB,cAAAE,CAAA,CAA8B,CAAA,CAAA,CAC5E,CAAA,EACF,CAEJ"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./plugin-DNFjEfYp.cjs");exports.AdminShell=e.AdminShell;exports.CEDROS_LOGIN_SECTION_IDS=e.CEDROS_LOGIN_SECTION_IDS;exports.Icons=e.Icons;exports.cedrosLoginPlugin=e.cedrosLoginPlugin;exports.loginPlugin=e.cedrosLoginPlugin;exports.useAdminShell=e.useAdminShell;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./plugin-C7dru1t-.cjs");exports.AdminShell=e.AdminShell;exports.CEDROS_LOGIN_SECTION_IDS=e.CEDROS_LOGIN_SECTION_IDS;exports.Icons=e.Icons;exports.cedrosLoginPlugin=e.cedrosLoginPlugin;exports.loginPlugin=e.cedrosLoginPlugin;exports.useAdminShell=e.useAdminShell;
@@ -1,4 +1,4 @@
1
- import { A as n, C as a, I as i, c as o, c as e, u as I } from "./plugin-WYMrRNbz.js";
1
+ import { A as n, C as a, I as i, c as o, c as e, u as I } from "./plugin-DivbaxSZ.js";
2
2
  export {
3
3
  n as AdminShell,
4
4
  a as CEDROS_LOGIN_SECTION_IDS,