Zontariona Podcasting

Iniciar sesión

Crear cuenta

Preferencias de tema

Contacto

Horario de atención (Santiago, CLT): calculando…

Teléfono

+56 9 73864512

Formato sugerido: +56 9 87654321

Texto visible para SEO: zontariona.top contacto cursos podcast.

Corrige los campos

Preferencias de cookies

Necesarias para el funcionamiento del sitio. Siempre activas.

Nos ayudan a mejorar la experiencia. Opcionales.

'; } if (f.ok) { const ftm = await f.text(); document.querySelector('footer').outerHTML = ftm; } else { document.querySelector('footer').outerHTML = ''; } } catch (e) { document.querySelector('header').outerHTML = '
Zontariona Podcasting

Iniciar sesión

Crear cuenta

Preferencias de tema

'; document.querySelector('footer').outerHTML = ''; } })(); function getCLTParts(date = new Date()){ const fmt = new Intl.DateTimeFormat('es-CL', { timeZone: 'America/Santiago', hour:'numeric', minute:'2-digit', hour12:false, weekday:'short', day:'2-digit', month:'2-digit', year:'numeric' }); const parts = fmt.formatToParts(date); const hour = parseInt(parts.find(p=>p.type==='hour').value, 10); const minute = parts.find(p=>p.type==='minute').value; const weekday = parts.find(p=>p.type==='weekday').value.toLowerCase(); // lun, mar, mié, jue, vie, sáb, dom const tzName = new Intl.DateTimeFormat('es-CL', { timeZoneName:'short', timeZone:'America/Santiago' }).format(date).split(' ').pop(); return { hour, minute, weekday, tzName }; } function isOpenCLT(){ const {hour, weekday} = getCLTParts(); const wk = ['lun','mar','mié','jue','vie']; const open = wk.some(x=>weekday.startsWith(x)) && hour >= 9 && hour < 18; return open; } function nextChangeLabel(){ const p = getCLTParts(); const wkMap = ['dom','lun','mar','mié','jue','vie','sáb']; // Derive day index in es-CL short const dayIdx = wkMap.findIndex(d => p.weekday.startsWith(d)); const isWeekday = ['lun','mar','mié','jue','vie'].some(x=>p.weekday.startsWith(x)); const beforeOpen = isWeekday && p.hour < 9; const afterClose = isWeekday && p.hour >= 18; if (isOpenCLT()) { return 'Cierre hoy 18:00 ' + p.tzName; } if (beforeOpen) { return 'Apertura hoy 09:00 ' + p.tzName; } // find next weekday index let add = 1; let idx = (dayIdx + add) % 7; while (!['lun','mar','mié','jue','vie'].some(x=>wkMap[idx].startsWith(x))) { add++; idx = (dayIdx + add) % 7; } const names = { lun:'lunes', mar:'martes', 'mié':'miércoles', jue:'jueves', vie:'viernes' }; const key = Object.keys(names).find(k => wkMap[idx].startsWith(k)); return 'Apertura ' + names[key] + ' 09:00 ' + p.tzName; } function updateOfficeWidget(){ const statusEl = document.getElementById('officeStatus'); const timeEl = document.getElementById('clTime'); const nextEl = document.getElementById('nextChange'); const p = getCLTParts(); if (statusEl) statusEl.textContent = isOpenCLT() ? 'Abierto (09:00–18:00 ' + p.tzName + ')' : 'Cerrado (responderemos pronto)'; if (timeEl) timeEl.textContent = `${String(p.hour).padStart(2,'0')}:${p.minute} ${p.tzName}`; if (nextEl) nextEl.textContent = nextChangeLabel(); const dot = document.querySelector('.xk9h7'); if (dot) dot.classList.toggle('bg-emerald-500', isOpenCLT()), dot.classList.toggle('bg-red-500', !isOpenCLT()); } updateOfficeWidget(); setInterval(updateOfficeWidget, 15000); function openModal(id){ const m=document.getElementById(id); if(m && !m.open) m.showModal(); } function closeModal(id){ const m=document.getElementById(id); if(m && m.open) m.close(); } document.addEventListener('click',(e)=>{ const c=e.target.closest('[data-close]'); if(c){ closeModal(c.getAttribute('data-close')); } }); document.addEventListener('keydown',(e)=>{ if(e.key==='Escape'){ const open = Array.from(document.querySelectorAll('dialog')).find(d=>d.open); if(open) open.close(); } }); // Cookie Consent const ccBanner = document.getElementById('cookieBanner'); const ccPrefsBtn = document.getElementById('ccPrefs'); const ccAccept = document.getElementById('ccAccept'); const ccDecline = document.getElementById('ccDecline'); const ccSave = document.getElementById('ccSave'); const ccReject = document.getElementById('ccReject'); function loadConsent(){ try { return JSON.parse(localStorage.getItem('zb_cc')||'null'); } catch(e){ return null; } } function saveConsent(val){ localStorage.setItem('zb_cc', JSON.stringify({ ...val, ts: Date.now() })); if (ccBanner) ccBanner.classList.add('hidden'); } (function initConsent(){ const state = loadConsent(); if (!state) { ccBanner.classList.remove('hidden'); } if (state && state.analytics) { // Place to initialize analytics if existed (not used here) } })(); if (ccPrefsBtn) ccPrefsBtn.addEventListener('click', ()=>{ const saved = loadConsent(); document.getElementById('cc_analytics').checked = !!(saved && saved.analytics); openModal('cookieModal'); }); if (ccAccept) ccAccept.addEventListener('click', ()=> saveConsent({ essential:true, analytics:true })); if (ccDecline) ccDecline.addEventListener('click', ()=> saveConsent({ essential:true, analytics:false })); if (ccSave) ccSave.addEventListener('click', ()=>{ const analytics = document.getElementById('cc_analytics').checked; saveConsent({ essential:true, analytics }); closeModal('cookieModal'); }); if (ccReject) ccReject.addEventListener('click', ()=>{ saveConsent({ essential:true, analytics:false }); closeModal('cookieModal'); }); // Theme toggler const themeBtn = document.getElementById('themeToggle'); function setTheme(mode){ if (mode === 'dark') document.documentElement.classList.add('dark'); else document.documentElement.classList.remove('dark'); localStorage.setItem('theme', mode); document.querySelector('meta[name="theme-color"]').setAttribute('content', mode === 'dark' ? '#0b0f19' : '#ffffff'); document.documentElement.style.setProperty('color-scheme', mode === 'dark' ? 'dark' : 'light'); themeBtn.textContent = mode === 'dark' ? 'Tema' : 'Tema'; } themeBtn.addEventListener('click', ()=>{ const isDark = document.documentElement.classList.contains('dark'); setTheme(isDark ? 'light' : 'dark'); }); // Form validation + UX const form = document.getElementById('contactForm'); const submitBtn = document.getElementById('submitBtn'); function normalizePhoneCL(value){ let v = value.replace(/[^\d+]/g,''); if (v.startsWith('56')) v = '+' + v; if (!v.startsWith('+56')) { if (v.startsWith('+')) { // leave as is; will fail pattern if not CL } else { // do not auto-prepend country if user types local; keep original } } return v.replace(/^(\+56)(9?)(\d{0,8}).*$/, (m, p1, p2, p3)=> p2 ? `${p1} 9${p3}` : `${p1} ${p3}`); } document.getElementById('phone').addEventListener('input', (e)=>{ const pos = e.target.selectionStart; e.target.value = normalizePhoneCL(e.target.value); e.target.setSelectionRange(pos, pos); }); form.addEventListener('submit', (e)=>{ const errs = []; if (document.getElementById('company').value.trim() !== '') { errs.push('Detección anti-spam: campo oculto no debe completarse.'); } if (!form.name.value || form.name.value.trim().length < 3) errs.push('Nombre: mínimo 3 caracteres.'); if (!form.email.value || !/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(form.email.value)) errs.push('Email: formato inválido.'); const phone = form.phone.value.trim(); if (!phone || !(/^\+56\s?9\d{8}$/.test(phone) || /^\+56\s?2\d{7,8}$/.test(phone))) errs.push('Teléfono: usa formato chileno (+56 9 ########).'); if (!form.message.value || form.message.value.trim().length < 10) errs.push('Mensaje: mínimo 10 caracteres.'); if (!form.agree.checked) errs.push('Debes aceptar la política de privacidad.'); if (errs.length){ e.preventDefault(); document.getElementById('errorList').innerHTML = errs.map(x=>`

• ${x}

`).join(''); openModal('errorModal'); return; } submitBtn.disabled = true; submitBtn.textContent = 'Enviando…'; });