import { FormEvent } from 'react'; import { Terminal, Crosshair, Code, ShieldAlert, Wifi, Cpu, Eye, LockKeyhole, FolderLock, Database, MapPin, ChevronRight, Share, TriangleAlert, Globe, Share2, Instagram } from 'lucide-react'; const DICT: Record = { pt: { back: '/cd root_dir', heroTitle: 'O ZERO-DAY.LOG', heroDesc: 'Registros restritos distribuídos sobre infosec, darknets e vulnerabilidades catastróficas L0.', btnDecrypt: 'DECRYPT_FILE()', btnTerminal: 'ACCESS_TERM()', feedTitle: 'SYS.LOGS_STREAM', subscribeText: 'Canal de transmissão de exploits prioridade vermelha.', subscribeBtn: 'INIT_HANDSHAKE', sidebarAd: 'S.P.O.N.S.O.R', adDesc: 'VPN DESCENTRALIZADA OFUSCADA', statusMonitor: 'SYS_NODE_MONITOR', articles: [ { id: '1', tag: 'ZERO-DAY', title: 'Exploit encontrado na rede principal Ethereum de custódia', excerpt: 'Nossa equipe documentou um exploit RCE crítico na infraestrutura nativa.', date: '14:02:00', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '2', tag: 'CRYPTO', title: 'Criptografia Quântica: A quebra absoluta', excerpt: 'Algoritmos de Shor não são mais teóricos. Atualize seus bancos com urgência antes do Q4.', date: '09:15:33', author: 'DrH4ck', sev: 'HIGH' }, { id: '3', tag: 'HARDWARE', title: 'Engenharia Reversa no SDK de Drones de Entrega Aérea', excerpt: 'Anatomia do firmware que controla a nova frota autônoma. O bypass é letalmente simples.', date: '22:40:11', author: 'R00T_ME', sev: 'MED' }, { id: '4', tag: 'WEB3', title: 'Como carteiras frias vazam seeds vitais via voltagem', excerpt: 'Chips tidos como seguros falham sob injeção de pólos extremos térmicos na placa principal.', date: '03:10:00', author: 'Ghost', sev: 'CRITICAL' }, { id: '5', tag: 'A.I.', title: 'Envenenamento de LLMs por injeção estocástica reversa', excerpt: 'Hackeando os bancos de treinamento massivos através de padrões de grid em dados de satélite.', date: '11:40:22', author: 'Cipher', sev: 'HIGH' }, { id: '6', tag: 'MALWARE', title: 'Ransomware trava totalmente malhas ferroviárias do leste', excerpt: 'Eles pediram Monero limpo, mas a chave de desencriptação queimou.', date: '16:05:00', author: '0xVoid', sev: 'HIGH' }, { id: '7', tag: 'PRIVACY', title: 'O Fim da rede Tor como conhecemos', excerpt: 'Entidades interceptaram tráfego no source e adquiriram 60% dos nodes finais globais.', date: '08:32:10', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '8', tag: 'NETWORK', title: 'DNS over HTTPS está vazando metadata de proxy', excerpt: 'Você não está invisível. A estrutura central reporta dados indiretos se mal configurada.', date: '01:10:05', author: 'R00T_ME', sev: 'LOW' }, ] }, en: { back: '/cd root_dir', heroTitle: 'THE ZERO-DAY.LOG', heroDesc: 'Restricted distributed logs on infosec, darknets, and catastrophic L0 vulnerabilities.', btnDecrypt: 'DECRYPT_FILE()', btnTerminal: 'ACCESS_TERM()', feedTitle: 'SYS.LOGS_STREAM', subscribeText: 'Red priority exploit transmission channel.', subscribeBtn: 'INIT_HANDSHAKE', sidebarAd: 'S.P.O.N.S.O.R', adDesc: 'OBFUSCATED DECENTRALIZED VPN', statusMonitor: 'SYS_NODE_MONITOR', articles: [ { id: '1', tag: 'ZERO-DAY', title: 'Zero-Day Exploit found on core custodial network', excerpt: 'Our analytical team documented a critical RCE exploit within standard core architecture.', date: '14:02:00', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '2', tag: 'CRYPTO', title: 'Quantum Cryptography: The absolute breakage event', excerpt: 'Shor algorithms dropped theoretical constraints. Patch databases rapidly before Q4 starts.', date: '09:15:33', author: 'DrH4ck', sev: 'HIGH' }, { id: '3', tag: 'HARDWARE', title: 'Reverse Engineering autonomous Aerial Drone SDKs', excerpt: 'Firmware anatomy bypass for commercial delivery fleets. The code breach is lethally basic.', date: '22:40:11', author: 'R00T_ME', sev: 'MED' }, { id: '4', tag: 'WEB3', title: 'How premium cold wallets leak seeds via voltage pinging', excerpt: 'Secure chips fail hard when injected with extreme thermal polls straight onto the mainboard.', date: '03:10:00', author: 'Ghost', sev: 'CRITICAL' }, { id: '5', tag: 'A.I.', title: 'Poisoning core LLMs via reverse stochastic injections', excerpt: 'Hacking massive training banks by tricking satellite grid rendering artifacts constantly.', date: '11:40:22', author: 'Cipher', sev: 'HIGH' }, { id: '6', title: 'Industrial Ransomware entirely halts eastern rail grids', tag: 'MALWARE', excerpt: 'Ransom requested in clean Monero, but the global decryption array burned to ash.', date: '16:05:00', author: '0xVoid', sev: 'HIGH' }, { id: '7', tag: 'PRIVACY', title: 'The total collapse of the Tor network as known', excerpt: 'Black entities intercepted core traffic routing and purchased 60% of all exit nodes.', date: '08:32:10', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '8', tag: 'NETWORK', title: 'Your DNS over HTTPS setup is leaking proxy data logs', excerpt: 'Invisibility is broken. Central scaffolding inherently leaks telemetry if left out of bounds.', date: '01:10:05', author: 'R00T_ME', sev: 'LOW' } ] }, es: { back: '/cd root_dir', heroTitle: 'EL ZERO-DAY.LOG', heroDesc: 'Registros distribuidos restringidos sobre infosec y vulnerabilidades catastróficas.', btnDecrypt: 'DESCIFRAR_ARCHIVO()', btnTerminal: 'ACCESO_TERM()', feedTitle: 'FLUJO.SYS_LOGS', subscribeText: 'Canal de distribución de exploits, prioridad roja.', subscribeBtn: 'INICIAR_HANDSHAKE', sidebarAd: 'P.A.T.R.O.C.I.N.A.D.O.R', adDesc: 'VPN DESCENTRALIZADA OFUSCADA', statusMonitor: 'MONITOR_DE_NODOS_SYS', articles: [ { id: '1', tag: 'ZERO-DAY', title: 'Exploit crítico en la red principal de custodia', excerpt: 'El equipo documentó un exploit RCE mortal en la infraestructura estándar nativa.', date: '14:02:00', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '2', tag: 'CRYPTO', title: 'Criptografía Cuántica: La ruptura absoluta inminente', excerpt: 'Los algoritmos de Shor ya no son una simple teoría. Se requiere un parcheo inmediato global.', date: '09:15:33', author: 'DrH4ck', sev: 'HIGH' }, { id: '3', tag: 'HARDWARE', title: 'Ingeniería Inversa letal a Drones comerciales', excerpt: 'El bypass de la anatomía del firmware muestra fallas operativas extremas en el SDK.', date: '22:40:11', author: 'R00T_ME', sev: 'MED' }, { id: '4', tag: 'WEB3', title: 'Wallets físicas filtrando frases semilla en tensión alta', excerpt: 'Los micro chips hiper seguros fallaron ante ataques eléctricos violentos a placa madre.', date: '03:10:00', author: 'Ghost', sev: 'CRITICAL' }, { id: '5', tag: 'A.I.', title: 'Corrompiendo LLMs mediante ataques estocásticos', excerpt: 'Dañando bases de datos de entrenamiento vía inyecciones matemáticas satelitales.', date: '11:40:22', author: 'Cipher', sev: 'HIGH' }, { id: '6', tag: 'MALWARE', title: 'Ransomware severo paraliza vías férreas de logística', excerpt: 'Miles de millones pedidos en Monero. La llave maestra de descifrado simplemente se borró.', date: '16:05:00', author: '0xVoid', sev: 'HIGH' }, { id: '7', tag: 'PRIVACY', title: 'El fin inevitable de anonimato total en red Tor', excerpt: 'Entes han adquirido el control total subyacente interceptando todos los nodos finales.', date: '08:32:10', author: 'SysAdmin_01', sev: 'CRITICAL' }, { id: '8', tag: 'NETWORK', title: 'Ajuste de DNS over HTTPS filtra meta datos severos', excerpt: 'No eres invisible en internet. La estructura troncal reporta huellas de IP y tracking.', date: '01:10:05', author: 'R00T_ME', sev: 'LOW' }, ] } }; export default function CyberTheme({ posts = [], activeView = 'home', currentArticle, children }: { posts?: any[], activeView?: 'home' | 'article', currentArticle?: any, children?: React.ReactNode }) { const lang = 'pt'; const ui = DICT[lang] || DICT['pt']; // Mapeia posts reais do Supabase (gerados pela IA) ou usa o Fallback padrão const articlesToRender = posts && posts.length > 0 ? posts.map((p, i) => ({ id: p.slug || p.id, tag: 'SYSTEM', title: p.data?.title || p.title, excerpt: p.data?.excerpt || p.excerpt, date: p.data?.date ? new Date(p.data.date).toLocaleTimeString('pt-BR', { hour: '2-digit', minute: '2-digit', second: '2-digit' }) : '00:00:00', author: p.data?.author || 'AI_NODE', sev: i % 2 === 0 ? 'CRITICAL' : 'HIGH', content: p.body || p.content })) : ui.articles; // Se houver um artigo atual passado por rota dinâmica const article = currentArticle ? { id: currentArticle.slug, tag: 'SYSTEM', title: currentArticle.data?.title, excerpt: currentArticle.data?.excerpt, date: currentArticle.data?.date ? new Date(currentArticle.data.date).toLocaleTimeString('pt-BR') : '00:00:00', author: currentArticle.data?.author || 'AI_NODE', sev: 'CRITICAL' } : null; const handleSimulatedAction = (e: React.MouseEvent | FormEvent, msg: string) => { e.preventDefault(); window.alert(`[SYS_PROMPT] ${msg}`); }; const severityColor = (sev: string) => { switch (sev) { case 'CRITICAL': return 'text-red-500 border-red-500/50 bg-red-500/10'; case 'HIGH': return 'text-orange-500 border-orange-500/50 bg-orange-500/10'; case 'MED': return 'text-yellow-500 border-yellow-500/50 bg-yellow-500/10'; default: return 'text-[#00ff9d] border-[#00ff9d]/50 bg-[#00ff9d]/10'; } }; return (
{/* Triple-Column Application Dashboard Shell */} {/* Global Application Header */}
CYBER_SYS_CORE v9.4
IP MASKED UPTIME: 99.42% AUTH
{/* Main 3 Column Flex Layer */}
{/* LEFT COLUMN: NAVIGATION TREE (15-20%) hidden on mobile */} {/* CENTER COLUMN: MAIN FEED (60%) scrollable */}
{activeView === 'home' ? ( <> {/* Terminal Header Banner */}
GLOBAL_BROADCAST

{ui.heroTitle}

{ui.heroDesc}

{/* Dense Log Feed */} ) : ( /* Article View inside Center Column */
{ui.back}
SEVERITY: {currentArticle.sev} AUTHOR_ID: {currentArticle.author}

{currentArticle.title}

TIMESTAMP: {currentArticle.date} handleSimulatedAction(e, 'Share log via Onion router')}> TRANSMIT VIA ONION
{currentArticle.excerpt}
{/* Injecting Ad block into article flow dynamically (always before content) */}
handleSimulatedAction(e, 'MREC Article Ad')}> {ui.sidebarAd} // MREC SCRIPT SPONSORED_TERMINAL_BLOCK 300x250
{children}
)}

Terminal_Core

Infraestrutura de segurança distribuída para coleta de inteligência em redes abertas.

Node_Status

ALL_SYSTEMS_OPERATIONAL
EOF - END OF LOGS TRANSMISSION // {new Date().getFullYear()} // ENCRYPTED_SITE
{/* RIGHT COLUMN: STATUS MONITOR & WIDGETS (20-25%) hidden on smaller screens */}
); }