PageSourceSearch

https://www.hotelcapricorno.wien/files/javascript/schickhotels/ncm-gtm-helper.min.js?v=1791488287

js hotelcapricorno.wien collected 2026-10-08 20:20:53 UTC 2,263 bytes, 1 lines download raw bytes

1class GtmHelper{#debug=!1;#tagManagerId="";#localKey="gtagAccepts";#defaults={ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied"};#initialized=!1;constructor(t,e){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},this.#tagManagerId=t,this.#debug=document.location.host.endsWith(e)||new URLSearchParams(window.location.search).has("debugGtmHelper")}init(t){var e,a,i,s,n;this.#initialized&&t&&this.grant("all"),this.#initialized||(this.#initialized=!0,gtag("consent","default",this.#getSettings(t)),t=window,e=document,a="script",i="dataLayer",s=this.#tagManagerId,n=this.#debug,t[i]=t[i]||[],t[i].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),n||""===s?(console.log("Debug! These are the parameters given to gtm:"),console.log([t,e,a,i,s]),console.log("dataLayer: "),console.log(t[i])):(n=e.getElementsByTagName(a)[0],(t=e.createElement(a)).async=!"",t.src="https://www.googletagmanager.com/gtm.js?id="+s,n.parentNode.insertBefore(t,n)))}#getSettings(e){try{var t=localStorage.getItem(this.#localKey);if(null===t)throw new Error("Localstorage is null!");var a=JSON.parse(t);if("object"!=typeof a||Object.keys(this.#defaults).sort().join(",")!==Object.keys(a).sort().join(","))throw new Error("Localstorage could not be parsed to object!");return a}catch(t){this.#debug&&(console.log("Failed getting Object!"),console.log(t));var i={...this.#defaults};if(e)for(const s in i)i[s]="granted";return localStorage.setItem(this.#localKey,JSON.stringify(i)),{...i}}}#updateConsent(t){gtag("consent","update",t);var e=this.#getSettings();for(const a in t)e[a]=t[a];localStorage.setItem(this.#localKey,JSON.stringify(e)),this.#debug&&console.log(window.dataLayer)}#filterUpdate(t){var e={...this.#getSettings()},a={};for(const i in t)t[i]!==e[i]&&(a[i]=t[i]);return a}#update(e,a){if("granted"===a||"denied"===a){let t={};if("all"===e){for(const e in t={...this.#defaults})t[e]=a;return(t=this.#filterUpdate(t),0===Object.keys(t).length)?void 0:void this.#updateConsent(t)}!1!==Object.keys(this.#defaults).includes(e)&&(t[e]=a,t=this.#filterUpdate(t),0!==Object.keys(t).length)&&this.#updateConsent(t)}}grant(t){this.#update(t,"granted")}deny(t){this.#update(t,"denied")}}

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.