PageSourceSearch

https://kampnagel.de/assets/javascripts/chunks/bf288acddeb403017424.search.js

js kampnagel.de collected 2026-10-01 10:31:36 UTC 14,114 bytes, 2 lines download raw bytes

vendor: 4,231 bytes, line 1
1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[187],{708:(t,e,s)=>{var r=s(4762),i=s(2347),n=Math.floor,a=r("".charAt),o=r("".replace),u=r("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,s,r,c,d){var g=s+t.length,v=r.length,f=l;return void 0!==c&&(c=i(c),f=h),o(d,f,(function(i,o){var h;switch(a(o,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,s);case"'":return u(e,g);case"<":h=c[u(o,1,-1)];break;default:var l=+o;if(0===l)return i;if(l>v){var d=n(l/10);return 0===d?i:d<=v?void 0===r[d-1]?a(o,1):r[d-1]+a(o,1):i}h=r[l-1]}return void 0===h?"":h}))}},1871:(t,e,s)=>{var r=s(9461).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},2428:(t,e,s)=>{var r=s(1807),i=s(2293),n=s(1483),a=s(1278),o=s(8865),u=TypeError;t.exports=function(t,e){var s=t.exec;if(n(s)){var h=r(s,t,e);return null!==h&&i(h),h}if("RegExp"===a(t))return r(o,t,e);throw new u("RegExp#exec called on incompatible receiver")}},3062:(t,e,s)=>{var r=s(3067),i=s(1807),n=s(4762),a=s(3358),o=s(8473),u=s(2293),h=s(1483),l=s(5983),c=s(3005),d=s(8324),g=s(6261),v=s(3312),f=s(4419),p=s(2564),m=s(708),S=s(2428),E=s(1)("replace"),b=Math.max,y=Math.min,w=n([].concat),_=n([].push),A=n("".indexOf),x=n("".slice),k="$0"==="a".replace(/./,"$0"),q=!!/./[E]&&""===/./[E]("a","$0");a("replace",(function(t,e,s){var n=q?"$":"$0";return[function(t,s){var r=v(this),n=l(t)?void 0:p(t,E);return n?i(n,t,r,s):i(e,g(r),t,s)},function(t,i){var a=u(this),o=g(t);if("string"==typeof i&&-1===A(i,n)&&-1===A(i,"$<")){var l=s(e,a,o,i);if(l.done)return l.value}var v=h(i);v||(i=g(i));var p,E=a.global;E&&(p=a.unicode,a.lastIndex=0);for(var k,q=[];null!==(k=S(a,o))&&(_(q,k),E);)""===g(k[0])&&(a.lastIndex=f(o,d(a.lastIndex),p));for(var T,L="",R=0,M=0;M<q.length;M++){for(var C,I=g((k=q[M])[0]),$=b(y(c(k.index),o.length),0),P=[],H=1;H<k.length;H++)_(P,void 0===(T=k[H])?T:String(T));var j=k.groups;if(v){var U=w([I],P,$,o);void 0!==j&&_(U,j),C=g(r(i,void 0,U))}else C=m(I,o,$,P,j,i);$>=R&&(L+=x(o,R,$)+C,R=$+I.length)}return L+x(o,R)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!k||q)},3152:(t,e,s)=>{var r=s(8473);t.exports=function(t,e){var s=[][t];return!!s&&r((function(){s.call(null,e||function(){return 1},1)}))}},3172:(t,e,s)=>{var r=s(2048).PROPER,i=s(8473),n=s(5870);t.exports=function(t){return i((function(){return!!n[t]()||"​…᠎"!=="​…᠎"[t]()||r&&n[t].name!==t}))}},3357:(t,e,s)=>{var r=s(9461).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},3358:(t,e,s)=>{s(5021);var r=s(1807),i=s(7914),n=s(8865),a=s(8473),o=s(1),u=s(9037),h=o("species"),l=RegExp.prototype;t.exports=function(t,e,s,c){var d=o(t),g=!a((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),v=g&&!a((function(){var e=!1,s=/a/;return"split"===t&&((s={}).constructor={},s.constructor[h]=function(){return s},s.flags="",s[d]=/./[d]),s.exec=function(){return e=!0,null},s[d](""),!e}));if(!g||!v||s){var f=/./[d],p=e(d,""[t],(function(t,e,s,i,a){var o=e.exec;return o===n||o===l.exec?g&&!a?{done:!0,value:r(f,e,s,i)}:{done:!0,value:r(t,s,e,i)}:{done:!1}}));i(String.prototype,t,p[0]),i(l,d,p[1])}c&&u(l[d],"sham",!0)}},4419:(t,e,s)=>{var r=s(9105).charAt;t.exports=function(t,e,s){return e+(s?r(t,e).length:1)}},4777:(t,e,s)=>{function r(t,e,s,r,i,n,a){try{var o=t[n](a),u=o.value}catch(t){return void s(t)}o.done?e(u):Promise.resolve(u).then(r,i)}s.d(e,{Q:()=>i}),s(76);var i=function(){var t,e=(t=function*(t){try{if(!t)return Promise.resolve({token:""});var e=yield fetch(t,{method:"POST",headers:{Accept:"application/json"}});return e.ok?e.json():Promise.reject()}catch(t){return null}},function(){var e=this,s=arguments;return new Promise((function(i,n){var a=t.apply(e,s);function o(t){r(a,i,n,o,u,"next",t)}function u(t){r(a,i,n,o,u,"throw",t)}o(void 0)}))});return function(t){return e.apply(this,arguments)}}()},5175:(t,e,s)=>{s.r(e),s.d(e,{default:()=>h}),s(4962),s(6448),s(6054),s(76),s(5021),s(3687),s(3062),s(6968),s(2367),s(9102);var r=s(4777),i=s(2050);function n(t,e,s,r,i,n,a){try{var o=t[n](a),u=o.value}catch(t){return void s(t)}o.done?e(u):Promise.resolve(u).then(r,i)}function a(t){return function(){var e=this,s=arguments;
1return new Promise((function(r,i){var a=t.apply(e,s);function o(t){n(a,r,i,o,u,"next",t)}function u(t){n(a,r,i,o,u,"throw",t)}o(void 0)}))}}var o=["productions","articles","pages","mediathek"],u=t=>String(null==t?"":t).replace(/[&<>"']/g,(t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[t])));const h=class{constructor(t){this.element=t,this.config=JSON.parse(t.dataset.config||"{}"),this.labels=this.config.labels||{},this.minChars=this.config.minChars||3,this.results=t.querySelector(".search__results"),this.input=t.querySelector(".search__input"),this.form=t.querySelector(".search__form"),this.submitButton=t.querySelector(".search__submit"),this.controlsEl=t.querySelector("[data-search-controls]"),this.filtersEl=t.querySelector("[data-search-filters]"),this.sortEl=t.querySelector("[data-search-sort]"),this.moreEl=t.querySelector("[data-search-more]"),this.suggestionsEl=t.querySelector("[data-search-suggestions]"),this.activeType="all",this.sort="relevance",this.offset=0,this.pageSize=50,this.lastResult=null,this.searchReqId=0,this.suggestions=[],this.activeSuggestion=-1,this.suggestReqId=0,this.suggestTimer=null,this.token=null,this.isValidSearch=!1,this.input.addEventListener("input",(()=>this.handleInput())),this.input.addEventListener("keydown",(t=>this.handleKeydown(t))),this.input.addEventListener("blur",(()=>window.setTimeout((()=>this.hideSuggestions()),120))),this.form.addEventListener("submit",(t=>this.handleSubmit(t))),this.sortEl&&this.sortEl.querySelectorAll("[data-sort-mode]").forEach((t=>{t.addEventListener("click",(()=>{var e=t.getAttribute("data-sort-mode")||"relevance";e!==this.sort&&(this.setSort(e),this.runSearch())}))})),this.moreEl&&this.moreEl.addEventListener("click",(()=>{this.offset+=this.pageSize,this.runSearch({append:!0})}))}setSort(t){this.sort="newest"===t?"newest":"relevance",this.sortEl&&this.sortEl.querySelectorAll("[data-sort-mode]").forEach((t=>{var e=t.getAttribute("data-sort-mode")===this.sort;t.classList.toggle("search__sort-option--active",e),t.setAttribute("aria-pressed",e?"true":"false")}))}getToken(t){var e=this;return a((function*(){if(void 0===t&&(t=!1),e.token&&!t)return e.token;var{token:s}=yield(0,r.Q)(e.config.csrfApiUrl);return e.token=s,s}))()}handleInput(){var t=this.input.value.trim();this.isValidSearch=t.length>=this.minChars,this.submitButton.disabled=!this.isValidSearch,this.element.classList.toggle("search--is-active",t.length>=this.minChars),window.clearTimeout(this.suggestTimer),t.length>=this.minChars?(this.showSuggestionsLoading(),this.suggestTimer=window.setTimeout((()=>this.fetchSuggestions(t)),250)):this.hideSuggestions()}handleSubmit(t){t.preventDefault();var e=this.input.value.trim();e.length<this.minChars||(this.activeType="all",this.setSort("relevance"),void 0!==window._paq&&window._paq.push(["trackSiteSearch",e,!1,!1]),this.hideSuggestions(),this.runSearch())}runSearch(t){var e=this;return a((function*(){var{append:s=!1}=void 0===t?{}:t,r=e.input.value.trim();if(!(r.length<e.minChars)){s||(e.offset=0);var n=++e.searchReqId;s?e.moreEl&&(e.moreEl.disabled=!0):(e.element.classList.add("search--is-loading"),e.submitButton.disabled=!0);try{var a=yield e.postSearch(r,e.offset);if(n!==e.searchReqId)return;s?e.appendResults(a.html||""):(e.lastResult=a,e.results.innerHTML=a.html||"",e.renderFilters()),e.updateMoreButton(a.hasMore),(0,i.A)(),e.dispatchModalUpdate()}catch(t){s&&(e.offset=Math.max(0,e.offset-e.pageSize))}finally{n===e.searchReqId&&(s?e.moreEl&&(e.moreEl.disabled=!1):(e.element.classList.remove("search--is-loading"),e.submitButton.disabled=!1))}}}))()}appendResults(t){var e=this.results.querySelector(".teaser-row__teasers"),s=document.createElement("div");s.innerHTML=t;var r=s.querySelector(".teaser-row__teasers");if(e&&r)for(;r.firstElementChild;)e.appendChild(r.firstElementChild);else t&&this.results.insertAdjacentHTML("beforeend",t)}updateMoreButton(t){this.moreEl&&(this.moreEl.hidden=!t)}postSearch(t,e,s){var r=this;return a((function*(){void 0===e&&(e=0),void 0===s&&(s=!0);var i=yield r.getToken(),n=new URLSearchParams({q:t,type:r.activeType,sort:r.sort,offset:e}),a=yield fetch(r.config.apiUrl+"?"+n.toString(),{method:"POST",headers:{"X-CSRF-Token":i}});if(400===a.status&&s)return yield r.getToken(!0),r.postSearch(t,e,!1);if(!a.ok)throw new Error("Search failed: "+a.status);return a.json()}))()}renderFilters(){if(this.filtersEl){var t=this.lastResult;if(!t||!t.total)return this.filtersEl.innerHTML="",void(this.controlsEl&&(this.controlsEl.hidden=!0));var e=t.counts||{},s=[["all",this.labels.all||"Alle",t.total]];o.forEach((t=>{var r=e[t]||0;r>0&&s.push([t,this.labels[t]||t,r])})),this.filtersEl.innerHTML=s.map((t=>{var[e,s,r]=t,i=e===this.activeType;return'<button type="button" role="tab" class="search__filter'+(i?" search__filter--active":"")+'" data-search-filter="'+e+'" aria-selected="'+(i?"true":"false")+'">'+u(s)+" ("+r+")</button>"})).join(""),this.controlsEl&&(this.controlsEl.hidden=!1),this.filtersEl.querySelectorAll("[data-search-filter]").forEach((t=>{t.addEventListener("click",(()=>{var e=t.getAttribute("data-search-filter")||"all";e!==this.activeType&&(this.activeType=e,this.runSearch())}))}))}}fetchSuggestions(t){var e=this;return a((function*(){var s=++e.suggestReqId;
1try{var r=new URLSearchParams({q:t}),i=yield fetch(e.config.suggestUrl+"?"+r.toString(),{method:"GET"});if(!i.ok)return void(s===e.suggestReqId&&e.hideSuggestions());var n=yield i.json();if(s!==e.suggestReqId)return;e.renderSuggestions(n.suggestions||[])}catch(t){s===e.suggestReqId&&e.hideSuggestions()}}))()}showSuggestionsLoading(){this.suggestionsEl&&(this.suggestions=[],this.activeSuggestion=-1,this.suggestionsEl.innerHTML='<li class="search__suggestion search__suggestion--loading" aria-hidden="true">\n      <span class="search__suggestion-stairs">\n        <span></span><span></span><span></span><span></span>\n      </span>\n    </li>',this.suggestionsEl.hidden=!1,this.suggestionsEl.setAttribute("aria-busy","true"),this.input.setAttribute("aria-expanded","true"))}renderSuggestions(t){this.suggestionsEl&&(this.suggestionsEl.removeAttribute("aria-busy"),t.length?(this.suggestions=t,this.activeSuggestion=-1,this.suggestionsEl.innerHTML=t.map(((t,e)=>'<li class="search__suggestion" role="option" id="search-suggestion-'+e+'" data-index="'+e+'" aria-selected="false">\n            <span class="search__suggestion-label">'+u(t.label)+"</span>\n            "+(t.type?'<span class="search__suggestion-type">'+u(t.type)+"</span>":"")+"\n          </li>")).join(""),this.suggestionsEl.hidden=!1,this.input.setAttribute("aria-expanded","true"),this.suggestionsEl.querySelectorAll(".search__suggestion").forEach((t=>{t.addEventListener("mousedown",(e=>{e.preventDefault(),this.chooseSuggestion(parseInt(t.dataset.index,10))}))}))):this.hideSuggestions())}setActiveSuggestion(t){this.activeSuggestion=t,this.suggestionsEl.querySelectorAll(".search__suggestion").forEach(((e,s)=>{var r=s===t;e.classList.toggle("search__suggestion--active",r),e.setAttribute("aria-selected",r?"true":"false")})),t>=0?this.input.setAttribute("aria-activedescendant","search-suggestion-"+t):this.input.removeAttribute("aria-activedescendant")}chooseSuggestion(t){var e=this.suggestions[t];e&&(this.input.value=e.label,this.isValidSearch=e.label.trim().length>=this.minChars,this.element.classList.add("search--is-active"),this.hideSuggestions(),this.activeType="all",this.setSort("relevance"),void 0!==window._paq&&window._paq.push(["trackSiteSearch",e.label,!1,!1]),this.runSearch())}hideSuggestions(){this.suggestionsEl&&(this.suggestionsEl.hidden=!0,this.suggestionsEl.innerHTML="",this.suggestionsEl.removeAttribute("aria-busy"),this.suggestions=[],this.activeSuggestion=-1,this.input.setAttribute("aria-expanded","false"),this.input.removeAttribute("aria-activedescendant"))}handleKeydown(t){if(this.suggestionsEl&&!this.suggestionsEl.hidden&&this.suggestions.length){var e=this.suggestions.length-1;switch(t.key){case"ArrowDown":t.preventDefault(),this.setActiveSuggestion(Math.min(this.activeSuggestion+1,e));break;case"ArrowUp":t.preventDefault(),this.setActiveSuggestion(Math.max(this.activeSuggestion-1,-1));break;case"Enter":this.activeSuggestion>=0&&(t.preventDefault(),this.chooseSuggestion(this.activeSuggestion));break;case"Escape":this.hideSuggestions()}}}dispatchModalUpdate(){var t=new CustomEvent("modal-update-"+this.config.modalId,{bubbles:!0});window.dispatchEvent(t)}}},5637:(t,e,s)=>{var r=s(9461);t.exports=/MSIE|Trident/.test(r)},6060:(t,e,s)=>{var r=s(8761),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+r(e)+" of "+r(t))}},6448:(t,e,s)=>{var r=s(8612),i=s(4762),n=s(8120),a=s(2347),o=s(6960),u=s(6060),h=s(6261),l=s(8473),c=s(7354),d=s(3152),g=s(1871),v=s(5637),f=s(6477),p=s(3357),m=[],S=i(m.sort),E=i(m.push),b=l((function(){m.sort(void 0)})),y=l((function(){m.sort(null)})),w=d("sort"),_=!l((function(){if(f)return f<70;if(!(g&&g>3)){if(v)return!0;if(p)return p<603;var t,e,s,r,i="";for(t=65;t<76;
vendor: 856 bytes, lines 1-2
1t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:s=3;break;case 68:case 71:s=4;break;default:s=2}for(r=0;r<47;r++)m.push({k:e+r,v:s})}for(m.sort((function(t,e){return e.v-t.v})),r=0;r<m.length;r++)e=m[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:b||!y||!w||!_},{sort:function(t){void 0!==t&&n(t);var e=a(this);if(_)return void 0===t?S(e):S(e,t);var s,r,i=[],l=o(e);for(r=0;r<l;r++)r in e&&E(i,e[r]);for(c(i,function(t){return function(e,s){return void 0===s?-1:void 0===e?1:void 0!==t?+t(e,s)||0:h(e)>h(s)?1:-1}}(t)),s=o(i),r=0;r<s;)e[r]=i[r++];for(;r<l;)u(e,r++);return e}})},6968:(t,e,s)=>{var r=s(8612),i=s(4544).trim;r({target:"String",proto:!0,forced:s(3172)("trim")},{trim:function(){return i(this)}})}}]);
2//# sourceMappingURL=bf288acddeb403017424.search.js.map

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.