PageSourceSearch

https://www.visitnc.com/themes/custom/visitnorthcarolina/dist/js/03-organisms/site/nav.js?tm8gy7

js visitnc.com collected 2026-10-02 02:43:56 UTC 5,207 bytes, 1 lines download raw bytes

1!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r,i=0;i<t.length;i++)(r=t[i]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}function n(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(n)?n:n+""}var r,i;Drupal.behaviors.nav={attach:function(e){once("navigation",".header",e).forEach((function(){function e(e){"open"===e?(r.classList.add("search-open"),d.setAttribute("aria-expanded","true"),m.classList.add("transition-visibility-show"),a.classList.add("nav-hide")):(d.setAttribute("aria-expanded","false"),m.classList.remove("transition-visibility-show"),r.classList.remove("search-open"),a.classList.remove("nav-hide"))}function t(){o.innerHTML="Menu",i.setAttribute("aria-expanded","false"),r.classList.remove("main-menu-open"),a.classList.remove("transition-visibility-show")}function n(){var e=document.querySelector(".submenu.transition-visibility-show");r.classList.remove("sub-menu-open"),document.querySelector(".submenus").classList.remove("transition-visibility-show"),e&&(e.classList.remove("transition-visibility-show"),e.setAttribute("aria-hidden","true"));var t=document.querySelector('.header__menu [aria-expanded="true"]');t&&t.setAttribute("aria-expanded","false")}var r=document.querySelector("html"),i=(document.querySelector(".header"),document.querySelector("#main-menu-toggle")),o=document.querySelector("#main-menu-toggle div"),a=document.querySelector(".header__menu"),s=document.querySelectorAll(".header__menu ul.menu button"),l=document.querySelectorAll(".submenu__menu-wrapper ul.menu button"),u=document.querySelectorAll(".submenu > .submenu__internal > .submenu__menu-wrapper > nav > ul.menu > li"),c=document.querySelector(".submenus .back"),d=document.querySelector(".search-control"),m=document.querySelector(".header__search"),f=0;100<=window.scrollY&&r.classList.add("scroll-up"),i.addEventListener("click",(function(e){this.blur(),"true"===this.getAttribute("aria-expanded")?(t(),n()):(o.innerHTML="Close",i.setAttribute("aria-expanded","true"),r.classList.add("main-menu-open"),a.classList.add("transition-visibility-show")),e.preventDefault(),e.stopPropagation()})),s.forEach((function(e){e.addEventListener("click",(function(e){this.blur(),"false"===this.getAttribute("aria-expanded")?function(e){var t=document.getElementById(e.getAttribute("aria-controls"));document.querySelector(".submenu.transition-visibility-show"),r.classList.add("sub-menu-open"),document.querySelector(".submenus").classList.add("transition-visibility-show"),t.scrollTop=0,document.querySelectorAll(".submenu").forEach((function(e){e.setAttribute("aria-hidden","true")})),t.setAttribute("aria-hidden","false"),document.querySelectorAll('.header__menu [aria-expanded="true"]').forEach((function(e){e.setAttribute("aria-expanded","false")})),e.setAttribute("aria-expanded","true")}(this):n(),e.preventDefault(),e.stopPropagation()}))})),l.forEach((function(e){e.addEventListener("click",(function(e){var t=this.getAttribute("data-url");t&&(window.location.href=t||this.getAttribute("href"))}))})),c.addEventListener("click",(function(e){n()})),u.forEach((function(e){e.addEventListener("click",(function(e){var t=this.querySelector("button");console.log("clicked button",t),t&&"false"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","true"),t.classList.add("transition-visibility-show")):t&&t.setAttribute("aria-expanded","false")}))})),window.addEventListener("scroll",(function(e){!function(e){parseInt(e.scrollTopDelta,10);var i=window.scrollY;100>=i?r.classList.remove("scroll-down","scroll-up"):(i>f&&!r.classList.contains("scroll-down")?(r.classList.remove("scroll-up"),r.classList.add("scroll-down"),1250<=window.innerWidth&&(t(),n())
1):i<f&&r.classList.contains("scroll-down")&&(r.classList.remove("scroll-down"),r.classList.add("scroll-up"),t(),n()),f=i)}(e)})),d.addEventListener("click",(function(t){"true"===t.currentTarget.getAttribute("aria-expanded")?e("close"):e("open")}))}))}},r=function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.targetData=new WeakMap},i=[{key:"handle",value:function(e){var t=e.target,n=t===document,r=document.documentElement,i=this.targetData.get(t)||{top:0,left:0},o=i.top,a=i.left;return i.top=n?r.scrollTop+document.body.scrollTop:t.scrollTop,i.left=n?r.scrollLeft+document.body.scrollLeft:t.scrollLeft,e.scrollTopDelta=i.top-o,e.scrollLeftDelta=i.left-a,e.scrollTop=i.top,e.scrollLeft=i.left,this.targetData.set(t,i),"function"==typeof e.handler?e.handler(e):null}},{key:"bind",value:function(e,t){var n=this.handle.bind(this);e.addEventListener("scroll",(function(e){e.handler=t,n(e)}))}}],i&&t(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1})}();

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.