',iconSize:[34,34],iconAnchor:[17,17]});const m=L.marker([e.lat,e.lng],{icon}).addTo(map);markers.push(m);bounds.push([e.lat,e.lng]);m.bindPopup('
'+safe(e.title)+''+safe(e.date)+'
'+safe(e.time)+'
'+safe(e.place)+'
'+safe(e.note)+'Directions'+(e.url?' ยท Event details':''));const card=document.createElement('div');card.className='event';card.tabIndex=0;card.setAttribute('role','button');card.innerHTML='
'+safe(e.kind)+''+safe(e.title)+'๐
'+safe(e.date)+'๐ '+safe(e.time)+'๐ '+safe(e.place)+''+safe(e.note)+'๐ Directions'+(e.url?'Event details':'')+'
';card.addEventListener('click',ev=>{if(ev.target.closest('a'))return;document.querySelectorAll('#santa-map-app .event').forEach(x=>x.classList.remove('active'));card.classList.add('active');map.setView([e.lat,e.lng],e.approx?11:13);m.openPopup();});card.addEventListener('keydown',ev=>{if(ev.key==='Enter'&&ev.target===card)card.click()});list.appendChild(card)}); const note=document.createElement('p');note.className='note';note.textContent='โน๏ธ Dates and locations are based on preliminary event listings. Confirm with organizers before traveling. The December 12 Naples marker is approximate, not an event venue.';list.appendChild(note);map.fitBounds(bounds,{padding:[35,35]});setTimeout(()=>map.invalidateSize(),250); })();