PageSourceSearch

https://www.aravaiparunning.com/wp-content/cache/min/1/wp-content/…/assets/aravaipa-calendar.js?ver=1790916550

js aravaiparunning.com collected 2026-10-02 07:46:23 UTC 2,943 bytes, 22 lines download raw bytes

1(function(){'use strict';function syncMonthHeadings(root){var months=root.querySelectorAll('.arv-calendar__month');Array.prototype.forEach.call(months,function(month){var rows=month.querySelectorAll('.arv-calendar__row');var anyVisible=Array.prototype.some.call(rows,function(row){return!row.hasAttribute('hidden')});month.hidden=!anyVisible})}
2function matches(row,query,state,month,series,openOnly,roadOnly){if(openOnly&&row.getAttribute('data-open')!=='1'){return!1}
3if(roadOnly&&row.getAttribute('data-terrain')!=='road'){return!1}
4if(state&&row.getAttribute('data-state')!==state){return!1}
5if(series&&row.getAttribute('data-series')!==series){return!1}
6if(month&&row.getAttribute('data-month')!==month){return!1}
7if(!query){return!0}
8var haystack=(row.getAttribute('data-name')||'')+' '+(row.getAttribute('data-where')||'')+' '+(row.getAttribute('data-distances')||'');return query.split(/\s+/).every(function(word){return haystack.indexOf(word)!==-1})}
9function setUp(bar){var calendar=bar.closest('.arv-calendar');if(!calendar){return}
10var list=calendar.querySelector('[data-arv-list]');if(!list){return}
11var rows=list.querySelectorAll('.arv-calendar__row');var search=bar.querySelector('[data-arv-search]');var stateSel=bar.querySelector('[data-arv-state]');var monthSel=bar.querySelector('[data-arv-month]');var seriesSel=bar.querySelector('[data-arv-series]');var openBox=bar.querySelector('[data-arv-open]');var roadBox=bar.querySelector('[data-arv-road]');var count=bar.querySelector('[data-arv-count]');var total=rows.length;var hiatus=calendar.querySelector('.arv-calendar__hiatus');function apply(){var query=search?search.value.trim().toLowerCase():'';var state=stateSel?stateSel.value:'';var month=monthSel?monthSel.value:'';var series=seriesSel?seriesSel.value:'';var openOnly=openBox?openBox.checked:!1;var roadOnly=roadBox?roadBox.checked:!1;var shown=0;Array.prototype.forEach.call(rows,function(row){var ok=matches(row,query,state,month,series,openOnly,roadOnly);row.hidden=!ok;if(ok){shown++}});syncMonthHeadings(calendar);if(hiatus){hiatus.hidden=!!(query||state||month||series||openOnly||roadOnly)}
12if(count){if(shown===total){count.textContent=''}else if(shown===0){count.textContent='No races match. Try clearing a filter.'}else{count.textContent='Showing '+shown+' of '+total+' races'}}
13calendar.classList.toggle('is-empty',shown===0)}
14if(search){search.addEventListener('input',apply)}
15if(stateSel){stateSel.addEventListener('change',apply)}
16if(monthSel){monthSel.addEventListener('change',apply)}
17if(seriesSel){seriesSel.addEventListener('change',apply)}
18if(openBox){openBox.addEventListener('change',apply)}
19if(roadBox){roadBox.addEventListener('change',apply)}
20bar.classList.add('is-ready')}
21function init(){var bars=document.querySelectorAll('[data-arv-filters]');Array.prototype.forEach.call(bars,setUp)}
22if('loading'===document.readyState){document.addEventListener('DOMContentLoaded',init)}else{init()}}())

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.