PageSourceSearch

https://www.medisana.de/theme/29dd88a3115312fa1caaeeabf063cd13/js/…izon.zen-offcanvas-top-bar.plugin.7f1521.js

js medisana.de collected 2026-09-24 09:38:48 UTC 6,830 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkzenitPlatformHorizon=self.webpackChunkzenitPlatformHorizon||[]).push([[27816],{6105(t,e,s){s.d(e,{A:()=>l,r:()=>r});var i=s(8308);let n="js-offcanvas-singleton",a=new WeakMap;class o{constructor(){this.$emitter=new i.A}open(t,e,s,i,n,a,o){this._removeExistingOffCanvas();let r=this._createOffCanvas(s,a,o,i);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"),this._disableBackgroundAccessibility(t),window.focusHandler._addFocusTrapGuard(t),o.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();e.forEach(s=>{let i=()=>{setTimeout(()=>
1{this._restoreBackgroundState(),s.remove(),window.focusHandler._removeFocusTrapGuard(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),s.removeEventListener("hide.bs.offcanvas",i)};s.addEventListener("hide.bs.offcanvas",i)}),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))}_disableBackgroundAccessibility(t){let e=[...document.body.children].filter(e=>e!==t).map(t=>({element:t,inert:t.inert,ariaHidden:t.getAttribute("aria-hidden")}));a.set(this,e),e.forEach(t=>{let{element:e}=t;e.inert=!0,e.setAttribute("aria-hidden","true")})}_restoreBackgroundState(){let t=a.get(this);t?.forEach(t=>{let{element:e,inert:s,ariaHidden:i}=t;if(e.inert=s,null===i){e.removeAttribute("aria-hidden");return}e.setAttribute("aria-hidden",i)}),a.delete(this)}_removeExistingOffCanvas(){this.getOffCanvas().forEach(t=>{let e=bootstrap.Offcanvas.getInstance(t);e&&"function"==typeof e.dispose&&e.dispose(),t.remove(),window.focusHandler._removeFocusTrapGuard()}
1),this._restoreBackgroundState(),o.bsOffcanvas=null}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":`offcanvas-${t}`}_createOffCanvas(t,e,s,i){let a=document.createElement("div");if(a.classList.add("offcanvas",n),a.classList.add(this._getPositionClass(t)),a.setAttribute("tabindex","-1"),!0===e&&a.classList.add("is-fullwidth"),s){let t=typeof s;if("string"===t)a.classList.add(s);else if(Array.isArray(s))s.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),o.bsOffcanvas=new bootstrap.Offcanvas(a,{backdrop:!1!==i||"static"}),a}}let r=Object.freeze(new o);class l{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",i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";r.open(t,e,s,i,n,a,o)}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;r.setContent(t,e,s)}static setAdditionalClassName(t){r.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;r.close(t)}static exists(){return r.exists()}static getOffCanvas(){return r.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}},7816(t,e,s){s.r(e),s.d(e,{default:()=>n});var i=s(6105);class n extends window.PluginBaseClass{static #t=this.options={initialContentSelector:".js-top-bar-offcanvas-initial-content",offcanvasPostion:"right",additionalClass:"top-bar-offcanvas",cookieConfigurationSelector:"[data-cookie-permission]"};init(){this._registerEvents()}_registerEvents(){this.el.addEventListener("click",this._onClickOffCanvasTopBar.bind(this))}_onClickOffCanvasTopBar(t){t.preventDefault();let e=document.querySelector(this.options.initialContentSelector);if(e){if(this._content=e.innerHTML,this._content.length>0)try{i.A.open(this._content,()=>{window.PluginManager.initializePlugins(),this._initializeCookieConfiguration()},this.options.offcanvasPostion,!0,i.A.REMOVE_OFF_CANVAS_DELAY(),!1),i.A.setAdditionalClassName(this.options.additionalClass)}catch(t){console.error("Error opening offcanvas:",t)}this.$emitter.publish("onClickOffCanvasTopBar")}}_initializeCookieConfiguration(){let t=this.options,e=document.querySelector(t.cookieConfigurationSelector);e&&(this._cookieConfigurationPlugin=window.PluginManager.getPluginInstanceFromElement(e,"CookieConfiguration")),this._cookieConfigurationPlugin&&this._cookieConfigurationPlugin._registerEvents()}}},8308(t,e,s){s.d(e,{A:()=>i});class i{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),a=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=a;a=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(n[0],a),this.listeners.push({splitEventName:n,opts:s,cb:a}),!0}unsubscribe(t){arguments.length>1&&"function"==typeof arguments[1]&&console.warn(`[NativeEventEmitter] Unsubscribing by passing the subscriber function as a second argument is not supported. By default, all listeners for the event will be removed. Use a suffix (separated by a dot) on the event name when subscribing/unsubscribing to identify/target your specific listener only, e.g. "${t}.MyCustomPlugin"`);let e=t.split(".");return this.listeners=this.listeners.reduce((t,s)=>([...s.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):t.push(s),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}}}}]);

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.