PageSourceSearch

https://rasch.de/theme/e2a39899ea91df829d56423b5775db01/js/storefr…torefront.offcanvas-filter.plugin.808768.js

js rasch.de collected 2026-09-25 07:15:53 UTC 4,431 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[66167],{6105(t,e,s){s.d(e,{A:()=>r,r:()=>o});var a=s(8308);let n="js-offcanvas-singleton";class i{constructor(){this.$emitter=new a.A}open(t,e,s,a,n,i,o){this._removeExistingOffCanvas();let r=this._createOffCanvas(s,i,o,a);this.setContent(t,n),this._openOffcanvas(r,e)}setContent(t,e){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(`.${n}`)}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"),i.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();e.forEach(s=>{let a=()=>{setTimeout(()=>{s.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),s.removeEventListener("hide.bs.offcanvas",a)};s.addEventListener("hide.bs.offcanvas",a)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0}),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",s=t.querySelector(`[data-id="${e}"]`);s&&!t.hasAttribute("aria-labelledby")&&(s.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){this.getOffCanvas().forEach(t=>{let e=bootstrap.Offcanvas.getInstance(t);e&&"function"==typeof e.dispose&&e.dispose(),t.remove()}),i.bsOffcanvas=null}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":`offcanvas-${t}`}_createOffCanvas(t,e,s,a){let o=document.createElement("div");if(o.classList.add("offcanvas",n),o.classList.add(this._getPositionClass(t)),o.setAttribute("tabindex","-1"),!0===e&&o.classList.add("is-fullwidth"),s){let t=typeof s;if("string"===t)o.classList.add(s);else if(Array.isArray(s))s.forEach(t=>{o.classList.add(t)});else throw Error(`The type "${t}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(o),i.bsOffcanvas=new bootstrap.Offcanvas(o,{backdrop:!1!==a||"static"}),o}}let o=Object.freeze(new i);class r{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",a=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";o.open(t,e,s,a,n,i,r)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;o.setContent(t,e,s)}static setAdditionalClassName(t){o.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;o.close(t)}static exists(){return o.exists()}static getOffCanvas(){return o.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}},6167(t,e,s){s.r(e),s.d(e,{default:()=>i});var a=s(6105),n=s(4335);class i extends n.A{init(){this._registerEventListeners()}_registerEventListeners(){this.el.addEventListener("click",this._onClickOffCanvasFilter.bind(this))}_onCloseOffCanvas(t){let e=t.detail.offCanvasContent[0];document.querySelector('[data-off-canvas-filter-content="true"]').innerHTML=e.innerHTML,document.$emitter.unsubscribe("onCloseOffcanvas",this._onCloseOffCanvas.bind(this)),window.PluginManager.getPluginInstances("Listing")[0].refreshRegistry()}_onClickOffCanvasFilter(t){t.preventDefault();let e=document.querySelector('[data-off-canvas-filter-content="true"]');if(!e)throw Error('There was no DOM element with the data attribute "data-offcanvas-filter-content".');a.A.open(e.innerHTML,()=>{},"bottom",!0,a.A.REMOVE_OFF_CANVAS_DELAY(),!0,"offcanvas-filter"),e.innerHTML="",window.PluginManager.getPluginInstances("Listing")[0].refreshRegistry(),document.$emitter.subscribe("onCloseOffcanvas",this._onCloseOffCanvas.bind(this)),this.$emitter.publish("onClickOffCanvasFilter")}}}}]);

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.