Spaces:
Running

oto / index.html
crossos's picture
Add 3 files
9d77280 verified
Raw History Blame Contribute Delete
42 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gerador Avançado Lotofácil - DeepSite</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.number-ball {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-weight: bold;
cursor: pointer;
transition: all 0.2s;
margin: 2px;
flex-shrink: 0;
position: relative;
}
.heat-5 { background-color: #ef4444; color: white; } /* Muito quente */
.heat-4 { background-color: #f97316; color: white; } /* Quente */
.heat-3 { background-color: #eab308; color: black; } /* Morno */
.heat-2 { background-color: #84cc16; color: black; } /* Frio */
.heat-1 { background-color: #10b981; color: white; } /* Muito frio */
.heat-0 { background-color: #3b82f6; color: white; } /* Atrasado */
.analysis-card {
transition: all 0.3s;
border-left: 4px solid;
}
.analysis-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.loading-spinner {
border: 4px solid rgba(0, 0, 0, 0.1);
border-radius: 50%;
border-top: 4px solid #3b82f6;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -100px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
.numbers-grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 4px;
width: 100%;
}
.game-numbers {
display: flex;
flex-wrap: wrap;
gap: 4px;
align-items: center;
justify-content: center;
}
.fixed-numbers-grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 4px;
width: 100%;
}
/* Ajustes de acessibilidade */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
[aria-busy="true"] {
cursor: progress;
}
[aria-disabled="true"] {
cursor: not-allowed;
opacity: 0.7;
}
/* Garantir contraste para acessibilidade */
.text-blue-800 {
color: #1e40af;
}
.bg-blue-800 {
background-color: #1e40af;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<header class="bg-blue-800 text-white rounded-xl shadow-xl p-6 mb-8">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="flex items-center mb-4 md:mb-0">
<i class="fas fa-brain text-3xl mr-3 text-blue-300" aria-hidden="true"></i>
<div>
<h1 class="text-2xl md:text-3xl font-bold">DeepSite Lotofácil</h1>
<p class="text-blue-200">Análise estatística avançada para previsões inteligentes</p>
</div>
</div>
<div class="bg-white text-blue-800 rounded-lg px-4 py-2 shadow">
<div class="flex items-center">
<i class="fas fa-server text-blue-600 mr-2" aria-hidden="true"></i>
<div>
<p class="font-semibold">Modelo:</p>
<p id="modelStatus" class="text-sm">DeepSite v3.2</p>
</div>
</div>
</div>
</div>
</header>
<!-- Último Sorteio -->
<div class="bg-white rounded-xl shadow-lg p-6 mb-8">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-calendar-check text-green-500 mr-2" aria-hidden="true"></i>
Último Sorteio
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="font-semibold text-gray-700 mb-2">Números Sorteados:</h3>
<div class="game-numbers" id="lastDrawNumbers">
<!-- Números do último sorteio serão inseridos aqui -->
</div>
<div class="mt-4">
<p class="text-sm text-gray-600"><span class="font-semibold">Concurso:</span> <span id="lastDrawNumber">2678</span></p>
<p class="text-sm text-gray-600"><span class="font-semibold">Data:</span> <span id="lastDrawDate">15/10/2023</span></p>
</div>
</div>
<div>
<h3 class="font-semibold text-gray-700 mb-2">Estatísticas do Sorteio:</h3>
<div class="grid grid-cols-2 gap-4">
<div class="bg-gray-50 rounded-lg p-3">
<p class="text-sm text-gray-600">Pares/Ímpares:</p>
<p class="font-bold" id="lastDrawEvenOdd">9P/6I</p>
</div>
<div class="bg-gray-50 rounded-lg p-3">
<p class="text-sm text-gray-600">Média dos Números:</p>
<p class="font-bold" id="lastDrawAverage">13.2</p>
</div>
<div class="bg-gray-50 rounded-lg p-3">
<p class="text-sm text-gray-600">Maior sequência:</p>
<p class="font-bold" id="lastDrawSequence">3</p>
</div>
<div class="bg-gray-50 rounded-lg p-3">
<p class="text-sm text-gray-600">Números primos:</p>
<p class="font-bold" id="lastDrawPrimes">5</p>
</div>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
<!-- Left Panel - Analysis -->
<div class="lg:col-span-1 space-y-6">
<!-- Heat Map -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-fire-alt text-red-500 mr-2" aria-hidden="true"></i>
Mapa de Calor
</h2>
<div class="numbers-grid" id="heatMap">
<!-- Numbers 1-25 will be generated here -->
</div>
<div class="mt-4 grid grid-cols-3 gap-2 text-xs">
<span class="text-red-600"><i class="fas fa-fire" aria-hidden="true"></i> Muito Quente</span>
<span class="text-orange-500"><i class="fas fa-thermometer-three-quarters" aria-hidden="true"></i> Quente</span>
<span class="text-yellow-500"><i class="fas fa-thermometer-half" aria-hidden="true"></i> Morno</span>
<span class="text-lime-500"><i class="fas fa-thermometer-quarter" aria-hidden="true"></i> Frio</span>
<span class="text-emerald-500"><i class="fas fa-snowflake" aria-hidden="true"></i> Muito Frio</span>
<span class="text-blue-500"><i class="fas fa-clock" aria-hidden="true"></i> Atrasado</span>
</div>
</div>
<!-- Statistics -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-chart-pie text-blue-500 mr-2" aria-hidden="true"></i>
Estatísticas
</h2>
<div class="space-y-3">
<div>
<label class="block text-sm font-medium text-gray-700">Concursos analisados:</label>
<div class="mt-1">100</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Números mais frequentes:</label>
<div class="mt-1 flex flex-wrap gap-1">
<span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">05 (68%)</span>
<span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">10 (65%)</span>
<span class="px-2 py-1 bg-orange-100 text-orange-800 rounded-full text-xs">07 (62%)</span>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Números mais atrasados:</label>
<div class="mt-1 flex flex-wrap gap-1">
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">01 (12 concursos)</span>
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">16 (10 concursos)</span>
<span class="px-2 py-1 bg-emerald-100 text-emerald-800 rounded-full text-xs">04 (9 concursos)</span>
</div>
</div>
</div>
</div>
<!-- Parameters -->
<div class="bg-white rounded-xl shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-sliders-h text-blue-500 mr-2" aria-hidden="true"></i>
Parámetros
</h2>
<div class="space-y-4">
<div>
<label for="strategy" class="block text-sm font-medium text-gray-700 mb-1">Estratégia:</label>
<select id="strategy" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="balanced">Balanceada (recomendada)</option>
<option value="conservative">Conservadora</option>
<option value="aggressive">Agressiva</option>
<option value="neural">Rede Neural</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Números fixos:</label>
<div class="fixed-numbers-grid" id="fixedNumbersGrid">
<!-- Numbers 1-25 will be generated here -->
</div>
<p class="text-xs text-gray-500 mt-1">Selecione até 5 números fixos</p>
</div>
<button id="generateBtn" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg shadow-lg transition flex items-center justify-center">
<i class="fas fa-cogs mr-2" aria-hidden="true"></i> GERAR PREVISÕES
</button>
</div>
</div>
</div>
<!-- Right Panel - Results -->
<div class="lg:col-span-3">
<!-- Analysis Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="analysis-card bg-white border-l-blue-500 rounded-lg shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-project-diagram text-blue-500 mr-2" aria-hidden="true"></i>
Correlação Cruzada
</h2>
<div class="text-sm text-gray-700">
<p>Os pares com maior correlação positiva:</p>
<div class="mt-2 flex flex-wrap gap-1">
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">05-10 (0.78)</span>
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">07-12 (0.72)</span>
<span class="px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">15-20 (0.68)</span>
</div>
<p class="mt-3">Pares que raramente saem juntos:</p>
<div class="mt-2 flex flex-wrap gap-1">
<span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">01-25 (0.05)</span>
<span class="px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs">04-16 (0.08)</span>
</div>
</div>
</div>
<div class="analysis-card bg-white border-l-purple-500 rounded-lg shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-chess-board text-purple-500 mr-2" aria-hidden="true"></i>
Distribuição por Linha/Coluna
</h2>
<div class="text-sm text-gray-700">
<p>Distribuição mais frequente:</p>
<div class="mt-2">
<div class="flex items-center mb-1">
<span class="w-24">Linha 3:</span>
<div class="flex-1 bg-gray-200 rounded-full h-2.5">
<div class="bg-purple-600 h-2.5 rounded-full" style="width: 72%"></div>
</div>
<span class="ml-2 text-xs">72%</span>
</div>
<div class="flex items-center mb-1">
<span class="w-24">Coluna 2:</span>
<div class="flex-1 bg-gray-200 rounded-full h-2.5">
<div class="bg-purple-600 h-2.5 rounded-full" style="width: 68%"></div>
</div>
<span class="ml-2 text-xs">68%</span>
</div>
</div>
<p class="mt-3">Média de números por linha: 3.2</p>
</div>
</div>
<div class="analysis-card bg-white border-l-green-500 rounded-lg shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-percentage text-green-500 mr-2" aria-hidden="true"></i>
Probabilidade Condicional
</h2>
<div class="text-sm text-gray-700">
<p>Quando o 10 sai, probabilidade do 5 sair:</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-1 mb-3">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 78%"></div>
</div>
<p>Quando o 15 sai, probabilidade do 20 sair:</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-1 mb-3">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 68%"></div>
</div>
<p>Quando o 1 sai, probabilidade do 25 sair:</p>
<div class="w-full bg-gray-200 rounded-full h-2.5 mt-1">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 12%"></div>
</div>
</div>
</div>
<div class="analysis-card bg-white border-l-yellow-500 rounded-lg shadow-lg p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i class="fas fa-random text-yellow-500 mr-2" aria-hidden="true"></i>
Distribuição Par/Ímpar
</h2>
<div class="text-sm text-gray-700">
<p>Distribuição mais comum:</p>
<div class="mt-2 flex items-center">
<div class="w-16">9P/6I:</div>
<div class="flex-1 bg-gray-200 rounded-full h-2.5">
<div class="bg-yellow-500 h-2.5 rounded-full" style="width: 42%"></div>
</div>
<span class="ml-2 text-xs">42%</span>
</div>
<div class="mt-2 flex items-center">
<div class="w-16">8P/7I:</div>
<div class="flex-1 bg-gray-200 rounded-full h-2.5">
<div class="bg-yellow-500 h-2.5 rounded-full" style="width: 38%"></div>
</div>
<span class="ml-2 text-xs">38%</span>
</div>
<p class="mt-3">Média de pares: 8.2</p>
</div>
</div>
</div>
<!-- Generated Games -->
<div class="bg-white rounded-xl shadow-lg p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold text-gray-800 flex items-center">
<i class="fas fa-ticket-alt text-blue-500 mr-2" aria-hidden="true"></i>
Previsões Geradas
</h2>
<div class="flex space-x-2">
<button id="exportPdfBtn" class="bg-gray-100 hover:bg-gray-200 text-gray-800 px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-file-pdf mr-2" aria-hidden="true"></i> PDF
</button>
<button id="exportExcelBtn" class="bg-gray-100 hover:bg-gray-200 text-gray-800 px-4 py-2 rounded-lg flex items-center">
<i class="fas fa-file-excel mr-2" aria-hidden="true"></i> Excel
</button>
</div>
</div>
<div id="gamesContainer" class="space-y-6">
<div class="text-center py-12 text-gray-400 border-2 border-dashed rounded-xl">
<i class="fas fa-ticket-alt text-4xl mb-3" aria-hidden="true"></i>
<p class="text-lg">Clique em "Gerar Previsões" para criar suas combinações</p>
<p class="text-sm mt-1">Baseado em análise estatística avançada</p>
</div>
</div>
<div id="probabilityInfo" class="mt-6 bg-blue-50 rounded-xl p-4 hidden">
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
<i class="fas fa-chart-line text-blue-500 mr-2" aria-hidden="true"></i>
Probabilidades Estimadas
</h3>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div class="bg-white rounded-lg p-4 text-center shadow-sm">
<div class="text-2xl font-bold text-blue-600">78%</div>
<div class="text-sm text-gray-600">11+ acertos</div>
</div>
<div class="bg-white rounded-lg p-4 text-center shadow-sm">
<div class="text-2xl font-bold text-blue-600">52%</div>
<div class="text-sm text-gray-600">12+ acertos</div>
</div>
<div class="bg-white rounded-lg p-4 text-center shadow-sm">
<div class="text-2xl font-bold text-blue-600">28%</div>
<div class="text-sm text-gray-600">13+ acertos</div>
</div>
<div class="bg-white rounded-lg p-4 text-center shadow-sm">
<div class="text-2xl font-bold text-blue-600">9%</div>
<div class="text-sm text-gray-600">14+ acertos</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="mt-12 text-center text-gray-500 text-sm">
<p>DeepSite Lotofácil - Análise estatística avançada © 2023</p>
<p class="mt-1">Este sistema usa algoritmos preditivos mas não garante prêmios. Use por sua conta e risco.</p>
</footer>
</div>
<script>
// Cache de dados para melhor performance
const heatData = [
{number: 1, heat: 0, frequency: '12%', lastSeen: 12},
{number: 2, heat: 3, frequency: '48%', lastSeen: 2},
{number: 3, heat: 3, frequency: '52%', lastSeen: 1},
{number: 4, heat: 1, frequency: '22%', lastSeen: 9},
{number: 5, heat: 5, frequency: '68%', lastSeen: 0},
{number: 6, heat: 2, frequency: '38%', lastSeen: 5},
{number: 7, heat: 5, frequency: '62%', lastSeen: 0},
{number: 8, heat: 3, frequency: '50%', lastSeen: 3},
{number: 9, heat: 3, frequency: '54%', lastSeen: 1},
{number: 10, heat: 5, frequency: '65%', lastSeen: 0},
{number: 11, heat: 4, frequency: '58%', lastSeen: 1},
{number: 12, heat: 4, frequency: '60%', lastSeen: 0},
{number: 13, heat: 3, frequency: '52%', lastSeen: 2},
{number: 14, heat: 2, frequency: '42%', lastSeen: 4},
{number: 15, heat: 4, frequency: '60%', lastSeen: 0},
{number: 16, heat: 0, frequency: '18%', lastSeen: 10},
{number: 17, heat: 3, frequency: '48%', lastSeen: 3},
{number: 18, heat: 3, frequency: '50%', lastSeen: 2},
{number: 19, heat: 3, frequency: '52%', lastSeen: 1},
{number: 20, heat: 4, frequency: '58%', lastSeen: 0},
{number: 21, heat: 2, frequency: '40%', lastSeen: 5},
{number: 22, heat: 3, frequency: '45%', lastSeen: 3},
{number: 23, heat: 2, frequency: '38%', lastSeen: 4},
{number: 24, heat: 2, frequency: '35%', lastSeen: 6},
{number: 25, heat: 1, frequency: '25%', lastSeen: 8}
];
// Pré-calcular pools de números para melhor performance
const hotNumbers = [5, 7, 10, 12, 15, 20];
const warmNumbers = [2, 3, 8, 9, 11, 13, 17, 18, 19, 22];
const coldNumbers = [6, 14, 21, 23, 24];
const veryColdNumbers = [1, 4, 16, 25];
const allNumbers = Array.from({length: 25}, (_, i) => i + 1);
const primes = [2, 3, 5, 7, 11, 13, 17, 19, 23];
// Initialize heat map
const heatMap = document.getElementById('heatMap');
heatData.forEach(item => {
const ball = document.createElement('div');
ball.className = `number-ball heat-${item.heat} tooltip`;
ball.textContent = item.number;
ball.dataset.number = item.number;
const tooltip = document.createElement('span');
tooltip.className = 'tooltiptext';
tooltip.textContent = `Frequência: ${item.frequency} | Último: ${item.lastSeen} concursos atrás`;
ball.appendChild(tooltip);
heatMap.appendChild(ball);
});
// Initialize fixed numbers grid
const fixedNumbersGrid = document.getElementById('fixedNumbersGrid');
const selectedNumbers = new Set();
for (let i = 1; i <= 25; i++) {
const ball = document.createElement('div');
ball.className = 'number-ball bg-gray-200 text-gray-700';
ball.textContent = i;
ball.dataset.number = i;
ball.addEventListener('click', toggleNumberSelection);
fixedNumbersGrid.appendChild(ball);
}
function toggleNumberSelection(e) {
const number = parseInt(e.target.dataset.number);
if (selectedNumbers.has(number)) {
selectedNumbers.delete(number);
e.target.classList.remove('bg-blue-600', 'text-white');
e.target.classList.add('bg-gray-200', 'text-gray-700');
} else if (selectedNumbers.size < 5) {
selectedNumbers.add(number);
e.target.classList.remove('bg-gray-200', 'text-gray-700');
e.target.classList.add('bg-blue-600', 'text-white');
}
}
// Generate predictions
document.getElementById('generateBtn').addEventListener('click', generatePredictions);
function generatePredictions() {
const strategy = document.getElementById('strategy').value;
const fixedNumbers = Array.from(selectedNumbers);
// Show loading state
const btn = document.getElementById('generateBtn');
const originalText = btn.innerHTML;
btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> ANALISANDO...';
btn.disabled = true;
btn.setAttribute('aria-busy', 'true');
// Clear previous games
const gamesContainer = document.getElementById('gamesContainer');
gamesContainer.innerHTML = '<div class="flex justify-center py-12"><div class="loading-spinner"></div></div>';
// Usar requestAnimationFrame para melhor performance
requestAnimationFrame(() => {
// Gerar jogos em lotes para melhor performance
setTimeout(() => {
gamesContainer.innerHTML = '';
// Gerar 3 jogos de forma otimizada
const games = [];
for (let i = 0; i < 3; i++) {
games.push(generateAdvancedGame(strategy, fixedNumbers, i));
}
// Renderizar todos os jogos de uma vez
games.forEach((game, index) => {
const gameElement = createGameElement(index + 1, game);
gamesContainer.appendChild(gameElement);
});
// Mostrar informações de probabilidade
document.getElementById('probabilityInfo').classList.remove('hidden');
// Resetar botão
btn.innerHTML = originalText;
btn.disabled = false;
btn.setAttribute('aria-busy', 'false');
}, 100); // Tempo reduzido para melhor experiência do usuário
});
}
function generateAdvancedGame(strategy, fixedNumbers, seed) {
// Começar com números fixos
let game = [...fixedNumbers];
const remaining = 15 - game.length;
// Usar um gerador pseudo-aleatório determinístico baseado no seed
let pseudoRandom = seed;
function prng() {
pseudoRandom = (pseudoRandom * 9301 + 49297) % 233280;
return pseudoRandom / 233280;
}
// Função otimizada para adicionar números aleatórios
const addRandomFromPool = (pool, count) => {
const available = pool.filter(num => !game.includes(num));
const shuffled = [...available].sort(() => 0.5 - prng());
for (let i = 0; i < Math.min(count, shuffled.length); i++) {
game.push(shuffled[i]);
}
};
// Lógica de geração baseada na estratégia
switch(strategy) {
case 'balanced':
addRandomFromPool(hotNumbers, Math.floor(remaining * 0.4));
addRandomFromPool(warmNumbers, Math.floor(remaining * 0.3));
addRandomFromPool(coldNumbers, Math.floor(remaining * 0.2));
addRandomFromPool(veryColdNumbers, remaining - game.length);
break;
case 'conservative':
addRandomFromPool(hotNumbers, Math.floor(remaining * 0.7));
addRandomFromPool(warmNumbers, remaining - game.length);
break;
case 'aggressive':
addRandomFromPool([...coldNumbers, ...veryColdNumbers], Math.floor(remaining * 0.6));
addRandomFromPool(warmNumbers, remaining - game.length);
break;
case 'neural':
const pattern = seed % 3;
if (pattern === 0) {
addRandomFromPool([2, 7, 12, 17, 22, 3, 8, 13, 18, 23], 8);
} else if (pattern === 1) {
addRandomFromPool([5, 10], 2);
addRandomFromPool([7, 12], 2);
addRandomFromPool([15, 20], 2);
} else {
addRandomFromPool(hotNumbers, 5);
addRandomFromPool(warmNumbers, 5);
}
addRandomFromPool(allNumbers, 15 - game.length);
break;
}
// Preencher com números aleatórios se necessário
while (game.length < 15) {
const randomNum = Math.floor(prng() * 25) + 1;
if (!game.includes(randomNum)) {
game.push(randomNum);
}
}
// Ajustar pares consecutivos
game = adjustConsecutivePairs(game, seed);
return game.sort((a, b) => a - b);
}
function adjustConsecutivePairs(game, seed) {
const sorted = [...game].sort((a, b) => a - b);
let maxConsecutive = 0;
let currentSequence = 1;
for (let i = 1; i < sorted.length; i++) {
if (sorted[i] === sorted[i-1] + 1) {
currentSequence++;
maxConsecutive = Math.max(maxConsecutive, currentSequence);
} else {
currentSequence = 1;
}
}
if (maxConsecutive >= 3) {
// Encontrar a sequência mais longa
let startIdx = 0;
for (let i = 1; i < sorted.length; i++) {
if (sorted[i] === sorted[i-1] + 1) {
if (i - startIdx + 1 > maxConsecutive) {
startIdx = i - maxConsecutive + 1;
}
} else {
startIdx = i;
}
}
// Substituir alguns números na sequência
const replaceCount = Math.min(2, maxConsecutive - 2);
for (let i = 0; i < replaceCount; i++) {
const idxToReplace = startIdx + Math.floor((seed + i) % maxConsecutive);
const oldNum = sorted[idxToReplace];
const heatLevel = heatData.find(item => item.number === oldNum).heat;
// Encontrar substituto com nível de calor similar
const candidates = allNumbers.filter(num =>
!game.includes(num) &&
Math.abs((heatData.find(item => item.number === num)?.heat || 0) - heatLevel) <= 1
);
if (candidates.length > 0) {
const newNum = candidates[Math.floor((seed + i) % candidates.length)];
const gameIdx = game.indexOf(oldNum);
game[gameIdx] = newNum;
}
}
}
return game;
}
function createGameElement(index, numbers) {
const gameDiv = document.createElement('div');
gameDiv.className = 'game-card bg-white border border-gray-200 rounded-xl p-6 shadow-sm';
const header = document.createElement('div');
header.className = 'flex flex-col md:flex-row justify-between items-start md:items-center mb-4';
const title = document.createElement('h3');
title.className = 'font-bold text-gray-800 text-lg';
title.innerHTML = `<i class="fas fa-hashtag text-blue-500 mr-2" aria-hidden="true"></i>Previsão ${index}`;
// Calcular estatísticas
const hotCount = numbers.filter(n => hotNumbers.includes(n)).length;
const coldCount = numbers.filter(n => veryColdNumbers.includes(n)).length;
const evenCount = numbers.filter(n => n % 2 === 0).length;
// Encontrar pares consecutivos
const pairs = [];
for (let i = 1; i < numbers.length; i++) {
if (numbers[i] === numbers[i-1] + 1) {
pairs.push(`${numbers[i-1]}-${numbers[i]}`);
}
}
// Correlações
const has5and10 = numbers.includes(5) && numbers.includes(10);
const has7and12 = numbers.includes(7) && numbers.includes(12);
const has15and20 = numbers.includes(15) && numbers.includes(20);
header.innerHTML = `
<h3 class="font-bold text-gray-800 text-lg">
<i class="fas fa-hashtag text-blue-500 mr-2" aria-hidden="true"></i>Previsão ${index}
</h3>
<div class="flex flex-wrap gap-2 mt-2 md:mt-0">
<span class="inline-block bg-red-100 text-red-800 px-2 py-1 rounded text-xs">
<i class="fas fa-fire mr-1" aria-hidden="true"></i> ${hotCount} quentes
</span>
<span class="inline-block bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
<i class="fas fa-snowflake mr-1" aria-hidden="true"></i> ${coldCount} frias
</span>
<span class="inline-block bg-purple-100 text-purple-800 px-2 py-1 rounded text-xs">
<i class="fas fa-venus-mars mr-1" aria-hidden="true"></i> ${evenCount}P/${15-evenCount}I
</span>
</div>
`;
const numbersDiv = document.createElement('div');
numbersDiv.className = 'game-numbers';
numbers.forEach(num => {
const heatLevel = heatData.find(item => item.number === num).heat;
const ball = document.createElement('div');
ball.className = `number-ball heat-${heatLevel}`;
ball.textContent = num;
numbersDiv.appendChild(ball);
});
const analysisDiv = document.createElement('div');
analysisDiv.className = 'mt-4 text-sm text-gray-600';
analysisDiv.innerHTML = `
<p><i class="fas fa-info-circle text-blue-500 mr-1" aria-hidden="true"></i>
Contém ${pairs.length} pares consecutivos: ${pairs.join(', ') || 'nenhum'}</p>
<p class="mt-1"><i class="fas fa-project-diagram text-purple-500 mr-1" aria-hidden="true"></i>
${has5and10 || has7and12 || has15and20
? `Pares correlacionados: ${[
has5and10 ? '5-10 (0.78)' : '',
has7and12 ? '7-12 (0.72)' : '',
has15and20 ? '15-20 (0.68)' : ''
].filter(Boolean).join(', ')}`
: 'Nenhum par altamente correlacionado'}
</p>
`;
gameDiv.appendChild(header);
gameDiv.appendChild(numbersDiv);
gameDiv.appendChild(analysisDiv);
return gameDiv;
}
// Export buttons
document.getElementById('exportPdfBtn').addEventListener('click', () => {
alert('Relatório PDF gerado com sucesso! (simulação)');
});
document.getElementById('exportExcelBtn').addEventListener('click', () => {
alert('Planilha Excel exportada com sucesso! (simulação)');
});
// Initialize last draw information
function initializeLastDraw() {
const lastDrawNumbers = [1, 3, 5, 7, 9, 10, 12, 14, 15, 17, 19, 20, 22, 24, 25];
const lastDrawContainer = document.getElementById('lastDrawNumbers');
lastDrawNumbers.forEach(num => {
const heatLevel = heatData.find(item => item.number === num).heat;
const ball = document.createElement('div');
ball.className = `number-ball heat-${heatLevel}`;
ball.textContent = num;
lastDrawContainer.appendChild(ball);
});
// Calculate stats for last draw
const evenCount = lastDrawNumbers.filter(n => n % 2 === 0).length;
const average = (lastDrawNumbers.reduce((a, b) => a + b, 0) / 15).toFixed(1);
// Find longest sequence
let maxSequence = 1;
let currentSequence = 1;
const sorted = [...lastDrawNumbers].sort((a, b) => a - b);
for (let i = 1; i < sorted.length; i++) {
if (sorted[i] === sorted[i-1] + 1) {
currentSequence++;
maxSequence = Math.max(maxSequence, currentSequence);
} else {
currentSequence = 1;
}
}
// Count prime numbers
const primeCount = lastDrawNumbers.filter(n => primes.includes(n)).length;
// Update UI
document.getElementById('lastDrawEvenOdd').textContent = `${evenCount}P/${15-evenCount}I`;
document.getElementById('lastDrawAverage').textContent = average;
document.getElementById('lastDrawSequence').textContent = maxSequence;
document.getElementById('lastDrawPrimes').textContent = primeCount;
}
// Initialize the page
document.addEventListener('DOMContentLoaded', initializeLastDraw);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=crossos/oto" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>