Cruz Sampaio
Criar Conta

Profissionais comprometidos com o propósito maior

Autenticação segura com certificado digital brasileiro

ou cadastre-se com e-mail

Sua participação requer validação administrativa e cooperação entre instituições. Entre em contato para solicitar acesso.

✉ Solicitar Acesso Internacional

Processando...

(() => { 'use strict'; const STORAGE_KEY = 'app-theme'; function preferredTheme() { const saved = localStorage.getItem(STORAGE_KEY); if (saved === 'light' || saved === 'dark') return saved; // O produto nasce no tema escuro. A preferência do sistema não pode trocar // todo o ecossistema para claro sem uma escolha explícita do usuário. return 'dark'; } function applyTheme(theme, persist = false) { document.documentElement.toggleAttribute('data-theme', theme === 'dark'); if (theme === 'dark') document.documentElement.setAttribute('data-theme', 'dark'); else document.documentElement.removeAttribute('data-theme'); document.body?.classList.toggle('dark-mode', theme === 'dark'); document.body?.classList.toggle('light-mode', theme === 'light'); if (persist) localStorage.setItem(STORAGE_KEY, theme); document.dispatchEvent(new CustomEvent('themechange', { detail: { theme } })); return theme; } function syncButton(button, theme) { const dark = theme === 'dark'; button.innerHTML = dark ? '' : ''; button.setAttribute('aria-label', dark ? 'Modo escuro. Mudar para modo claro' : 'Modo claro. Mudar para modo escuro'); button.setAttribute('title', dark ? 'Modo escuro' : 'Modo claro'); button.setAttribute('aria-pressed', String(dark)); } function ensureThemeControl() { const languageRow = document.querySelector('.lang-bar, .language-bar, .language-row'); const controls = [...document.querySelectorAll('.theme-toggle, .global-header-theme-toggle, .module-theme-toggle')]; let button = controls[0]; const dock = document.createElement('div'); dock.className = 'module-preferences'; dock.setAttribute('aria-label', 'Preferências de visualização'); if (!button) { button = document.createElement('button'); button.type = 'button'; } const existingHost = button.closest('.global-header-actions, header, .topbar, .sidebar, .sidebar-header'); button.classList.add('theme-toggle', 'module-theme-toggle'); controls.slice(1).forEach(extra => extra.remove()); if (languageRow) languageRow.prepend(button); else if (existingHost) existingHost.appendChild(button); else { dock.appendChild(button); document.body.appendChild(dock); } if (languageRow || existingHost) button.classList.add('module-theme-toggle-inline'); else button.classList.remove('module-theme-toggle-inline'); document.querySelectorAll('.module-atmosphere-toggle').forEach(control => control.remove()); let theme = preferredTheme(); syncButton(button, theme); if (!button.dataset.moduleThemeBound) { button.dataset.moduleThemeBound = 'true'; button.addEventListener('click', event => { event.preventDefault(); event.stopImmediatePropagation(); theme = applyTheme(theme === 'dark' ? 'light' : 'dark', true); syncButton(button, theme); }, true); } document.addEventListener('themechange', event => { theme = event.detail?.theme || preferredTheme(); syncButton(button, theme); }); const reconcileControls = () => { const duplicates = [...document.querySelectorAll('.theme-toggle, .global-header-theme-toggle, .module-theme-toggle')] .filter(control => control !== button); duplicates.forEach(extra => extra.remove()); const lateLanguageRow = document.querySelector('.lang-bar, .language-bar, .language-row'); const structuralHost = lateLanguageRow || document.querySelector( '.global-header-actions, .sidebar-header, header, .topbar, .sidebar' ); if (structuralHost && !structuralHost.contains(button)) { if (lateLanguageRow) structuralHost.prepend(button); else structuralHost.appendChild(button); button.classList.add('module-theme-toggle-inline'); } if (dock.isConnected && dock.childElementCount === 0) dock.remove(); }; [0, 250, 1000].forEach(delay => setTimeout(reconcileControls, delay)); } function enhanceSemantics() { document.querySelectorAll('button:not([type])').forEach(button => { button.type = 'button'; }); document.querySelectorAll('a[target="_blank"]:not([rel])').forEach(link => { link.rel = 'noopener noreferrer'; }); } function enableCadencedMotion() { if (matchMedia('(prefers-reduced-motion: reduce)').matches) return; const candidates = [...document.querySelectorAll('main section, main article, .card, .panel')].slice(0, 80); if (!('IntersectionObserver' in window)) return candidates.forEach(node => node.classList.add('module-ui-visible')); const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if (!entry.isIntersecting) return; entry.target.classList.add('module-ui-visible'); observer.unobserve(entry.target); }); }, { rootMargin: '0px 0px -6% 0px', threshold: 0.04 }); candidates.forEach(node => { if (node.hidden || node.closest('[hidden], dialog:not([open])')) return; node.classList.add('module-ui-reveal'); observer.observe(node); }); } function init() { document.documentElement.classList.add('miguel-module-ui'); applyTheme(preferredTheme()); ensureThemeControl(); enhanceSemantics(); enableCadencedMotion(); document.documentElement.dataset.moduleUi = 'v1'; } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true }); else init(); })(); body>