1if ('NodeList' in window && !NodeList.prototype.forEach) { 2 NodeList.prototype.forEach = function (callback, thisArg) { 3 thisArg = thisArg || window; 4 for (var i = 0; i < this.length; i++) { 5 callback.call(thisArg, this[i], i, this); 6 } 7 }; 8} 9 10(() => { 11 // handle videos 12 const fVideos = document.querySelectorAll('.flickity.layout-imagebuilder video') 13 fVideos.forEach(v => { 14 v.muted = true 15 v.autoplay = true 16 v.loop = true 17 v. controls = false 18 v.play() 19 }) 20})(); 21 22(function flickityInit() { 23 var autoplay = 1; 24 var speed = 5000; 25 var speed = autoplay && speed; 26 var randomize = '0'; 27 var arrow = 'none'; 28 var arrows = arrow !== 'none'; 29 var pager = 'normal'; 30 var pagerPosition = 'standard'; 31 var uid = 543415; 32 var otherSliderUid = 543411; 33 var variant = 'navigation'; 34 var wrapAround = true; 35 var cellAlign = 'center'; 36 37 var elem = document.querySelector('.flickity--' + uid); 38 39 if (randomize != 0) { 40 // only works for 1 instance / slider - navslider combo per page 41 function defineRandomOrder(array) { 42 window.flickityRandomOrder = []; 43 for (var i = 0, len = array.length; i < len; i++) { 44 function roll() { 45 var random = Math.floor(Math.random() * len); 46 if (window.flickityRandomOrder.indexOf(random) === -1) { 47 window.flickityRandomOrder.push(random); 48 } else { 49 roll(); 50 } 51 } 52 roll(); 53 } 54 } 55 56 function applyRandomOrder() { 57 var order = window.flickityRandomOrder; 58 for (var i = 0, len = order.length; i < len; i++) { 59 var orderNumber = order[i]; 60 if(slides[orderNumber] != undefined){ 61 slides[orderNumber].parentNode.appendChild(slides[orderNumber]); 62 } 63 } 64 } 65 66 var slides = elem.querySelectorAll('.flickity-slide'); 67 if (!window.flickityRandomOrder) defineRandomOrder(Array.prototype.slice.call(slides)); 68 applyRandomOrder(); 69 } 70 71 if (variant === 'autoheight-autowidth') { 72 wrapAround = true; 73 cellAlign = 'left'; 74 } 75 76 if (variant === 'navigation') { 77 (function styling() { 78 var target = $(elem).closest('.container')[0].previousElementSibling.querySelector('.flickity').parentNode; 79 var wrap = document.createElement('div'); wrap.classList.add('wrap'); wrap.style.width = '100%'; wrap.style.position = 'absolute'; wrap.style.bottom = '30px'; wrap.style.pointerEvents = 'none'; target.appendChild(wrap); 80 target.appendChild(wrap); 81 elem.parentNode.classList.add('container'); 82 wrap.appendChild(elem.parentNode); 83 var spacer = document.createElement('div'); spacer.classList.add('spacer'); spacer.classList.add('flickity-spacer'); spacer.style.height = '80px'; target.appendChild(spacer); 84 (function gaHandling() { 85 var links = elem.querySelectorAll('a'); 86 if (!links.length) return; 87 links.forEach(function(link) { 88 (function(link) { 89 link.addEventListener('click', function(e) { 90 var linkText = ($(link).closest('.flickity-slide')[0].querySelector('a').textContent); 91 var linkTarget = $(link).attr('href'); 92 }) 93 })(link); 94 }); 95 })(); 96 })(); 97 } 98 99 var customNav; 100 if (pager !== 'none') { 101 customNav = document.createElement('div'); customNav.classList.add('customNav'); customNav.classList.add('customNav--' + pagerPosition); 102 customNav.innerHTML = '<div class="'+pager+'"><div class="previous"></div><div class="indicator"></div><div class="next"></div></div>'; elem.parentNode.appendChild(customNav); 103 customNav.indicator = customNav.querySelector('.indicator'); 104 customNav.indicator.items = []; 105 } 106 107 if (variant === 'products') { 108 var links = elem.querySelectorAll('a.product-link'); 109 if (links.length) { 110 links.forEach(function(link) { 111 if (link.innerHTML.indexOf('<img') === -1) { 112 link.classList.add('internal-link'); 113 link.classList.add('button-gray-link-arrow'); 114 } 115 }); 116 } 117 } 118 119 if (variant === 'teasers') { 120 elem.parentNode.parentNode.classList.add('container'); 121 } 122 123 if (variant === 'seminarsAutogen') { 124 var oSlide = elem.querySelector('.flickity-slide'); 125 var sTeasers = elem.querySelectorAll('.seminar-teaser'); 126 127 if (sTeasers.length) {
128 sTeasers.forEach(function(sTeaser) { 129 var slide = document.createElement('div'); slide.classList.add('flickity-slide'); slide.appendChild(sTeaser); 130 elem.appendChild(slide); 131 }); 132 133 oSlide.parentNode.removeChild(oSlide); 134 } else { 135 elem.parentNode.innerHTML = ''; 136 return; 137 } 138 } 139 140 var sync = otherSliderUid ? document.querySelector('.flickity--' + otherSliderUid) : false; 141 var autoplayTimeout; 142 var isManualNavigation = false; 143 144 function pauseBothSliders() { 145 if (!isManualNavigation && elem.flickity) { 146 isManualNavigation = true; 147 148 // Pause this slider if it has autoplay 149 if (speed) { 150 elem.flickity.pausePlayer(); 151 } 152 153 // Pause sync slider if it has autoplay 154 if (sync && sync.flickity && sync.flickity.pausePlayer) { 155 var syncSpeed = sync.flickity.options.autoPlay; 156 if (syncSpeed) { 157 sync.flickity.pausePlayer(); 158 } 159 } 160 161 clearTimeout(autoplayTimeout); 162 autoplayTimeout = setTimeout(function() { 163 isManualNavigation = false; 164 if (speed && elem.flickity && elem.flickity.unpausePlayer) { 165 elem.flickity.unpausePlayer(); 166 } 167 if (sync && sync.flickity && sync.flickity.unpausePlayer) { 168 var syncSpeed = sync.flickity.options.autoPlay; 169 if (syncSpeed) { 170 sync.flickity.unpausePlayer(); 171 } 172 } 173 }, 10000); 174 } 175 } 176 177 imagesLoaded(elem, function() { 178 179 elem.flickity = new Flickity(elem, { 180 prevNextButtons: arrows, 181 autoPlay: speed, 182 pauseAutoPlayOnHover: true, 183 wrapAround: wrapAround, 184 cellAlign: cellAlign, 185 pageDots: variant === 'autowidth', 186 sync: sync, 187 adaptiveHeight: variant === 'navigation', 188 on: { 189 ready: function() { 190 if (variant === 'teasers') { 191 arrows = elem.querySelectorAll('.flickity-button'); 192 arrows.forEach(function(button) { 193 var target = button.parentNode.parentNode.parentNode; 194 target.classList.add('flickity--arrows-normal'); 195 target.appendChild(button); 196 }); 197 } 198 }, 199 staticClick: function() { 200 pauseBothSliders(); 201 }, 202 pointerDown: function() { 203 pauseBothSliders(); 204 } 205 } 206 }); 207 208 // Add event listeners to built-in Flickity navigation buttons 209 if (arrows) { 210 setTimeout(function() { 211 var flickityButtons = elem.querySelectorAll('.flickity-button'); 212 flickityButtons.forEach(function(button) { 213 button.addEventListener('click', function() { 214 pauseBothSliders(); 215 }); 216 }); 217 }, 100); 218 } 219 220 if (pager !== 'none') { 221 customNav.prev = customNav.querySelector('.previous'); 222 customNav.prev.addEventListener('click', function() { 223 elem.flickity.previous(true, false); 224 pauseBothSliders(); 225 }); 226 customNav.next = customNav.querySelector('.next'); 227 customNav.next.addEventListener('click', function() { 228 elem.flickity.next(true, false); 229 pauseBothSliders(); 230 }); 231 232 if (elem.querySelector('.row--hover-teaser')) { 233 function scrollUpOnMobile() { 234 if (window.innerWidth < 767) { 235 $([document.documentElement, document.body]).animate({ 236 scrollTop: $(elem).offset().top 237 }, 500); 238 } 239 } 240 customNav.next.addEventListener('click', scrollUpOnMobile) 241 customNav.prev.addEventListener('click', scrollUpOnMobile) 242 } 243 244 customNav.setActiveClass = function() { 245 customNav.indicator.items.forEach(function(item, index) { 246 if (index === elem.flickity.selectedIndex) { 247 item.classList.add('active'); 248 } else { 249 item.classList.remove('active'); 250 } 251 }); 252 } 253 254 customNav.update = function(init) { 255 if (pager === 'special') { 256 if (init) { 257 elem.flickity.cells.forEach(function(cell, index) { 258 var item = document.createElement('div'); item.classList.add('item'); item.innerHTML = index + 1; 259 item.addEventListener('click', function() { 260 elem.flickity.select(index, true, false); 261 pauseBothSliders(); 262 }); 263 customNav.indicator.appendChild(item); 264 customNav.indicator.items.push(item); 265 }); 266 } 267 customNav.setActiveClass(); 268 } else { 269 customNav.indicator.innerHTML = (elem.flickity.selectedIndex + 1) + ' / ' + elem.flickity.slides.length; 270 } 271 } 272 273 customNav.update(true); 274 elem.flickity.on('select', function() { customNav.update(false); }); 275 elem.appendChild(customNav); 276 } 277 278 if (variant === 'navigation') {
279 // elem.flickity.cells.forEach(function(current) { 280 // var link = current.element.querySelector('a'); 281 // if (!link) return; 282 // current.element.addEventListener('click', function(e) { 283 // if (customNav.contains(e.target) || customNav === e.target) return; 284 // e.preventDefault(); 285 // window.open(link, "_blank"); 286 // }); 287 // }); 288 elem.flickity.on('change', function(i) { 289 elem.flickity.cells.forEach(function(current) { 290 const frame = current.element.querySelector('.frame-default'); 291 if (!frame) return; 292 if (current === elem.flickity.cells[i]) { 293 frame.style.opacity = '1'; 294 } else { 295 frame.style.opacity = '0'; 296 } 297 }); 298 }); 299 } 300 301 if (variant === 'products') { 302 (function() { 303 var title = document.createElement('div'); title.classList.add('product-slider-title'); title.innerHTML = 'ÐСÐÐÐÐЫРÐÐ ÐÐУÐТЫ'; elem.appendChild(title); 304 setTimeout(function() { 305 elem.flickity.resize(); 306 }, 1000); 307 })(); 308 } 309 if (variant === 'downloads') { 310 (function() { 311 var title = document.createElement('div'); title.classList.add('product-slider-title'); title.innerHTML = 'СкаÑаÑÑ'; elem.appendChild(title); 312 })(); 313 } 314 if (variant === 'seminars' || variant === 'seminarsAutogen') { 315 (function() { 316 var title = document.createElement('div'); title.classList.add('product-slider-title'); title.innerHTML = 'Seminare'; elem.appendChild(title); 317 $( window ).scroll(function() { 318 elem.flickity.resize(); 319 }); 320 setTimeout(function() { 321 elem.flickity.resize(); 322 }, 1000); 323 let timer; 324 function debounce(callback, time) { 325 clearTimeout(timer) 326 timer = setTimeout(callback, time) 327 } 328 window.addEventListener('scroll', () => { 329 debounce(() => { 330 elem.flickity.resize(); 331 }, 100) 332 }); 333 })(); 334 } 335 }); 336 337 imagesLoaded(elem, function() { 338 setTimeout(function() { 339 elem.flickity.resize(); 340 }, 0); 341 elem.style.opacity = '1'; 342 var isIE11 = !!window.MSInputMethodContext && !!document.documentMode; 343 if (!isIE11) return; 344 var videos = elem.querySelectorAll('video'); 345 if (!videos.length) return; 346 videos.forEach(function(video){video.play();}); 347 }); 348 349 // dynamic margin bottom 350 (() => { 351 if (elem.className.indexOf('imagebuilder') === -1) return 352 function getHighest() { 353 const navBoxes = elem.parentNode.querySelectorAll('.flickity--nav-slider .flickity-slide') 354 if (!navBoxes.length) return 355 const highest = Array.from(navBoxes).reduce((acc, curr) => { 356 const h = curr.scrollHeight 357 return h > acc ? h : acc 358 }, 0) 359 return highest 360 } 361 function setMb() { 362 const high = getHighest() 363 if (!high) return 364 const w = window.innerWidth 365 const mob = w < 768 366 const whiteBorder = 100/1920*w 367 elem.style.marginBottom = `${high - (mob ? 0 : whiteBorder) - 20}px` 368 } 369 ['load', 'resize', 'orientationchange'].forEach(e => { 370 window.addEventListener(e, setMb) 371 }) 372 })(); 373})(); 374 375
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.