Spaces:
Running
Running
Update js/main.js
Browse files- js/main.js +153 -106
js/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
// js/main.js
|
| 2 |
|
| 3 |
// --- INICIO: Importaciones de M贸dulos ---
|
|
|
|
| 4 |
import { renderIaConfigForm, transcriptionProviders, getIaConfig } from './iaConfigModule.js';
|
| 5 |
import { initRecorder } from './recordingModule.js';
|
| 6 |
import { analyzeMedical } from './analysisModule.js';
|
|
@@ -8,128 +9,174 @@ import { copyText } from './clipboardModule.js';
|
|
| 8 |
import { analyzeLabResults, displayLabResults } from './labAnalysisModule.js';
|
| 9 |
// --- FIN: Importaciones de M贸dulos ---
|
| 10 |
|
|
|
|
|
|
|
| 11 |
window.addEventListener('DOMContentLoaded', () => {
|
|
|
|
| 12 |
|
| 13 |
// --- INICIO: Variables y Estado Global ---
|
| 14 |
let lastLabResultText = '';
|
| 15 |
// --- FIN: Variables y Estado Global ---
|
| 16 |
|
| 17 |
-
// --- INICIO:
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
const transProvider = cfg?.transcription?.provider;
|
| 21 |
-
const transModel = cfg?.transcription?.models?.[transProvider] || 'N/A';
|
| 22 |
-
const llmProvider = cfg?.llm?.provider;
|
| 23 |
-
const llmModel = cfg?.llm?.model || 'N/A';
|
| 24 |
-
|
| 25 |
-
const transLabel = document.getElementById('trans-model-label');
|
| 26 |
-
if (transLabel) transLabel.textContent = transModel ? `(${transModel})` : '';
|
| 27 |
-
const analysisLabel = document.getElementById('analysis-model-label');
|
| 28 |
-
if (analysisLabel) analysisLabel.textContent = llmModel ? `(${llmModel})` : '';
|
| 29 |
-
const labLabel = document.getElementById('lab-model-label');
|
| 30 |
-
if (labLabel) labLabel.textContent = llmModel ? `(${llmModel})` : '';
|
| 31 |
-
}
|
| 32 |
-
updateModelLabels();
|
| 33 |
-
document.addEventListener('iaConfigChanged', updateModelLabels);
|
| 34 |
-
// --- FIN: Funci贸n para Actualizar Etiquetas de Modelo ---
|
| 35 |
-
|
| 36 |
-
// --- INICIO: Selecci贸n de Elementos DOM (VERIFICAR IDs) ---
|
| 37 |
-
// Configuraci贸n
|
| 38 |
const btnConfig = document.getElementById('btnConfig');
|
| 39 |
const modal = document.getElementById('configModal');
|
| 40 |
-
|
| 41 |
-
const
|
| 42 |
-
const
|
| 43 |
-
const outputExploracionEl = document.getElementById('output-exploracion'); // id="output-exploracion"
|
| 44 |
const btnStart = document.getElementById('btnStart');
|
| 45 |
const btnStop = document.getElementById('btnStop');
|
| 46 |
const btnCopyTranscript = document.getElementById('btnCopyTranscript');
|
| 47 |
const btnCopyAnalysis = document.getElementById('btnCopyAnalysis');
|
| 48 |
-
// Elementos Pesta帽as
|
| 49 |
const allTabButtons = document.querySelectorAll('.tab-button');
|
| 50 |
const allTabContents = document.querySelectorAll('.tab-content');
|
| 51 |
-
|
| 52 |
-
const
|
| 53 |
-
const
|
| 54 |
-
const
|
| 55 |
-
const
|
| 56 |
-
const
|
| 57 |
-
|
| 58 |
-
//
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
console.log('[Main] Limpiando outputEnfermedadEl...');
|
| 93 |
-
outputEnfermedadEl.textContent = '';
|
| 94 |
-
} else {
|
| 95 |
-
// Este mensaje aparecer铆a si el getElementById fall贸 al inicio
|
| 96 |
-
console.warn('[Main] Referencia outputEnfermedadEl no encontrada al intentar limpiar.');
|
| 97 |
}
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
}
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
console.log('[Main] Limpiando labInputText (TextArea)...');
|
| 109 |
-
labInputText.value = ''; // Limpiar valor del textarea
|
| 110 |
-
} else {
|
| 111 |
-
console.warn('[Main] Referencia labInputText no encontrada al intentar limpiar.');
|
| 112 |
}
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
}
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
console.
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
});
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
}); // Fin de window.addEventListener('DOMContentLoaded', ...)
|
|
|
|
| 1 |
// js/main.js
|
| 2 |
|
| 3 |
// --- INICIO: Importaciones de M贸dulos ---
|
| 4 |
+
// Aseg煤rate de que todas las rutas sean correctas
|
| 5 |
import { renderIaConfigForm, transcriptionProviders, getIaConfig } from './iaConfigModule.js';
|
| 6 |
import { initRecorder } from './recordingModule.js';
|
| 7 |
import { analyzeMedical } from './analysisModule.js';
|
|
|
|
| 9 |
import { analyzeLabResults, displayLabResults } from './labAnalysisModule.js';
|
| 10 |
// --- FIN: Importaciones de M贸dulos ---
|
| 11 |
|
| 12 |
+
console.log("[Main] Script main.js cargado. Esperando DOMContentLoaded...");
|
| 13 |
+
|
| 14 |
window.addEventListener('DOMContentLoaded', () => {
|
| 15 |
+
console.log("[Main] Evento DOMContentLoaded detectado. Iniciando configuraci贸n...");
|
| 16 |
|
| 17 |
// --- INICIO: Variables y Estado Global ---
|
| 18 |
let lastLabResultText = '';
|
| 19 |
// --- FIN: Variables y Estado Global ---
|
| 20 |
|
| 21 |
+
// --- INICIO: Selecci贸n de Elementos DOM + VALIDACI脫N ---
|
| 22 |
+
// Seleccionamos todos los elementos al principio y verificamos si existen
|
| 23 |
+
console.log("[Main] Seleccionando elementos del DOM...");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
const btnConfig = document.getElementById('btnConfig');
|
| 25 |
const modal = document.getElementById('configModal');
|
| 26 |
+
const transcriptEl = document.getElementById('transcript');
|
| 27 |
+
const outputEnfermedadEl = document.getElementById('output-enfermedad');
|
| 28 |
+
const outputExploracionEl = document.getElementById('output-exploracion');
|
|
|
|
| 29 |
const btnStart = document.getElementById('btnStart');
|
| 30 |
const btnStop = document.getElementById('btnStop');
|
| 31 |
const btnCopyTranscript = document.getElementById('btnCopyTranscript');
|
| 32 |
const btnCopyAnalysis = document.getElementById('btnCopyAnalysis');
|
|
|
|
| 33 |
const allTabButtons = document.querySelectorAll('.tab-button');
|
| 34 |
const allTabContents = document.querySelectorAll('.tab-content');
|
| 35 |
+
const labInputText = document.getElementById('lab-input-text');
|
| 36 |
+
const btnAnalyzeLabs = document.getElementById('btnAnalyzeLabs');
|
| 37 |
+
const labLoadingIndicator = document.getElementById('lab-loading-indicator');
|
| 38 |
+
const filterAlteredLabsCheckbox = document.getElementById('filterAlteredLabs');
|
| 39 |
+
const labResultsOutput = document.getElementById('lab-results-output');
|
| 40 |
+
const btnCopyLabResults = document.getElementById('btnCopyLabResults');
|
| 41 |
+
|
| 42 |
+
// Validaciones b谩sicas (mostrar error en consola si falta un elemento cr铆tico)
|
| 43 |
+
if (!btnConfig) console.error("!!! ERROR CR脥TICO: Elemento #btnConfig no encontrado!");
|
| 44 |
+
if (!modal) console.error("!!! ERROR CR脥TICO: Elemento #configModal no encontrado!");
|
| 45 |
+
if (!transcriptEl) console.error("!!! ERROR CR脥TICO: Elemento #transcript no encontrado!");
|
| 46 |
+
if (!outputEnfermedadEl) console.error("!!! ERROR CR脥TICO: Elemento #output-enfermedad no encontrado!");
|
| 47 |
+
if (!outputExploracionEl) console.error("!!! ERROR CR脥TICO: Elemento #output-exploracion no encontrado!");
|
| 48 |
+
if (!btnStart) console.error("!!! ERROR CR脥TICO: Elemento #btnStart no encontrado!");
|
| 49 |
+
if (!btnStop) console.error("!!! ERROR CR脥TICO: Elemento #btnStop no encontrado!");
|
| 50 |
+
if (allTabButtons.length === 0) console.error("!!! ERROR CR脥TICO: No se encontraron botones de pesta帽a (.tab-button)!");
|
| 51 |
+
if (allTabContents.length === 0) console.error("!!! ERROR CR脥TICO: No se encontraron contenidos de pesta帽a (.tab-content)!");
|
| 52 |
+
if (!labInputText) console.error("!!! ERROR CR脥TICO: Elemento #lab-input-text no encontrado!");
|
| 53 |
+
if (!btnAnalyzeLabs) console.error("!!! ERROR CR脥TICO: Elemento #btnAnalyzeLabs no encontrado!");
|
| 54 |
+
if (!labLoadingIndicator) console.error("!!! ERROR CR脥TICO: Elemento #lab-loading-indicator no encontrado!");
|
| 55 |
+
if (!filterAlteredLabsCheckbox) console.error("!!! ERROR CR脥TICO: Elemento #filterAlteredLabs no encontrado!");
|
| 56 |
+
if (!labResultsOutput) console.error("!!! ERROR CR脥TICO: Elemento #lab-results-output no encontrado!");
|
| 57 |
+
console.log("[Main] Selecci贸n de elementos del DOM finalizada.");
|
| 58 |
+
// --- FIN: Selecci贸n de Elementos DOM + VALIDACI脫N ---
|
| 59 |
+
|
| 60 |
+
// --- INICIO: Bloques de L贸gica envueltos en try...catch para aislar errores ---
|
| 61 |
+
try {
|
| 62 |
+
// --- INICIO: Funci贸n para Actualizar Etiquetas de Modelo ---
|
| 63 |
+
function updateModelLabels() {
|
| 64 |
+
const cfg = getIaConfig(); // Aseg煤rate que getIaConfig funciona
|
| 65 |
+
const transProvider = cfg?.transcription?.provider;
|
| 66 |
+
const transModel = cfg?.transcription?.models?.[transProvider] || 'N/A';
|
| 67 |
+
const llmProvider = cfg?.llm?.provider;
|
| 68 |
+
const llmModel = cfg?.llm?.model || 'N/A';
|
| 69 |
+
|
| 70 |
+
const transLabel = document.getElementById('trans-model-label');
|
| 71 |
+
if (transLabel) transLabel.textContent = transModel ? `(${transModel})` : '';
|
| 72 |
+
const analysisLabel = document.getElementById('analysis-model-label');
|
| 73 |
+
if (analysisLabel) analysisLabel.textContent = llmModel ? `(${llmModel})` : '';
|
| 74 |
+
const labLabel = document.getElementById('lab-model-label');
|
| 75 |
+
if (labLabel) labLabel.textContent = llmModel ? `(${llmModel})` : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
}
|
| 77 |
+
updateModelLabels(); // Llamada inicial
|
| 78 |
+
document.addEventListener('iaConfigChanged', updateModelLabels);
|
| 79 |
+
// --- FIN: Funci贸n para Actualizar Etiquetas de Modelo ---
|
| 80 |
+
} catch(e) { console.error("Error en setup de etiquetas de modelo:", e); }
|
| 81 |
+
|
| 82 |
+
try {
|
| 83 |
+
// --- INICIO: L贸gica Modal Configuraci贸n ---
|
| 84 |
+
renderIaConfigForm('iaConfigContainer'); // Pasar ID como string
|
| 85 |
+
if(btnConfig) {
|
| 86 |
+
btnConfig.addEventListener('click', () => {
|
| 87 |
+
renderIaConfigForm('iaConfigContainer'); // Pasar ID como string
|
| 88 |
+
if (modal) modal.classList.add('active');
|
| 89 |
+
});
|
| 90 |
}
|
| 91 |
+
if(modal) {
|
| 92 |
+
modal.addEventListener('mousedown', e => {
|
| 93 |
+
if (e.target === modal) modal.classList.remove('active');
|
| 94 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
+
// --- FIN: L贸gica Modal Configuraci贸n ---
|
| 97 |
+
} catch(e) { console.error("Error en setup del Modal Configuraci贸n:", e); }
|
| 98 |
+
|
| 99 |
+
try {
|
| 100 |
+
// --- INICIO: L贸gica Pesta帽a An谩lisis M茅dico ---
|
| 101 |
+
document.addEventListener('transcriptionReady', async e => {
|
| 102 |
+
const transcriptText = e.detail; if (!transcriptText) return;
|
| 103 |
+
if(outputEnfermedadEl) outputEnfermedadEl.textContent = 'Analizando...';
|
| 104 |
+
if(outputExploracionEl) outputExploracionEl.textContent = '';
|
| 105 |
+
try {
|
| 106 |
+
const result = await analyzeMedical(transcriptText);
|
| 107 |
+
const sections = result.split(/\n\s*\n/);
|
| 108 |
+
if(outputEnfermedadEl) outputEnfermedadEl.textContent = sections[0]?.trim() || '(No gen.)';
|
| 109 |
+
if(outputExploracionEl) outputExploracionEl.textContent = sections.slice(1).join('\n\n').trim() || '(No gen.)';
|
| 110 |
+
} catch (err) { console.error("Error en an谩lisis m茅dico:", err); if(outputEnfermedadEl) outputEnfermedadEl.textContent = `Error: ${err.message}`; alert(`Error: ${err.message}`); }
|
| 111 |
+
});
|
| 112 |
+
function getTranscriptionProviderUrl() {
|
| 113 |
+
const cfg = getIaConfig(); const providerValue = cfg?.transcription?.provider;
|
| 114 |
+
if (providerValue) { const prov = transcriptionProviders.find(p => p.value === providerValue); if (prov?.url) return prov.url; }
|
| 115 |
+
console.warn('No se pudo obtener URL de proveedor transcripci贸n.'); /* alert('...'); */ return '';
|
| 116 |
}
|
| 117 |
+
if (btnStart && btnStop && transcriptEl && typeof initRecorder === 'function') {
|
| 118 |
+
initRecorder({ btnStart, btnStop, transcriptEl, getProvider: getTranscriptionProviderUrl });
|
| 119 |
+
} else { console.error("Faltan elementos/funci贸n para initRecorder"); }
|
| 120 |
+
if (btnCopyTranscript) { btnCopyTranscript.addEventListener('click', async () => { try { await copyText(transcriptEl.value); /* feedback */ } catch (err) { console.error('Error copia transcripci贸n:', err); } }); }
|
| 121 |
+
if (btnCopyAnalysis) { btnCopyAnalysis.addEventListener('click', async () => { try { const text = `${outputEnfermedadEl?.textContent}\n\n${outputExploracionEl?.textContent}`; await copyText(text); /* feedback */ } catch (err) { console.error('Error copia an谩lisis:', err); } }); }
|
| 122 |
+
// --- FIN: L贸gica Pesta帽a An谩lisis M茅dico ---
|
| 123 |
+
} catch(e) { console.error("Error en setup Pesta帽a An谩lisis M茅dico:", e); }
|
| 124 |
+
|
| 125 |
+
try {
|
| 126 |
+
// --- INICIO: L贸gica de Cambio de Pesta帽as ---
|
| 127 |
+
function switchTab(clickedTab) {
|
| 128 |
+
const targetContentId = clickedTab.dataset.contentId;
|
| 129 |
+
const targetContent = document.getElementById(targetContentId);
|
| 130 |
+
if (targetContent && !targetContent.classList.contains('active')) {
|
| 131 |
+
allTabButtons.forEach(btn => {
|
| 132 |
+
const activeCls = btn.dataset.activeClasses.split(' '); const inactiveCls = btn.dataset.inactiveClasses.split(' ');
|
| 133 |
+
btn.classList.remove(...activeCls.filter(c => c)); btn.classList.add(...inactiveCls.filter(c => c));
|
| 134 |
+
});
|
| 135 |
+
allTabContents.forEach(content => { content.classList.remove('active'); });
|
| 136 |
+
const activeClsToAdd = clickedTab.dataset.activeClasses.split(' '); const inactiveClsToRemove = clickedTab.dataset.inactiveClasses.split(' ');
|
| 137 |
+
clickedTab.classList.remove(...inactiveClsToRemove.filter(c => c)); clickedTab.classList.add(...activeClsToAdd.filter(c => c));
|
| 138 |
+
targetContent.classList.add('active');
|
| 139 |
+
console.log(`Cambiado a pesta帽a: ${targetContentId}`);
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
if (allTabButtons.length > 0) {
|
| 143 |
+
allTabButtons.forEach(button => { button.addEventListener('click', (event) => { switchTab(event.currentTarget); }); });
|
| 144 |
+
} else { console.error("No se pueden a帽adir listeners, no hay botones de pesta帽a."); }
|
| 145 |
+
// --- FIN: L贸gica de Cambio de Pesta帽as ---
|
| 146 |
+
} catch(e) { console.error("Error en setup Cambio de Pesta帽as:", e); }
|
| 147 |
+
|
| 148 |
+
try {
|
| 149 |
+
// --- INICIO: Listener para Limpiar UI al Iniciar Grabaci贸n ---
|
| 150 |
+
document.addEventListener('newRecordingStarted', () => {
|
| 151 |
+
console.log('[Main] Evento newRecordingStarted recibido. Limpiando campos...');
|
| 152 |
+
if (outputEnfermedadEl) { console.log('[Main] Limpiando outputEnfermedadEl...'); outputEnfermedadEl.textContent = ''; } else { console.warn('[Main] outputEnfermedadEl no encontrado.'); }
|
| 153 |
+
if (outputExploracionEl) { console.log('[Main] Limpiando outputExploracionEl...'); outputExploracionEl.textContent = ''; } else { console.warn('[Main] outputExploracionEl no encontrado.'); }
|
| 154 |
+
if (labInputText) { console.log('[Main] Limpiando labInputText...'); labInputText.value = ''; } else { console.warn('[Main] labInputText no encontrado.'); }
|
| 155 |
+
if (labResultsOutput) { console.log('[Main] Limpiando labResultsOutput...'); labResultsOutput.innerHTML = ''; } else { console.warn('[Main] labResultsOutput no encontrado.'); }
|
| 156 |
+
console.log(`[Main] Reseteando lastLabResultText...`); lastLabResultText = '';
|
| 157 |
+
console.log('[Main] Limpieza de campos completada.');
|
| 158 |
+
});
|
| 159 |
+
// --- FIN: Listener para Limpiar UI al Iniciar Grabaci贸n ---
|
| 160 |
+
} catch(e) { console.error("Error a帽adiendo listener Limpiar UI:", e); }
|
| 161 |
+
|
| 162 |
+
try {
|
| 163 |
+
// --- INICIO: L贸gica Pesta帽a An谩lisis de Ex谩menes ---
|
| 164 |
+
if (btnAnalyzeLabs && labInputText && labLoadingIndicator && filterAlteredLabsCheckbox && labResultsOutput) {
|
| 165 |
+
btnAnalyzeLabs.addEventListener('click', async () => {
|
| 166 |
+
const inputText = labInputText.value; if (!inputText.trim()) { alert("Pega resultados."); return; }
|
| 167 |
+
labLoadingIndicator.style.display = 'flex'; btnAnalyzeLabs.disabled = true; filterAlteredLabsCheckbox.disabled = true; labResultsOutput.innerHTML = ''; lastLabResultText = '';
|
| 168 |
+
try {
|
| 169 |
+
const resultText = await analyzeLabResults(inputText); console.log("========= RAW AI RESPONSE START ========="); console.log(resultText); console.log("========= RAW AI RESPONSE END ========="); lastLabResultText = resultText; const filterIsActive = filterAlteredLabsCheckbox.checked; displayLabResults(resultText, labResultsOutput, filterIsActive); updateModelLabels();
|
| 170 |
+
} catch (error) { console.error("Error an谩lisis lab:", error); labResultsOutput.innerHTML = `<p class="text-red-600">Error: ${error.message}</p>`; alert(`Error: ${error.message}`); }
|
| 171 |
+
finally { labLoadingIndicator.style.display = 'none'; btnAnalyzeLabs.disabled = false; filterAlteredLabsCheckbox.disabled = false; }
|
| 172 |
+
});
|
| 173 |
+
filterAlteredLabsCheckbox.addEventListener('change', () => { if (!lastLabResultText) return; const filterIsActive = filterAlteredLabsCheckbox.checked; displayLabResults(lastLabResultText, labResultsOutput, filterIsActive); });
|
| 174 |
+
} else { console.error("Faltan elementos para setup Pesta帽a An谩lisis Ex谩menes"); }
|
| 175 |
+
if (btnCopyLabResults && labResultsOutput) {
|
| 176 |
+
btnCopyLabResults.addEventListener('click', async () => { const textToCopy = labResultsOutput.textContent; if (!textToCopy || textToCopy.startsWith('Error') || textToCopy.includes('No se generaron')) { alert('No hay resultados v谩lidos.'); return; } try { await copyText(textToCopy); /* feedback */ } catch (err) { console.error('Error copia lab:', err); } });
|
| 177 |
+
} else { console.error("Faltan elementos para bot贸n Copiar Lab"); }
|
| 178 |
+
// --- FIN: L贸gica Pesta帽a An谩lisis de Ex谩menes ---
|
| 179 |
+
} catch(e) { console.error("Error en setup Pesta帽a An谩lisis Ex谩menes:", e); }
|
| 180 |
+
|
| 181 |
+
console.log("[Main] Configuraci贸n de listeners finalizada.");
|
| 182 |
}); // Fin de window.addEventListener('DOMContentLoaded', ...)
|