/* ═══════════════════════════════════════════════════════════ MARKETPLACE PAGE — HaaS · DaaS · SaaS + E-Wallet (demo for guests, real for logged users) + Affiliate-enabled products + Partner products & services ═══════════════════════════════════════════════════════════ */ const { useState: useStateMk, useEffect: useEffectMk, useContext: useContextMk } = React; /* ── Mock data ──────────────────────────────────────────── */ const MK_ITEMS = [ { id:'mk_01', cat:'SaaS', kicker:'EventOS · Anual', t:'Plataforma completa', price:24000, display:'€24K', per:'/ano', features:['9 Kernels integrados','Hexis AI ilimitada','D3-BMC dashboards','Suporte prioritário 24/7'], tag:'', side:'empresas', featured:false }, { id:'mk_02', cat:'DaaS', kicker:'Leads · Pack 100', t:'Leads qualificados', price:4800, display:'€4.8K', per:'/pack', features:['100 decisores validados','MatchScore™ ≥85%','CRM sync nativo','Follow-up sugerido pela IA'], tag:'Best seller', side:'empresas', featured:true }, { id:'mk_03', cat:'DaaS', kicker:'API · Dados setoriais', t:'Acesso programático', price:1200, display:'€1.2K', per:'/mês', features:['REST + gRPC','Rate-limit 100k/dia','pgvector embeddings','SLA 99.95%'], tag:'', side:'empresas', featured:false }, { id:'mk_04', cat:'HaaS', kicker:'Stand digital · Premium', t:'Presença expandida', price:8000, display:'€8K', per:'/evento', features:['Landing dedicado','Leads em tempo real','Overlay Hexis','Relatório pós-evento'], tag:'', side:'empresas', featured:false }, { id:'mk_05', cat:'SaaS', kicker:'White-label', t:'Multi-tenant', price:0, display:'Custom', per:'/SLA', features:['Subdomínio próprio','Branding total','Kernels selecionáveis','Suporte 24/7'], tag:'Enterprise', side:'empresas', featured:false }, { id:'mk_06', cat:'HaaS', kicker:'Kiosk · Aluguer', t:'Check-in completo', price:2400, display:'€2.4K', per:'/evento', features:['Setup + operação incluídos','Face ID + NFC dual','Briefing Hexis < 10s','Relatório automático'], tag:'', side:'empresas', featured:false }, { id:'mk_07', cat:'HaaS', kicker:'Ticket Executive', t:'Acesso C-Level', price:480, display:'€480', per:'/evento', features:['Executive Floor acesso','Lounge dedicado Marcianus','Briefing Hexis personalizado','Kit NFC + ID Band'], tag:'', side:'participants', featured:false }, { id:'mk_08', cat:'SaaS', kicker:'Networking Premium', t:'30 dias de matches', price:120, display:'€120', per:'/mês', features:['MatchScore™ prioritário','10 introduções garantidas','Agenda sincronizada','Follow-up automático'], tag:'Mais escolhido', side:'participants', featured:true }, { id:'mk_09', cat:'SaaS', kicker:'Hexis Prioritário', t:'Priority Engine', price:60, display:'€60', per:'/evento', features:['Fila zero nos kiosks','Briefing expandido','3 matches VIP','Relatório pós-evento'], tag:'', side:'participants', featured:false }, { id:'mk_10', cat:'HaaS', kicker:'Wallet · Saldo', t:'Ecossistema unificado', price:0, display:'Flex.', per:'/saldo', features:['Uma conta, um saldo','Cashback em eventos','Stripe + EMIS','Transferível'], tag:'', side:'participants', featured:false }, { id:'mk_11', cat:'HaaS', kicker:'Mentoria 1:1', t:'Curadoria Marcianus', price:200, display:'€200', per:'/sessão', features:['Mentor validado','60 min + NDA','Follow-up 48h','Gravação opcional'], tag:'', side:'participants', featured:false }, { id:'mk_12', cat:'HaaS', kicker:'ID Band Marcianus', t:'Hardware pessoal', price:90, display:'€90', per:'/un.', features:['NFC + BLE dual','72h bateria passiva','Wallet integrada','Silicone hipoalergénico'], tag:'New', side:'participants', featured:false }, ]; /* ── Partner / Collaborator products ───────────────────── */ const PARTNER_ITEMS = [ { id:'p_01', cat:'Serviço', kicker:'Consultoria · Premium', t:'Estratégia de Evento', price:2500, display:'€2.5K', per:'/sessão', features:['Diagnóstico completo','Plano operacional','Integração CRM','Relatório pós-evento'], partner:'EventPro Lisboa', tag:'Parceiro', side:'empresas', featured:false }, { id:'p_02', cat:'Logística', kicker:'Transportes · Premium', t:'Transfers Executivos', price:800, display:'€800', per:'/dia', features:['Frota premium','Motorista NDA','Tracking real-time','Faturação automática'], partner:'LuxTransfer PT', tag:'Parceiro', side:'empresas', featured:false }, { id:'p_03', cat:'Catering', kicker:'Gastronomia · Executiva', t:'Catering C-Level', price:65, display:'€65', per:'/pax', features:['Chef executivo','Menu personalizado','Serviço white-glove','Restrições alimentares'], partner:'Chef Rodrigues', tag:'Parceiro', side:'empresas', featured:false }, { id:'p_04', cat:'Design', kicker:'Identidade Visual', t:'Branding de Evento', price:3200, display:'€3.2K', per:'/projeto', features:['Brand book completo','Assets digitais + físicos','Signage design','Motion graphics'], partner:'Studio Vox', tag:'Parceiro', side:'empresas', featured:false }, { id:'p_05', cat:'Imóvel', kicker:'Venue · Premium', t:'Espaço Executivo', price:4500, display:'€4.5K', per:'/dia', features:['Até 500 pax','AV completo incluído','Catering kitchen','Gestão de acesso'], partner:'Spaces Lux', tag:'Parceiro', side:'empresas', featured:false }, { id:'p_06', cat:'Serviço', kicker:'Talent · Speakers', t:'Oradores Curados', price:1800, display:'€1.8K', per:'/keynote', features:['C-level speaker','Preparação conjunta','Conteúdo personalizado','Follow-up whitepaper'], partner:'TalentOS', tag:'Parceiro', side:'empresas', featured:false }, ]; /* ── E-Wallet Mock Transactions ─────────────────────────── */ const DEMO_TRANSACTIONS = [ { id: 'tx1', type: 'in', desc: 'Cashback · Invicta Forum', amount: 57.6, date: '28 Abr 2026', status: 'completed' }, { id: 'tx2', type: 'out', desc: 'Networking Premium · Abr', amount: -120, date: '01 Abr 2026', status: 'completed' }, { id: 'tx3', type: 'in', desc: 'Comissão Afiliado · Cygnus AI', amount: 81.6, date: '28 Mar 2026', status: 'completed' }, { id: 'tx4', type: 'out', desc: 'Bilhete · Aether Summit VIP', amount: -2400, date: '15 Mar 2026', status: 'completed' }, { id: 'tx5', type: 'in', desc: 'Recarga · Stripe', amount: 2000, date: '10 Mar 2026', status: 'completed' }, { id: 'tx6', type: 'pending', desc: 'Comissão Afiliado · FinTech Lisboa', amount: 62.4, date: 'Pendente', status: 'pending' }, ]; /* ── E-Wallet Component ─────────────────────────────────── */ const EWallet = ({ user, onNav }) => { const isDemo = !user; const [balance, setBalance] = useStateMk(isDemo ? 1850 : 1850); const [txs] = useStateMk(DEMO_TRANSACTIONS); const [activeTab, setActiveTab] = useStateMk('overview'); const [topUpAmount, setTopUpAmount] = useStateMk(500); const [topping, setTopping] = useStateMk(false); const handleTopUp = () => { if (!user) { onNav('entrar'); return; } setTopping(true); setTimeout(() => { setBalance(b => b + topUpAmount); setTopping(false); SoundFX.success(); fireConfetti({ x: window.innerWidth / 2, y: 400 }, ['#FFD700', '#00C48C']); ToastBus.push({ kind: 'gold', icon: 'check-circle', title: `+€${topUpAmount.toLocaleString('pt-PT')} adicionados`, desc: 'Saldo atualizado na Wallet Marcianus.' }); }, 1400); }; const walletActions = [ { icon: 'arrow-up', label: 'Enviar', action: () => ToastBus.push({ icon: 'send', title: 'Transferência', desc: isDemo ? 'Cria conta para transferir.' : 'Funcionalidade em breve.' }) }, { icon: 'arrow-down', label: 'Receber', action: () => ToastBus.push({ icon: 'qr-code', title: 'QR Code gerado', desc: 'Mostra para receber pagamentos.' }) }, { icon: 'refresh', label: 'Recarregar', action: handleTopUp }, { icon: 'chart-bar', label: 'Histórico', action: () => setActiveTab('history') }, ]; return (
{isDemo && (
Modo Demo — Estás a ver uma simulação da Wallet. onNav('entrar')}>Cria conta para operações reais →
)}
{/* Card */}
Saldo disponível
€{balance.toLocaleString('pt-PT', { minimumFractionDigits: 2 })}
Wallet · Live EU Sovereign
MRCS •••• •••• {user ? '4291' : '0000'}
{/* Stats */}
{[ { label: 'Cashback acumulado', value: '€138.80', color: 'var(--success)' }, { label: 'Volume este mês', value: '€2.520', color: 'var(--gold)' }, { label: 'Comissões afiliado', value: '€144', color: 'var(--purple-soft)' }, ].map((s, i) => (
{s.label} {s.value}
))}
{/* Actions */}
{walletActions.map((a, i) => ( ))}
{/* Tabs */}
{[{ id: 'overview', l: 'Visão Geral' }, { id: 'history', l: 'Histórico' }, { id: 'topup', l: 'Recarregar' }].map(t => ( ))}
{activeTab === 'overview' && (
Últimas transações
{txs.slice(0, 4).map(tx => (
{tx.desc}
{tx.date}
{tx.amount > 0 ? '+' : ''}€{Math.abs(tx.amount).toLocaleString('pt-PT', { minimumFractionDigits: 2 })}
))}
{isDemo && (
)}
)} {activeTab === 'history' && (
{txs.map(tx => (
{tx.desc}
{tx.date} · {tx.status === 'pending' ? '⏳ Pendente' : '✓ Completo'}
{tx.amount > 0 ? '+' : ''}€{Math.abs(tx.amount).toLocaleString('pt-PT', { minimumFractionDigits: 2 })}
))}
)} {activeTab === 'topup' && (
Recarrega a tua Wallet Marcianus via Stripe ou EMIS/Multicaixa. O saldo é creditado em segundos e pode ser usado em qualquer kernel do ecossistema.
{[100, 250, 500, 1000].map(v => ( ))}
setTopUpAmount(Math.max(10, +e.target.value))} />
Pagamento seguro · Stripe · EMIS · RGPD Compliant
)}
); }; /* ── MARKETPLACE PAGE ────────────────────────────────────── */ const MarketplacePage = ({ onNav }) => { const auth = window.useAuth ? window.useAuth() : { user: null }; const { user } = auth; const [side, setSide] = useStateMk('empresas'); const [showPartners, setShowPartners] = useStateMk(false); const [cart, setCart] = useStateMk([]); const [walletBalance, setWalletBalance] = useStateMk(1850); const [toast, setToast] = useStateMk(null); const [checkingOut, setCheckingOut] = useStateMk(false); const marcianusItems = MK_ITEMS.filter(o => o.side === side); const partnerItems = PARTNER_ITEMS.filter(o => o.side === side); const list = showPartners ? partnerItems : marcianusItems; const cartTotal = cart.reduce((s, c) => s + (c.price || 0), 0); const showToast = (msg) => { setToast(msg); setTimeout(() => setToast(null), 3200); }; const handleAdd = (item) => { if (!user) { onNav('entrar'); return; } if (item.price === 0) { showToast('Contacto comercial enviado. A equipa Marcianus entrará em contacto em 24h.'); return; } if (cart.find(c => c.id === item.id)) { showToast('Item já está no carrinho.'); return; } setCart(prev => [...prev, item]); showToast(`${item.t} adicionado ao carrinho`); SoundFX.tap(); }; const handleRemove = (id) => { setCart(prev => prev.filter(c => c.id !== id)); SoundFX.tap(); }; const handleCheckout = () => { if (!user) { onNav('entrar'); return; } const liveBalance = window.HexisEngine ? HexisEngine.getProfile().walletBalance : walletBalance; if (cartTotal > liveBalance) { showToast('Saldo insuficiente. Recarrega a tua Wallet primeiro.'); return; } setCheckingOut(true); setTimeout(() => { setCheckingOut(false); /* Deduct from HexisEngine wallet (authoritative) */ if (window.HexisEngine) { HexisEngine.walletSpend(`Marketplace · ${cart.length} produto${cart.length > 1 ? 's' : ''}`, cartTotal); setWalletBalance(HexisEngine.getProfile().walletBalance); } else { setWalletBalance(b => b - cartTotal); } setCart([]); SoundFX.success(); fireConfetti({ x: window.innerWidth / 2, y: window.innerHeight / 2 }); showToast(`Compra concluída! €${cartTotal.toLocaleString('pt-PT')} debitados da Wallet.`); if (window.HexisEngine) HexisEngine.awardXP(20, 'Compra no Marketplace'); if (window.HexisStore) HexisStore.addAlert({ kind: 'success', title: 'Compra no Marketplace', body: `€${cartTotal.toLocaleString('pt-PT')} debitados · ${cart.length} produto${cart.length > 1 ? 's' : ''} adquirido${cart.length > 1 ? 's' : ''}. +20 XP.`, action: 'Ver histórico' }); if (window.HexisBLS) HexisBLS.track('cta_click', 'marketplace_checkout', cartTotal); }, 1400); }; const catColor = (cat) => cat === 'HaaS' ? 'var(--gold)' : cat === 'DaaS' ? 'var(--success)' : cat === 'Serviço' ? 'var(--blue)' : cat === 'Logística' ? 'var(--warning)' : 'var(--purple-soft)'; const catIcon = (cat) => cat === 'HaaS' ? '⬡' : cat === 'DaaS' ? '◈' : cat === 'Serviço' ? '⟡' : cat === 'Logística' ? '◆' : '⟡'; const catBg = (cat) => cat === 'HaaS' ? 'linear-gradient(135deg, rgba(255,215,0,0.12) 0%, rgba(93,63,211,0.08) 100%)' : cat === 'DaaS' ? 'linear-gradient(135deg, rgba(0,196,140,0.12) 0%, rgba(93,63,211,0.08) 100%)' : cat === 'Serviço' ? 'linear-gradient(135deg, rgba(0,209,255,0.10) 0%, rgba(93,63,211,0.06) 100%)' : 'linear-gradient(135deg, rgba(123,97,255,0.14) 0%, rgba(93,63,211,0.06) 100%)'; return ( <> {/* Toast */} {toast && (
setToast(null)}> {toast}
)} {/* Hero */}
Marketplace · Marcianus Ecosystem

O Ecossistema Completo.
HaaS, DaaS, SaaS.

Capacidade, leads e decisões. Faturação unificada. Wallet cross-kernel auditável.

{user && (
Wallet: €{walletBalance.toLocaleString('pt-PT')}
)} {!user && ( )}
{/* Source toggle */}
setShowPartners(false)}> Marcianus setShowPartners(true)}> Parceiros
{/* Products grid */}
{showPartners && (
Parceiros regularizados e validados pelo Hexis AI. Produtos e serviços com links de afiliado disponíveis.
)}
{list.map((o) => { const inCart = !!cart.find(c => c.id === o.id); return (
{catIcon(o.cat)} {o.tag && {o.tag}}
{o.cat}
{o.partner && (
{o.partner}
)}
{o.kicker}

{o.t}

{o.display}{o.per}
    {o.features.slice(0, 4).map(f =>
  • {f}
  • )}
{inCart && ( )}
{/* Affiliate link for partners */} {o.partner && ( )}
); })}
{/* E-Wallet Section */}
E-Wallet Marcianus

Um saldo. Todo o ecossistema.

Compra tickets, stands, leads e hardware com um único saldo. Carregas via Stripe ou EMIS, gastas em qualquer kernel. Transferível, auditável, sem surpresas de faturação.

{/* Cart bar */} {cart.length > 0 && (
{cart.length} item{cart.length !== 1 ? 's' : ''} · {cart.map(c => c.t).join(', ')}
€{cartTotal.toLocaleString('pt-PT')}
)} {/* Final CTA */}
O Próximo Passo

O próximo evento pode ser o mais lucrativo da tua carreira.

Entre no ecossistema Marcianus. Hexis analisa o teu perfil em 30 segundos e entrega o primeiro match antes do próximo café.

{!user && ( )}
Sem cartão · RGPD Compliant · Setup em < 2 min
); }; window.MarketplacePage = MarketplacePage;