1(function(){function debounce(func,wait,immediate){'use strict';var timeout;wait=(typeof wait!=='undefined')?wait:20;immediate=(typeof immediate!=='undefined')?immediate:!0;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate){func.apply(context,args)}};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){func.apply(context,args)}}} 2function prependElement(container,element){if(container.firstChild.nextSibling){return container.insertBefore(element,container.firstChild.nextSibling)}else{return container.appendChild(element)}} 3function showButton(element){element.className=element.className.replace('is-empty','')} 4function hideButton(element){if(!element.classList.contains('is-empty')){element.className+=' is-empty'}} 5function getAvailableSpace(button,container){return container.offsetWidth-button.offsetWidth-22} 6function isOverflowingNavivation(list,button,container){return list.offsetWidth>getAvailableSpace(button,container)} 7var navContainer=document.querySelector('.main-navigation');var breaks=[];if(!navContainer){return} 8function updateNavigationMenu(container){if(!container.parentNode.querySelector('.main-menu[id]')){return} 9var visibleList=container.parentNode.querySelector('.main-menu[id]');var hiddenList=visibleList.parentNode.nextElementSibling.querySelector('.hidden-links');var toggleButton=visibleList.parentNode.nextElementSibling.querySelector('.main-menu-more-toggle');
9if(isOverflowingNavivation(visibleList,toggleButton,container)){breaks.push(visibleList.offsetWidth);prependElement(hiddenList,!visibleList.lastChild||null===visibleList.lastChild?visibleList.previousElementSibling:visibleList.lastChild);showButton(toggleButton)}else{if(getAvailableSpace(toggleButton,container)>breaks[breaks.length-1]){visibleList.appendChild(hiddenList.firstChild.nextSibling);breaks.pop()} 10if(breaks.length<2){hideButton(toggleButton)}} 11if(isOverflowingNavivation(visibleList,toggleButton,container)){updateNavigationMenu(container)}} 12document.addEventListener('DOMContentLoaded',function(){updateNavigationMenu(navContainer);var hasSelectiveRefresh=('undefined'!==typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.navMenusPreview.NavMenuInstancePartial);if(hasSelectiveRefresh){wp.customize.selectiveRefresh.bind('partial-content-rendered',function(placement){var isNewNavMenu=(placement&&placement.partial.id.includes('nav_menu_instance')&&'null'!==placement.container[0].parentNode&&placement.container[0].parentNode.classList.contains('main-navigation'));if(isNewNavMenu){updateNavigationMenu(placement.container[0].parentNode)}})}});window.addEventListener('load',function(){updateNavigationMenu(navContainer)});var isResizing=!1;window.addEventListener('resize',debounce(function(){if(isResizing){return} 13isResizing=!0;setTimeout(function(){updateNavigationMenu(navContainer);isResizing=!1},150)}));updateNavigationMenu(navContainer)})()
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.