{"version":3,"sources":["sourcemaps:///modelstartpage/webpack/universalModuleDefinition?","sourcemaps:///modelstartpage/webpack/bootstrap?","sourcemaps:///modelstartpage/external \"core-utils\"?0","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_global.js?1","sourcemaps:///modelstartpage/external \"core-application\"?2","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_is-object.js?3","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_descriptors.js?4","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_hide.js?5","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_fails.js?6","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_wks.js?7","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_has.js?8","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_uid.js?9","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_object-dp.js?10","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_redefine.js?11","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_an-object.js?12","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_property-desc.js?13","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_to-primitive.js?14","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_core.js?15","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_defined.js?16","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_shared.js?17","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_fix-re-wks.js?18","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_ie8-dom-define.js?19","sourcemaps:///modelstartpage/./node_modules/core-js/modules/_dom-create.js?20","sourcemaps:///modelstartpage/./components/basis-video/basis-video.js?","sourcemaps:///modelstartpage/./node_modules/stickyfill/index.js?34","sourcemaps:///modelstartpage/./node_modules/core-js/modules/es6.regexp.replace.js?44","sourcemaps:///modelstartpage/./components/basis-gallery/basis-gallery.js?","sourcemaps:///modelstartpage/./components/drawer/drawer.js?","sourcemaps:///modelstartpage/./components/scroll-highlight/scroll-highlight.js?","sourcemaps:///modelstartpage/./components/scroll-technology/scroll-technology.js?","sourcemaps:///modelstartpage/./components/includes/helper/video-performance-helper.js?"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","Math","self","Function","__g","it","a","dP","createDesc","f","exec","e","store","uid","USE_SYMBOL","id","px","random","concat","undefined","toString","anObject","IE8_DOM_DEFINE","toPrimitive","O","P","Attributes","TypeError","hide","has","SRC","$toString","TPL","split","inspectSource","val","safe","isFunction","join","String","this","isObject","bitmap","configurable","writable","S","fn","valueOf","core","version","__e","redefine","fails","defined","wks","KEY","length","SYMBOL","fns","strfn","rxfn","RegExp","string","arg","document","is","createElement","BasisVideo","constructor","super","video","videoContainer","playButton","skipButton","isDisconnected","_initializeModule","_startVideo","_stopVideo","_handleScrollDependentVideo","_handleVideoEnded","connectedCallback","disconnectedCallback","_removeEvents","_initializeElements","_addEvents","_isAutoplayVideo","_videoContainerIsMostlyInViewport","querySelector","addEventListener","removeEventListener","pause","_videoContainerIsVisible","_getPercentageOfVisibleVideoContainerHeight","rect","getBoundingClientRect","pixelVisible","innerHeight","top","bottom","clientHeight","hasAttribute","play","classList","add","error","console","log","muted","currentTime","remove","contains","customElements","doc","win","scroll","checkTimer","watchArray","initialized","html","documentElement","noop","hiddenPropertyName","visibilityChangeEventName","webkitHidden","getComputedStyle","seppuku","prefixes","block","style","position","init","rebuild","stop","kill","parseNumeric","parseFloat","updateScrollPos","pageYOffset","left","pageXOffset","onScroll","recalcAllPos","onWheel","event","setTimeout","recalcElementPos","el","inited","currentMode","limit","start","end","nodeStyle","node","offset","right","width","marginLeft","marginRight","marginTop","box","css","switchElementMode","initElement","isNaN","computed","isCell","clone","refElement","nextSibling","cloneStyle","height","marginBottom","padding","border","borderSpacing","fontSize","cssFloat","parentNode","insertBefore","parent","offsetHeight","docOffsetTop","getDocOffsetTop","deinitElement","deinitParent","removeChild","killClone","targetObj","sourceObject","mergeObjects","initAll","deinitAll","getElementParams","computedStyle","parentComputedStyle","cachedPosition","numeric","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","nodeOffset","getElementOffset","parentOffset","borderTopWidth","borderBottomWidth","clientWidth","display","offsetTop","offsetParent","startFastCheckTimer","setInterval","deltaTop","abs","deltaHeight","fastCheck","stopFastCheckTimer","clearInterval","handlePageVisibilityChange","pop","push","stickies","splice","REPLACE","$replace","searchValue","replaceValue","__","selectorTagVideo","selectorModule","selectorNavigationArea","selectorNavigationArrowForward","selectorNavigationArrowBack","selectorNavigationBar","selectorVideoPlayButton","selectorVideo","selectorVideoStillFrame","selectorButtonOverlay","selectorMediaContainerList","selectorMediaContainerListVideo","selectorMediaContainerListStillFrame","dir","touchStartCoords","x","y","startTime","currentElements","querySelectorAll","oDefaults","forEach","galleryModule","initModule","getAttribute","navigationAreasList","videoList","navigationArea","previousButton","dom","getElement","nextButton","navigationBar","setNavigationHandlers","setSwipeHandlers","setVideoManualPlayHandlers","stopNotActiveVideoSlide","showsArrowsIfNecessary","scrollVideoListener","debounce","handleScrollVideo","onclick","moveNavigationElem","direction","diff","leftElement","elem","directionOffset","currentIndex","nextIndex","getElementPosition","leftPosition","getElemMarginLeft","newPosition","transition","updateNavigationButtons","showArrows","isShowingArrowsNeccessary","navbarScrollWidth","navbarClientWidth","navigationItems","getElementsArray","slice","scrollWidth","elementIndex","liElements","replace","showNextButton","isMoveRightPossible","showPreviousButton","isMoveLeftPossible","firstElem","swipeStart","swipeEvent","changedTouches","pageX","pageY","Date","getTime","swipeMove","preventDefault","swipeEnd","diffTouchCoords","addMultipleListeners","element","swipeEvents","listener","handleVideoPlay","playPromise","catch","playVideo","listPlayButtons","buttonElem","elemId","videoElem","stillFrameElem","buttonOverlay","stopPropagation","onended","onpause","stopNotActiveVideoSlideChangeHandler","listVideos","stillFrame","Array","apply","filter","otherVideo","setAttribute","currentVideo","listMediaItems","videos","activeVideo","videoVisibility","getViewportPercentageCovered","removeEvents","handleDocumentReady","globalEventBus","signal","getEmitter","on","appEvents","PAGE_READY","PAGE_LEAVE","LAYER_LOADED","LAYER_CLOSED","getEventDelegate","_domEventDelegate","promises","dropdowns","initializedModules","drawer","moduleDrawerSelector","isElement","initialize","pageTitle","layerTitle","drawerButtonSelector","buttonTextSelector","headerSelector","bodySelector","contentSelector","initDropdown","moduleId_","dropdown","subscribeToFlyout","data_","onSelectionChanged","async","contentId_","contentDiv","url","templateContent","loadContentTemplateContent","handleDisplayBehaviourAfterContentLoaded","templateContent_","contentDiv_","drawerBody","setTemplateInDom","hideCurrentModelContent","showModelContent","calculateAndSetBodyMaxHeight","currentModelId","selector","modelContent","container_","template_","layerTitleElement","pageTitleElement","innerHTML","emit","dispatchLayerLoadedEvent","customEvent","CustomEvent","dispatchEvent","handleContentWrapper","body","contentDivs","preloadArr","content","fillCache","url_","Promise","resolve","reject","getContent","then","warn","handleButtonClick","context_","closeDrawer","openDrawer","firstContentDiv","header","scrollToPosition","firstModelId","moduleTheme","backgroundColor","btnSelector","scrollListener","resizeListener","err","closeBtn","maxHeight","scrollTo","initColor","onContentScroll","closeButton","startFixingButton","scrollTop","moduleBottomPosition","scrollY","bodyMaxHeight","scrollHeight","context","button","headerBottomPosition","getElementsByTagName","addEvents","initContent","moduleList","getDataAttribute","indexOf","_selectorModule","_moduleData","_eventBus","_isExtraWideScreen","_hiddenTextBlocks","handleTextBlockShow","textBlocks","getHiddenTextBlocks","textBlockShowListener","getVisibleVerticalPercentageInViewport","handleSetupHighlightTexts","onResize","getVideoByModule","posViewPort","getModuleData","setInitialHighlightData","setTextOpacity","setHighlightHeight","setModuleData","getStartPositionDesignHighlights","highlightWrapper","firstHighlight","secondHighlight","closest","minHeight","innerWidth","throttle","setupHighlightTextsListener","isExtraWideScreenListener","animateModuleAlternativeListener","animateModuleListener","off","isExtraWideScreen","pageWrapper","initializeAlternativeVideos","loadVideo","animateModuleAlternative","ajaxLoadVideo","callback","fetch","getBlob","method","blob","objectURL","URL","createObjectURL","message","getModuleIdByElement","getMinimalFramesPerSecond","minFps","getPixelDurationMapping","duration","getCurrentPositionInView","startPos","handleVideoCanPlayThrough","target","animateModule","handleLoadedVideo","videoSrc","src","animateVideo","opacity","calculateHighlightTextsOpacity","pixelMapping","startPosition","round","paused","startVideo","pauseVideo","getVideoSrc","source","screenWidth","initializePerVideoPerformance","fps","initializeVideos","loadVideoForAnimation","addListener","_contentWrapper","_selectorModul","_topOffset","_hiddenTextblocks","anyModule","loadVideos","handleSetAllHighlightHeightListener","removeListener","animateAlternativeListener","minfps","getHiddenTextblocks","getCurrentVideoPositionInView","setInitialModuleData","pixelDuration","setInitialAlternativeModuleData","setInitializeHighlightTexts","isAlternative","animateHightTexts","handleSetAllHighlightHeight","textblocks","autoplay","setupInitialModuleState","handleFollowingModulesFixed","handleFollowingModules","animateAlternative","text1","text2","nextSiblings","getNextSiblings","sibling","transform","paddingBottom","handleXMLHTTPRequest","useVideoAlternative","useVideo","readyState","nextElementSibling","handleTopPosition","navigation","isPerformant","initializeVideo","stickyfill","Stickyfill","stickyElements","getElementsByClassName","_start","_requestId","_performanceVideo","_numberUpdates","_currentTestCount","_frameToggle","getCurrentTestCount","handleVideoPerformanceTest","lastFps","getLastFPS","emitVIdeoPerformance","setTestVideo","addTestVideoEvents","storeLastFPS","localStorage","setItem","parseInt","getItem","appendChild","checkVideoPerformance","emitFps","getAverageFPS","numberUpdates","toggleVideoFrames","requestAnimationFrame","increaseNumberUpdates","handleResult","currentTestCount","cancelAnimationFrame"],"mappings":";;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,cAAeA,QAAQ,qBAC/B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,wB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F,qBAAoB,WA3JvBpH,EAAGgW","file":"bundle.modelstartpage.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"core-utils\"), require(\"core-application\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"bundle.modelstartpage\", [\"core-utils\", \"core-application\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"bundle.modelstartpage\"] = factory(require(\"core-utils\"), require(\"core-application\"));\n\telse\n\t\troot[\"bundle.modelstartpage\"] = factory(root[\"core-utils\"], root[\"core-application\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 75);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","export default class BasisVideo extends HTMLElement {\n\t/**\n\t* constructor\n\t* @returns {void}\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.video = null;\n\t\tthis.videoContainer = null;\n\t\tthis.playButton = null;\n\t\tthis.skipButton = null;\n\t\tthis.isDisconnected = false;\n\n\t\tthis._initializeModule = this._initializeModule.bind(this);\n\t\tthis._startVideo = this._startVideo.bind(this);\n\t\tthis._stopVideo = this._stopVideo.bind(this);\n\t\tthis._handleScrollDependentVideo = this._handleScrollDependentVideo.bind(this);\n\t\tthis._handleVideoEnded = this._handleVideoEnded.bind(this);\n\t}\n\n\t/**\n\t* connectedCallback - callback for adding element to dom/shadow dom\n\t* @returns {void}\n\t*/\n\tconnectedCallback() {\n\t\tthis._initializeModule();\n\t}\n\n\t/**\n\t* @returns {void}\n\t*/\n\tdisconnectedCallback() {\n\t\tthis._removeEvents();\n\t\tthis.isDisconnected = true; // double safety net\n\t}\n\n\t/**\n\t* _initializeModule - inits module, bind events\n\t* @returns {void}\n\t*/\n\t_initializeModule() {\n\t\tthis._initializeElements();\n\n\t\tif (!this.video) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._addEvents();\n\n\t\tif (this._isAutoplayVideo() && this._videoContainerIsMostlyInViewport()) {\n\t\t\tthis._startVideo();\n\t\t}\n\t}\n\n\t_initializeElements() {\n\t\tif (!this.video) {\n\t\t\tthis.video = this.querySelector('video');\n\t\t\tthis.videoContainer = this.querySelector('.nm-basis-video-player');\n\t\t\tthis.playButton = this.querySelector('.nm-basis-video-play-button');\n\t\t\tthis.skipButton = this.querySelector('.nm-basis-video-skip-button');\n\t\t}\n\t}\n\n\t/**\n\t* _bindEvents - event binding\n\t* @returns {void}\n\t*/\n\t_addEvents() {\n\t\t// video events\n\t\tthis.video.addEventListener('ended', this._handleVideoEnded);\n\n\t\t// play via button\n\t\tif (this.playButton) {\n\t\t\tthis.playButton.addEventListener('mousedown', this._startVideo);\n\t\t\tthis.playButton.addEventListener('touchstart', this._startVideo);\n\t\t}\n\n\t\t// skip by button\n\t\tif (this.skipButton) {\n\t\t\tthis.skipButton.addEventListener('mousedown', this._stopVideo);\n\t\t\tthis.skipButton.addEventListener('touchstart', this._stopVideo);\n\t\t}\n\n\t\twindow.addEventListener('scroll', this._handleScrollDependentVideo);\n\t}\n\n\t/**\n\t* _unbindEvents - remove event binding\n\t* @returns {void}\n\t*/\n\t_removeEvents() {\n\t\t// viewport events\n\t\twindow.removeEventListener('scroll', this._handleScrollDependentVideo);\n\n\t\tif (this.video) {\n\t\t\tthis.video.pause();\n\n\t\t\tthis.video.removeEventListener('ended', this._handleVideoEnded);\n\t\t}\n\n\t\t// play via button\n\t\tif (this.playButton) {\n\t\t\tthis.playButton.removeEventListener('mousedown', this._startVideo);\n\t\t\tthis.playButton.removeEventListener('touchstart', this._startVideo);\n\t\t}\n\n\t\t// skip by button\n\t\tif (this.skipButton) {\n\t\t\tthis.skipButton.removeEventListener('mousedown', this._stopVideo);\n\t\t\tthis.skipButton.removeEventListener('touchstart', this._stopVideo);\n\t\t}\n\t}\n\n\t/**\n\t* _videoContainerIsVisible\n\t* @returns {boolean} - is video container visible or not\n\t*/\n\t_videoContainerIsVisible() {\n\t\treturn (this._getPercentageOfVisibleVideoContainerHeight() > 0);\n\t}\n\n\t/**\n\t* _videoContainerInViewport more then 50%\n\t* @returns {boolean} - is video container is in viewport 50% or less\n\t*/\n\t_videoContainerIsMostlyInViewport() {\n\t\treturn (this._getPercentageOfVisibleVideoContainerHeight() >= 50);\n\t}\n\n\t/**\n\t* _getPercentageOfVisibleVideoContainerHeight - calculate how many percent of the height of video container is visible\n\t* @returns {number} - percentage height\n\t*/\n\t_getPercentageOfVisibleVideoContainerHeight() {\n\t\tlet rect = this.videoContainer.getBoundingClientRect(),\n\t\t\tpixelVisible = window.innerHeight - rect.top;\n\t\tif (rect.top < 0) {\n\t\t\tpixelVisible = rect.bottom;\n\t\t}\n\t\tif (pixelVisible <= 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (pixelVisible >= this.videoContainer.clientHeight) {\n\t\t\treturn 100;\n\t\t}\n\t\treturn (pixelVisible / this.videoContainer.clientHeight) * 100;\n\t}\n\n\t/**\n\t * _isAutoplayVideo - verifying whether then video should be played in the autoplaymodus or not\n\t * @returns {boolean} - is autoplay or not\n\t */\n\t_isAutoplayVideo() {\n\t\treturn (this.videoContainer.hasAttribute('data-autoplay'));\n\t}\n\n\t/**\n\t * private function handles the playmode as in autoplay/ playbutton\n\t * @returns {void}\n\t */\n\tasync _startVideo() {\n\t\tif (this.isDisconnected) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.video.removeEventListener('canplaythrough', this._startVideo);\n\n\t\ttry {\n\t\t\tawait this.video.play();\n\t\t\tthis.videoContainer.classList.add('nm-basis-video-playing');\n\t\t}\n\t\tcatch (error) {\n\t\t\tconsole.log('video could not be played because: ', error);\n\t\t\tthis.video.muted = true;\n\t\t\tthis.video.addEventListener('canplaythrough', this._startVideo);\n\t\t}\n\t}\n\n\t/**\n\t * private function handles the skipping of the video\n\t * @returns {void}\n\t */\n\t_stopVideo() {\n\t\tif (this.video) {\n\t\t\tthis.video.pause();\n\t\t\tthis.video.currentTime = 0;\n\t\t\tthis._handleVideoEnded();\n\t\t}\n\t}\n\n\t/**\n\t * private function handling the video ended state\n\t * @returns {void}\n\t */\n\t_handleVideoEnded() {\n\t\tthis.videoContainer.classList.remove('nm-basis-video-playing');\n\t\tif (this._isAutoplayVideo()) {\n\t\t\tthis.videoContainer.classList.add('nm-basis-video-autoplay-played');\n\t\t}\n\t}\n\n\t/**\n\t * private function handling the videostopping and playing depending of position within viewport\n\t * @returns {void}\n\t */\n\t_handleScrollDependentVideo() {\n\t\tif (this._videoContainerIsMostlyInViewport() && this._isAutoplayVideo()) {\n\t\t\tif (!this.videoContainer.classList.contains('nm-basis-video-autoplay-played')) {\n\t\t\t\tthis._startVideo();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.videoContainer.classList.remove('nm-basis-video-autoplay-played');\n\n\t\t\tif (this.videoContainer.classList.contains('nm-basis-video-playing')) {\n\t\t\t\tthis._stopVideo();\n\t\t\t}\n\t\t}\n\t}\n}\n\nif (window.customElements.get('audi-basis-video') === undefined) {\n\twindow.customElements.define('audi-basis-video', BasisVideo);\n}\n","/*!\n * Stickyfill -- `position: sticky` polyfill\n * v. 1.1.1 | https://github.com/wilddeer/stickyfill\n * Copyright Oleg Korsunsky | http://wd.dizaina.net/\n *\n * MIT License\n */\n\nmodule.exports = (function(doc, win) {\n if (!doc) {\n doc = document;\n }\n\n if (!win) {\n win = window;\n }\n \n var watchArray = [],\n scroll,\n initialized = false,\n html = doc.documentElement,\n noop = function() {},\n checkTimer,\n\n //visibility API strings\n hiddenPropertyName = 'hidden',\n visibilityChangeEventName = 'visibilitychange';\n\n //fallback to prefixed names in old webkit browsers\n if (doc.webkitHidden !== undefined) {\n hiddenPropertyName = 'webkitHidden';\n visibilityChangeEventName = 'webkitvisibilitychange';\n }\n\n //test getComputedStyle\n if (!win.getComputedStyle) {\n seppuku();\n }\n\n //test for native support\n var prefixes = ['', '-webkit-', '-moz-', '-ms-'],\n block = document.createElement('div');\n\n for (var i = prefixes.length - 1; i >= 0; i--) {\n try {\n block.style.position = prefixes[i] + 'sticky';\n }\n catch(e) {}\n if (block.style.position != '') {\n seppuku();\n }\n }\n\n updateScrollPos();\n\n //commit seppuku!\n function seppuku() {\n init = add = rebuild = pause = stop = kill = noop;\n }\n\n function mergeObjects(targetObj, sourceObject) {\n for (key in sourceObject) {\n if (sourceObject.hasOwnProperty(key)) {\n targetObj[key] = sourceObject[key];\n }\n }\n }\n\n function parseNumeric(val) {\n return parseFloat(val) || 0;\n }\n\n function updateScrollPos() {\n scroll = {\n top: win.pageYOffset,\n left: win.pageXOffset\n };\n }\n\n function onScroll() {\n if (win.pageXOffset != scroll.left) {\n updateScrollPos();\n rebuild();\n return;\n }\n \n if (win.pageYOffset != scroll.top) {\n updateScrollPos();\n recalcAllPos();\n }\n }\n\n //fixes flickering\n function onWheel(event) {\n setTimeout(function() {\n if (win.pageYOffset != scroll.top) {\n scroll.top = win.pageYOffset;\n recalcAllPos();\n }\n }, 0);\n }\n\n function recalcAllPos() {\n for (var i = watchArray.length - 1; i >= 0; i--) {\n recalcElementPos(watchArray[i]);\n }\n }\n\n function recalcElementPos(el) {\n if (!el.inited) return;\n\n var currentMode = (scroll.top <= el.limit.start? 0: scroll.top >= el.limit.end? 2: 1);\n\n if (el.mode != currentMode) {\n switchElementMode(el, currentMode);\n }\n }\n\n //checks whether stickies start or stop positions have changed\n function fastCheck() {\n for (var i = watchArray.length - 1; i >= 0; i--) {\n if (!watchArray[i].inited) continue;\n\n var deltaTop = Math.abs(getDocOffsetTop(watchArray[i].clone) - watchArray[i].docOffsetTop),\n deltaHeight = Math.abs(watchArray[i].parent.node.offsetHeight - watchArray[i].parent.height);\n\n if (deltaTop >= 2 || deltaHeight >= 2) return false;\n }\n return true;\n }\n\n function initElement(el) {\n if (isNaN(parseFloat(el.computed.top)) || el.isCell) return;\n\n el.inited = true;\n\n if (!el.clone) clone(el);\n if (el.parent.computed.position != 'absolute' &&\n el.parent.computed.position != 'relative') el.parent.node.style.position = 'relative';\n\n recalcElementPos(el);\n\n el.parent.height = el.parent.node.offsetHeight;\n el.docOffsetTop = getDocOffsetTop(el.clone);\n }\n\n function deinitElement(el) {\n var deinitParent = true;\n\n el.clone && killClone(el);\n mergeObjects(el.node.style, el.css);\n\n //check whether element's parent is used by other stickies\n for (var i = watchArray.length - 1; i >= 0; i--) {\n if (watchArray[i].node !== el.node && watchArray[i].parent.node === el.parent.node) {\n deinitParent = false;\n break;\n }\n };\n\n if (deinitParent) el.parent.node.style.position = el.parent.css.position;\n el.mode = -1;\n }\n\n function initAll() {\n for (var i = watchArray.length - 1; i >= 0; i--) {\n initElement(watchArray[i]);\n }\n }\n\n function deinitAll() {\n for (var i = watchArray.length - 1; i >= 0; i--) {\n deinitElement(watchArray[i]);\n }\n }\n\n function switchElementMode(el, mode) {\n var nodeStyle = el.node.style;\n\n switch (mode) {\n case 0:\n nodeStyle.position = 'absolute';\n nodeStyle.left = el.offset.left + 'px';\n nodeStyle.right = el.offset.right + 'px';\n nodeStyle.top = el.offset.top + 'px';\n nodeStyle.bottom = 'auto';\n nodeStyle.width = 'auto';\n nodeStyle.marginLeft = 0;\n nodeStyle.marginRight = 0;\n nodeStyle.marginTop = 0;\n break;\n\n case 1:\n nodeStyle.position = 'fixed';\n nodeStyle.left = el.box.left + 'px';\n nodeStyle.right = el.box.right + 'px';\n nodeStyle.top = el.css.top;\n nodeStyle.bottom = 'auto';\n nodeStyle.width = 'auto';\n nodeStyle.marginLeft = 0;\n nodeStyle.marginRight = 0;\n nodeStyle.marginTop = 0;\n break;\n\n case 2:\n nodeStyle.position = 'absolute';\n nodeStyle.left = el.offset.left + 'px';\n nodeStyle.right = el.offset.right + 'px';\n nodeStyle.top = 'auto';\n nodeStyle.bottom = 0;\n nodeStyle.width = 'auto';\n nodeStyle.marginLeft = 0;\n nodeStyle.marginRight = 0;\n break;\n }\n\n el.mode = mode;\n }\n\n function clone(el) {\n el.clone = document.createElement('div');\n\n var refElement = el.node.nextSibling || el.node,\n cloneStyle = el.clone.style;\n\n cloneStyle.height = el.height + 'px';\n cloneStyle.width = el.width + 'px';\n cloneStyle.marginTop = el.computed.marginTop;\n cloneStyle.marginBottom = el.computed.marginBottom;\n cloneStyle.marginLeft = el.computed.marginLeft;\n cloneStyle.marginRight = el.computed.marginRight;\n cloneStyle.padding = cloneStyle.border = cloneStyle.borderSpacing = 0;\n cloneStyle.fontSize = '1em';\n cloneStyle.position = 'static';\n cloneStyle.cssFloat = el.computed.cssFloat;\n\n el.node.parentNode.insertBefore(el.clone, refElement);\n }\n\n function killClone(el) {\n el.clone.parentNode.removeChild(el.clone);\n el.clone = undefined;\n }\n\n function getElementParams(node) {\n var computedStyle = getComputedStyle(node),\n parentNode = node.parentNode,\n parentComputedStyle = getComputedStyle(parentNode),\n cachedPosition = node.style.position;\n\n node.style.position = 'relative';\n\n var computed = {\n top: computedStyle.top,\n marginTop: computedStyle.marginTop,\n marginBottom: computedStyle.marginBottom,\n marginLeft: computedStyle.marginLeft,\n marginRight: computedStyle.marginRight,\n cssFloat: computedStyle.cssFloat\n },\n numeric = {\n top: parseNumeric(computedStyle.top),\n marginBottom: parseNumeric(computedStyle.marginBottom),\n paddingLeft: parseNumeric(computedStyle.paddingLeft),\n paddingRight: parseNumeric(computedStyle.paddingRight),\n borderLeftWidth: parseNumeric(computedStyle.borderLeftWidth),\n borderRightWidth: parseNumeric(computedStyle.borderRightWidth)\n };\n\n node.style.position = cachedPosition;\n\n var css = {\n position: node.style.position,\n top: node.style.top,\n bottom: node.style.bottom,\n left: node.style.left,\n right: node.style.right,\n width: node.style.width,\n marginTop: node.style.marginTop,\n marginLeft: node.style.marginLeft,\n marginRight: node.style.marginRight\n },\n nodeOffset = getElementOffset(node),\n parentOffset = getElementOffset(parentNode),\n \n parent = {\n node: parentNode,\n css: {\n position: parentNode.style.position\n },\n computed: {\n position: parentComputedStyle.position\n },\n numeric: {\n borderLeftWidth: parseNumeric(parentComputedStyle.borderLeftWidth),\n borderRightWidth: parseNumeric(parentComputedStyle.borderRightWidth),\n borderTopWidth: parseNumeric(parentComputedStyle.borderTopWidth),\n borderBottomWidth: parseNumeric(parentComputedStyle.borderBottomWidth)\n }\n },\n\n el = {\n node: node,\n box: {\n left: nodeOffset.win.left,\n right: html.clientWidth - nodeOffset.win.right\n },\n offset: {\n top: nodeOffset.win.top - parentOffset.win.top - parent.numeric.borderTopWidth,\n left: nodeOffset.win.left - parentOffset.win.left - parent.numeric.borderLeftWidth,\n right: -nodeOffset.win.right + parentOffset.win.right - parent.numeric.borderRightWidth\n },\n css: css,\n isCell: computedStyle.display == 'table-cell',\n computed: computed,\n numeric: numeric,\n width: nodeOffset.win.right - nodeOffset.win.left,\n height: nodeOffset.win.bottom - nodeOffset.win.top,\n mode: -1,\n inited: false,\n parent: parent,\n limit: {\n start: nodeOffset.doc.top - numeric.top,\n end: parentOffset.doc.top + parentNode.offsetHeight - parent.numeric.borderBottomWidth -\n node.offsetHeight - numeric.top - numeric.marginBottom\n }\n };\n\n return el;\n }\n\n function getDocOffsetTop(node) {\n var docOffsetTop = 0;\n\n while (node) {\n docOffsetTop += node.offsetTop;\n node = node.offsetParent;\n }\n\n return docOffsetTop;\n }\n\n function getElementOffset(node) {\n var box = node.getBoundingClientRect();\n\n return {\n doc: {\n top: box.top + win.pageYOffset,\n left: box.left + win.pageXOffset\n },\n win: box\n };\n }\n\n function startFastCheckTimer() {\n checkTimer = setInterval(function() {\n !fastCheck() && rebuild();\n }, 500);\n }\n\n function stopFastCheckTimer() {\n clearInterval(checkTimer);\n }\n\n function handlePageVisibilityChange() {\n if (!initialized) return;\n\n if (document[hiddenPropertyName]) {\n stopFastCheckTimer();\n }\n else {\n startFastCheckTimer();\n }\n }\n\n function init() {\n if (initialized) return;\n\n updateScrollPos();\n initAll();\n\n win.addEventListener('scroll', onScroll);\n win.addEventListener('wheel', onWheel);\n\n //watch for width changes\n win.addEventListener('resize', rebuild);\n win.addEventListener('orientationchange', rebuild);\n\n //watch for page visibility\n doc.addEventListener(visibilityChangeEventName, handlePageVisibilityChange);\n\n startFastCheckTimer();\n\n initialized = true;\n }\n\n function rebuild() {\n if (!initialized) return;\n\n deinitAll();\n \n for (var i = watchArray.length - 1; i >= 0; i--) {\n watchArray[i] = getElementParams(watchArray[i].node);\n }\n \n initAll();\n }\n\n function pause() {\n win.removeEventListener('scroll', onScroll);\n win.removeEventListener('wheel', onWheel);\n win.removeEventListener('resize', rebuild);\n win.removeEventListener('orientationchange', rebuild);\n doc.removeEventListener(visibilityChangeEventName, handlePageVisibilityChange);\n\n stopFastCheckTimer();\n\n initialized = false;\n }\n\n function stop() {\n pause();\n deinitAll(); \n }\n\n function kill() {\n stop();\n\n //empty the array without loosing the references,\n //the most performant method according to http://jsperf.com/empty-javascript-array\n while (watchArray.length) {\n watchArray.pop();\n }\n }\n\n function add(node) {\n //check if Stickyfill is already applied to the node\n for (var i = watchArray.length - 1; i >= 0; i--) {\n if (watchArray[i].node === node) return;\n };\n\n var el = getElementParams(node);\n\n watchArray.push(el);\n\n if (!initialized) {\n init();\n }\n else {\n initElement(el);\n }\n }\n\n function remove(node) {\n for (var i = watchArray.length - 1; i >= 0; i--) {\n if (watchArray[i].node === node) {\n deinitElement(watchArray[i]);\n watchArray.splice(i, 1);\n }\n };\n }\n\n //expose Stickyfill\n return {\n stickies: watchArray,\n add: add,\n remove: remove,\n init: init,\n rebuild: rebuild,\n pause: pause,\n stop: stop,\n kill: kill\n };\n})","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","/**\n *\n * basis-gallery.js is used for FEATURE-GALLERY-FULLWIDTH and MEDIATEXT-COMBINATION-SMALL\n *\n *\n */\nimport { dom } from 'core-utils';\nimport { appEvents, signal } from 'core-application';\n\n/**\n * Object holding all private functions\n */\nvar __ = {};\n/**\n * some selector variables\n */\n__.oDefaults = {\n\tselectorTagVideo: 'video',\n\tselectorModule: '.nm-basis-gallery',\n\tselectorNavigationArea: '.nm-basis-gallery-navigation-area',\n\tselectorNavigationArrowForward: '.nm-basis-gallery-navigation-arrow-forward',\n\tselectorNavigationArrowBack: '.nm-basis-gallery-navigation-arrow-back',\n\tselectorNavigationBar: '.nm-basis-gallery-navigation-bar',\n\tselectorVideoPlayButton: '.nm-basis-gallery-play-button',\n\tselectorVideo: '.nm-basis-gallery-video',\n\tselectorVideoStillFrame: '.nm-basis-gallery-stillframe',\n\tselectorButtonOverlay: '.nm-basis-gallery-player-overlay',\n\tselectorMediaContainerList: '.nm-basis-gallery-slider-container-list',\n\tselectorMediaContainerListVideo: '.nm-basis-gallery-slider-container-list .nm-basis-gallery-video',\n\tselectorMediaContainerListStillFrame: '.nm-basis-gallery-slider-container-list .nm-basis-gallery-stillframe'\n};\n\nvar dir = {\n\tLEFT: 'left',\n\tRIGHT: 'right'\n};\n\nvar touchStartCoords = { x: -1, y: -1 };\n// swipeStart\nvar startTime = 0;\n/**\n * Object holding for all modules the current element\n */\nvar currentElements = {};\n\nvar _domEventDelegate;\nvar scrollListener;\nvar isDisconnected = false;\n\n/**\n * public function initializing the module\n * @returns {undefined}\n */\nfunction init() {\n\tvar galleryModules = document.querySelectorAll(__.oDefaults.selectorModule);\n\n\t[...galleryModules].forEach(function (galleryModule) {\n\t\t__.initModule(galleryModule);\n\t});\n}\n\n/**\n * private function initializes the given module\n * @return nothing\n */\n__.initModule = function (module) {\n\tisDisconnected = false;\n\n\tconst moduleId = module.getAttribute('data-module-id');\n\tconst navigationAreasList = [...module.querySelectorAll('.nm-basis-gallery-navigation-area')];\n\tconst videoList = [...module.querySelectorAll('video')];\n\n\tif (navigationAreasList.length > 0) {\n\t\tfor (var i = 0; i < navigationAreasList.length; i++) {\n\t\t\tcurrentElements[moduleId] = 0;\n\t\t\tvar navigationArea = navigationAreasList[i];\n\t\t\tvar previousButton = dom.getElement(__.oDefaults.selectorNavigationArrowBack, navigationArea);\n\t\t\tvar nextButton = dom.getElement(__.oDefaults.selectorNavigationArrowForward, navigationArea);\n\t\t\tvar navigationBar = dom.getElement(__.oDefaults.selectorNavigationBar, navigationArea);\n\t\t\t__.setNavigationHandlers(previousButton, nextButton, moduleId, navigationArea, navigationBar);\n\t\t\t__.setSwipeHandlers(previousButton, nextButton, navigationArea, navigationBar, moduleId);\n\t\t\t__.setVideoManualPlayHandlers(module);\n\t\t\t__.stopNotActiveVideoSlide(module);\n\t\t\t__.showsArrowsIfNecessary(moduleId, previousButton, nextButton, navigationBar);\n\t\t}\n\t} else {\n\t\tcurrentElements[moduleId] = 0;\n\t\t__.setVideoManualPlayHandlers(module);\n\t}\n\n\t// viewport events\n\tif (videoList && videoList.length > 0) {\n\t\t//set handler for autmatically video playing on scroll\n\t\t__.scrollVideoListener = dom.debounce(function () {__.handleScrollVideo(module, videoList);}, 100);\n\t\twindow.addEventListener('scroll', __.scrollVideoListener);\n\t}\n};\n\n/*\n * Sets the handlers relative to the slider\n */\n__.setNavigationHandlers = function (previousButton, nextButton, moduleId, navigationArea, navigationBar) { // eslint-disable-line max-params\n\tpreviousButton.onclick = function () {\n\t\t__.moveNavigationElem(moduleId, dir.LEFT, previousButton, nextButton, navigationArea, navigationBar);\n\t};\n\tnextButton.onclick = function () {\n\t\t__.moveNavigationElem(moduleId, dir.RIGHT, previousButton, nextButton, navigationArea, navigationBar);\n\t};\n};\n\n/*\n * move the navigation elem in the given direction\n */\n__.moveNavigationElem = function (moduleId, direction, previousButton, nextButton, navigationArea, navigationBar) { // eslint-disable-line max-params\n\tvar elem = dom.getElement(__.oDefaults.selectorNavigationBar, navigationArea);\n\tvar directionOffset = direction === dir.RIGHT ? 1 : -1;\n\tvar currentIndex = currentElements[moduleId];\n\tvar nextIndex = currentIndex + directionOffset;\n\tvar newElementPosition = __.getElementPosition(nextIndex, navigationBar).left;\n\tvar previousArrow = previousButton.getBoundingClientRect().right;\n\tvar diff, leftElement, rightElement, offset;\n\tif (direction === dir.RIGHT) {\n\t\tleftElement = __.getElementPosition(currentIndex, navigationBar);\n\t\trightElement = __.getElementPosition(currentIndex + 1, navigationBar);\n\t\tdiff = rightElement.left - leftElement.left;\n\t\toffset = currentIndex === 0 && nextIndex === 1 ? 48 : 0;\n\t} else {\n\t\tleftElement = __.getElementPosition(currentIndex - 1, navigationBar);\n\t\trightElement = __.getElementPosition(currentIndex, navigationBar);\n\t\tdiff = -(rightElement.left - leftElement.left);\n\t\toffset = currentIndex === 1 && nextIndex === 0 ? -48 : 0;\n\t}\n\tvar leftPosition = __.getElemMarginLeft(elem);\n\t// ensure that the element is not behind the left arrow but next to it.\n\tvar navigationAreaWidth = navigationArea.getBoundingClientRect().width;\n\tvar newPosition = leftPosition - diff + offset;\n\telem.style.marginLeft = newPosition + 'px';\n\telem.style.transition = 'margin-left .5s ease-out 0s';\n\tcurrentElements[moduleId] = nextIndex;\n\t// the move is animated and takes a few milliseconds.\n\t// We ensure that the navigations buttons update is executed the after move action by using a timeout\n\tsetTimeout(function () {\n\t\t__.updateNavigationButtons(navigationBar, previousButton, nextButton);\n\t}, 510);\n};\n\n__.showArrows = function (nextButton) {\n\tnextButton.style.display = 'block';\n};\n\n__.isShowingArrowsNeccessary = function (navigationBar) {\n\tvar navbarScrollWidth, navbarClientWidth, navigationItems;\n\tif (!navigationBar) {\n\t\treturn false;\n\t}\n\n\t// if the navigation contains 0 or 1 item, no arrows should be shown.\n\tnavigationItems = dom.getElementsArray('li', navigationBar);\n\tnavigationItems = [].slice.call(navigationItems);\n\tif (navigationItems.length < 2) {\n\t\treturn false;\n\t}\n\n\tnavbarScrollWidth = navigationBar.scrollWidth;\n\tnavbarClientWidth = navigationBar.clientWidth;\n\n\tif (navbarScrollWidth < navbarClientWidth) {\n\t\treturn false;\n\t}\n\tif (navbarScrollWidth === navbarClientWidth) {\n\t\treturn false;\n\t}\n\tif (navbarScrollWidth > navbarClientWidth) {\n\t\treturn true;\n\t}\n};\n\n/*\n * Checks whether the arrows should be shown (e.g. only two or three navigationtabs with short text, who fit all in one line)\n */\n__.showsArrowsIfNecessary = function (moduleId, previousButton, nextButton, navigationBar) {\n\tif (__.isShowingArrowsNeccessary(navigationBar)) {\n\t\t__.showArrows(nextButton);\n\t}\n};\n\n/**\n * Returns the left position of the navigation being at the given index.\n */\n__.getElementPosition = function (elementIndex, navigationBar) {\n\t//var liElements = document.querySelectorAll('#nm-mediatext-combination-navigation-bar-' + componentId + ' li');\n\tvar liElements = dom.getElementsArray('li', navigationBar);\n\tliElements = [].slice.call(liElements);\n\tvar element = liElements[elementIndex];\n\treturn element.getBoundingClientRect();\n};\n\n/*\n * Returns the margin left of the given elem\n */\n__.getElemMarginLeft = function (elem) {\n\tvar marginLeft = elem.style.marginLeft.replace('px', '');\n\tmarginLeft = marginLeft === '' ? 0 : parseFloat(marginLeft);\n\treturn marginLeft;\n};\n\n/*\n * hide or show the next and previous navigation buttons according to the current position\n * of the navigation elem within its parent\n */\n__.updateNavigationButtons = function (navigationBar, previousButton, nextButton) {\n\tvar showNextButton = __.isMoveRightPossible(navigationBar);\n\tvar showPreviousButton = __.isMoveLeftPossible(navigationBar);\n\tpreviousButton.style.display = showPreviousButton ? 'block' : 'none';\n\tnextButton.style.display = showNextButton ? 'block' : 'none';\n};\n\n/*\n * Checks whether a move to the right is possible (e.g. if we haven't reached the end of the list)\n */\n__.isMoveRightPossible = function (navigationBar) {\n\tvar lastElem = dom.getElement('li:last-child', navigationBar);\n\t/*if the right border of the last elem is bigger than the right border of its parent\n\tit means that we can go further right, so we show the next button */\n\tvar elemRectRight = lastElem.getBoundingClientRect().right;\n\tvar elemParentRectRight = navigationBar.getBoundingClientRect().right;\n\treturn elemRectRight > elemParentRectRight;\n};\n/*\n * Checks whether a move to the left is possible (e.g. if we haven't reached the beginning of the list)\n */\n__.isMoveLeftPossible = function (navigationBar) {\n\t/* if the left border of the first elem is smaller than the left border of its parent\n\tit means that we can go further left, so we show the previous button */\n\tvar firstElem = dom.getElement('li:first-child', navigationBar);\n\tvar elemRectLeft = firstElem.getBoundingClientRect().left;\n\n\t// -\n\t// -\n\t// -\n\t// TODO: needs to be optimized\n\t// -\n\t// -\n\t// -\n\tvar elemParentRectLeft = firstElem.parentNode.parentNode.getBoundingClientRect().left;\n\treturn elemRectLeft < elemParentRectLeft;\n};\n\n/*\n * Sets x and y coordination values and sets startTime when the swipe event starts\n */\n__.swipeStart = function (event) {\n\tvar swipeEvent = event ? event : window.event;\n\tswipeEvent = ('changedTouches' in swipeEvent) ? swipeEvent.changedTouches[0] : swipeEvent;\n\tif (swipeEvent) {\n\t\ttouchStartCoords = {\n\t\t\tx: swipeEvent.pageX,\n\t\t\ty: swipeEvent.pageY\n\t\t};\n\t\tstartTime = new Date().getTime();\n\t}\n};\n/*\n * Prevents standard click-behaviour\n */\n__.swipeMove = function (event) {\n\tvar swipeEvent = event ? event : window.event;\n\tswipeEvent.preventDefault();\n};\n/*\n * Moves the internalElment if the swipe-conditions are fullfilled\n */\n__.swipeEnd = function (event, moduleId, previousButton, nextButton, navigationArea, navigationBar) { // eslint-disable-line max-params\n\tvar diffTouchCoords = {};\n\tvar usedTime = 0;\n\tvar allowedMinDistanceX = 25;\n\tvar allowedMinDistanceY = 25;\n\tvar allowedMaxSwipeTime = 1000;\n\tvar swipeEvent = event ? event : window.event;\n\tswipeEvent = ('changedTouches' in swipeEvent) ? swipeEvent.changedTouches[0] : swipeEvent;\n\t// If there is no swipe event, we will do nothing\n\tif (!swipeEvent) {\n\t\treturn;\n\t}\n\t// Time used/passed since the start of the swipe movement\n\tusedTime = new Date().getTime() - startTime;\n\t// If current event happens a long time after the start event, it is not a swipe so we will do nothing\n\tif (usedTime > allowedMaxSwipeTime) {\n\t\treturn;\n\t}\n\t// Diff from start to end points of the swipe-movement\n\tdiffTouchCoords = {\n\t\tx: swipeEvent.pageX - touchStartCoords.x,\n\t\ty: swipeEvent.pageY - touchStartCoords.y\n\t};\n\t// If the distance of the movement is too small, it is not a swipe so we will do nothing\n\tif (!(Math.abs(diffTouchCoords.x) >= allowedMinDistanceX && Math.abs(diffTouchCoords.y) <= allowedMinDistanceY)) {\n\t\treturn;\n\t}\n\tif (diffTouchCoords.x < 0) {\n\t\t// If the x-movement is smaller than zero it is a movement to the right\n\t\tif (__.isMoveRightPossible(navigationBar)) {\n\t\t\t// the move is executed only if there is some element more on the right\n\t\t\t// if we are at the end of the list, we don't do anything\n\t\t\t__.moveNavigationElem(moduleId, dir.RIGHT, previousButton, nextButton, navigationArea, navigationBar);\n\t\t}\n\t} else {\n\t\t// Else the x-movement is bigger than zero and this means it is a movement to the left\n\t\tif (__.isMoveLeftPossible(navigationBar)) {\n\t\t\t// the move is executed only if there is some element more on the left\n\t\t\t// if we are at the beginning of the list, we don't do anything\n\t\t\t__.moveNavigationElem(moduleId, dir.LEFT, previousButton, nextButton, navigationArea, navigationBar);\n\t\t}\n\t}\n};\n/*\n * Sets the handlers relative to the swipe movements.\n */\n__.setSwipeHandlers = function (previousButton, nextButton, navigationArea, navigationBar, moduleId) { // eslint-disable-line max-params\n\t// swipe handlers are only set if the sliders has more elements than the one shown\n\t// (e.g. it has some arrows to see previous/next elements)\n\tif (__.isShowingArrowsNeccessary(navigationBar)) {\n\t\t/*\n\t\t * Sets to the given element an listener for the given swipeEvents\n\t\t *\n\t\t */\n\t\t__.addMultipleListeners = function (element, swipeEvents, listener) {\n\t\t\tvar i;\n\t\t\tfor (i = 0; i < swipeEvents.length; i++) {\n\t\t\t\telement.addEventListener(swipeEvents[i], listener, false);\n\t\t\t}\n\t\t};\n\t\t__.addMultipleListeners(navigationArea, ['mousedown', 'touchstart'], __.swipeStart);\n\t\t__.addMultipleListeners(navigationArea, ['mousemove', 'touchmove'], __.swipeMove);\n\t\t__.addMultipleListeners(navigationArea, ['mouseup', 'touchend'], function (event) {\n\t\t\t__.swipeEnd(event, moduleId, previousButton, nextButton, navigationArea, navigationBar);\n\t\t});\n\t}\n};\n\n/**\n * Checks if the given video is playable and plays it if it is\n * @param {HTMLElement} video\n * returns {undefined}\n */\n__.handleVideoPlay = function (video) {\n\tif (isDisconnected || !video) {\n\t\treturn;\n\t}\n\n\t/* if (video.readyState >= 3) {\n\t\t__.playVideo(video);\n\t}\n\telse {\n\t\tvideo.addEventListener(\"canplaythrough\", function () {\n\t\t\t__.playVideo(video);\n\t\t});\n\n\t\t// video.load();\n\t} */\n\n\tvar playPromise = video.play();\n\n\tif (!!playPromise) {\n\t\tplayPromise.catch(function () {\n\t\t\tvideo.muted = true; // bypassing the android/ IOS restriction for autoplaying video\n\t\t\tvideo.play();\n\t\t});\n\t}\n};\n\n/**\n * starts the video\n * @param {HTMLElement} video\n * returns {undefined}\n */\n__.playVideo = function (video) {\n\tif (isDisconnected) {\n\t\tvideo.removeEventListener(\"canplaythrough\", function () {\n\t\t\t__.playVideo(video);\n\t\t});\n\t\treturn;\n\t}\n\n\tvar playPromise = video.play();\n\n\tif (!!playPromise) {\n\t\tplayPromise.catch(function () {\n\t\t\tvideo.muted = true; // bypassing the android/ IOS restriction for autoplaying video\n\t\t\tvideo.play();\n\t\t});\n\t}\n};\n\n/* private functions */\n__.setVideoManualPlayHandlers = function (module) {\n\tvar listPlayButtons = dom.getElementsArray(__.oDefaults.selectorVideoPlayButton, module);\n\tlistPlayButtons = [].slice.call(listPlayButtons);\n\tlistPlayButtons.forEach(function (buttonElem) {\n\t\tvar elemId = buttonElem.getAttribute('data-id');\n\t\tvar videoElem = dom.getElement(__.oDefaults.selectorVideo + '-' + elemId, module);\n\t\tvar stillFrameElem = dom.getElement(__.oDefaults.selectorVideoStillFrame + '-' + elemId, module);\n\t\tvar buttonOverlay = dom.getElement(__.oDefaults.selectorButtonOverlay + '-' + elemId, module);\n\t\tbuttonElem.addEventListener('click', function (event) {\n\t\t\t__.handleVideoPlay(videoElem);\n\t\t\tbuttonElem.style.display = 'none';\n\t\t\tif (!!buttonOverlay) {\n\t\t\t\tbuttonOverlay.style.display = 'none';\n\t\t\t}\n\t\t\tif (!!stillFrameElem) {\n\t\t\t\tstillFrameElem.style.display = 'none';\n\t\t\t}\n\t\t\tevent.stopPropagation();\n\t\t});\n\t\tvideoElem.onended = function () {\n\t\t\tbuttonElem.style.display = 'block';\n\t\t\tif (!!buttonOverlay) {\n\t\t\t\tbuttonOverlay.style.display = 'block';\n\t\t\t}\n\t\t\tif (!!stillFrameElem) {\n\t\t\t\tstillFrameElem.style.display = 'block';\n\t\t\t}\n\t\t};\n\t\tvideoElem.onpause = function () {\n\t\t\tbuttonElem.style.display = 'block';\n\t\t\tif (!!buttonOverlay) {\n\t\t\t\tbuttonOverlay.style.display = 'block';\n\t\t\t}\n\t\t};\n\t});\n};\n\n// when clicking on another list media items, be sure to execute the following steps:\n// - stop any video which is currently running\n// - start the current video if it has the autoplay flag\n__.stopNotActiveVideoSlideChangeHandler = function (module, listVideos, elemId) {\n\treturn function () {\n\t\tvar video, stillFrame;\n\t\t// check all other videos and stop them\n\t\tvar otherVideos = Array.apply(null, listVideos).filter(function (el) {\n\t\t\treturn el.getAttribute('data-id') !== elemId;\n\t\t});\n\t\totherVideos.forEach(function (otherVideo) {\n\t\t\totherVideo.pause();\n\t\t\tif (otherVideo.currentTime !== 0) {\n\t\t\t\totherVideo.currentTime = 0;\n\t\t\t}\n\t\t\totherVideo.setAttribute('data-active', false);\n\t\t});\n\t\t// if the current media item is video, and if it has the autoplay flag,\n\t\t// the video should be started now.\n\t\tvar currentVideo = Array.apply(null, listVideos).filter(function (el) {\n\t\t\treturn el.getAttribute('data-id') === elemId;\n\t\t});\n\t\tif (currentVideo && currentVideo.length !== 0) {\n\t\t\tvideo = dom.getElement(__.oDefaults.selectorMediaContainerListVideo + '-' + elemId, module);\n\t\t\tstillFrame = dom.getElement(__.oDefaults.selectorMediaContainerListStillFrame + '-' + elemId, module);\n\t\t\tvideo.setAttribute('data-active', true);\n\t\t\tif (video && video.getAttribute('data-autoplay')) {\n\t\t\t\tif (!!stillFrame) {\n\t\t\t\t\tstillFrame.style.display = 'none';\n\t\t\t\t}\n\t\t\t\t__.handleVideoPlay(video);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!!stillFrame) {\n\t\t\t\t\tstillFrame.style.display = 'block';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\n__.stopNotActiveVideoSlide = function (module) {\n\tvar listMediaItems = dom.getElementsArray(__.oDefaults.selectorMediaContainerList + ' li', module);\n\tvar listVideos = dom.getElementsArray(__.oDefaults.selectorMediaContainerList + ' video', module);\n\tlistVideos = [].slice.call(listVideos);\n\tlistMediaItems = [].slice.call(listMediaItems);\n\tlistMediaItems.forEach(function (elem) {\n\t\tvar elemId = elem.getAttribute('data-id');\n\t\tvar checkbox = dom.getElement('.nm-basis-gallery-input[data-input-id=\"' + elemId + '\"]', module);\n\t\tcheckbox.addEventListener('change', __.stopNotActiveVideoSlideChangeHandler(module, listVideos, elemId));\n\t});\n};\n\n__.handleScrollVideo = function (module, videos) {\n\tvar stillFrame, elemId;\n\t// get the video of the module which is currently active\n\tvar activeVideo = videos.filter(function (video) {\n\t\treturn video.getAttribute('data-active') === \"true\";\n\t})[0];\n\n\tif (!activeVideo) {\n\t\t// there may be no active video. for example, if only pictures are shown.\n\t\t// in this case, we don't need to do anything\n\t\treturn;\n\t}\n\n\tvar videoVisibility = dom.getViewportPercentageCovered(activeVideo);\n\t// var videoVisibility = dom.getVisibleVerticalPercentageInViewport(activeVideo);\n\n\telemId = activeVideo.getAttribute('data-id');\n\tstillFrame = dom.getElement(__.oDefaults.selectorMediaContainerListStillFrame + '-' + elemId, module);\n\n\t// if the video of the module covers less than 50% of the viewport, it should be paused\n\tif (videoVisibility < 50) {\n\t\tactiveVideo.pause();\n\t\t// autoplay videos should be reset to time=0\n\t\tif (activeVideo.getAttribute('data-autoplay')) {\n\t\t\tif (activeVideo.currentTime !== 0) {\n\t\t\t\tactiveVideo.currentTime = 0;\n\t\t\t}\n\t\t}\n\t\tif (!!stillFrame) {\n\t\t\tstillFrame.style.display = 'block';\n\t\t}\n\t\t// if the video of the module covers more than 50% of the viewport, it should be played\n\t} else {\n\t\t// the video is restarted automatically only if it's an autoplay video\n\t\tif (activeVideo.getAttribute('data-autoplay') && activeVideo.currentTime === 0) {\n\t\t\tif (!!stillFrame) {\n\t\t\t\tstillFrame.style.display = 'none';\n\t\t\t}\n\t\t\t__.handleVideoPlay(activeVideo);\n\t\t}\n\t}\n};\n\n__.removeEvents = function() {\n\twindow.removeEventListener('scroll', __.scrollVideoListener);\n\n\tisDisconnected = true;\n}\n\ndom.handleDocumentReady(function () {\n\tvar globalEventBus = signal.getEmitter();\n\tglobalEventBus.on(appEvents.PAGE_READY, init);\n\tglobalEventBus.on(appEvents.PAGE_LEAVE, __.removeEvents);\n\tglobalEventBus.on(appEvents.LAYER_LOADED, init);\n\tglobalEventBus.on(appEvents.LAYER_CLOSED, __.removeEvents);\n\t_domEventDelegate = dom.getEventDelegate('body');\n\tinit();\n});\n\nexport { __, init }; // unit-test relevant\n","import { dom } from 'core-utils';\nimport { appEvents, signal, content } from 'core-application';\n/**\n * Object holding all private functions\n */\n\n/**\n * for each module we save a reference to its dropdown and promise\n * this is necessary because on drawer module can have a dropdown which includes several layers/content\n */\nvar __ = {\n\tpromises: {},\n\tdropdowns: {},\n\tmodules: {},\n\tinitializedModules: []\n};\n__.oDefaults = {\n\tpageTitle: '#nm-page-title',\n\tlayerTitle: '.nm-layer-title',\n\tmoduleDrawerSelector: '.nm-module-drawer',\n\tdrawerButtonSelector: '.nm-drawer-button',\n\tbuttonTextSelector: '.nm-drawer-text',\n\theaderSelector: '.nm-drawer-header',\n\tbodySelector: '.nm-drawer-body',\n\tcontentSelector: '.nm-drawer-content'\n};\n\n/** global variable, so we dont have to create a new instance each time we use the eventDelegate\n* this variable is initalized in the function __.initialize()\n*/\nvar _domEventDelegate;\n\n/**\n * private function initDropdown\n * @param {string} moduleId_ - the module id\n * @returns {undefined}\n */\n__.initDropdown = function(moduleId_) {\n\tconst dropdown = document.querySelector('#nm-drawer-' + moduleId_ + '-dropdown');\n\n\tfunction drowpdownCallbackFunction(data_) {\n\t\t__.onSelectionChanged(moduleId_, data_.id);\n\t}\n\n\tif (dropdown) {\n\t\tdropdown.subscribeToFlyout(drowpdownCallbackFunction);\n\t}\n};\n\n/**\n * private function onSelectionChanged\n * @param {string} moduleId_ - the module id\n * @param {string} contentId_ - ID of the selected Content\n * @returns {undefined}\n */\n__.onSelectionChanged = async function (moduleId_, contentId_) {\n\tconst contentDiv = document.querySelector(__.oDefaults.contentSelector + '[data-content-id=\"' + contentId_ + '\"]');\n\tconst url = contentDiv.getAttribute(\"data-content-url\");\n\n\ttry {\n\t\tconst templateContent = await __.loadContentTemplateContent(url);\n\t\t__.handleDisplayBehaviourAfterContentLoaded(templateContent, contentDiv, moduleId_, contentId_);\n\t}\n\tcatch(error) {\n\t\tconsole.log('Template could not be loaded', error);\n\t}\n};\n\n__.handleDisplayBehaviourAfterContentLoaded = function (templateContent_, contentDiv_, moduleId_, contentId_) {\n\tconst drawerBody = document.querySelector(__.oDefaults.moduleDrawerSelector + \"[data-module-id='\" + moduleId_ + \"'] \" + __.oDefaults.bodySelector);\n\n\t__.setTemplateInDom(contentDiv_, templateContent_);\n\t__.hideCurrentModelContent(moduleId_);\n\t__.showModelContent(contentId_);\n\t__.calculateAndSetBodyMaxHeight(drawerBody);\n\t__.dropdowns[moduleId_].currentModelId = contentId_;\n}\n/**\n * private function showModelContent\n * @param {string} contentId_ - Id of the selected Content\n * @returns {undefined}\n */\n__.showModelContent = function (contentId_) {\n\t__.hideCurrentModelContent(); // hide any previously selected items\n\tconst selector = __.oDefaults.contentSelector + \"[data-content-id='\" + contentId_ + \"']\";\n\tconst modelContent = document.querySelector(selector);\n\tmodelContent.classList.add(\"nm-drawer-content--is-visible\");\n};\n\n/**\n * private function hideCurrentModelContent\n * @param {string} moduleId_ - the module id\n * @returns {undefined}\n */\n__.hideCurrentModelContent = function (moduleId_ = undefined) {\n\tlet selector;\n\n\tif (moduleId_) {\n\t\tselector = __.oDefaults.contentSelector + \"[data-content-id='\" + __.dropdowns[moduleId_].currentModelId + \"']\";\n\t}\n\telse {\n\t\tselector = __.oDefaults.contentSelector + \".nm-drawer-content--is-visible\";\n\t}\n\n\tconst modelContent = document.querySelector(selector);\n\n\tif (modelContent) {\n\t\tmodelContent.classList.remove(\"nm-drawer-content--is-visible\");\n\t}\n};\n/**************/\n/*DROPDOWN END*/\n/**************/\n\n__.setTemplateInDom = function (container_, template_) {\n\tvar layerTitleElement;\n\tvar globalEventBus = signal.getEmitter();\n\n\t// search for current page title to set it into the layer title\n\tvar pageTitleElement = dom.getElement(__.oDefaults.pageTitle);\n\tvar pageTitle = !!pageTitleElement ? pageTitleElement.innerHTML : undefined;\n\n\tcontainer_.innerHTML = template_;\n\n\t// if there is a page title use it for the layer title\n\tif (pageTitle) {\n\t\t// search for the layer title element to change its value\n\t\tlayerTitleElement = dom.getElement(__.oDefaults.layerTitle, container_);\n\n\t\tif (!!layerTitleElement) {\n\t\t\tlayerTitleElement.innerHTML = pageTitle;\n\t\t}\n\t}\n\n\tglobalEventBus.emit(appEvents.LAYER_LOADED, { element: container_ });\n\t__.dispatchLayerLoadedEvent();\n};\n\n__.dispatchLayerLoadedEvent = function(){\n\ttry {\n\t\tlet customEvent = new CustomEvent('LAYER_LOADED');\n\n\t\tdocument.dispatchEvent(customEvent);\n\t}\n\tcatch (e) {\n\t\tconsole.error('dispatchLayerLoadedEvent: ', 'the custom-event for LAYER_LOADED could not be dispatched', e);\n\t}\n};\n\n__.handleContentWrapper = function () {\n\treturn function (body) {\n\t\tvar contentDivs = dom.getElementsArray(__.oDefaults.contentSelector, body);\n\t\tvar preloadArr = [];\n\t\tcontentDivs.forEach(function (contentDiv) {\n\t\t\tvar url = contentDiv.getAttribute(\"data-content-url\");\n\t\t\tpreloadArr.push(url);\n\t\t});\n\t\tcontent.fillCache(preloadArr);\n\t};\n};\n\n__.loadContentTemplateContent = function (url_) {\n\treturn new Promise(function (resolve, reject) {\n\t\tcontent.getContent(url_, false).then(function (content) {\n\t\t\tresolve(content);\n\t\t}).catch(function (error) {\n\t\t\tconsole.warn(\"content url content: \", url_, error);\n\t\t\treject(error);\n\t\t});\n\t});\n};\n\n__.handleButtonClick = function (context_) {\n\tvar isDrawerOpen = context_.classList.contains('nm-open');\n\tif (isDrawerOpen) {\n\t\tcontext_.classList.remove('nm-open');\n\t\t__.closeDrawer(context_);\n\t} else {\n\t\tcontext_.classList.add('nm-open');\n\t\t__.openDrawer(context_);\n\t}\n};\n\n__.openDrawer = async function (context_) {\n\tvar firstContentDiv, body, header, scrollToPosition, moduleId, url;\n\tscrollToPosition = window.pageYOffset;\n\n\tmoduleId = context_.getAttribute('data-module-id');\n\t__.modules[moduleId].scrollToPosition = scrollToPosition;\n\n\t//get the matching module to the clicked Button\n\tbody = dom.getElement(__.oDefaults.bodySelector, context_);\n\theader = dom.getElement(__.oDefaults.headerSelector, context_);\n\tfirstContentDiv = dom.getElement(__.oDefaults.contentSelector, body);\n\n\turl = firstContentDiv.getAttribute(\"data-content-url\");\n\n\ttry {\n\t\tconst templateContent = await __.loadContentTemplateContent(url);\n\t\t__.setTemplateInDom(firstContentDiv, templateContent);\n\t\t__.calculateAndSetBodyMaxHeight(body);\n\n\t\t// get the first model-id and set it as current modelid for the given module\n\t\tvar firstModelId = firstContentDiv.getAttribute(\"data-content-id\");\n\t\t__.dropdowns[moduleId].currentModelId = firstModelId;\n\n\t\tvar moduleTheme = context_.getAttribute('data-theme');\n\t\tbody.style.backgroundColor = moduleTheme === 'light' ? '#b3b3b3' : '#4c4c4c';\n\n\t\t// scroll listener should be set only when the module is opened to avoid unnecessary calls\n\t\tvar btnSelector = __.oDefaults.moduleDrawerSelector + \"[data-module-id='\" + moduleId + \"'] \" + __.oDefaults.drawerButtonSelector;\n\t\tvar scrollListener = __.scrollListener(context_, body, header, btnSelector);\n\t\t__.modules[moduleId].scrollListener = scrollListener; // save listener reference for the remove listener call\n\t\twindow.addEventListener(\"scroll\", scrollListener);\n\n\t\t// resize listener should be set only when the module is opened to avoid unnecessary calls\n\t\tvar resizeListener = dom.debounce(__.resizeListener(context_, body), 200);\n\t\t__.modules[moduleId].resizeListener = resizeListener; // save listener reference for the remove listener call\n\t\twindow.addEventListener(\"resize\", resizeListener);\n\t}\n\tcatch (err) {\n\t\tconsole.warn(\"drawer open err: \" + err);\n\t}\n};\n\n__.closeDrawer = function (context_) {\n\tvar moduleId = context_.getAttribute('data-module-id');\n\tvar closeBtn = dom.getElement(__.oDefaults.drawerButtonSelector, context_);\n\tvar body = dom.getElement(__.oDefaults.bodySelector, context_);\n\n\t// content is not shown any more\n\tbody.style.maxHeight = 0;\n\n\twindow.scrollTo(0, __.modules[moduleId].scrollToPosition);\n\tcloseBtn.classList.remove('nm-fixed-button');\n\n\t// remove listeners added when opening the module\n\twindow.removeEventListener(\"scroll\", __.modules[moduleId].scrollListener);\n\twindow.removeEventListener(\"resize\", __.modules[moduleId].resizeListener);\n\n\t// timeout is needed to execute the code after animation has been done\n\tsetTimeout(function () {\n\t\tvar initColor = context_.getAttribute('data-init-color');\n\t\tcontext_.style.backgroundColor = initColor;\n\t}, 500);\n};\n\n__.onContentScroll = function (closeButton, startFixingButton, module) {\n\tvar scrollTop, moduleBottomPosition;\n\tif (module.classList.contains('nm-open')) {\n\t\tscrollTop = document.body.scrollTop || window.pageYOffset || window.scrollY;\n\t\t// position of the module bottom in the viewport\n\t\tmoduleBottomPosition = module.getBoundingClientRect().bottom;\n\n\t\tif (scrollTop > startFixingButton && moduleBottomPosition > 140) {\n\t\t\tcloseButton.classList.add('nm-fixed-button');\n\t\t\tcloseButton.classList.remove('nm-absolute-button');\n\t\t} else {\n\t\t\tcloseButton.classList.add('nm-absolute-button');\n\t\t\tcloseButton.classList.remove('nm-fixed-button');\n\t\t}\n\t}\n};\n\n__.calculateAndSetBodyMaxHeight = function (body) {\n\tvar heightBuffer = 1500;\n\tvar bodyMaxHeight = body.scrollHeight + heightBuffer;\n\n\tbody.style.maxHeight = bodyMaxHeight + 'px';\n};\n\n__.scrollListener = function (context, body, header, btnSelector) {\n\tvar button = dom.getElement(btnSelector);\n\treturn function () {\n\t\tvar headerBottomPosition = header.getBoundingClientRect().top;\n\t\tvar topPage = document.getElementsByTagName('body')[0].getBoundingClientRect().top;\n\t\theaderBottomPosition = -1 * (topPage - headerBottomPosition);\n\t\t__.onContentScroll(button, headerBottomPosition, context);\n\t};\n};\n\n__.resizeListener = function (module, body) {\n\treturn function () {\n\t\tif (module.classList.contains('nm-open')) {\n\t\t\t__.calculateAndSetBodyMaxHeight(body);\n\t\t}\n\t};\n};\n\n/*\n * private function adding events-handlers\n */\n__.addEvents = function (context) {\n\t//handle open clicks\n\tvar moduleId = context.getAttribute('data-module-id');\n\tvar btnSelector = __.oDefaults.moduleDrawerSelector + \"[data-module-id='\" + moduleId + \"'] \" + __.oDefaults.drawerButtonSelector;\n\t_domEventDelegate.on(\"click\", btnSelector, function () { __.handleButtonClick(context); });\n};\n\n__.initContent = function (module) {\n\tvar bodys = dom.getElementsArray(__.oDefaults.bodySelector, module);\n\tbodys.forEach(__.handleContentWrapper());\n};\n\n/*\n * public initialize method for all existing module instances\n * @returns\n */\n__.initialize = function () {\n\tvar i, module, moduleId;\n\tvar moduleList = document.querySelectorAll(__.oDefaults.moduleDrawerSelector);\n\n\tfor (i = 0; i < moduleList.length; i++) {\n\t\tmodule = moduleList[i];\n\n\t\tif (module) {\n\t\t\tmoduleId = dom.getDataAttribute(module, 'data-module-id');\n\n\t\t\t// if module has already been initialized than don't initialize it a second time\n\t\t\t// to avoid event-handlers to be set multiple times.\n\t\t\tif (__.initializedModules.indexOf(moduleId) === -1) {\n\t\t\t\t__.dropdowns[moduleId] = {};\n\n\t\t\t\t__.initDropdown(moduleId);\n\n\t\t\t\t// marks the module as initialized\n\t\t\t\t__.initializedModules.push(moduleId);\n\t\t\t\t__.modules[moduleId] = {};\n\t\t\t}\n\t\t\t__.addEvents(module);\n\n\t\t\t// initContent needs to wait for APP_INITIALIZED to be able to load the data\n\t\t\t// thats why it may be called multiple times.\n\t\t\t__.initContent(module);\n\t\t}\n\t}\n};\n\n/*\n * private init method\n * @returns {void}\n */\nfunction init() {\n\tvar drawer = dom.getElement(__.oDefaults.moduleDrawerSelector);\n\tif (dom.isElement(drawer)) {\n\t\t__.initialize();\n\t}\n}\n\ndom.handleDocumentReady(function () {\n\t_domEventDelegate = dom.getEventDelegate('body');\n\tvar globalEventBus = signal.getEmitter();\n\n\tglobalEventBus.on(appEvents.PAGE_READY, init);\n\tinit();\n});\n\nexport {\n\t__, init\n};\n","import {dom, fetch} from 'core-utils';\nimport {appEvents, signal} from 'core-application';\n\n/**\n * Object holding all private functions\n */\nlet __ = {};\n\n/**\n * some selector variables\n */\nconst _selectorModule = '.nm-module-scroll-highlight',\n\t_selectorVideo = '.nm-scroll-highlight-video-player',\n\t_selectorHighlightText1 = '.nm-scroll-highlight-highlighttext-one',\n\t_selectorHighlightText2 = '.nm-scroll-highlight-highlighttext-two',\n\t_selectorTextBlockHidden = '.nm-scroll-highlight-textblock.nm-scroll-highlight-hidden',\n\t_selectorPageWrapper = '.nm-wrapper',\n\t_selectorHighlightTextWrapper = '.nm-scroll-highlight-textoverlay-wrapper';\n\n/**\n * some module variables\n */\nlet _moduleData,\n\t_eventBus,\n\t_isExtraWideScreen,\n\t_hiddenTextBlocks = null;\n\n/**\n * public initialize method\n */\nfunction init() {\n\tconst modules = dom.getElementsArray(_selectorModule);\n\n\tif (dom.isElement(modules[0])) {\n\t\t__.handleTextBlockShow();\n\t\t__.handleSetupHighlightTexts(false);\n\t\t__.addEvents();\n\n\t\tif (__.isExtraWideScreen()) { // alternative wide-screen\n\t\t\t__.initializeAlternativeVideos(modules);\n\t\t} else {\n\t\t\t_eventBus.addListener('video_performance', __.initializePerVideoPerformance);\n\t\t}\n\t}\n}\n\n/**\n * private function handling the visibility of the textblocks\n */\n__.handleTextBlockShow = function() {\n\tconst textBlocks = __.getHiddenTextBlocks();\n\n\tif (textBlocks.length < 1) {\n\t\twindow.removeEventListener(\"scroll\", __.textBlockShowListener);\n\t} else {\n\t\tfor(const key in textBlocks) {\n\t\t\tif (!textBlocks.hasOwnProperty(key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (dom.getVisibleVerticalPercentageInViewport(textBlocks[key]) >= 25) {\n\t\t\t\ttextBlocks[key].classList.remove(\"nm-scroll-highlight-hidden\");\n\t\t\t}\n\t\t}\n\t\t_hiddenTextBlocks = dom.getElementsArray(_selectorTextBlockHidden);\n\t}\n};\n\n/**\n * private function get all number elements still hidden\n * @returns {Array} - hidden textblocks\n */\n__.getHiddenTextBlocks = function() {\n\tif (!_hiddenTextBlocks) {\n\t\t_hiddenTextBlocks = dom.getElementsArray(_selectorTextBlockHidden);\n\t}\n\treturn _hiddenTextBlocks;\n};\n\n/**\n * private function setting the highlight texts up\n * @param {Boolean} onResize - whether the function was called while resize or not\n */\n__.handleSetupHighlightTexts = function(onResize) {\n\tconst modules = dom.getElementsArray(_selectorModule);\n\n\tfor(const key in modules) {\n\t\tif(modules.hasOwnProperty(key)){\n\t\t\tconst module = modules[key];\n\t\t\tconst moduleId = module.getAttribute('id');\n\n\t\t\tif (!onResize) {\n\t\t\t\tconst video = __.getVideoByModule(module);\n\t\t\t\tconst posViewPort = __.getModuleData(moduleId, 'startPosition') - video.getBoundingClientRect().top;\n\n\t\t\t\t__.setInitialHighlightData(module, moduleId, video);\n\t\t\t\t__.setTextOpacity(moduleId, posViewPort);\n\t\t\t}\n\n\t\t\t__.setHighlightHeight(moduleId);\n\t\t}\n\t}\n};\n\n/**\n * private function get the video of the module\n * @param {Element} module - the module\n * @returns {Element} video\n */\n__.getVideoByModule = function(module) {\n\treturn dom.getElement(_selectorVideo, module);\n};\n\n/**\n * private function set the initial Data for the highlight texts\n * @param {Element} module - the module of the video\n * @param {string} moduleId - the id of the module\n * @param {Element} video - the video\n */\n__.setInitialHighlightData = function(module, moduleId, video) {\n\t__.setModuleData(moduleId, 'startPosition', __.getStartPositionDesignHighlights(video));\n\t__.setModuleData(moduleId, 'text1', dom.getElement(_selectorHighlightText1, module));\n\t__.setModuleData(moduleId, 'text2', dom.getElement(_selectorHighlightText2, module));\n\t__.setModuleData(moduleId, 'textOverlayStartPosition', __.getModuleData(moduleId, 'startPosition') * 0.45);\n\t__.setModuleData(moduleId, 'textOverlayEndPosition', __.getModuleData(moduleId, 'startPosition') * 0.55);\n\t__.setModuleData(moduleId, 'textOverlayPixelMapping', 1 / (__.getModuleData(moduleId, 'textOverlayEndPosition') - __.getModuleData(moduleId, 'textOverlayStartPosition')));\n};\n\n/**\n * private function set data of the module\n * @param {string} moduleId - the id of the module\n * @param {string} key - the data key\n * @param {string | number} value - the data value\n */\n__.setModuleData = function(moduleId, key, value) {\n\tif (!_moduleData) {\n\t\t_moduleData = {};\n\t}\n\tif (!_moduleData[moduleId]) {\n\t\t_moduleData[moduleId] = {};\n\t}\n\t_moduleData[moduleId][key] = value;\n};\n\n/**\n * private function get data of the module\n * @param {String} moduleId - the id of the module\n * @param {String} key - the data key\n * @returns {null|object|string|number} - value\n */\n__.getModuleData = function(moduleId, key) {\n\tif (!_moduleData || !_moduleData[moduleId] || !_moduleData[moduleId][key]) {\n\t\treturn null;\n\t}\n\treturn _moduleData[moduleId][key];\n};\n\n/**\n * private function setting the height of the highlight-wrapper\n * @param {String} moduleId - the id of the module\n */\n__.setHighlightHeight = function(moduleId) {\n\tlet highlightWrapper;\n\tconst firstHighlight = __.getModuleData(moduleId, 'text1'),\n\t\tsecondHighlight = __.getModuleData(moduleId, 'text2');\n\n\tif (dom.isElement(firstHighlight)) {\n\t\thighlightWrapper = dom.closest(firstHighlight, _selectorHighlightTextWrapper);\n\t\thighlightWrapper.style.minHeight = \"0px\";\n\t}\n\n\tif (dom.isElement(secondHighlight) && window.innerWidth < 768) {\n\t\thighlightWrapper.style.minHeight = secondHighlight.clientHeight + \"px\";\n\t}\n};\n\n/**\n * private listener references\n */\n__.textBlockShowListener = dom.throttle(__.handleTextBlockShow, 40);\n__.setupHighlightTextsListener = dom.throttle(__.handleSetupHighlightTexts.bind(this, true), 100);\n__.isExtraWideScreenListener = dom.debounce(function() {_isExtraWideScreen = undefined;}, 100);\n\n/**\n * private function adding events\n */\n__.addEvents = function() {\n\twindow.addEventListener('scroll', __.textBlockShowListener);\n\twindow.addEventListener('resize', __.setupHighlightTextsListener);\n\twindow.addEventListener('resize', __.isExtraWideScreenListener);\n};\n\n/**\n * private function removing events\n */\n__.removeEvents = function () {\n\twindow.removeEventListener('scroll', __.textBlockShowListener);\n\twindow.removeEventListener('resize', __.setupHighlightTextsListener);\n\twindow.removeEventListener('resize', __.isExtraWideScreenListener);\n\n\tif (__.animateModuleAlternativeListener) {\n\t\twindow.removeEventListener('scroll', __.animateModuleAlternativeListener);\n\t}\n\n\tif (__.animateModuleListener) {\n\t\twindow.removeEventListener('scroll', __.animateModuleListener);\n\t}\n\n\t_eventBus.off(appEvents.PAGE_LEAVE, __.removeEvents);\n};\n\n/**\n * private function checking whether the viewport aspect-ratio is bigger then 16:9\n * @returns {Boolean} whether the viewport aspect-ratio is bigger then 16:9\n */\n__.isExtraWideScreen = function () {\n\tlet pageWrapper;\n\n\tif (!!_isExtraWideScreen) {\n\t\treturn _isExtraWideScreen;\n\t}\n\n\tpageWrapper = dom.getElement(_selectorPageWrapper);\n\treturn (pageWrapper.clientWidth / window.innerHeight) > (16/9);\n};\n\n/**\n * private function initializing the scroll-animation video alternative\n * @param {Array} modules - list of all modules on the page\n */\n__.initializeAlternativeVideos = function (modules) {\n\tfor(const key in modules) {\n\t\tif(modules.hasOwnProperty(key)){\n\t\t\tconst module = modules[key];\n\t\t\tconst video = __.getVideoByModule(module);\n\t\t\t__.loadVideo(video);\n\t\t\t// trigger the animation once for an initial state\n\t\t\t__.animateModuleAlternative(video);\n\t\t}\n\t}\n};\n\n/**\n * private function handling the request to get the video\n * @param {String} url - the url for the request\n * @param {Element} module - the current module\n * @param {function} callback - the function to be executed after the loading\n */\n__.ajaxLoadVideo = function(url, module, callback) {\n\tfetch.getBlob(url, {\n\t\tmethod: 'get'\n\t}).then(function(blob){\n\t\tconst objectURL = URL.createObjectURL(blob);\n\t\tcallback(module, objectURL);\n\t}).catch(function(err) {\n\t\tconsole.warn(\"Error:\" + err.message);\n\t});\n};\n\n/**\n * private function get the moduleId by some child element\n * @param {Element} element - child element of the module\n * @returns {string | null} - moduleId\n */\n__.getModuleIdByElement = function(element) {\n\tconst module = dom.closest(element, _selectorModule);\n\n\tif (dom.isElement(module) === false) {\n\t\treturn null;\n\t}\n\n\treturn module.getAttribute('id');\n};\n\n/**\n * private function returning the value for the minimal fps\n * @param {Element} module - one scroll technology module\n * @returns {number} minimal frames per second\n */\n__.getMinimalFramesPerSecond = function(module) {\n\tconst minFps = dom.getDataAttribute(module, 'minfps');\n\n\tif (!!minFps && minFps > 0) {\n\t\treturn minFps;\n\t}\n\n\treturn 15;\n};\n\n/**\n * private function get the mapping\n * @param {HTMLVideoElement} video - the video\n * @returns {number} mapping\n */\n__.getPixelDurationMapping = function(video) {\n\treturn video.duration / __.getStartPositionDesignHighlights(video);\n};\n\n/**\n * private function get the start position of the video\n * @param {Element} video - the video\n * @returns {number} start position\n */\n__.getStartPositionDesignHighlights = function(video) {\n\treturn window.innerHeight - (video.clientHeight * 0.75);\n};\n\n/**\n * returns the current position of the video in view\n * pos = -1 -> video-top above viewport-top or below start position\n * @param {string} moduleId - the id of the module\n * @param {Element} video - the video\n * @returns {number} current position of video\n */\n__.getCurrentPositionInView = function(moduleId, video) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tconst rect = video.getBoundingClientRect(),\n\t\tstartPos = __.getModuleData(moduleId, 'startPosition');\n\n\tif (rect.top >= 0 && startPos >= rect.top) {\n\t\treturn startPos - rect.top;\n\t}\n\n\treturn -1;\n};\n\n/**\n * private function handling the video if it is ready to be played\n * @param {Event} event - the canPlayThroughEvent\n */\n__.handleVideoCanPlayThrough = function(event) {\n\tconst video = event.target,\n\t\tmoduleId = __.getModuleIdByElement(video);\n\n\tvideo.removeEventListener(\"canplaythrough\", __.handleVideoCanPlayThrough);\n\tvideo.pause();\n\tvideo.currentTime = 0;\n\tvideo.muted = false;\n\n\t__.setModuleData(moduleId, 'pixelDurationMapping', __.getPixelDurationMapping(video));\n\t__.animateModuleListener = dom.throttle(__.animateModule.bind(this, moduleId, video), 40);\n\twindow.addEventListener('scroll', __.animateModuleListener);\n};\n\n/**\n * private function handling the loaded video\n * @param {Element} module - the HTML module of the video\n * @param {string} videoSrc - the src of the video\n */\n__.handleLoadedVideo = function(module, videoSrc) {\n\tconst video = __.getVideoByModule(module);\n\n\tvideo.src = videoSrc;\n\tvideo.addEventListener(\"canplaythrough\", __.handleVideoCanPlayThrough);\n\tvideo.muted = true;\n\n\t// needs to be set to trigger the canplaythrough eventually\n\tvideo.play();\n};\n/**\n * private function handle the animation of the module\n * @param {String} moduleId - the id of the module\n * @param {Element} video - the video\n */\n__.animateModule = function(moduleId, video) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tconst posViewPort = __.getCurrentPositionInView(moduleId, video);\n\n\tif (posViewPort >= 0) {\n\t\t__.animateVideo(moduleId, video, posViewPort);\n\t\t__.setTextOpacity(moduleId, posViewPort);\n\t}\n};\n\n/**\n * private function handle the animation of the videoSrc\n * @param {String} moduleId - the id of the module\n * @param {Element} video - the video of the module\n * @param {number} posViewPort - the position in the viewport\n */\n__.animateVideo = function(moduleId, video, posViewPort) {\n\tvideo.currentTime = __.getModuleData(moduleId, 'pixelDurationMapping') * posViewPort;\n};\n\n/**\n * private function handling the animation of the texts\n * @param {String} moduleId - the id of the module\n * @param {number} posViewPort - the ciurrent position in the viewport\n */\n__.setTextOpacity = function(moduleId, posViewPort) {\n\tlet opacity = __.calculateHighlightTextsOpacity(\n\t\t__.getModuleData(moduleId, 'textOverlayPixelMapping'),\n\t\tposViewPort,\n\t\t__.getModuleData(moduleId, 'textOverlayStartPosition')\n\t);\n\n\tif (opacity > 1) {\n\t\topacity = 1;\n\t} else if (opacity < 0) {\n\t\topacity = 0;\n\t}\n\t__.getModuleData(moduleId, 'text1').style.opacity = 1 - opacity;\n\t__.getModuleData(moduleId, 'text2').style.opacity = opacity;\n};\n\n/**\n * @description private function calculating the opacity of the highlight texts\n * @param {Number} pixelMapping - textOverlayPixelMapping\n * @param {Number} posViewPort - position of the video in the viewport\n * @param {Number} startPosition - start position of the animation\n * @returns {Number} the calculated opacity\n */\n__.calculateHighlightTextsOpacity = function(pixelMapping, posViewPort, startPosition) {\n\tlet opacity = Math.round((pixelMapping * (posViewPort - startPosition))*10)/10;\n\n\tif (opacity > 1) {\n\t\topacity = 1;\n\t} else if (opacity < 0) {\n\t\topacity = 0;\n\t}\n\treturn opacity;\n};\n\n/**\n * private function handling the autoplay alternatives\n * @param {HTMLVideoElement} video - the video\n */\n__.animateModuleAlternative = function(video) {\n\tif (video.paused && video.currentTime === 0) {\n\t\tif (__.isExtraWideScreen() && dom.getViewportPercentageCovered(video) >= 75){ // extra wide screen\n\t\t\t__.startVideo(video);\n\t\t} else if(!__.isExtraWideScreen() && dom.getVisibleVerticalPercentageInViewport(video) >= 75){ // normal screen\n\t\t\t__.startVideo(video);\n\t\t}\n\t} else if (video.currentTime > 0 && dom.getVisibleVerticalPercentageInViewport(video) === 0){\n\t\t__.pauseVideo(video);\n\t}\n};\n\n/**\n * private function starting the autoplay\n * @param {HTMLVideoElement} video - the video of the module\n */\n__.startVideo = function(video) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tconst playPromise = video.play();\n\n\tif (playPromise !== undefined) {\n\t\tplayPromise.catch(error => {\n\t\t\tconsole.error(error);\n\t\t\tvideo.muted = true;\n\t\t\tvideo.play();\n\t\t});\n\t}\n};\n\n/**\n * private function stopping the autoplay\n * @param {HTMLVideoElement} video - the video of the module\n */\n__.pauseVideo = function(video) {\n\tvideo.pause();\n\tvideo.currentTime = 0;\n};\n\n/**\n * private function handling the loading of the video\n * @param {Element} video - the current module\n */\n__.loadVideo = function(video) {\n\tvideo.src = __.getVideoSrc(video);\n\t__.animateModuleAlternativeListener = dom.throttle(__.animateModuleAlternative.bind(this, video), 100);\n\twindow.addEventListener('scroll', __.animateModuleAlternativeListener);\n};\n\n/**\n * private function returning the source of the video based on the screen-width\n * @param {Element} video - the video\n * @returns {String} video source\n */\n__.getVideoSrc = function(video) {\n\tlet source,\n\t\tscreenWidth = window.innerWidth;\n\n\tsource = dom.getDataAttribute(video, 'srcxl');\n\n\tif (screenWidth < 1025) {\n\t\tsource = (dom.getDataAttribute(video, 'srcl') || source);\n\t}\n\tif (screenWidth < 768) {\n\t\tsource = (dom.getDataAttribute(video, 'srcm') || source);\n\t}\n\tif (screenWidth < 415) {\n\t\tsource = (dom.getDataAttribute(video, 'srcs') || source);\n\t}\n\tif (!source) {\n\t\tsource = (dom.getDataAttribute(video, 'srcl') || dom.getDataAttribute(video, 'srcm') || dom.getDataAttribute(video, 'srcs'));\n\t}\n\treturn source;\n};\n\n/**\n * private function initializing the modules videos based on given performance\n * @param {Event} event - the video performance event\n */\n__.initializePerVideoPerformance = function (event) {\n\tlet fps = 0,\n\t\tmodules = dom.getElementsArray(_selectorModule),\n\t\tminFps = __.getMinimalFramesPerSecond(modules[0]);\n\n\tif (!!event.fps) {\n\t\tfps = event.fps;\n\t}\n\tif (fps >= minFps) {\n\t\t__.initializeVideos(modules);\n\t} else {\n\t\t__.initializeAlternativeVideos(modules);\n\t}\n};\n\n/**\n * private function initializing the scroll-animation video\n * @param {Array} modules - list of all modules on the page\n */\n__.initializeVideos = function(modules) {\n\tfor(const key in modules) {\n\t\tif(modules.hasOwnProperty(key)){\n\t\t\tconst module = modules[key];\n\t\t\tconst moduleId = module.getAttribute('id');\n\t\t\tconst video = __.getVideoByModule(module);\n\n\t\t\t__.loadVideoForAnimation(module, video);\n\t\t\t// trigger the animation once for an initial state\n\t\t\t__.animateModule(moduleId, video);\n\t\t}\n\t}\n};\n\n/**\n * private function handling the loading of the video\n * @param {Element} module - the current module\n * @param {Element} video - the current video\n */\n__.loadVideoForAnimation = function(module, video) {\n\tconst videoSrc = __.getVideoSrc(video);\n\t__.ajaxLoadVideo(videoSrc, module, __.handleLoadedVideo);\n};\n\ndom.handleDocumentReady(function() {\n\t_eventBus = signal.getEmitter();\n\t_eventBus.on(appEvents.PAGE_LEAVE, __.removeEvents);\n\tinit();\n});\n\nexport { __, init };\n","import {dom, fetch} from 'core-utils';\nimport {appEvents, signal} from 'core-application';\n\n/**\n * Object holding all private functions\n */\nlet __ = {};\n\n/**\n * some selector variables\n */\nlet _selectorModul = '.nm-module-scroll-technology',\n\t_selectorVideo = '.nm-scroll-technology-video-player',\n\t_selectorVideoContainer = '.nm-scroll-technology-video-container',\n\t_selectorHighlightText1 = '.nm-scroll-technology-highlighttext-one',\n\t_selectorHighlightText2 = '.nm-scroll-technology-highlighttext-two',\n\t_selectorHighlightTextWrapper = '.nm-scroll-technology-textoverlay-wrapper',\n\t_selectorTextblockHidden = '.nm-scroll-technology-textblock.nm-scroll-technology-textblock-hidden',\n\t_selectorContentWrapper = '.nm-content',\n\t_selectorNavigation = '.nm-navigation-main-wrap';\n\n/**\n * some module variables\n */\nlet _moduleData,\n\t_eventBus,\n\t_contentWrapper,\n\t_topOffset = 0,\n\t_defaultPlayBackrate = 5,\n\t_hiddenTextblocks = null,\n\t_minimalFpsForAnimation = 15;\n\n/** private functions */\n/**\n * private initialize method\n * @returns {undefined}\n */\n__.init = function () {\n\tconst anyModule = dom.getElement(_selectorModul);\n\n\tif (dom.isElement(anyModule))\n\t{\n\t\t__.handleTextBlockShow();\n\t\t__.addEvents();\n\t\t__.loadVideos();\n\t}\n};\n\n/**\n * @description private function adding events\n * @returns {undefined}\n */\n__.addEvents = function () {\n\t// wether a shown video would perform good\n\t_eventBus.addListener('video_performance', __.initializeVideos);\n\twindow.addEventListener(\"scroll\", __.textBlockShowListener);\n\twindow.addEventListener('resize', __.handleSetAllHighlightHeightListener);\n};\n\n/**\n * @description private function removing events\n * @returns {undefined}\n */\n__.removeEvents = function () {\n\t_eventBus.removeListener('video_performance', __.initializeVideos);\n\twindow.removeEventListener(\"scroll\", __.textBlockShowListener);\n\twindow.removeEventListener('resize', __.handleSetAllHighlightHeightListener);\n\tif (__.animateAlternativeListener) {\n\t\twindow.removeEventListener('scroll', __.animateAlternativeListener);\n\t}\n\n\tif (__.animateModuleListener) {\n\t\twindow.removeEventListener('scroll', __.animateModuleListener);\n\t}\n};\n\n/** getter/setter */\n/**\n * @description private function get the video of the modul\n * @param {DOMElement} module - the module of the video\n * @returns {HTMLVideoElement} video\n */\n__.getVideoByModule = function (module) {\n\treturn dom.getElement(_selectorVideo, module);\n};\n\n/**\n * @description private function get the moduleid by some Childelement\n * @param {DOMElement} element - checildelement of the module\n * @returns {DOMElement} moduleId\n */\n__.getModuleIdByElement = function (element) {\n\tconst module = dom.closest(element, _selectorModul);\n\n\tif (dom.isElement(module) === false)\n\t{\n\t\treturn null;\n\t}\n\treturn module.getAttribute('id');\n};\n\n/**\n * private function returning the value for the minimal fps\n * @param {DOMElement} module - one scroll technology module\n * @returns {Number} fps\n */\n__.getMinimalFramesPerSecond = function (module) {\n\tconst minfps = dom.getDataAttribute(module, 'minfps');\n\tif (!!minfps && minfps > 0)\n\t{\n\t\treturn minfps;\n\t}\n\treturn _minimalFpsForAnimation;\n};\n\n/**\n * @description private function get all number elements still hidden\n * @returns {Array} hiddenTextblocks\n */\n__.getHiddenTextblocks = function () {\n\tif (!_hiddenTextblocks)\n\t{\n\t\t_hiddenTextblocks = dom.getElementsArray(_selectorTextblockHidden);\n\t}\n\treturn _hiddenTextblocks;\n};\n\n/**\n * @description private function get data of the module\n * @param {String} moduleId - the id of the module\n * @param {String} key - the key of the data\n * @returns {String} data value\n */\n__.getModuleData = function (moduleId, key) {\n\tif (!_moduleData || !_moduleData[moduleId] || !_moduleData[moduleId][key])\n\t{\n\t\treturn null;\n\t}\n\treturn _moduleData[moduleId][key];\n};\n\n/**\n * @description private function set data of the module\n * @param {String} moduleId - the id of the module\n * @param {String} key - the key of the data\n * @param {String} value - data value\n * @returns {undefined}\n */\n__.setModuleData = function (moduleId, key, value) {\n\tif (!_moduleData)\n\t{\n\t\t_moduleData = {};\n\t}\n\tif (!_moduleData[moduleId])\n\t{\n\t\t_moduleData[moduleId] = {};\n\t}\n\t_moduleData[moduleId][key] = value;\n};\n\n/**\n * @description returns the current position of the video in view\n * pos = -1 -> video-top above viewport-top or below startposition\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} videoContainer - the container of video\n * @return {number} position of video\n */\n__.getCurrentPositionInView = function (module, moduleId, videoContainer) {\n\tconst rect = module.getBoundingClientRect(),\n\t\ttop = rect.top + __.getModuleData(moduleId, 'videoOffsetTop');\n\n\tif (top === 0 && _topOffset === 0 && rect.bottom === 0 && videoContainer.clientHeight === 0)\n\t{\n\t\treturn -1;\n\t}\n\telse if (top <= _topOffset && rect.bottom >= videoContainer.clientHeight + _topOffset)\n\t{\n\t\treturn -(top - _topOffset);\n\t}\n\n\treturn -1;\n};\n\n/**\n * @description returns the current position of the video in view\n * pos = -1 -> video-top above viewport-top or below startposition\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @return {number} position of video\n */\n__.getCurrentVideoPositionInView = function (moduleId, video) {\n\tconst rect = video.getBoundingClientRect(),\n\t\tstartPos = __.getModuleData(moduleId, 'startPosition');\n\n\tif (rect.top === 0 && startPos === 0)\n\t{\n\t\treturn -1;\n\t}\n\telse if (rect.top >= 0 && startPos >= rect.top)\n\t{\n\t\treturn startPos - rect.top;\n\t}\n\treturn -1;\n};\n\n/**\n * @description private function setting the initial Data\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @returns {undefined}\n */\n__.setInitialModuleData = function (moduleId, video) {\n\tlet pixelDuration;\n\tconst module = dom.closest(video, _selectorModul);\n\n\t// the amount of pixel to be scrollt in order to play the complete video\n\tpixelDuration = window.innerHeight / _defaultPlayBackrate * video.duration;\n\t__.setModuleData(moduleId, 'pixelDuration', pixelDuration);\n\t__.setModuleData(moduleId, 'pixelDurationMapping', video.duration / pixelDuration);\n\t__.setModuleData(moduleId, 'videoOffsetTop', video.getBoundingClientRect().top - module.getBoundingClientRect().top); // margin between top of module and top of video\n};\n\n/**\n * @description private function setting the initial Data for module alternative\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @returns {undefined}\n */\n__.setInitialAlternativeModuleData = function (module, moduleId, video) {\n\t__.setModuleData(moduleId, 'startPosition', window.innerHeight - (video.clientHeight * 0.75));\n\t__.setInitializeHighlightTexts(module, moduleId, video, true);\n};\n\n/**\n * @description private function setting the initial Data for the highlights\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video of the module\n * @param {Boolean} isAlternative - whether the alternative is loaded or not\n * @returns {undefined}\n */\n__.setInitializeHighlightTexts = function (module, moduleId, video, isAlternative) {\n\t__.setModuleData(moduleId, 'text1', dom.getElement(_selectorHighlightText1, module));\n\t__.setModuleData(moduleId, 'text2', dom.getElement(_selectorHighlightText2, module));\n\t__.setModuleData(moduleId, 'videoOffsetTop', video.getBoundingClientRect().top - module.getBoundingClientRect().top);\n\n\tif (isAlternative)\n\t{\n\t\t__.setModuleData(moduleId, 'textOverlayStartPosition', __.getModuleData(moduleId, 'startPosition') * 0.45);\n\t\t__.setModuleData(moduleId, 'textOverlayEndPosition', __.getModuleData(moduleId, 'startPosition') * 0.55);\n\t\t__.setModuleData(moduleId, 'textOverlayPixelMapping', 1 / (__.getModuleData(moduleId, 'textOverlayEndPosition') - __.getModuleData(moduleId, 'textOverlayStartPosition')));\n\t} else\n\t{\n\t\t__.setModuleData(moduleId, 'textOverlayStartPosition', __.getModuleData(moduleId, 'videoOffsetTop') * 0.45);\n\t\t__.setModuleData(moduleId, 'textOverlayEndPosition', __.getModuleData(moduleId, 'videoOffsetTop') * 0.55);\n\t\t__.setModuleData(moduleId, 'textOverlayPixelMapping', 1 / (__.getModuleData(moduleId, 'textOverlayEndPosition') - __.getModuleData(moduleId, 'textOverlayStartPosition')));\n\t}\n\t__.animateHightTexts(moduleId, -video.getBoundingClientRect().top);\n\t__.setHighlightHeight(moduleId);\n};\n\n/**\n * private function setting the highlighttexts up\n * @param {Boolean} onResize - whether the function was calle while rezize or not\n * @return {undefined}\n */\n__.handleSetAllHighlightHeight = function () {\n\tlet key, moduleId,\n\t\tmodules = dom.getElementsArray(_selectorModul);\n\tfor (key in modules)\n\t{\n\t\tif (modules.hasOwnProperty(key))\n\t\t{\n\t\t\tmoduleId = modules[key].getAttribute('id');\n\t\t\t__.setHighlightHeight(moduleId);\n\t\t}\n\t}\n};\n\n/**\n * private function setting the height of the highlight-wrapper\n * @param {String} moduleId - the id of the module\n * @return {undefined}\n */\n__.setHighlightHeight = function (moduleId) {\n\tlet highlightWrapper,\n\t\tsecondHighlight = __.getModuleData(moduleId, 'text2'),\n\t\tfirstHighlight = __.getModuleData(moduleId, 'text1');\n\n\tif (dom.isElement(firstHighlight))\n\t{\n\t\thighlightWrapper = dom.closest(firstHighlight, _selectorHighlightTextWrapper);\n\t\thighlightWrapper.style.minHeight = \"0px\";\n\t}\n\n\tif (dom.isElement(secondHighlight) && window.innerWidth < 768)\n\t{\n\t\thighlightWrapper = dom.closest(secondHighlight, _selectorHighlightTextWrapper);\n\t\thighlightWrapper.style.minHeight = secondHighlight.clientHeight + \"px\";\n\t}\n};\n\n// /** eventhandler */\n/**\n * @description private function handling the visibility of the textblocks\n * @returns {undefined}\n */\n__.handleTextBlockShow = function () {\n\tlet key, textblocks = __.getHiddenTextblocks();\n\tif (textblocks.length < 1)\n\t{\n\t\twindow.removeEventListener(\"scroll\", __.textBlockShowListener);\n\t} else\n\t{\n\t\tfor (key in textblocks)\n\t\t{\n\t\t\tif (!textblocks.hasOwnProperty(key))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (dom.getVisibleVerticalPercentageInViewport(textblocks[key]) >= 25)\n\t\t\t{\n\t\t\t\ttextblocks[key].classList.remove(\"nm-scroll-technology-textblock-hidden\");\n\t\t\t}\n\t\t}\n\t\t_hiddenTextblocks = dom.getElementsArray(_selectorTextblockHidden);\n\t}\n};\n\n/**\n * @description private function handling the video if it is ready to be played\n * @param {Event} event - video canplaythroughevent\n * @returns {undefined}\n */\n__.handleVideoCanPlayThrough = function (event) {\n\tconst video = event.target;\n\tconst videoContainer = dom.closest(video, _selectorVideoContainer);\n\tconst moduleId = __.getModuleIdByElement(video);\n\tconst module = dom.closest(video, _selectorModul);\n\n\tvideo.removeEventListener(\"canplaythrough\", __.handleVideoCanPlayThrough);\n\tvideo.pause();\n\tvideo.currentTime = 0;\n\tvideo.muted = false;\n\tvideo.autoplay = false;\n\n\t__.setInitialModuleData(moduleId, video);\n\t__.setupInitialModuleState(module, moduleId, videoContainer);\n\n\t__.animateModuleListener = dom.throttle(__.animateModule.bind(this, module, moduleId, video, videoContainer), 15);\n\twindow.addEventListener('scroll', __.animateModuleListener);\n};\n\n/**\n * @description private function setting initial positions/height of the modules elements\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} videoContainer - the container of video\n * @returns {undefined}\n */\n__.setupInitialModuleState = function (module, moduleId, videoContainer) {\n\tif (!module) {\n\t\treturn;\n\t}\n\n\tlet rect;\n\tmodule.style.height = module.clientHeight + __.getModuleData(moduleId, 'pixelDuration') + _topOffset + \"px\";\n\trect = module.getBoundingClientRect(); // needs to be set AFTER setting the height\n\tif (rect.top < -__.getModuleData(moduleId, 'videoOffsetTop') && rect.bottom > videoContainer.clientHeight && rect.bottom > videoContainer.getBoundingClientRect().bottom) {\n\t\t__.handleFollowingModulesFixed(module, moduleId, videoContainer);\n\t}\n\telse {\n\t\t__.handleFollowingModules(module, moduleId, videoContainer);\n\t}\n};\n\n/**\n * @description private function handle the animation of the module\n * @param {DOMElement} module -the HTML modul of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @returns {undefined}\n */\n__.animateModule = function (module, moduleId, video, videoContainer) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tconst posViewPort = __.getCurrentPositionInView(module, moduleId, videoContainer);\n\tif (posViewPort >= 0)\n\t{ // sticky\n\t\t__.animateVideo(moduleId, video, posViewPort);\n\t\t__.animateHightTexts(moduleId, posViewPort);\n\t\tif (!__.getModuleData(moduleId, 'fixed'))\n\t\t{\n\t\t\t__.handleFollowingModules(module, moduleId, videoContainer);\n\t\t\t__.handleFollowingModulesFixed(module, moduleId, videoContainer);\n\t\t}\n\t}\n\telse { // not sticky\n\t\tif (!!__.getModuleData(moduleId, 'fixed') && __.getModuleData(moduleId, 'fixed') === true)\n\t\t{\n\t\t\t__.handleFollowingModules(module, moduleId, videoContainer);\n\t\t}\n\t}\n};\n\n/**\n * @description private function handle the animation of the module\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @returns {undefined}\n */\n__.animateAlternative = function (moduleId, video) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tconst posViewPort = __.getCurrentVideoPositionInView(moduleId, video);\n\tif (posViewPort >= 0)\n\t{\n\t\tif (video.paused && video.currentTime === 0)\n\t\t{\n\t\t\tconst playPromise = video.play();\n\n\t\t\tif (playPromise !== undefined) {\n\t\t\t\tplayPromise.catch(error => {\n\t\t\t\t\tconsole.error(error);\n\n\t\t\t\t\tif (video) {\n\t\t\t\t\t\tvideo.muted = true;\n\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t}\n\t\t\t\t}).then(() => {\n\t\t\t\t\tvideo.play();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t__.animateHightTexts(moduleId, posViewPort);\n\t} else if (video.currentTime > 0 && dom.getVisibleVerticalPercentageInViewport(video) === 0)\n\t{\n\t\tvideo.pause();\n\t\tvideo.currentTime = 0;\n\t}\n};\n\n/**\n * @description private function handle the animation of the videoSrc\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} video - the video\n * @param {number} posViewPort - the position of the video in viewport\n * @returns {undefined}\n */\n__.animateVideo = function (moduleId, video, posViewPort) {\n\tif (!video) {\n\t\treturn;\n\t}\n\n\tvideo.currentTime = __.getModuleData(moduleId, 'pixelDurationMapping') * posViewPort;\n};\n\n/**\n * @description private function handling the animation of the texts\n * @param {String} moduleId - the id of the module\n * @param {number} posViewPort - the position of the video in viewport\n * @returns {undefined}\n */\n__.animateHightTexts = function (moduleId, posViewPort) {\n\tlet text1, text2,\n\t\topacity = __.calculateHighlightTextsOpacity(__.getModuleData(moduleId, 'textOverlayPixelMapping'), posViewPort, __.getModuleData(moduleId, 'textOverlayStartPosition'));\n\n\ttext2 = __.getModuleData(moduleId, 'text2');\n\tif (!!text2)\n\t{\n\t\ttext2.style.opacity = opacity;\n\t}\n\ttext1 = __.getModuleData(moduleId, 'text1');\n\tif (!!text1)\n\t{\n\t\ttext1.style.opacity = 1 - opacity;\n\t}\n};\n\n/**\n * @description private function calculating the opacity of the highlight texts\n * @param {Number} pixelMapping - textOverlayPixelMapping\n * @param {Number} posViewPort - position of the video in the viewport\n * @param {Number} startPosition - startposition of the animation\n * @returns {Number} the calculated opacity\n */\n__.calculateHighlightTextsOpacity = function (pixelMapping, posViewPort, startPosition) {\n\tlet opacity = Math.round((pixelMapping * (posViewPort - startPosition)) * 10) / 10;\n\tif (opacity > 1)\n\t{\n\t\topacity = 1;\n\t} else if (opacity < 0)\n\t{\n\t\topacity = 0;\n\t}\n\treturn opacity;\n};\n\n/**\n * @description private function handling the distance of the following modules\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} videoContainer - the container of the video\n * @returns {undefined}\n */\n__.handleFollowingModules = function (module, moduleId, videoContainer) {\n\tlet diff = 0,\n\t\tnextSiblings = __.getNextSiblings(module, moduleId),\n\t\trectVideo = videoContainer.getBoundingClientRect();\n\n\tif (rectVideo.top > _topOffset)\n\t{\n\t\tdiff = __.getModuleData(moduleId, 'pixelDuration') + _topOffset;\n\t}\n\n\tnextSiblings.forEach(function (sibling) {\n\t\tsibling.style.position = \"relative\";\n\t\tsibling.style.transform = \"translateY(\" + -diff + \"px)\";\n\t\tsibling.style.top = \"0px\";\n\t}, this);\n\t_contentWrapper.style.paddingBottom = \"0px\";\n\t__.setModuleData(moduleId, 'fixed', null);\n};\n\n/**\n * @description private function handling the fixing of the following modules\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @param {DOMElement} videoContainer - the container of the video\n * @returns {undefined}\n */\n__.handleFollowingModulesFixed = function (module, moduleId, videoContainer) {\n\tlet nextSiblings = __.getNextSiblings(module, moduleId),\n\t\ttop = videoContainer.clientHeight + _topOffset;\n\n\t__.handleFollowingModules(module, moduleId, videoContainer);\n\tnextSiblings.forEach(function (sibling) {\n\t\tsibling.style.transform = \"translateY(0px)\";\n\t\tsibling.style.position = \"fixed\";\n\t\tsibling.style.top = top + \"px\";\n\t\ttop += sibling.clientHeight;\n\t}, this);\n\t_contentWrapper.style.paddingBottom = top - videoContainer.clientHeight + _topOffset + \"px\";\n\t__.setModuleData(moduleId, 'fixed', true);\n};\n\n/**\n * @description private function handling the loading of the video\n * @returns {undefined}\n */\n__.loadVideos = function () {\n\tconst modules = dom.getElementsArray(_selectorModul);\n\n\tfor (const key in modules)\n\t{\n\t\tif (modules.hasOwnProperty(key))\n\t\t{\n\t\t\tconst module = modules[key];\n\t\t\tconst video = __.getVideoByModule(module);\n\t\t\tconst videoSrc = __.getVideoSrc(video);\n\t\t\t__.handleXMLHTTPRequest(videoSrc, video);\n\t\t}\n\t}\n};\n\n/**\n * @description private function returning the source of the video based on the screen-width\n * @param {HTMLVideoElement} video - the video\n * @returns {String} video source\n */\n__.getVideoSrc = function (video) {\n\tconst screenWidth = window.innerWidth;\n\tlet source = dom.getDataAttribute(video, 'srcxl');\n\n\tif (screenWidth < 1025)\n\t{\n\t\tsource = (dom.getDataAttribute(video, 'srcl') || source);\n\t}\n\telse if (screenWidth < 768)\n\t{\n\t\tsource = (dom.getDataAttribute(video, 'srcm') || source);\n\t}\n\telse if (screenWidth < 415)\n\t{\n\t\tsource = (dom.getDataAttribute(video, 'srcs') || source);\n\t}\n\n\tif (!source)\n\t{\n\t\tsource = (dom.getDataAttribute(video, 'srcl') || dom.getDataAttribute(video, 'srcm') || dom.getDataAttribute(video, 'srcs'));\n\t}\n\n\treturn source;\n};\n\n/**\n * @description private function handling the xhtmlhttprequest to get the video\n * @param {String} url - url for the video\n * @param {HTMLVideoElement} video - the video element\n * @return {undefined}\n */\n__.handleXMLHTTPRequest = function (url, video) {\n\tfetch\n\t\t.getBlob(url, {\n\t\t\tmethod: 'get'\n\t\t}).then(function (blob) {\n\t\t\tvideo.src = URL.createObjectURL(blob);\n\t\t}).catch(function (err) {\n\t\t\tconsole.error(\"Error: \" + err.message);\n\t\t});\n};\n\n/**\n * @description private function handling the loaded video\n * @param {DOMElement} module - the HTML modul of the video\n * @param {DOMElement} moduleId - the id of the module\n * @param {objectURL} video - the video\n * @returns {undefined}\n */\n__.useVideoAlternative = function (module, moduleId, video) {\n\t__.animateAlternativeListener = dom.throttle(__.animateAlternative.bind(this, moduleId, video), 100);\n\twindow.addEventListener('scroll', __.animateAlternativeListener);\n\t__.setInitialAlternativeModuleData(module, moduleId, video);\n};\n\n/**\n * @description private function handling the loaded video\n * @param {DOMElement} video - the video\n * @returns {undefined}\n */\n__.useVideo = function (video) {\n\tif (video.readyState === 4)\n\t{\n\t\t__.handleVideoCanPlayThrough({target: video});\n\t} else\n\t{\n\t\tvideo.addEventListener(\"canplaythrough\", __.handleVideoCanPlayThrough);\n\t\ttry\n\t\t{\n\t\t\tvideo.muted = true;\n\t\t\tvideo.autoplay = true;\n\t\t\t// needs to be set to trigger the canplaythrough eventually\n\t\t\tvideo.play();\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tconsole.error(e);\n\t\t}\n\t}\n};\n\n/**\n * @description private function returning the next siblings of the module\n * @param {DOMElement} module - the module of the video\n * @param {String} moduleId - the id of the module\n * @returns {Array} - Array of following modules\n */\n__.getNextSiblings = function (module, moduleId) {\n\tlet nextSiblings = __.getModuleData(moduleId, 'nextSiblings'),\n\t\tsibling;\n\n\tif (!!nextSiblings)\n\t{\n\t\treturn nextSiblings;\n\t}\n\tnextSiblings = [];\n\tsibling = module.nextElementSibling;\n\twhile (!!sibling)\n\t{\n\t\tnextSiblings.push(sibling);\n\t\tsibling = sibling.nextElementSibling;\n\t}\n\t__.setModuleData(moduleId, 'nextSiblings', nextSiblings);\n\treturn nextSiblings;\n};\n\n/**\n * @description private function handling the top position in case there is a sticky navigation\n * @returns {undefined}\n */\n__.handleTopPosition = function () {\n\tlet videoContainer, key,\n\t\tnavigation = dom.getElement(_selectorNavigation);\n\t_topOffset = navigation.clientHeight;\n\n\tif (_topOffset > 0)\n\t{\n\t\tvideoContainer = dom.getElementsArray(_selectorVideoContainer);\n\t\tfor (key in videoContainer)\n\t\t{\n\t\t\tif (videoContainer.hasOwnProperty(key))\n\t\t\t{\n\t\t\t\tvideoContainer[key].style.top = _topOffset + 'px';\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * @description private function initialitzing the scroll-animation or alternative function for the Videos\n * @param {Event} event - the videoperformance event\n * @returns {undefined}\n */\n__.initializeVideos = function (event) {\n\tlet key, module, isPerformant,\n\t\tfps = 0,\n\t\tmodules = dom.getElementsArray(_selectorModul),\n\t\tminfps = __.getMinimalFramesPerSecond(modules[0]);\n\tif (!!event.fps)\n\t{\n\t\tfps = event.fps;\n\t}\n\tisPerformant = fps >= minfps;\n\n\tif (isPerformant)\n\t{\n\t\t__.handleTopPosition();\n\t}\n\tfor (key in modules)\n\t{\n\t\tif (modules.hasOwnProperty(key))\n\t\t{\n\t\t\tmodule = modules[key];\n\t\t\t__.initializeVideo(isPerformant, module);\n\t\t}\n\t}\n};\n\n/**\n * @description private function initialitzing a single video\n * @param {Boolean} isPerformant - whether the performance is sufficent\n * @param {DOMElement} module - the module of the video\n * @returns {undefined}\n */\n__.initializeVideo = function (isPerformant, module) {\n\tconst moduleId = module.getAttribute('id');\n\tconst video = __.getVideoByModule(module);\n\n\tif (isPerformant)\n\t{\n\t\t_contentWrapper = dom.closest(module, _selectorContentWrapper);\n\t\t__.useVideo(video);\n\t\t__.setInitializeHighlightTexts(module, moduleId, video, false);\n\t} else\n\t{\n\t\tvideo.classList.remove('sticky');\n\t\t__.useVideoAlternative(module, moduleId, video);\n\t\t// trigger the animation once for an initial state\n\t\t__.animateAlternative(moduleId, video);\n\t}\n};\n\n/**\n * private listener references\n */\n__.textBlockShowListener = dom.throttle(__.handleTextBlockShow, 40);\n__.handleSetAllHighlightHeightListener = dom.throttle(__.handleSetAllHighlightHeight, 100);\n\ndom.handleDocumentReady(function () {\n\tconst Stickyfill = require('stickyfill');\n\tconst stickyfill = Stickyfill();\n\n\t_eventBus = signal.getEmitter();\n\t_eventBus.on(appEvents.PAGE_LEAVE, __.removeEvents);\n\n\tlet i, stickyElements = document.getElementsByClassName('sticky');\n\n\tfor (i = stickyElements.length - 1; i >= 0; i--)\n\t{\n\t\tstickyfill.add(stickyElements[i]);\n\t}\n\n\t__.init();\n});\n\nexport {__};\n","import {dom} from 'core-utils';\nimport { signal } from 'core-application';\n\n/**\n * Object holding all private functions\n */\nvar __ = {};\n\nvar _start,\n\t_requestId,\n\t_performanceVideo,\n\t_performanceTestTime = 1000,\n\t_numberUpdates = 0,\n\t_minFPS = 15,\n\t_maxTests = 5,\n\t_currentTestCount = 0,\n\t_frameToggle = 0;\n\n/**\n* @function init\n* @description public initialize method\n* @returns {undefined}\n*/\nfunction init() {\n\t__.handleVideoPerformanceTest();\n}\n\n/**\n* @description private function returning the current count of the testing\n* @return {Number} the current count of testings\n*/\n__.getCurrentTestCount = function() {\n\treturn _currentTestCount;\n};\n/**\n * @description private function handling the testing of the video performance\n * @return {undefined}\n */\n__.handleVideoPerformanceTest = function() {\n\tvar lastFps = __.getLastFPS();\n\tif (!!lastFps && lastFps >= _minFPS) {\n\t\t__.emitVIdeoPerformance(lastFps);\n\t} else {\n\t\t__.setTestVideo();\n\t\t__.addTestVideoEvents();\n\t}\n};\n\n/**\n * @description private function getting the last value for fps\n * @param {Number} fps - last frames per second\n * @returns {undefined}\n */\n__.storeLastFPS = function(fps) {\n\tif (!!fps && fps >= 0) {\n\t\tlocalStorage.setItem('lastVideoFps', fps);\n\t}\n};\n\n/**\n * @description private function getting the last value for fps\n * @returns {Number} last frames per second\n */\n__.getLastFPS = function() {\n\tvar fps = parseInt(localStorage.getItem('lastVideoFps'), 10);\n\treturn !!fps ? fps : 0;\n};\n\n/**\n * @description private function setting up the testvideo\n * @returns {undefined}\n */\n__.setTestVideo = function(){\n\t_performanceVideo = document.createElement('video');\n\t_performanceVideo.setAttribute('data-video-notracking', 'true');\n\t_performanceVideo.src = \"data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAG1wNDFpc29tAAAAJ3V1aWRcpwj7Mo5CBahhZQ7KCpWWAAAACzYuMi4wOTIwMC4wAAAE9W1kYXQAAAAAAAAAEAAAAAIJEAAAADMGBS8C+GFQ/HBBcrcySPOnKj00TWljcm9zb2Z0IEguMjY0IEVuY29kZXIgVjEuNS4zAIAAAADsBgXoy7ITkphzQ9qopsdCmDVs9XNyYzozIGg6NjQgdzo2NCBmcHM6MjQuMDAwIHBmOjY2IGx2bDo1IGI6MCBicXA6MyBnb3A6NzIgaWRyOjcyIHNsYzoxIGNtcDowIHJjOjEgcXA6MjYgcmF0ZToxMDAwMDAwIHBlYWs6MCBidWZmOjM3NTAwMCByZWY6MiBzcmNoOjMyIGFzcmNoOjEgc3VicDoxIHBhcjo2IDMgMyBybmQ6MCBjYWJhYzowIGxwOjIgY3RudDowIGF1ZDoxIGxhdDowIHdyazo4IH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AAAAZAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAB7AAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARAAAAFHN0Y28AAAAAAAAAAQAAAE8AAAAUc3RzcwAAAAAAAAABAAAAAQAAAER1ZHRhAAAANG1ldGEAAAAAAAAAIGhkbHIAAAAAAAAAAG1kaXIAAAAAAAAAAAAAAAAAAAAIaWxzdAAAAAhYdHJh\";\n\t_performanceVideo.autoplay = true; // needed for safari ios in order to trigger the canplay event\n\t_performanceVideo.style.display = 'none';\n\tdocument.body.appendChild(_performanceVideo);\n};\n\n/**\n * @description private function adding events to the test video\n * @returns {undefined}\n */\n__.addTestVideoEvents = function() {\n\tsetTimeout(function(){\n\t\tif (_performanceVideo.readyState >= 4) {\n\t\t\t__.checkVideoPerformance();\n\t\t} else {\n\t\t\t_performanceVideo.addEventListener('canplay', __.checkVideoPerformance);\n\t\t}\n\t}, 100);\n};\n\n/**\n * @description private function emitting the performance event\n * @param {Number} fps - the frames per second to emit\n * @returns {undefined}\n */\n__.emitVIdeoPerformance = function(fps) {\n\tvar emitFps = (!!fps && fps >= 0) ? fps : 0;\n\tsignal.getEmitter().emit('video_performance', {'fps' : emitFps});\n};\n\n/**\n * @description private function returning the average fps rate\n * @param {Timestamp} start - starttime of the test\n * @param {Number} numberUpdates - the number of timeupdates\n * @returns {Float} fps\n */\n__.getAverageFPS = function(start, numberUpdates) {\n\tif (!start || !numberUpdates || start <=0 || numberUpdates <=0) {\n\t\treturn 0;\n\t}\n\treturn 1000 / Math.round((new Date().getTime() - start) / numberUpdates);\n};\n/**\n * @description private function toggling the frames of a video\n * @returns {undefined}\n */\n__.toggleVideoFrames = function() {\n\t_performanceVideo.currentTime = _frameToggle;\n\tif (_frameToggle < _performanceVideo.duration) {\n\t\t_frameToggle += 0.1;\n\t} else {\n\t\t_frameToggle = 0;\n\t}\n\t_requestId = requestAnimationFrame(__.toggleVideoFrames);\n};\n/**\n * @description private function checking the video performance by creating a video element\n * and checking on the preiod of time between timeupdates *\n * @returns {undefined}\n */\n__.checkVideoPerformance = function() {\n\t_currentTestCount++;\n\t_performanceVideo.removeEventListener('canplay', __.checkVideoPerformance);\n\t_start = new Date().getTime();\n\t_performanceVideo.addEventListener('timeupdate', __.increaseNumberUpdates);\n\t_requestId = requestAnimationFrame(__.toggleVideoFrames);\n\tsetTimeout(__.handleResult, _performanceTestTime);\n};\n\n/**\n * @description private function increasing the update count\n * @returns {undefined}\n */\n__.increaseNumberUpdates = function() {\n\t_numberUpdates++;\n};\n\n/**\n * @description private function handling the result of the performance check\n * @returns {undefined}\n */\n__.handleResult = function() {\n\tvar fps = __.getAverageFPS(_start, _numberUpdates),\n\tcurrentTestCount = __.getCurrentTestCount();\n\n\t// store fps\n\tif (fps >= _minFPS) {\n\t\t__.storeLastFPS(fps);\n\t}\n\n\t// emit first result\n\tif (currentTestCount === 1) {\n\t\tcancelAnimationFrame(_requestId);\n\t\tdocument.body.removeChild(_performanceVideo);\n\t\t__.emitVIdeoPerformance(fps);\n\t}\n\n\t// continue testing\n\tif (fps < _minFPS && currentTestCount < _maxTests) {\n\t\t_numberUpdates = 0;\n\t\t__.checkVideoPerformance();\n\t}\n};\n\ndom.handleDocumentReady(function() {\n\tinit();\n});\n\nexport { __, init };"],"sourceRoot":""}