1var g=i=>{throw TypeError(i)};var w=(i,t,s)=>t.has(i)||g("Cannot "+s);var e=(i,t,s)=>(w(i,t,"read from private field"),s?s.call(i):t.get(i)),a=(i,t,s)=>t.has(i)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),u=(i,t,s,l)=>(w(i,t,"write to private field"),l?l.call(i,s):t.set(i,s),s);import{t as v}from"./throttle-debounce-BnOnwhtV.js";var d,m,h,c,r,o,n;class B{constructor(t){a(this,d);a(this,m);a(this,h);a(this,c);a(this,r);a(this,o);a(this,n,{searchBoxSelector:".searchbox",inputFieldSelector:"#ke_search_searchfield_sword",closeButtonSelector:".search-close",triggerSelector:".search-toggle",submitButtonSelector:"#ke_search_searchfield_submit",mobileBreakpoint:1024});u(this,n,{...e(this,n),...t}),u(this,d,document.querySelector("html")),u(this,m,document.querySelector(e(this,n).searchBoxSelector)),u(this,h,document.querySelector(e(this,n).inputFieldSelector)),u(this,c,document.querySelector(e(this,n).closeButtonSelector)),u(this,r,document.querySelector(e(this,n).triggerSelector)),u(this,o,document.querySelector(e(this,n).submitButtonSelector)),!(!e(this,m)||!e(this,r)||!e(this,c)||!e(this,o))&&(e(this,r)._on={onClick:s=>{s.preventDefault(),this.show()}},e(this,c)._on={onClick:s=>{s.preventDefault(),this.hide()}},this.handleWindowResize(),window.addEventListener("resize",v(100,this.handleWindowResize.bind(this))),this.initializeAutoComplete())}initializeAutoComplete(){if(typeof autoComplete<"u"){new autoComplete({selector:e(this,h),source:(l,p)=>{l=l.toLowerCase();const y=choices.filter(b=>b.toLowerCase().includes(l));p(y)},minChars:2,onSelect:(l,p,y)=>{const b=e(this,o);if(b){const f=b.shadowRoot;if(f){const S=f.querySelector("button");S&&S.click()}else b.click()}}});const t=new MutationObserver(()=>{const l=document.querySelector(".autocomplete-suggestions");l&&l.style.display==="block"?document.body.classList.add("autocomplete-open"):document.body.classList.remove("autocomplete-open")}),s=document.querySelector(".autocomplete-suggestions");s&&t.observe(s,{attributes:!0,attributeFilter:["style"]}),e(this,o).addEventListener("touchstart",l=>{l.preventDefault(),e(this,o).click()},{passive:!0})}else setTimeout(this.initializeAutoComplete.bind(this),100)}isVisible(){return e(this,m).classList.contains("show")}toggle(){this.isVisible()?this.hide():this.show()}show(){const t=document.querySelector(".main-header");t&&t.classList.contains("is-open")&&(t.classList.remove("is-open"),document.querySelector("html").classList.remove("overlay-open")),e(this,r).style.display="none",e(this,c).style.display="block",e(this,m).classList.add("show"),e(this,d).classList.add("no-scroll"),e(this,h)&&e(this,h).focus()}hide(){e(this,m).classList.remove("show"),e(this,r).style.display="block",e(this,c).style.display="none",e(this,d).classList.remove("no-scroll"),e(this,h)&&e(this,h).blur()}handleWindowResize(){const t=this.isVisible();window.innerWidth>=e(this,n).mobileBreakpoint?(e(this,r).style.display="none",e(this,c).style.display=t?"block":"none",e(this,d).classList.toggle("no-scroll",t),e(this,o).setAttribute("_icons","customiconfont icon-search"),e(this,o).setAttribute("_hide-label","true")):(e(this,r).style.display=t?"none":"block",e(this,c).style.display=t?"block":"none",e(this,d).classList.toggle("no-scroll",t),e(this,o).removeAttribute("_icons"),e(this,o).setAttribute("_label","Suchen"),e(this,o).setAttribute("_hide-label","false"))}}d=new WeakMap,m=new WeakMap,h=new WeakMap,c=new WeakMap,r=new WeakMap,o=new WeakMap,n=new WeakMap;export{B as default};
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.