PageSourceSearch

https://www.foodmaker.be/theme/17d7502def644033fa04e2b44db7aaea/js…ent-theme.offcanvas-menu.override.aaa2a6.js

js foodmaker.be collected 2026-10-04 15:17:20 UTC 14,534 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[39768],{4156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o(Array.isArray(t)?[]:{},t,e):t}function i(t,e,n){return t.concat(e).map(function(t){return s(t,n)})}function r(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function o(t,n,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=s;var c,h,u=Array.isArray(n);return u!==Array.isArray(t)?s(n,l):u?l.arrayMerge(t,n,l):(h={},(c=l).isMergeableObject(t)&&r(t).forEach(function(e){h[e]=s(t[e],c)}),r(n).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&c.isMergeableObject(n[e])?h[e]=(function(t,e){if(!e.customMerge)return o;var n=e.customMerge(t);return"function"==typeof n?n:o})(e,c)(t[e],n[e],c):h[e]=s(n[e],c))}),h)}o.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,n){return o(t,n,e)},{})},t.exports=o},9768:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var s=n(4335),i=n(6105),r=n(5683),a=n(9068);class o extends s.A{static #t=this.options={navigationUrl:window.router["frontend.menu.offcanvas"],position:"left",triggerEvent:"click",additionalOffcanvasClass:"navigation-offcanvas",linkSelector:".js-navigation-offcanvas-link",loadingIconSelector:".js-navigation-offcanvas-loading-icon",linkLoadingClass:"is-loading",menuSelector:".navigation-offcanvas-container",initialContentSelector:".js-navigation-offcanvas-initial-content",currentCategorySelector:"a.is-current-category"};init(){this._cache={},this._client=new a.A,this._content=r.A.getTemplate(),this._registerEvents()}_registerEvents(){this.el.removeEventListener(this.options.triggerEvent,this._getLinkEventHandler.bind(this)),this.el.addEventListener(this.options.triggerEvent,this._getLinkEventHandler.bind(this)),i.A.exists()&&(i.A.getOffCanvas().forEach(t=>{t.querySelectorAll(this.options.linkSelector).forEach(t=>{o._resetLoader(t),t.addEventListener("click",e=>{this._getLinkEventHandler(e,t)})})}),window.PluginManager.initializePlugins()),this._openMenuViaUrlParameter()}_openMenu(t){o._stopEvent(t),i.A.open(this._content,this._registerEvents.bind(this),this.options.position),i.A.setAdditionalClassName(this.options.additionalOffcanvasClass),this.$emitter.publish("openMenu")}_openMenuViaUrlParameter(){let t=new URLSearchParams(window.location.search);if(t.has("offcanvas")&&"menu"===t.get("offcanvas")&&(document.querySelector('[data-off-canvas-menu="true"]')?.click(),window.history.replaceState)){let t=new URL(window.location);t.searchParams.delete("offcanvas"),window.history.replaceState({},document.title,t)}}_getLinkEventHandler(t,e){if(!e){let e=document.querySelector(this.options.initialContentSelector),n=`${this.options.navigationUrl}?navigationId=${window.activeNavigationId}`;return this._fetchMenu(n,n=>(e.querySelector(this.options.menuSelector).innerHTML=n,this._content=e.innerHTML,this._openMenu(t)))}if(o._stopEvent(t),e.classList.contains(this.options.linkLoadingClass))return;o._setLoader(e);let n=e.getAttribute("data-href")||e.getAttribute("href");n&&(this.$emitter.publish("getLinkEventHandler"),this._fetchMenu(n,this._updateContent.bind(this)))}static _setLoader(t){t.classList.add(this.options.linkLoadingClass);let e=t.querySelector(this.options.loadingIconSelector);e&&(e._linkIcon=e.innerHTML,e.innerHTML=r.A.getTemplate())}static _resetLoader(t){t.classList.remove(this.options.linkLoadingClass);let e=t.querySelector(this.options.loadingIconSelector);e&&e._linkIcon&&(e.innerHTML=e._linkIcon)}_updateContent(t){if(this._content=t,i.A.exists()){let e=o._getOffcanvasMenu();e.innerHTML=t;let n=e.querySelector(this.options.currentCategorySelector);window.focusHandler.setFocus(n,{focusVisible:!0}),this._registerEvents()}this.$emitter.publish("updateContent")}_fetchMenu(t,e){return!!t&&(this._cache[t]&&"function"==typeof e?e(this._cache[t]):void(this.$emitter.publish("beforeFetchMenu"),fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(t=>t.text()).then(n=>{this._cache[t]=n,"function"==typeof e&&e(n)})))}static _stopEvent(t){t.preventDefault(),t.stopImmediatePropagation()}static _getOffcanvas(){return i.A.getOffCanvas()[0]}static _getOffcanvasMenu(){return o._getOffcanvas().querySelector(this.options.menuSelector)}}class l extends o{init(){super.init()}_getLinkEventHandler(t,e){if(!e){let e=document.querySelector(this.options.initialContentSelector),n=this.options.navigationUrl;return this._fetchMenu(n,n=>(e.querySelector(this.options.menuSelector).innerHTML=n,this._content=e.innerHTML,this._openMenu(t)))}if(o._stopEvent(t),e.classList.contains(this.options.linkLoadingClass))return;
1o._setLoader(e);let n=e.getAttribute("data-href")||e.getAttribute("href");n&&(this.$emitter.publish("getLinkEventHandler"),this._fetchMenu(n,this._updateContent.bind(this)))}}},8308:(t,e,n)=>{n.d(e,{A:()=>s});class s{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:n});return this.el.dispatchEvent(s),s}subscribe(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,i=t.split("."),r=n.scope?e.bind(n.scope):e;if(n.once&&!0===n.once){let e=r;r=function(n){s.unsubscribe(t),e(n)}}return this.el.addEventListener(i[0],r),this.listeners.push({splitEventName:i,opts:n,cb:r}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,n)=>([...n.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(n.splitEventName[0],n.cb):t.push(n),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}},4335:(t,e,n)=>{n.d(e,{A:()=>o});var s=n(4156),i=n.n(s);class r{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let n=r.toUpperCamelCase(t,e);return r.lcFirst(n)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>r.ucFirst(t.toLowerCase())).join(""):r.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}var a=n(8308);class o{constructor(t,e={},n=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${n}".`);return}this.el=t,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),i().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),n=this.el.getAttribute(`data-${e}-config`);return n?window.PluginConfigManager.get(this._pluginName,n):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),n=this.el.getAttribute(`data-${e}-options`);if(n)try{return JSON.parse(n)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}},6105:(t,e,n)=>{n.d(e,{A:()=>o,r:()=>a});var s=n(8308);let i="js-offcanvas-singleton";class r{constructor(){this.$emitter=new s.A}open(t,e,n,s,i,r,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(n,r,a,s);this.setContent(t,i),this._openOffcanvas(o,e)}setContent(t,e){let n=this.getOffCanvas();n[0]&&(n[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(`.${i}`)}close(t){let e=this.getOffCanvas();e.forEach(t=>{bootstrap.Offcanvas.getInstance(t).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(t,e){window.focusHandler.saveFocusState("offcanvas"),r.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();e.forEach(n=>{let s=()=>{setTimeout(()=>{n.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),n.removeEventListener("hide.bs.offcanvas",s)};n.addEventListener("hide.bs.offcanvas",s)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0}
1),document.querySelectorAll(".js-offcanvas-close").forEach(e=>e.addEventListener("click",this.close.bind(this,t)))}_setAriaAttrs(){let t=this.getOffCanvas()[0],e="off-canvas-headline",n=t.querySelector(`[data-id="${e}"]`);n&&!t.hasAttribute("aria-labelledby")&&(n.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){return r.bsOffcanvas=null,this.getOffCanvas().forEach(t=>t.remove())}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":`offcanvas-${t}`}_createOffCanvas(t,e,n,s){let a=document.createElement("div");if(a.classList.add("offcanvas",i),a.classList.add(this._getPositionClass(t)),a.setAttribute("tabindex","-1"),!0===e&&a.classList.add("is-fullwidth"),n){let t=typeof n;if("string"===t)a.classList.add(n);else if(Array.isArray(n))n.forEach(t=>{a.classList.add(t)});else throw Error(`The type "${t}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(a),r.bsOffcanvas=new bootstrap.Offcanvas(a,{backdrop:!1!==s||"static"}),a}}let a=Object.freeze(new r);class o{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";a.open(t,e,n,s,i,r,o)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;a.setContent(t,e,n)}static setAdditionalClassName(t){a.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;a.close(t)}static exists(){return a.exists()}static getOffCanvas(){return a.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}},9068:(t,e,n)=>{n.d(e,{A:()=>s});class s{constructor(){this._request=null,this._errorHandlingInternal=!1}get(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",t,n);return this._sendRequest(s,null,e)}post(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let i=this._createPreparedRequest("POST",t,s);return this._sendRequest(i,e,n)}delete(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let i=this._createPreparedRequest("DELETE",t,s);return this._sendRequest(i,e,n)}patch(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let i=this._createPreparedRequest("PATCH",t,s);return this._sendRequest(i,e,n)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn(`the request to ${t.responseURL} was aborted`)}),t.addEventListener("error",()=>{console.warn(`the request to ${t.responseURL} failed with status ${t.status}`)}),t.addEventListener("timeout",()=>{console.warn(`the request to ${t.responseURL} timed out`)})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,n){return this._registerOnLoaded(t,n),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,n){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),n&&this._request.setRequestHeader("Content-type",n),this._request}}},5683:(t,e,n)=>{n.d(e,{A:()=>r});let s="loader",i={BEFORE:"before",INNER:"inner"};class r{constructor(t,e=i.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===i.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=r.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),r.getTemplate())}}remove(){if(this.position===i.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===i.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status">
2                    <span class="visually-hidden">Loading...</span>
3                </div>`}static SELECTOR_CLASS(){return s}}}}]);

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.