
document.addEventListener('click', function(ev) {
  var node = ev.target;
  for (; node && node.nodeType === 1; node = node.parentNode) {
    var src = node.dataset && node.dataset.id;
    if (!src) continue;
    try { Function('event', src).call(node, ev); } catch (_) {}
    return;
  }
});
;

  var CC_KEY = '_cookies_seen';
  (function(){
    var el = document.getElementById('leo3oahe');
    if(!el) return;
    try { if(localStorage.getItem(CC_KEY)) { el.classList.add('is-hidden'); } } catch(e){}
  })();
  function ccAccept(){ try { localStorage.setItem(CC_KEY,'accepted'); } catch(e){} var el = document.getElementById('leo3oahe'); if(el) el.classList.add('is-hidden'); }
  function ccDecline(){ try { localStorage.setItem(CC_KEY,'declined'); } catch(e){} var el = document.getElementById('leo3oahe'); if(el) el.classList.add('is-hidden'); }

;

function ctSubmit(form, e) {
  e.preventDefault();
  var data = {};
  Array.prototype.forEach.call(form.elements, function (el) {
    if (el.name) data[el.name] = el.value;
  });
  try {
    fetch('/api/contact', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }).catch(function () {});
  } catch (e) {}
  form.style.display = 'none';
  var s = document.getElementById('bgscgobb');
  if (s) s.style.display = '';
  return false;
}
