PageSourceSearch

https://zinkbakken.dk/theme/89fec0e0143898505c6fffd88afa0419/js/storefront/storefront.navbar.plugin.d95fa7.js

js zinkbakken.dk collected 2026-09-26 07:48:07 UTC 2,010 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3251],{3251:(e,t,i)=>{i.r(t),i.d(t,{default:()=>r});var s=i(9568),o=i(5206),n=i(3266);class r extends s.Z{init(){this._topLevelLinks=this.el.querySelectorAll("".concat(this.options.topLevelLinksSelector)),this._registerEvents(),this._isMouseOver=!1,this._setAriaCurrentPage()}_registerEvents(){let e=o.Z.isTouchDevice()?"touchstart":"mouseenter",t=o.Z.isTouchDevice()?"touchstart":"mouseleave",i=o.Z.isTouchDevice()?"touchstart":"click";n.Z.iterate(this._topLevelLinks,s=>{s.addEventListener(e,this._toggleNavbar.bind(this,s)),s.addEventListener(t,this._toggleNavbar.bind(this,s)),s.addEventListener(i,this._navigateToLinkOnClick.bind(this,s))})}_toggleNavbar(e,t){let i=window.bootstrap.Dropdown.getOrCreateInstance(e);"mouseenter"===t.type?(this._isMouseOver=!0,this._debounce(()=>{this._isMouseOver&&(null==i?void 0:i._menu)&&!i._menu.classList.contains("show")&&(this._closeAllDropdowns(),this.$emitter.publish("closeAllDropdowns"),i.show(),this.$emitter.publish("showDropdown"))},this.options.debounceTime)):"mouseleave"===t.type&&(this._isMouseOver=!1)}_closeAllDropdowns(){Array.from(this._topLevelLinks).map(e=>window.bootstrap.Dropdown.getInstance(e)).forEach(e=>{(null==e?void 0:e._menu)&&e._menu.classList.contains("show")&&e.hide()})}_navigateToLinkOnClick(e,t){"click"===t.type&&0!==t.pageX&&(t.preventDefault(),t.stopPropagation(),window.location.replace(e.href))}_debounce(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._clearDebounce(),this._debouncer=setTimeout(e.bind(this,...i),this.options.debounceTime)}_clearDebounce(){clearTimeout(this._debouncer)}_setAriaCurrentPage(){if(!window.activeNavigationId)return;let e=this.options.ariaCurrentPageSelector.replace("{id}",window.activeNavigationId),t=this.el.querySelector(e);t&&t.setAttribute("aria-current","page")}}r.options={debounceTime:125,topLevelLinksSelector:".main-navigation-link",ariaCurrentPageSelector:".nav-item-{id}-link"}}}]);

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.