/* App shell: hash router, navbar, footer, toasts, scroll-reveal */ const { useState: uS, useEffect: uE, useCallback: uC } = React; /* ---- routing helpers (global) ---- */ window.navigate = (path) => {window.location.hash = '#' + path;window.scrollTo({ top: 0, behavior: 'auto' });}; window.scrollToId = (id) => { if (window.location.hash && window.location.hash !== '#/' && !window.location.hash.startsWith('#/?')) { window.location.hash = '#/'; setTimeout(() => {const el = document.getElementById(id);if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 80, behavior: 'smooth' });}, 60); } else { const el = document.getElementById(id);if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 80, behavior: 'smooth' }); } }; window.flashCond = () => { const run = () => { const el = document.getElementById('dieu-kien-qua'); if (!el) return; window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 90, behavior: 'smooth' }); el.classList.remove('flash'); void el.offsetWidth; el.classList.add('flash'); }; if (window.location.hash && window.location.hash !== '#/' && !window.location.hash.startsWith('#/?')) { window.location.hash = '#/'; setTimeout(run, 80); } else { run(); } }; function parseHash() { const raw = (window.location.hash || '#/').replace(/^#/, ''); const [path, qs] = raw.split('?'); return { path: path || '/', query: new URLSearchParams(qs || '') }; } function Navbar() { const links = [ ['Giới thiệu', 'gioi-thieu'], ['Agenda', 'agenda'], ['Diễn giả', 'dien-gia'], ['Quyền lợi', 'qua-tang']]; return (