1jQuery(document).ready(function($){if(!afLiveSearch.enabled)return;let timer;const resultsBox=$('#af-live-search-results');const searchInput=$('input[type="search"]');let items=[];let index=-1;function resetNavigation(){items=resultsBox.find('[role="option"]');index=-1;items.attr('aria-selected','false')} 2searchInput.on('keyup',function(e){if(e.key==='ArrowDown'&&items.length){index=(index+1)%items.length;items.attr('aria-selected','false').eq(index).attr('aria-selected','true').focus();return} 3if(e.key==='ArrowUp'&&items.length){index=(index-1+items.length)%items.length;items.attr('aria-selected','false').eq(index).attr('aria-selected','true').focus();return} 4if(e.key==='Enter'&&index>=0){window.location=items.eq(index).find('a').attr('href');return} 5const query=$(this).val().trim();clearTimeout(timer);timer=setTimeout(function(){if(query.length<2){resultsBox.html('').attr('aria-expanded','false');return} 6$.ajax({url:afLiveSearch.ajax_url,type:'POST',data:{action:'morenews_live_search',s:query,nonce:afLiveSearch.nonce,limit:afLiveSearch.results_count},beforeSend:function(){resultsBox.html('<div class="loading" role="status">'+afLiveSearch.searching_text+'</div>').attr('aria-expanded','true')},success:function(response){resultsBox.html(response).attr('aria-expanded','true');resetNavigation()}})},300)});$(document).on('click',function(e){if(!$(e.target).closest('.af-search-wrap').length){resultsBox.html('').attr('aria-expanded','false')}})}) 7;
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.