PageSourceSearch

https://www.hamburg-tourism.de/_assets/b4ccaba872ad200c4e382984a31…/offCanvas__content__search.js?1790674645

js hamburg-tourism.de collected 2026-10-01 11:58:50 UTC 6,615 bytes, 1 lines download raw bytes

1!function(){var e={5052:function(e){e.exports={offsetTop:function(e){var t=document.querySelector("body");return e.getBoundingClientRect().top-t.getBoundingClientRect().top},offsetLeft:function(e){var t=document.querySelector("body");return e.getBoundingClientRect().left-t.getBoundingClientRect().left},scrollTo:function(e,t,n){var o=function(){return{x:window.pageXOffset,y:window.pageYOffset}},a=o(),r={x:(e-a.x)/(n/15),y:(t-a.y)/(n/15)},s=setInterval((function(){!function(){var n=o(),a={x:!1,y:!1};return r.x<0?n.x+r.x<=e&&(a.x=!0):n.x+r.x>=e&&(a.x=!0),r.y<0?n.y+r.y<=t&&(a.y=!0):n.y+r.y>=t&&(a.y=!0),!(!a.x||!a.y)}()?window.scrollBy(r.x,r.y):(clearInterval(s),window.scrollTo(e,t))}),15)},scrollElementTo:function(e,t,n,o){var a=function(){return{x:o.scrollLeft,y:o.scrollTop}},r=a(),s=(e-r.x)/(n/15),c=(t-r.y)/(n/15),i=setInterval((function(){!function(){var n=a(),o={x:!1,y:!1};return s<0?n.x+s<=e&&(o.x=!0):n.x+s>=e&&(o.x=!0),c<0?n.y+c<=t&&(o.y=!0):n.y+c>=t&&(o.y=!0),!(!o.x||!o.y)}()?(o.scrollLeft+=s,o.scrollTop+=c):(clearInterval(i),o.scrollLeft=e,o.scrollTop+=t)}),15)},accessDataset:function(e,t){return e.dataset?e.dataset[t]:e.getAttribute("data-"+t)},extendObject:function(e,t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e},documentReady:function(e){let t=!1;"undefined"!=typeof less&&"object"==typeof less.pageLoadFinished&&(t=!0);var n=function(){t?less.pageLoadFinished.then((()=>{setTimeout(e)})):setTimeout(e)},o=function(){document.removeEventListener("DOMContentLoaded",o),window.removeEventListener("load",o),n()};"complete"===document.readyState?n():(document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o))}}}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},window.offCanvasAutoSuggestUI=((e,t)=>{"use strict";const n=e=>t.style.display=e?"block":"none",o=t=>{e.value=t.currentTarget.innerText,n(!1),window.offCanvasSearchUI.search(e.value)},a=e=>{let n=document.createElement("LI"),a=document.createElement("A");a.href="javascript:void(0)",a.innerText=e,a.addEventListener("click",o),n.appendChild(a),t.appendChild(n)};async function r(o){if(4>e.value.length)return void n(!1);const r=await window.offCanvasSearchWorker.suggest(e.value);t.innerHTML="",r.data.suggestions.forEach(a),n(!0)}return{init:()=>{e=document.getElementById("offCanvas__content__search__input__therm"),t=document.getElementById("offCanvas__content__search__autosuggest"),e&&t&&e.addEventListener("input",r)},setVisible:n}})(),document.addEventListener("DOMContentLoaded",window.offCanvasAutoSuggestUI.init),function(){"use strict";var e=n(5052);n.n(e)().documentReady((function(){var e=document.getElementById("offCanvas__content__search__input__therm"),t=document.getElementById("offCanvas__content__search__autosuggest");if(e&&t){var n=function(e){var t=e.parentElement,n=document.createElement("a");n.setAttribute("href","javascript:void(0);");var o=document.createElement("span");return o.className="icon-cross",n.appendChild(o),t.appendChild(n),n}(e);n.addEventListener("click",(function(){e.value=null,t.style.display="none",e.classList.remove("offCanvas__content__search__input__therm--placeholder-hidden")}))}}))}(),window.offCanvasSearchUI=((e,t,n,o,a)=>{"use strict";const r=e=>{e.preventDefault();const t=hhtConfig.fullTextSearchList,n=window.offCanvasSearchWorker.getParamGlue(t);location.href=`${t}${n}q=${a}`},s=e=>{if(0===e)return void(n.style.display="none");n.style.display="block";const t=1===e?"plugin.fullTextSearch.oneResult":"plugin.fullTextSearch.multipleResults";o.innerHTML=hhtConfig.translations[t].replace("%s",e)};async function c(e){a=e;const n=document.getElementById("offCanvas__content__search");n.classList.add("-js-offCanvas__content__search--loading");const o=await window.offCanvasSearchWorker.search(e),r=Number(o.data.totalCount),c=o.data.spellcheck;if(t.innerHTML="",0===r){let d=document.createElement("h4");if(d.innerHTML=`${hhtConfig.translations["plugin.fullTextSearch.noResult"].replace("%s",e)}`,t.append(d),c.length>
10){let l=document.createElement("p");l.innerHTML=`${hhtConfig.translations["plugin.fullTextSearch.spellcheck"]}`,t.append(l);let u=document.getElementById("offCanvas__content__search__input__therm");function f(e,n,o){return i(u,e,t)}c.map(f)}}else t.innerHTML=o.data.html;n.classList.remove("-js-offCanvas__content__search--loading"),s(r)}const i=(e,t,n)=>{var o=document.createElement("a");return o.setAttribute("href","javascript:void(0);"),o.innerHTML=t,o.addEventListener("click",(function(){e.value=t,e.classList.remove("offCanvas__content__search__input__therm--placeholder-hidden"),n.innerHTML="",c(e.value)})),n.querySelector("p").append(o),o},d=t=>{"Enter"===t.key&&(window.offCanvasAutoSuggestUI.setVisible(!1),c(e.value))};return{init:()=>{e=document.getElementById("offCanvas__content__search__input__therm"),t=document.getElementById("offCanvas__content__search__resultList"),n=document.getElementById("offCanvas__content__readmore--hiddenInitially"),e&&t&&n&&(o=n.querySelector(".link-ButtonExtended-cta__content"),e.addEventListener("keyup",d),o.addEventListener("click",r)),window.imxDevice.hasAnimate()&&!document.querySelector("html").classList.contains("webanimations")&&document.querySelector("html").classList.add("webanimations")},search:c}})(),document.addEventListener("DOMContentLoaded",window.offCanvasSearchUI.init),window.offCanvasSearchWorker=((e,t,n)=>{"use strict";const o=e=>(n.open("GET",e),new Promise((e=>{n.onload=()=>e(JSON.parse(n.responseText)||{}),n.send()}))),a=e=>/\?/.test(e)?"&":"?";return{init:()=>{n=new XMLHttpRequest,t=a(e)},search:n=>(window.imxTriggerTracking({tr_search_query:n,event:"tr_search"}),o(`${e}${t}action=search&q=${n}`)),suggest:n=>o(`${e}${t}action=autoSuggest&q=${n}`),getParamGlue:a}})(hhtConfig.fullTextSearchEndpoint),document.addEventListener("DOMContentLoaded",window.offCanvasSearchWorker.init),function(){"use strict";var e,t=n(5052);e=null,n.n(t)().documentReady((function(){(e=document.getElementById("offCanvas__content__search__input__therm"))&&e.addEventListener("input",(function(){e.value.length>=1?e.classList.add("offCanvas__content__search__input__therm--placeholder-hidden"):e.classList.remove("offCanvas__content__search__input__therm--placeholder-hidden")}))}))}()}();

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.