{"version":3,"file":"site.min.js","sources":["../../site/js/_preloads/functions.js","../../site/js/_preloads/getsVisible.js","../../site/js/_preloads/polyfills.js","../../site/js/siteContext.js","../../site/js/directives/fancybox-mediaslide.js","../../site/js/directives/gotoLink.js","../../site/js/directives/slider.js","../../site/js/directives/sticky-after.js","../../site/js/directives/sticky-bottom.js","../../site/js/services/gaq.js","../../site/js/services/HttpClient.js","../../site/js/services/PageEvents.js","../../site/js/modules/accos-block.js","../../site/js/modules/enquiry-form.js","../../site/js/modules/navbar.js","../../site/js/modules/newsletter.js","../../site/js/modules/scrollto.js","../../site/js/modules/showmore.js","../../site/js/modules/site-expander.js"],"sourcesContent":["\r\n\r\n// Needed for pluton\r\nfunction gotoLink(htmlElement) {\r\n\r\n var destinationUrl = \"\";\r\n var target = \"\";\r\n\r\n if (htmlElement.href) {\r\n destinationUrl = htmlElement.href;\r\n target = htmlElement.getAttribute(\"target\");\r\n }\r\n else {\r\n if (htmlElement.childNodes) {\r\n if (htmlElement.getElementsByTagName(\"a\")) {\r\n destinationUrl = htmlElement.getElementsByTagName(\"a\")[0].href;\r\n target = htmlElement.getElementsByTagName(\"a\")[0].getAttribute(\"target\");\r\n }\r\n }\r\n }\r\n\r\n if (/MSIE (\\d+\\.\\d+);/.test(navigator.userAgent)) {\r\n var referLink = document.createElement('a');\r\n referLink.href = destinationUrl;\r\n referLink.target = target;\r\n document.body.appendChild(referLink);\r\n referLink.click();\r\n } else if (target === \"_blank\") {\r\n window.open(destinationUrl);\r\n }\r\n else {\r\n location.href = destinationUrl;\r\n }\r\n}\r\n\r\n\r\n// ie fix (add class ie{version} to )\r\n(function (document) {\r\n /**\r\n * documentMode is an IE-only property\r\n * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx\r\n */\r\n var msie = parseInt(document.documentMode);\r\n if (msie) {\r\n document.getElementsByTagName(\"html\")[0].className += \" ie\" + msie;\r\n }\r\n})(document);\r\n\r\n\r\n// detect touch devices\r\n(function (window) {\r\n window.isTouchDevice = false;\r\n\r\n // https://codeburst.io/the-only-way-to-detect-touch-with-javascript-7791a3346685\r\n $(window).one(\"touchstart\", function () {\r\n window.isTouchDevice = true;\r\n });\r\n\r\n})(window);\r\n","(function (window) {\r\n \"use strict\";\r\n\r\n window.getsVisible = function (elem) {\r\n var rect = elem.getBoundingClientRect();\r\n\r\n var height = (window.innerHeight || document.documentElement.clientHeight);\r\n var width = (window.innerWidth || document.documentElement.clientWidth);\r\n return (\r\n (\r\n xAxisIsInviewport(rect, width) &&\r\n yAxisIsInviewport(rect, height)\r\n ) || (\r\n isViewInRect(rect, width, height)\r\n )\r\n );\r\n }\r\n function isViewInRect(rect, width, height) {\r\n return (\r\n (\r\n rect.top <= 0 &&\r\n rect.bottom >= height\r\n ) || (\r\n rect.left <= 0 &&\r\n rect.right >= width\r\n )\r\n );\r\n }\r\n function yAxisIsInviewport(rect, height) {\r\n return (\r\n (\r\n rect.top >= 0 &&\r\n rect.top <= height\r\n ) || (\r\n rect.bottom >= 0 &&\r\n rect.bottom <= height\r\n )\r\n );\r\n }\r\n function xAxisIsInviewport(rect, width) {\r\n return (\r\n (\r\n rect.left >= 0 &&\r\n rect.left <= width\r\n ) || (\r\n rect.right >= 0 &&\r\n rect.right <= width\r\n )\r\n );\r\n }\r\n\r\n})(window);\r\n\r\n\r\n// $.fn.isElementInViewport\r\n(function ($) {\r\n $.fn.isElementInViewport = function () {\r\n return window.getsVisible(this[0]);\r\n }\r\n})(jQuery);","\r\n(function () {\r\n var f = function () { };\r\n if (!window.console) {\r\n window.console = {\r\n log: f, info: f, warn: f, debug: f, error: f\r\n };\r\n }\r\n}());\r\n\r\n\r\n// requestAnimationFrame polyfill\r\n(function () {\r\n \"use strict\";\r\n\r\n var lastTime = 0;\r\n var vendors = ['ms', 'moz', 'webkit', 'o'];\r\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\r\n window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame']\r\n || window[vendors[x] + 'CancelRequestAnimationFrame'];\r\n }\r\n\r\n if (!window.requestAnimationFrame)\r\n window.requestAnimationFrame = function (callback, element) {\r\n var currTime = new Date().getTime();\r\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\r\n var id = window.setTimeout(function () { callback(currTime + timeToCall); },\r\n timeToCall);\r\n lastTime = currTime + timeToCall;\r\n return id;\r\n };\r\n\r\n if (!window.cancelAnimationFrame)\r\n window.cancelAnimationFrame = function (id) {\r\n clearTimeout(id);\r\n };\r\n\r\n})();\r\n\r\n\r\n\r\n(function () {\r\n \"use strict\";\r\n\r\n if (!Array.prototype.flat) {\r\n Object.defineProperty(Array.prototype, 'flat', {\r\n configurable: true,\r\n value: function flat() {\r\n var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]);\r\n\r\n return depth ? Array.prototype.reduce.call(this, function (acc, cur) {\r\n if (Array.isArray(cur)) {\r\n acc.push.apply(acc, flat.call(cur, depth - 1));\r\n } else {\r\n acc.push(cur);\r\n }\r\n\r\n return acc;\r\n }, []) : Array.prototype.slice.call(this);\r\n },\r\n writable: true\r\n });\r\n }\r\n\r\n if (!Array.prototype.flatMap) {\r\n Object.defineProperty(Array.prototype, 'flatMap', {\r\n configurable: true,\r\n value: function flatMap(callback) {\r\n return Array.prototype.map.apply(this, arguments).flat();\r\n },\r\n writable: true\r\n });\r\n }\r\n})();\r\n\r\n\r\n// Object.assign(...) polyfill for all versions of IE\r\n(function () {\r\n if (typeof Object.assign !== 'function') {\r\n // Must be writable: true, enumerable: false, configurable: true\r\n Object.defineProperty(Object, \"assign\", {\r\n value: function assign(target, varArgs) { // .length of function is 2\r\n 'use strict';\r\n if (target === null || target === undefined) {\r\n throw new TypeError('Cannot convert undefined or null to object');\r\n }\r\n\r\n var to = Object(target);\r\n\r\n for (var index = 1; index < arguments.length; index++) {\r\n var nextSource = arguments[index];\r\n\r\n if (nextSource !== null && nextSource !== undefined) {\r\n for (var nextKey in nextSource) {\r\n // Avoid bugs when hasOwnProperty is shadowed\r\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\r\n to[nextKey] = nextSource[nextKey];\r\n }\r\n }\r\n }\r\n }\r\n return to;\r\n },\r\n writable: true,\r\n configurable: true\r\n });\r\n }\r\n})();\r\n\r\n\r\n\r\n// Array.prototype.find polyfill for all IE versions\r\n(function () {\r\n \"use strict\";\r\n\r\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\r\n if (!Array.prototype.find) {\r\n Object.defineProperty(Array.prototype, 'find', {\r\n value: function (predicate) {\r\n // 1. Let O be ? ToObject(this value).\r\n if (this == null) {\r\n throw new TypeError('\"this\" is null or not defined');\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\r\n var len = o.length >>> 0;\r\n\r\n // 3. If IsCallable(predicate) is false, throw a TypeError exception.\r\n if (typeof predicate !== 'function') {\r\n throw new TypeError('predicate must be a function');\r\n }\r\n\r\n // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\r\n var thisArg = arguments[1];\r\n\r\n // 5. Let k be 0.\r\n var k = 0;\r\n\r\n // 6. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ! ToString(k).\r\n // b. Let kValue be ? Get(O, Pk).\r\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\r\n // d. If testResult is true, return kValue.\r\n var kValue = o[k];\r\n if (predicate.call(thisArg, kValue, k, o)) {\r\n return kValue;\r\n }\r\n // e. Increase k by 1.\r\n k++;\r\n }\r\n\r\n // 7. Return undefined.\r\n return undefined;\r\n },\r\n configurable: true,\r\n writable: true\r\n });\r\n }\r\n\r\n})();\r\n\r\n\r\n// Array.prototype.includes polyfill\r\n(function () {\r\n \"use strict\";\r\n if (!Array.prototype.includes) {\r\n Array.prototype.includes = function (search) {\r\n return !!~this.indexOf(search);\r\n };\r\n }\r\n})();","// ReSharper disable once InconsistentNaming\r\n(function (window, $) {\r\n \"use strict\";\r\n\r\n function SiteContext() {\r\n // overwritten in _Layout.cshtml\r\n this.language = 'de';\r\n this.environment = 'Live';\r\n this.privacyLink = null;\r\n this.imprintLink = null;\r\n\r\n // bootstrap 4 breakpoints\r\n this.breakpoints = {\r\n de: { min: 0, max: 576 - .2 },\r\n xs: { min: 576, max: 768 - .2 },\r\n sm: { min: 768, max: 992 - .2 },\r\n md: { min: 992, max: 1200 - .2 },\r\n lg: { min: 1200, max: 1400 - .2 },\r\n xl: { min: 1400, max: Infinity }\r\n };\r\n\r\n // a simple services container:\r\n this.services = {};\r\n }\r\n\r\n\r\n SiteContext.prototype.registerService = function (name, factory) {\r\n this.services[name] = factory;\r\n };\r\n\r\n SiteContext.prototype.getService = function (name) {\r\n var factoryName = name;\r\n var instanceName = name + '_Ø';\r\n\r\n var service = this.services[instanceName];\r\n if (!service) {\r\n var factory = this.services[factoryName];\r\n if (!factory) throw new Error(\"No service for '\" + name + \"' registered!\");\r\n this.services[instanceName] = service = factory();\r\n }\r\n\r\n return service;\r\n };\r\n\r\n\r\n SiteContext.prototype.ready = function(cb) {\r\n if (document.readyState !== 'loading') cb();\r\n else document.addEventListener('DOMContentLoaded', cb);\r\n }\r\n\r\n\r\n SiteContext.prototype.mapBylang = function (de, it, en) {\r\n switch (this.language) {\r\n default:\r\n case 'de':\r\n return de;\r\n case 'it':\r\n return it;\r\n case 'en':\r\n return en;\r\n }\r\n };\r\n\r\n\r\n SiteContext.prototype.triggerReflow = function () {\r\n // use 'site' instead of 'this' because $(..).slideUp(site.triggerReflow) binds the element as this 😢\r\n window.site.getService('PageEvents').trigger('html-reflow');\r\n };\r\n\r\n\r\n SiteContext.prototype.debounce = function(func, wait, immediate) {\r\n var timeout;\r\n return function () {\r\n var context = this, args = arguments;\r\n var later = function () {\r\n timeout = null;\r\n if (!immediate) func.apply(context, args);\r\n };\r\n var callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n };\r\n\r\n\r\n SiteContext.prototype.scrollOffset = function () { return (window.innerWidth ? 60 : 120); };\r\n SiteContext.prototype.scrollToHash = function (hash, delay, offset) {\r\n var _ = this;\r\n offset = offset || 0;\r\n delay = delay || 0;\r\n if (hash && hash !== \"#\" && !/&/.test(hash)) {\r\n\r\n // hash campaign tracking\r\n if (/utm_/.test(hash)) {\r\n return false;\r\n }\r\n\r\n var e = $(hash);\r\n if (e.length) {\r\n\r\n setTimeout(function () {\r\n offset = offset + _.scrollOffset();\r\n\r\n $(document).scrollTo(e, 600, { offset: -offset });\r\n }, delay);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n // export instance\r\n var defaults = new SiteContext();\r\n window.site = $.extend(defaults, window.site || {});\r\n\r\n\r\n})(window, jQuery);\r\n\r\n\r\n$(function ($) {\r\n \"use strict\";\r\n\r\n $(document).ready(function () {\r\n site.scrollToHash(window.location.hash.replace(\"/\", \"\"), 500);\r\n\r\n $(document).on(\"click\", \"a[href^='#'], a[href^='\" + window.location.pathname + \"#']\", function (e) {\r\n\r\n if ($(e.currentTarget).attr('css-target')) {\r\n return undefined;\r\n }\r\n\r\n var hash = e.currentTarget.getAttribute('href').replace(/^[^#]*/i, '');\r\n var offset = +e.currentTarget.getAttribute('offset') || 0;\r\n\r\n if (site.scrollToHash(hash, 0, offset)) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n\r\n return undefined;\r\n });\r\n });\r\n});","$(function($) {\r\n \"use strict\";\r\n\r\n $('.mediaslide').each(function() {\r\n var $element = $(this);\r\n\r\n var slides = $element.find('.swiper-slide').length;\r\n if (slides <= 1) {\r\n return;\r\n }\r\n\r\n var update = function(swiper) {\r\n //$element.find('.slider-counter').text((swiper.activeIndex + 1) + '/' + swiper.slides.length);\r\n\r\n //var caption = $(swiper.slides[swiper.activeIndex]).find('figcaption').html();\r\n //$element.find('.mediaslide__caption').html(caption);\r\n };\r\n\r\n var slider = new Swiper($element.find('.swiper-container')[0],\r\n {\r\n slidesPerView: 'auto',\r\n initialSlide: 0,\r\n navigation: {\r\n nextEl: '.slider-next',\r\n prevEl: '.slider-prev',\r\n },\r\n\r\n // cssMode: true,\r\n // swipeHandler: string | HTMLElement\r\n\r\n // for better swipe / click\r\n resistance: true,\r\n resistanceRatio: 0.99,\r\n\r\n pagination: {\r\n el: $element.find('.swiper-pagination')[0],\r\n clickable: true,\r\n dynamicBullets: true,\r\n dynamicMainBullets: 3\r\n },\r\n\r\n on: {\r\n init: function() {\r\n update(this);\r\n $element.find('.lazyloading').removeClass('lazyloading').addClass('lazyload');\r\n },\r\n slideChange: function() {\r\n update(this);\r\n }\r\n }\r\n });\r\n\r\n });\r\n\r\n // makes a distinct list of all images in the fancybox every time it is opened.\r\n var open = $.fancybox.open;\r\n $.fancybox.open = function(items, opts, index) {\r\n var inst = open(items, opts, index);\r\n if (inst) {\r\n var group = [], o = {};\r\n for (var i in inst.group) {\r\n var img = inst.group[i];\r\n if (!o[img.src]) {\r\n o[img.src] = true;\r\n group.push(img);\r\n }\r\n }\r\n\r\n // console.log('update group', inst.group, group);\r\n inst.group = group;\r\n }\r\n return inst;\r\n };\r\n\r\n $('[data-fancybox]').fancybox({\r\n caption: function(inst, item) {\r\n try {\r\n return $(this).parents('figure').find('figcaption').html();\r\n } catch (e) {\r\n console.error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n\r\n var options = {\r\n animationEffect: \"zoom\", // \"fade\"\r\n transitionDuration: 550,\r\n\r\n preventCaptionOverlap: true,\r\n\r\n protect: true, // Disable right-click and use simple image protection for images\r\n\r\n media: {\r\n // ICDAM providers\r\n peer: {\r\n matcher: /https?:\\/\\/(player\\.peer\\.tv)\\/(js)\\/([0-9a-z]+)/i,\r\n type: \"inline\",\r\n url: function(match, params, item) {\r\n var id = match[3];\r\n var url = 'https://player.peer.tv/js/' +\r\n id +\r\n '/?w=liquid-proportional'; // + '&a=1'; <- to auto play\r\n item.opts.smallBtn = false; // hide close btn\r\n return '
';\r\n }\r\n },\r\n feratel: {\r\n matcher: /https?:\\/\\/(webtv\\.feratel\\.com)\\/(webtv)\\/?\\?.*&cam=([0-9]+)/i,\r\n type: \"iframe\",\r\n url: 'https://webtv.feratel.com/webtv/?design=v3&cam=$3'\r\n },\r\n dailymotion: {\r\n matcher: /https?:\\/\\/(?:www\\.)?(dailymotion\\.com)\\/video\\/([^_]+)/i,\r\n type: \"iframe\",\r\n url: 'https://www.dailymotion.com/embed/video/$2?autoplay=1'\r\n },\r\n inetcons: { // obsolete\r\n matcher: /https?:\\/\\/(media\\.inetcons\\.it)\\/(videos)\\/(.+)\\.(de|it|en)\\.([0-9a-z]+)\\.mp4/i,\r\n type: \"iframe\",\r\n url: 'https://media.inetcons.it/video/embed/$5?languageCode=$4&autoplay=true'\r\n },\r\n virtualSuedtirol: {\r\n matcher: /.*virtualsuedtirol\\.com.*/i,\r\n type: 'iframe',\r\n url: '$0'\r\n },\r\n movingPictures: {\r\n matcher: /.*moving-pictures\\.com.*/i,\r\n type: 'iframe',\r\n url: '$0'\r\n }\r\n },\r\n\r\n buttons: [\r\n \"zoom\",\r\n \"share\",\r\n \"slideShow\",\r\n //\"fullScreen\",\r\n //\"download\",\r\n \"thumbs\",\r\n \"close\"\r\n ],\r\n arrows: true,\r\n infobar: true, // window.innerWidth >= site.breakpoints.md.min, // on desktop\r\n thumbs: {autoStart: window.innerWidth >= site.breakpoints.md.min, // on desktop, // Display thumbnails on opening\r\n hideOnClose: true, // Hide thumbnail grid when closing animation starts\r\n parentEl: \".fancybox-container\", // Container is injected into this element\r\n //axis: \"x\" // Vertical (y) or horizontal (x) scrolling\r\n },\r\n lang: site.language,\r\n i18n: {\r\n en: {\r\n CLOSE: \"Close\",\r\n NEXT: \"Next\",\r\n PREV: \"Previous\",\r\n ERROR: \"The requested content cannot be loaded.