1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3685],{3685(e,t,s){s.r(t),s.d(t,{default:()=>r});var n=s(4335),i=s(6105),a=s(5683),o=s(9068);class r extends n.A{static #e=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 o.A,this._content=a.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(e=>{e.querySelectorAll(this.options.linkSelector).forEach(e=>{r._resetLoader(e),e.addEventListener("click",t=>{this._getLinkEventHandler(t,e)})}),window.PluginManager.initializePluginsInParentElement(e)}),this._openMenuViaUrlParameter()}_openMenu(e){r._stopEvent(e),i.A.open(this._content,this._registerEvents.bind(this),this.options.position),i.A.setAdditionalClassName(this.options.additionalOffcanvasClass),this.$emitter.publish("openMenu")}_openMenuViaUrlParameter(){let e=new URLSearchParams(window.location.search);if(e.has("offcanvas")&&"menu"===e.get("offcanvas")&&(document.querySelector('[data-off-canvas-menu="true"]')?.click(),window.history.replaceState)){let e=new URL(window.location);e.searchParams.delete("offcanvas"),window.history.replaceState({},document.title,e)}}_getLinkEventHandler(e,t){if(!t){let t=document.querySelector(this.options.initialContentSelector),s=`${this.options.navigationUrl}?navigationId=${window.activeNavigationId}`;return this._fetchMenu(s,s=>(t.querySelector(this.options.menuSelector).innerHTML=s,this._content=t.innerHTML,this._openMenu(e)))}if(r._stopEvent(e),t.classList.contains(this.options.linkLoadingClass))return;r._setLoader(t);let s=t.getAttribute("data-href")||t.getAttribute("href");s&&(this.$emitter.publish("getLinkEventHandler"),this._fetchMenu(s,this._updateContent.bind(this)))}static _setLoader(e){e.classList.add(this.options.linkLoadingClass);let t=e.querySelector(this.options.loadingIconSelector);t&&(t._linkIcon=t.innerHTML,t.innerHTML=a.A.getTemplate())}static _resetLoader(e){e.classList.remove(this.options.linkLoadingClass);let t=e.querySelector(this.options.loadingIconSelector);t&&t._linkIcon&&(t.innerHTML=t._linkIcon)}_updateContent(e){if(this._content=e,i.A.exists()){let t=r._getOffcanvasMenu();t.innerHTML=e;let s=t.querySelector(this.options.currentCategorySelector);window.focusHandler.setFocus(s,{focusVisible:!0}),this._registerEvents()}this.$emitter.publish("updateContent")}_fetchMenu(e,t){return!!e&&(this._cache[e]&&"function"==typeof t?t(this._cache[e]):void(this.$emitter.publish("beforeFetchMenu"),fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(s=>{this._cache[e]=s,"function"==typeof t&&t(s)})))}static _stopEvent(e){e.preventDefault(),e.stopImmediatePropagation()}static _getOffcanvas(){return i.A.getOffCanvas()[0]}static _getOffcanvasMenu(){return r._getOffcanvas().querySelector(this.options.menuSelector)}}},5683(e,t,s){s.d(t,{A:()=>a,c:()=>i});let n="loader",i={BEFORE:"before",AFTER:"after",INNER:"inner"};class a{constructor(e,t=i.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===i.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=a.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),a.getTemplate())}}remove(){if(this.position===i.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${n}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${n}`).length>0}_getPosition(){return this.position===i.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${n}" role="status">
2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return n}}},6105(e,t,s){s.d(t,{A:()=>r,r:()=>o});var n=s(8308);let i="js-offcanvas-singleton";class a{constructor(){this.$emitter=new n.A}open(e,t,s,n,i,a,o){this._removeExistingOffCanvas();let r=this._createOffCanvas(s,a,o,n);this.setContent(e,i),this._openOffcanvas(r,t)}setContent(e,t){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=e,this._registerEvents(t),this._setAriaAttrs())}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(`.${i}`)}close(e){let t=this.getOffCanvas();t.forEach(e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){window.focusHandler.saveFocusState("offcanvas"),a.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();t.forEach(s=>{let n=()=>{setTimeout(()=>{s.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e),s.removeEventListener("hide.bs.offcanvas",n)};s.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0}),document.querySelectorAll(".js-offcanvas-close").forEach(t=>{t.addEventListener("click",this.close.bind(this,e))})}_setAriaAttrs(){let e=this.getOffCanvas()[0],t="off-canvas-headline",s=e.querySelector(`[data-id="${t}"]`);s&&!e.hasAttribute("aria-labelledby")&&(s.setAttribute("id",t),e.setAttribute("aria-labelledby",t))}_removeExistingOffCanvas(){this.getOffCanvas().forEach(e=>{let t=bootstrap.Offcanvas.getInstance(e);t&&"function"==typeof t.dispose&&t.dispose(),e.remove()}),a.bsOffcanvas=null}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,s,n){let o=document.createElement("div");if(o.classList.add("offcanvas",i),o.classList.add(this._getPositionClass(e)),o.setAttribute("tabindex","-1"),!0===t&&o.classList.add("is-fullwidth"),s){let e=typeof s;if("string"===e)o.classList.add(s);else if(Array.isArray(s))s.forEach(e=>{o.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(o),a.bsOffcanvas=new bootstrap.Offcanvas(o,{backdrop:!1!==n||"static"}),o}}let o=Object.freeze(new a);class r{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";o.open(e,t,s,n,i,a,r)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;o.setContent(e,t,s)}static setAdditionalClassName(e){o.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;o.close(e)}static exists(){return o.exists()}static getOffCanvas(){return o.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}},9068(e,t,s){s.d(t,{A:()=>n});class n{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,s);return this._sendRequest(n,null,t)}post(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("POST",e,n);return this._sendRequest(i,t,s)}delete(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(i,t,s)}patch(e,t,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(i,t,s)}
3abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}}}}]);
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.