1'use strict'; 2function debounce(func, wait, immediate) { 3 var timeout; 4 return function () { 5 var context = this, 6 args = arguments, 7 later = function () { 8 (timeout = null), 9 immediate || func.apply(context, args); 10 }, 11 callNow = immediate && !timeout; 12 clearTimeout(timeout), 13 (timeout = setTimeout(later, wait)), 14 callNow && func.apply(context, args); 15 }; 16} 17function pretty(string) { 18 return string.replace(/<\/?[^>]+(>|$)/g, ''); 19} 20function _defineProperty(obj, key, value) { 21 return (key in obj ? Object.defineProperty(obj, key, { 22 value: value, 23 enumerable: !0, 24 configurable: !0, 25 writable: !0, 26 }) : (obj[key] = value), obj); 27} 28function _classCallCheck(instance, Constructor) { 29 if (!(instance instanceof Constructor)) throw new TypeError('Cannot call a class as a function'); 30} 31function _possibleConstructorReturn(self, call) { 32 if (!self) throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called'); 33 return !call || ('object' != typeof call && 'function' != typeof call) ? self : call; 34} 35function _inherits(subClass, superClass) { 36 if ('function' != typeof superClass && null !== superClass) throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); 37 (subClass.prototype = Object.create(superClass && superClass.prototype, { 38 constructor: { 39 value: subClass, 40 enumerable: !1, 41 writable: !0, 42 configurable: !0, 43 }, 44 })), 45 superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : (subClass.__proto__ = superClass)); 46} 47function MakeOptionList(props) { 48 var type = props.type, 49 typeList = props.typeList; 50 switch (type) { 51 case 'solution': 52 type = langStrings.labelSolution; 53 break; 54 case 'process': 55 type = langStrings.labelProcess; 56 break; 57 case 'technology': 58 type = langStrings.labelTechnology; 59 } 60 var uppercaseType = type[0].toUpperCase() + type.slice(1); 61 return React.createElement('div', null, React.createElement('select', { 62 name: type, 63 className: 'select mix-select_inverse', 64 onChange: props.handleSelectChange, 65 value: props.solutionSelected, 66 }, React.createElement('option', { 67 value: '' 68 }, uppercaseType), typeList && typeList.map(function (el, index) { 69 return React.createElement('option', { 70 value: el.id, 71 key: index 72 }, el.name); 73 }))); 74} 75function ProductsList(props) { 76 if (props.productList.length > 0) { 77 var list = props.productList.sort(function (a, b) { 78 var nameA = a.title.rendered.toUpperCase(), 79 nameB = b.title.rendered.toUpperCase(); 80 return nameA < nameB ? - 1 : nameA > nameB ? 1 : 0; 81 }); 82 return React.createElement('div', { 83 className: 'contentWrapper u-vrInverse_x3' 84 }, React.createElement('div', { 85 className: 'betterBlocks betterBlocks_gutter betterBlocks_2up_MD betterBlocks_3up_LG', 86 }, list.map(function (el, index) { 87 return [React.createElement(Product, { 88 key: index, 89 index: index, 90 product: el, 91 solution: props.solution, 92 technology: props.technology, 93 process: props.process, 94 handleSelectActiveChange: props.handleSelectActiveChange, 95 }), 96 ]; 97 }))); 98 } 99 return 0 !== props.productList.length || props.firstFetch ? React.createElement('div', { 100 className: 'contentWrapper' 101 }, React.createElement('h3', { 102 className: 'hdg hdg_2' 103 }, langStrings.loading)) : React.createElement('div', { 104 className: 'contentWrapper' 105 }, React.createElement('h3', { 106 className: 'hdg hdg_2' 107 }, langStrings.noProducts)); 108}(window.wdsAnimationHero = { 109}), 110(function (window, $, app) { 111 (app.init = function () { 112 app.cache(), 113 app.meetsRequirements() && app.bindEvents(); 114 }), 115 (app.cache = function () { 116 return ((app.turnedOn = !1), (app.turnOnTolerance = 0.85), (app.$c = { 117 window: $(window), 118 heroContainer: $('.animationHero'), 119 heroVideo: $('.animationHero .animationHero-video'), 120 }), (app.videoHeight = app.$c.heroVideo.height()), this); 121 }), 122 (app.bindEvents = function () { 123 app.$c.window.on('scroll', function () { 124 console.log(), 125 app.elementIsInView(app.$c.heroVideo[0]) && !app.turnedOn && (app.$c.heroVideo[0].play(), (app.turnedOn = !0)); 126 }); 127 }), 128 (app.meetsRequirements = function () { 129 return app.$c.heroContainer.length; 130 }), 131 (app.elementIsInView = function (element) { 132 return (element.getBoundingClientRect().top >= app.turnOnTolerance * app.videoHeight); 133 }), 134 $(app.init); 135}) (window, jQuery, window.wdsAnimationHero), 136(window.wdsCarousel = { 137}), 138(function (window, $, app) { 139 (app.init = function () { 140 app.cache(), 141 app.meetsRequirements() && ((app.activeSlideNumber = 0), (app.numberOfSlides = app.$c.slides.length), (app.carouselTimer = null), app.appendBullets(), app.handleBulletClick(), app.handleArrowClick(), app.runSlideShow()); 142 }), 143 (app.cache = function () { 144 app.$c = { 145 window: $(window), 146 carousel: $('.carousel'), 147 slideWrapper: $('.slide-wrapper'),
148 slides: $('.slide'), 149 leftArrow: $('.mix-carousel-arrow_left'), 150 rightArrow: $('.mix-carousel-arrow_right'), 151 play: $('.carousel_play'), 152 pause: $('.carousel_pause'), 153 }; 154 }), 155 (app.meetsRequirements = function () { 156 return app.$c.slides.length; 157 }), 158 (app.goToSlide = function (slideNumber) { 159 app.hideOldSlide(app.activeSlideNumber), 160 app.checkSlideNumber(slideNumber), 161 app.showNewSlide(); 162 }), 163 (app.checkSlideNumber = function (slideNumber) { 164 slideNumber >= app.numberOfSlides ? (app.activeSlideNumber = slideNumber % app.numberOfSlides) : (app.activeSlideNumber = slideNumber < 0 ? app.numberOfSlides - 1 : slideNumber); 165 }), 166 (app.hideOldSlide = function (oldNumber) { 167 var $oldSlide = app.$c.slides.eq(oldNumber); 168 app.deActivateBullet(oldNumber), 169 $oldSlide.removeClass('slide_isActive'), 170 $oldSlide.find('.slide-content-inner').removeClass('slide-content-inner_isActive'), 171 $oldSlide.find('.slide-image').removeClass('slide-image_isActive'), 172 $oldSlide.find('.slide-image-container').removeClass('slide-image-container_isActive'); 173 }), 174 (app.showNewSlide = function () { 175 var $newSlide = app.$c.slides.eq(app.activeSlideNumber); 176 $newSlide.addClass('slide_isActive'), 177 app.activateBullet(app.activeSlideNumber), 178 $newSlide.find('.slide-image').addClass('slide-image_isActive'), 179 $newSlide.find('.slide-content-inner').addClass('slide-content-inner_isActive'), 180 $newSlide.find('.slide-image-container').addClass('slide-image-container_isActive'); 181 }), 182 (app.goToNextSlide = function () { 183 app.goToSlide(app.activeSlideNumber + 1); 184 }), 185 (app.goToPreviousSlide = function () { 186 app.goToSlide(app.activeSlideNumber - 1); 187 }), 188 (app.pauseSlideshow = function () { 189 clearInterval(app.carouselTimer); 190 }), 191 (app.runSlideShow = function () { 192 document.onkeydown = checkKey; 193 function checkKey(e) { 194 e = e || window.event; 195 if (e.keyCode == '37') { 196 app.goToPreviousSlide(); 197 } else if (e.keyCode == '39') { 198 app.goToNextSlide(); 199 } else if (e.keyCode == '32') { 200 app.pauseSlideshow(); 201 } 202 } 203 app.carouselTimer = setInterval(function () { 204 app.goToNextSlide(); 205 }, 5000); 206 }), 207 (app.appendBullets = function () { 208 for (var bulletsString = '<li class="carousel-bullet carousel-bullet_isActive" id="js-carouse-button-' + 0 + '" aria-label="Slide 1 of ' + app.numberOfSlides + '"></li>', i = 1; i < app.numberOfSlides; i++) bulletsString += '<li class="carousel-bullet" id="js-carouse-button-' + i + '" aria-label="Slide ' + (i + 1) + ' of ' + app.numberOfSlides + '"></li>'; 209 $('.carousel-bullets').append(bulletsString), 210 (app.$c.bullets = $('.carousel-bullets').children()); 211 }), 212 (app.activateBullet = function (slideNumber) { 213 app.$c.bullets.eq(slideNumber).addClass('carousel-bullet_isActive'); 214 }), 215 (app.deActivateBullet = function (slideNumber) { 216 app.$c.bullets.eq(slideNumber).removeClass('carousel-bullet_isActive'); 217 }), 218 (app.resetSlideshow = function () { 219 clearInterval(app.carouselTimer), 220 app.runSlideShow(); 221 }), 222 (app.handleBulletClick = function () { 223 app.$c.bullets.click(function () { 224 app.debounceBulletClick(this); 225 }); 226 }), 227 (app.debounceBulletClick = debounce(function (that) { 228 var nextSlide = that.id.slice( - 1); 229 app.goToSlide(nextSlide), 230 app.resetSlideshow(); 231 }, 1000, !0)), 232 (app.handleArrowClick = function () { 233 app.$c.leftArrow.click(function () { 234 app.debounceLeftClick(); 235 }), 236 app.$c.rightArrow.click(function () { 237 app.debounceRightClick(); 238 }); 239 app.$c.play.click(function () { 240 app.resetSlideshow(); 241 }), 242 app.$c.pause.click(function () { 243 app.pauseSlideshow(); 244 }); 245 }), 246 (app.debounceLeftClick = debounce(function () { 247 app.goToPreviousSlide(), 248 app.resetSlideshow(); 249 }, 1000, !0)), 250 (app.debounceRightClick = debounce(function () { 251 app.goToNextSlide(), 252 app.resetSlideshow(); 253 }, 1000, !0)), 254 $(app.init); 255}) (window, jQuery, window.wdsCarousel), 256(window.wdsDrawer = { 257}), 258(function (window, $, app) { 259 var isOpen = !1, 260 openId = ''; 261 (app.init = function () { 262 app.cache(), 263 app.meetsRequirements() && app.bindEvents(); 264 }), 265 (app.cache = function () { 266 app.$c = { 267 window: $(window), 268 tile: $('.js-accordionParent'), 269 close: $('.js-accordionDrawer .close'), 270 }; 271 }), 272 (app.bindEvents = function () { 273 app.$c.tile.find('.js-accordionTrigger').on('click', function (e) { 274 'a' !== e.target.nodeName.toLowerCase() && app.toggleDrawer(e); 275 }), 276 app.$c.close.on('click', app.closeDrawer); 277 }), 278 (app.meetsRequirements = function () { 279 return app.$c.tile.length; 280 }), 281 (app.toggleDrawer = function (event) { 282 var closeOnly = !1, 283 timeout = 0, 284 $target = $(event.currentTarget), 285 targetDrawerId = $target.data('id'), 286 $targetDrawer = $(targetDrawerId); 287 openId === targetDrawerId && (closeOnly = !0), 288 isOpen && (app.closeDrawer(), (timeout = 500)), 289 closeOnly || setTimeout(function () { 290 app.openDrawer($target.parent(), $targetDrawer); 291 }, timeout); 292 }), 293 (app.openDrawer = function ($targetTile, $targetDrawer) { 294 var $targetDrawerContainer = $targetDrawer.find('.js-drawerContainer'); 295 $targetDrawerContainer.show(); 296 var tileCoordinates = $targetTile.get(0).getBoundingClientRect(), 297 drawerCoordinates = $targetDrawerContainer.get(0).getBoundingClientRect(), 298 tileTop = tileCoordinates.top, 299 tileHeight = $targetTile.outerHeight(), 300 drawerTop = drawerCoordinates.top, 301 rowheight = drawerTop - tileTop; 302 !(function (el) { 303 'function' == typeof jQuery && el instanceof jQuery && (el = el[0]); 304 var rect = el.getBoundingClientRect(); 305 rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && (rect.right, window.innerWidth || document.documentElement.clientWidth); 306 }) ($targetDrawer); 307 var $targetParent = $targetTile.closest('.js-accordionParent'), 308 arrowPos = rowheight - tileHeight; 309 $targetDrawerContainer.hide(), 310 $targetDrawer.addClass('drawerOpen'), 311 $targetDrawerContainer.slideDown(), 312 $targetParent.addClass('tileOpen'), 313 $targetParent.children().attr('aria-expanded', true); 314 $targetTile.find('.js-drawerArrow').css({ 315 bottom: - arrowPos 316 }), 317 (isOpen = !0), 318 (openId = '#' + $targetDrawer.attr('id')); 319 }), 320 (app.closeDrawer = function () { 321 $('.js-accordionDrawer').removeClass('drawerOpen'), 322 $('.js-accordionDrawer .js-drawerContainer').slideUp(), 323 $('.js-accordionParent').removeClass('tileOpen'), 324 (isOpen = !1), 325 (openId = ''); 326 $('.js-accordionParent').children().attr('aria-expanded', false); 327 }), 328 $(app.init); 329}) (window, jQuery, window.wdsDrawer), 330//jQuery('.wysiwyg').fitVids(), 331(window.wdsFixedHeader = { 332}), 333(function (window, $, app) { 334 (app.init = function () { 335 app.cache(), 336 app.bindEvents(); 337 }), 338 (app.cache = function () { 339 app.$c = { 340 window: $(window), 341 header: $('.headerWrapper') 342 }; 343 }), 344 (app.bindEvents = function () { 345 app.$c.window.scroll(app.toggleHeaderWrapperClass); 346 }), 347 (app.toggleHeaderWrapperClass = function () { 348 $(window).scrollTop() >= 1 ? app.$c.header.addClass('fixed') : app.$c.header.removeClass('fixed'); 349 }), 350 $(app.init); 351}) (window, jQuery, window.wdsFixedHeader), 352(window.wdsHamburgerMenu = { 353}), 354(function (window, $, app) { 355 (app.init = function () { 356 app.cache(), 357 app.appendDropDownArrows(), 358 app.handleMenuItemClick(); 359 }), 360 (app.cache = function () { 361 app.$c = { 362 window: $(window), 363 clickableMenuItem: $('.mobile-menu .menu-item-has-children > a'), 364 }; 365 }), 366 (app.appendDropDownArrows = function () { 367 //app.$c.clickableMenuItem.append('<button class="js-menu-button"><svg class="mobile-menu-arrow"><use xlink:href="#icon-arrow-right"></use></svg></button>'); 368 }), 369 (app.handleMenuItemClick = function () { 370 app.$c.clickableMenuItem.click(function (e) { 371 e.preventDefault(), 372 $(this).next(' .sub-menu ').toggleClass('isActive'), 373 $(this).find('.mobile-menu-arrow').toggleClass('isActive'); 374 $(this).find('.js-menu-button').toggleClass('isActive'); 375 if (typeof $(this).attr('aria-expanded') == 'string') { 376 $(this).attr('aria-expanded', !JSON.parse($(this).attr('aria-expanded'))); 377 } else { 378 $(this).attr('aria-expanded', !$(this).attr('aria-expanded')); 379 } 380 }); 381 }), 382 $(app.init); 383}) (window, jQuery, window.wdsHamburgerMenu), 384(document.body.className = document.body.className.replace('no-js', 'js')), 385('Microsoft Internet Explorer' === navigator.appName || navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/) || (void 0 !== jQuery.browser && !0 === jQuery.browser.msie)) && jQuery('body').addClass('ie'), 386(window.wdsMap = { 387}), 388(function (window, $, app) { 389 (app.init = function () { 390 (app.activeNumber = 0), 391 (app.locations = [ 392 ]), 393 (app.markersArray = [ 394 ]), 395 (app.markersBoundsArray = [ 396 ]), 397 (app.map = null),
398 app.cache(), 399 app.$c.tabs.length && (app.scrapeLocationData(), app.initMap(), app.createMarkersArrays(), app.setMapForAllMarkers(app.markersArray[app.activeNumber], app.map), app.map.setCenter(app.markersBoundsArray[app.activeNumber].getCenter()), app.map.fitBounds(app.markersBoundsArray[app.activeNumber]), app.attatchTabClickHandlers(), app.attatchMobileSelectHandlers()); 400 }), 401 (app.cache = function () { 402 app.$c = { 403 window: $(window), 404 tabs: $('.js-tabs li'), 405 tabPanes: $('.js-locations .js-locationPanel'), 406 }; 407 }), 408 (app.initMap = function () { 409 document.getElementById('js-map') && (app.map = new google.maps.Map(document.getElementById('js-map'), { 410 zoom: 2, 411 styles: app.googleMapStyles, 412 zoomControl: !0, 413 mapTypeControl: !0, 414 scaleControl: !1, 415 streetViewControl: !1, 416 rotateControl: !1, 417 fullscreenControl: !1, 418 mapTypeId: 'satellite', 419 })); 420 }), 421 (app.scrapeLocationData = function () { 422 app.$c.tabPanes.each(function (paneIndex, element) { 423 var paneLocationArray = [ 424 ]; 425 $(element).find('.location').each(function (locationIndex, element) { 426 var data = $(element).data(), 427 address = $(element).find('.location-detail-address').html(), 428 tempLocation = null; 429 data.lat && (tempLocation = { 430 lat: data.lat ? parseFloat(data.lat) : null, 431 lng: data.lng ? parseFloat(data.lng) : null, 432 title: data.title ? data.title : null, 433 address: address, 434 searchString: '<a href="#">da search stuff</a>', 435 }), 436 paneLocationArray.push(tempLocation); 437 }), 438 (app.locations[paneIndex] = paneLocationArray); 439 }); 440 }), 441 (app.createMarkersArrays = function () { 442 for (var i = 0; i < app.locations.length; i++) { 443 var bounds = new google.maps.LatLngBounds(), 444 tempMarkersArray = app.locations[i].map(function (location) { 445 if (location) { 446 var marker = new google.maps.Marker({ 447 position: location, 448 optimized: !1, 449 icon: { 450 url: lamScriptVars.assetsUrl + 'images/svg/google-map-marker.svg', 451 scaledSize: new google.maps.Size(15, 15), 452 }, 453 }), 454 markerContentString = '<div class="map-marker"><h1>' + location.title + '</h1>' + location.address + '<p><a href="https://www.google.com/maps/search/?api=1&query=' + location.lat + ',' + location.lng + '" target="_blank">' + lamScriptVars.langStrings.viewGoogleMap + '</a></p></div>', 455 infoWindow = new google.maps.InfoWindow({ 456 content: markerContentString, 457 }); 458 return (marker.addListener('click', function () { 459 infoWindow.open(app.map, marker); 460 }), bounds.extend(marker.getPosition()), marker); 461 } 462 return null; 463 }); 464 (app.markersArray[i] = tempMarkersArray), 465 (app.markersBoundsArray[i] = bounds); 466 } 467 }), 468 (app.setMapForAllMarkers = function (array, map) { 469 for (var i = 0; i < array.length; i++) array[i] && array[i].setMap(map); 470 }), 471 (app.clearMapForAllMarkers = function (array) { 472 app.setMapForAllMarkers(array, null); 473 }), 474 (app.showPane = function (index) { 475 index != app.activeNumber && (app.changeTabTo(index), app.changePaneTo(index), app.clearMapForAllMarkers(app.markersArray[app.activeNumber]), app.setMapForAllMarkers(app.markersArray[index], app.map), app.map.panTo(app.markersBoundsArray[index].getCenter()), app.map.fitBounds(app.markersBoundsArray[index]), (app.activeNumber = index)); 476 }), 477 (app.changeTabTo = function (index) { 478 app.$c.tabs.eq(app.activeNumber).children().removeClass('isActive'), 479 app.$c.tabs.eq(index).children().addClass('isActive'); 480 }), 481 (app.changePaneTo = function (index) { 482 app.$c.tabPanes.eq(app.activeNumber).addClass('u-isVisuallyHidden'), 483 app.$c.tabPanes.eq(index).removeClass('u-isVisuallyHidden'); 484 }), 485 (app.attatchTabClickHandlers = function () { 486 app.$c.tabs.click(function () { 487 var goToIndex = $(this).index(); 488 app.showPane(goToIndex); 489 }); 490 }), 491 (app.attatchMobileSelectHandlers = function () { 492 $('.map #js-region-select').change(function () { 493 var goToIndex = $(this).val(); 494 app.showPane(goToIndex); 495 }); 496 }), 497 $(app.init), 498 (app.googleMapStyles = [ 499 { 500 elementType: 'geometry', 501 stylers: [ 502 { 503 color: '#f5f5f5' 504 } 505 ] 506 }, 507 { 508 elementType: 'labels.icon', 509 stylers: [ 510 { 511 visibility: 'off' 512 } 513 ], 514 }, 515 { 516 elementType: 'labels.text.fill', 517 stylers: [ 518 { 519 color: '#616161' 520 } 521 ], 522 }, 523 { 524 elementType: 'labels.text.stroke', 525 stylers: [ 526 { 527 color: '#f5f5f5' 528 } 529 ], 530 }, 531 { 532 featureType: 'administrative.country', 533 elementType: 'geometry.stroke', 534 stylers: [ 535 { 536 color: '#b3b3b3' 537 }, 538 { 539 weight: 1 540 } 541 ], 542 }, 543 { 544 featureType: 'administrative.land_parcel', 545 elementType: 'labels.text.fill', 546 stylers: [ 547 { 548 color: '#bdbdbd' 549 } 550 ], 551 }, 552 { 553 featureType: 'administrative.province', 554 elementType: 'geometry.stroke', 555 stylers: [ 556 { 557 color: '#838383' 558 }, 559 { 560 visibility: 'on' 561 } 562 ], 563 }, 564 { 565 featureType: 'poi', 566 elementType: 'geometry', 567 stylers: [ 568 { 569 color: '#eeeeee' 570 } 571 ], 572 }, 573 { 574 featureType: 'poi', 575 elementType: 'labels.text.fill', 576 stylers: [ 577 { 578 color: '#757575' 579 } 580 ], 581 }, 582 { 583 featureType: 'poi.park', 584 elementType: 'geometry', 585 stylers: [ 586 { 587 color: '#e5e5e5' 588 } 589 ], 590 }, 591 { 592 featureType: 'poi.park', 593 elementType: 'labels.text.fill', 594 stylers: [ 595 { 596 color: '#9e9e9e' 597 } 598 ], 599 }, 600 { 601 featureType: 'road', 602 elementType: 'geometry', 603 stylers: [ 604 { 605 color: '#ffffff' 606 } 607 ], 608 }, 609 { 610 featureType: 'road.arterial', 611 elementType: 'labels.text.fill', 612 stylers: [ 613 { 614 color: '#757575' 615 } 616 ], 617 }, 618 { 619 featureType: 'road.highway', 620 elementType: 'geometry', 621 stylers: [ 622 { 623 color: '#e6e6e6' 624 } 625 ], 626 }, 627 { 628 featureType: 'road.highway', 629 elementType: 'labels.text.fill', 630 stylers: [ 631 { 632 color: '#616161' 633 } 634 ], 635 }, 636 { 637 featureType: 'road.local', 638 elementType: 'labels.text.fill', 639 stylers: [ 640 { 641 color: '#9e9e9e' 642 } 643 ], 644 }, 645 { 646 featureType: 'transit.line', 647 elementType: 'geometry', 648 stylers: [ 649 { 650 color: '#e5e5e5' 651 } 652 ], 653 }, 654 { 655 featureType: 'transit.station', 656 elementType: 'geometry', 657 stylers: [ 658 { 659 color: '#eeeeee' 660 } 661 ], 662 }, 663 { 664 featureType: 'water', 665 elementType: 'geometry', 666 stylers: [ 667 { 668 color: '#c9c9c9' 669 } 670 ], 671 }, 672 { 673 featureType: 'water', 674 elementType: 'labels.text.fill', 675 stylers: [ 676 { 677 color: '#9e9e9e' 678 } 679 ], 680 }, 681 ]); 682}) (window, jQuery, window.wdsMap), 683(window.wdsModal = { 684}), 685(function (window, $, app) { 686 var $modalToggle = void 0, 687 $focusableChildren = void 0, 688 $player = void 0, 689 $tag = document.createElement('script'), 690 $firstScriptTag = document.getElementsByTagName('script') [0]; 691 (app.init = function () { 692 app.cache(), 693 app.meetsRequirements() && ($firstScriptTag.parentNode.insertBefore($tag, $firstScriptTag), app.bindEvents()); 694 }), 695 (app.cache = function () { 696 app.$c = { 697 body: $('body') 698 }; 699 }), 700 (app.meetsRequirements = function () { 701 return $('.modal-trigger').length; 702 }), 703 (app.bindEvents = function () { 704 app.$c.body.on('click touchstart', '.modal-trigger', app.openModal), 705 app.$c.body.on('click touchstart', '.close', app.closeModal), 706 app.$c.body.on('keydown', app.escKeyClose), 707 app.$c.body.on('click touchstart', 'div.modal-open', app.closeModalByClick), 708 app.$c.body.on('keydown', app.trapKeyboardMaybe); 709 }), 710 (app.openModal = function () { 711 $modalToggle = $(this); 712 var $modal = $($(this).data('target')); 713 $modal.addClass('modal-open'), 714 app.$c.body.addClass('modal-open'), 715 ($focusableChildren = $modal.find('a, :input, [tabindex]')), 716 0 < $focusableChildren.length && $focusableChildren[0].focus(); 717 }), 718 (app.closeModal = function () { 719 var $modal = $($('div.modal-open .close').data('target')), 720 $iframe = $modal.find('iframe'); 721 if ($iframe.length) { 722 var url = $iframe.attr('src'); 723 url.includes('enablejsapi=1') ? $player.stopVideo() : $iframe.attr('src', '').attr('src', url); 724 } 725 $modal.removeClass('modal-open'), 726 app.$c.body.removeClass('modal-open'), 727 $modalToggle.focus(); 728 }), 729 (app.escKeyClose = function (event) { 730 27 === event.keyCode && app.closeModal(); 731 }), 732 (app.closeModalByClick = function (event) { 733 $(event.target).parents('div').hasClass('modal-dialog') || app.closeModal(); 734 }), 735 (app.trapKeyboardMaybe = function (event) { 736 if (9 === event.which && 0 < $('.modal-open').length) {
737 var $focused = $(':focus'), 738 focusIndex = $focusableChildren.index($focused); 739 0 === focusIndex && event.shiftKey ? ($focusableChildren[$focusableChildren.length - 1].focus(), event.preventDefault()) : event.shiftKey || focusIndex !== $focusableChildren.length - 1 || ($focusableChildren[0].focus(), event.preventDefault()); 740 } 741 }), 742 (app.onYouTubeIframeAPIReady = function () { 743 var $modal = $('div.modal'), 744 $iframeid = $modal.find('iframe').attr('id'); 745 $player = new (void 0).Player($iframeid, { 746 events: { 747 onReady: app.onPlayerReady, 748 onStateChange: app.onPlayerStateChange, 749 }, 750 }); 751 }), 752 (app.onPlayerReady = function () { 753 }), 754 (app.onPlayerStateChange = function () { 755 $(event.target.a).parents('.modal').find('a, :input, [tabindex]').first().focus(); 756 }), 757 $(app.init); 758}) (window, jQuery, window.wdsModal), 759(window.wdsPrimaryNavigation = { 760}), 761(function (window, $, app) { 762 (app.init = function () { 763 app.cache(), 764 app.meetsRequirements() && app.bindEvents(); 765 }), 766 (app.cache = function () { 767 app.$c = { 768 window: $(window), 769 document: $(document), 770 subMenuContainer: $('.main-navigation .sub-menu'), 771 subMenuParentItem: $('.main-navigation div.menu-item-has-children'), 772 }; 773 }), 774 (app.bindEvents = function () { 775 app.$c.subMenuParentItem.find('a').on('click', function (e) { 776 if ($(this).parent('div.menu-item-has-children').hasClass('noEvent')) return e.preventDefault(), 777 app.toggleFocus($(this)); 778 }), 779 app.$c.document.click(function (event) { 780 if (!$(event.target).closest('.main-navigation').length) { 781 $('.main-navigation').find('.focus').children('a').attr('aria-expanded', false); 782 $('.main-navigation').find('.focus').removeClass('focus'); 783 } 784 }); 785 }), 786 (app.meetsRequirements = function () { 787 return app.$c.subMenuContainer.length; 788 }), 789 (app.addDownArrow = function () { 790 app.$c.subMenuParentItem.find('> a').append('<span class="caret-down" aria-hidden="true"></span>'); 791 }), 792 (app.toggleFocus = function (that) { 793 var $target = $(that).parent('div.menu-item-has-children'), 794 state = !1; 795 $target.hasClass('focus') && (state = !0), 796 $('.main-navigation').find('.focus').children('a').attr('aria-expanded', false); 797 $('.main-navigation').find('.focus').removeClass('focus'); 798 if (!1 === state) { 799 $(that).parents('div.menu-item-has-children').addClass('focus'); 800 $('.main-navigation').find('.focus').children('a').attr('aria-expanded', true); 801 } 802 }), 803 $(app.init); 804}) (window, jQuery, window.wdsPrimaryNavigation), 805(window.nestle = { 806}), 807(function (window, $, app) { 808 (app.init = function () { 809 app.cache(), 810 app.hideNestleElements(), 811 app.attachHandlers(), 812 app.checkInstancesForInView(); 813 }), 814 (app.cache = function () { 815 app.$c = { 816 window: $(window), 817 nestleInstances: $('[data-nestle]'), 818 }; 819 }), 820 (app.hideNestleElements = function () { 821 app.$c.nestleInstances.each(function () { 822 $(this).addClass('zeroOpacity'); 823 }); 824 }), 825 (app.attachHandlers = function () { 826 app.$c.window.on('scroll', function () { 827 app.checkInstancesForInView(); 828 }); 829 }), 830 (app.checkInstancesForInView = function () { 831 app.$c.nestleInstances.each(function (index) { 832 if (app.isInView($(this))) { 833 var animationName = $(this).data('nestle'); 834 $(this).addClass(animationName), 835 $(this).removeClass('zeroOpacity'); 836 } 837 }); 838 }), 839 (app.isInView = function ($elem) { 840 var docViewTop = app.$c.window.scrollTop(), 841 elemTop = $elem.offset().top; 842 return (docViewTop + app.$c.window.height() - 200 >= elemTop && elemTop >= docViewTop); 843 }), 844 $(app.init); 845}) (window, jQuery, window.nestle); 846var langStrings = lamScriptVars.langStrings; 847(window.wdsoffCanvas = { 848}), 849(function (window, $, app) { 850 (app.init = function () { 851 app.cache(); 852 lamScriptVars.langStrings; 853 (app.languagesOpen = !1), 854 app.meetsRequirements() && (app.bindEvents(), app.replaceLanguageText(), app.onCloseLanguages()); 855 }), 856 (app.cache = function () { 857 (app.$c = { 858 body: $('body'), 859 offCanvasClose: $('.off-canvas-close'), 860 offCanvasContainer: $('.off-canvas-container'), 861 offCanvasOpen: $('.off-canvas-open'), 862 offCanvasScreen: $('.off-canvas-screen'), 863 languagesText: $('.menu-languages > a'), 864 mobileLanguagesText: $('.mobile-menu .menu-languages > a'), 865 mobileLanguagesMenu: $('.mobile-menu .menu-languages .sub-menu'), 866 }), 867 (app.currentLanguage = langStrings.langSwitcher), 868 (app.currentLanguageFlag = langStrings.langFlag), 869 (app.backButton = langStrings.backButton); 870 }), 871 (app.bindEvents = function () { 872 app.$c.body.on('keydown', app.escKeyClose), 873 app.$c.offCanvasClose.on('click', function () { 874 app.toggleoffCanvas(); 875 }), 876 app.$c.offCanvasOpen.on('click', function () { 877 app.toggleoffCanvas(); 878 }), 879 app.$c.offCanvasScreen.on('click', function () { 880 app.closeoffCanvas(); 881 }), 882 app.$c.body.on('click', 'nav.is-visible', function (event) { 883 $(event.target).parents('nav.is-visible').length || app.closeoffCanvas(); 884 }), 885 $(window).resize(function () { 886 $(this).innerWidth() > 1259 && app.closeoffCanvas(); 887 }); 888 }), 889 (app.meetsRequirements = function () { 890 return app.$c.offCanvasContainer.length; 891 }), 892 (app.replaceLanguageText = function () { 893 var rightArrow = '<button class="js-menu-button"><svg class="mobile-menu-arrow"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-arrow-right"></use></svg></button>', 894 backButtonMarkup = '<li id="js-mobile-back" class="menu-item"><a title="Back" href="http://lam.dev/">' + rightArrow + '<span class="menu-image-title">' + langStrings.backButton + '</span></a></li>', 895 languageMarkup = '<img src="' + app.currentLanguageFlag + '" class="languageFlag">' + app.currentLanguage; 896 app.$c.languagesText.html(languageMarkup), 897 app.$c.languagesText.attr('class', 'languageLink'), 898 app.$c.mobileLanguagesText.html('<div>' + languageMarkup + '</div>' + rightArrow), 899 app.$c.mobileLanguagesMenu.prepend(backButtonMarkup); 900 }), 901 (app.onCloseLanguages = function () { 902 $('#js-mobile-back').on('click', function (e) { 903 e.preventDefault(), 904 $(this).closest('.sub-menu').removeClass('isActive'), 905 $('.js-menu-button .mobile-menu-arrow').removeClass('isActive'); 906 $('.js-menu-button').removeClass('isActive'); 907 }); 908 }), 909 (app.toggleoffCanvas = function () { 910 'true' === app.$c.offCanvasOpen.attr('aria-expanded') ? app.closeoffCanvas() : app.openoffCanvas(); 911 }), 912 (app.openoffCanvas = function () { 913 app.$c.offCanvasContainer.addClass('is-visible'), 914 app.$c.offCanvasOpen.addClass('is-visible'), 915 app.$c.offCanvasScreen.addClass('is-visible'), 916 app.$c.offCanvasOpen.attr('aria-expanded', !0), 917 app.$c.offCanvasContainer.attr('aria-hidden', !1), 918 app.$c.offCanvasContainer.find('button').first().focus(), 919 app.$c.body.css({ 920 overflow: 'hidden', 921 position: 'fixed' 922 }); 923 }), 924 (app.closeoffCanvas = function () { 925 app.$c.offCanvasContainer.removeClass('is-visible'), 926 app.$c.offCanvasOpen.removeClass('is-visible'), 927 app.$c.offCanvasScreen.removeClass('is-visible'), 928 app.$c.offCanvasOpen.attr('aria-expanded', !1), 929 app.$c.offCanvasContainer.attr('aria-hidden', !0), 930 app.$c.offCanvasOpen.focus(), 931 app.$c.body.css({ 932 overflow: 'auto', 933 position: 'relative' 934 }); 935 }), 936 (app.escKeyClose = function (event) { 937 27 === event.keyCode && app.closeoffCanvas(); 938 }), 939 $(app.init); 940}) (window, jQuery, window.wdsoffCanvas); 941var _createClass = (function () { 942 function defineProperties(target, props) { 943 for (var i = 0; i < props.length; i++) { 944 var descriptor = props[i]; 945 (descriptor.enumerable = descriptor.enumerable || !1), 946 (descriptor.configurable = !0), 947 'value' in descriptor && (descriptor.writable = !0), 948 Object.defineProperty(target, descriptor.key, descriptor); 949 } 950 } 951 return function (Constructor, protoProps, staticProps) { 952 return (protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), Constructor); 953 }; 954}) (), 955langStrings = lamScriptVars.langStrings, 956_lamScriptVars = lamScriptVars, 957assetsUrl = _lamScriptVars.assetsUrl, 958ProductSearch = (function (_React$Component) { 959 function ProductSearch() { 960 _classCallCheck(this, ProductSearch); 961 var _this = _possibleConstructorReturn(this, (ProductSearch.__proto__ || Object.getPrototypeOf(ProductSearch)).call(this)); 962 return ((_this.state = { 963 searchText: '', 964 solution: null, 965 process: null, 966 technology: null, 967 solutionSelected: null, 968 processSelected: null, 969 technologySelected: null, 970 products: [ 971 ], 972 firstFetch: !0, 973 }), (_this.handleTextChange = _this.handleTextChange.bind(_this)), (_this.handleSelectChange = _this.handleSelectChange.bind(_this)), (_this.handleSelectActiveChange = _this.handleSelectActiveChange.bind(_this)), (_this.fetchCategory = _this.fetchCategory.bind(_this)), (_this.fetchProducts = _this.fetchProducts.bind(_this)), (_this.debounceFetchProducts = debounce(_this.debounceFetchProducts, 400)), _this); 974 } 975 return (_inherits(ProductSearch, _React$Component), _createClass(ProductSearch, [ 976 { 977 key: 'componentWillMount', 978 value: function () { 979 this.fetchCategory('solution'), 980 this.fetchCategory('process'), 981 this.fetchCategory('technology'), 982 this.fetchProducts(); 983 }, 984 }, 985 { 986 key: 'fetchCategory', 987 value: function (type) { 988 var tempArray = [ 989 ], 990 that = this; 991 jQuery.get(lamScriptVars.restUrl + 'wp/v2/' + type + '?per_page=100', function (data) { 992 (tempArray = data.map(function (el) { 993 return { 994 name: el.name, 995 id: el.id 996 }; 997 })), 998 that.setState(_defineProperty({ 999 }, type, tempArray)); 1000 }), 1001 jQuery.get(lamScriptVars.restUrl + 'wp/v2/' + type + '?per_page=100', function (data) { 1002 (tempArray = data.map(function (el) { 1003 return { 1004 name: el.name, 1005 id: el.id 1006 }; 1007 })), 1008 that.setState(_defineProperty({ 1009 }, type, tempArray)); 1010 }); 1011 }, 1012 }, 1013 { 1014 key: 'fetchProducts', 1015 value: function () { 1016 var _state = this.state, 1017 searchText = _state.searchText, 1018 solutionSelected = _state.solutionSelected, 1019 processSelected = _state.processSelected, 1020 technologySelected = _state.technologySelected, 1021 query = '?per_page=100', 1022 that = this; 1023 searchText && (query += '&search=' + searchText), 1024 solutionSelected && (query += '&solution=' + solutionSelected), 1025 processSelected && (query += '&process=' + processSelected), 1026 technologySelected && (query += '&technology=' + technologySelected), 1027 jQuery.get(lamScriptVars.restUrl + 'wp/v2/product' + query, function (data) { 1028 that.setState({ 1029 products: [ 1030 ] 1031 }, function () { 1032 that.setState({ 1033 products: data, 1034 firstFetch: !1, 1035 }, function () { 1036 wdsDrawer.init(); 1037 }); 1038 }); 1039 }); 1040 }, 1041 }, 1042 { 1043 key: 'handleTextChange', 1044 value: function (e) { 1045 var that = this; 1046 this.setState(_defineProperty({ 1047 }, e.target.name, e.target.value), function () { 1048 that.debounceFetchProducts(); 1049 }); 1050 }, 1051 }, 1052 { 1053 key: 'debounceFetchProducts', 1054 value: function () { 1055 this.fetchProducts(); 1056 }, 1057 }, 1058 { 1059 key: 'handleSelectChange', 1060 value: function (e) { 1061 var _this2 = this, 1062 name = e.target.name.toLowerCase(), 1063 value = e.target.value; 1064 this.setState(_defineProperty({ 1065 }, name + 'Selected', value), function () { 1066 return _this2.fetchProducts(); 1067 }); 1068 }, 1069 }, 1070 { 1071 key: 'handleSelectActiveChange', 1072 value: function (solutionNumber) { 1073 var that = this; 1074 this.setState({ 1075 solutionSelected: solutionNumber 1076 }, function () { 1077 that.fetchProducts(); 1078 }); 1079 }, 1080 }, 1081 { 1082 key: 'render', 1083 value: function () { 1084 return React.createElement('div', { 1085 className: 'mix-contentWrapper_clearFix' 1086 }, React.createElement(FilterBar, { 1087 handleTextChange: this.handleTextChange, 1088 handleSelectChange: this.handleSelectChange, 1089 searchText: this.state.searchText, 1090 solution: this.state.solution, 1091 process: this.state.process, 1092 technology: this.state.technology, 1093 solutionSelected: this.state.solutionSelected, 1094 }), React.createElement(ProductsList, { 1095 productList: this.state.products, 1096 technology: this.state.technology, 1097 process: this.state.process, 1098 solution: this.state.solution, 1099 handleSelectActiveChange: this.handleSelectActiveChange, 1100 firstFetch: this.state.firstFetch, 1101 })); 1102 }, 1103 }, 1104 ]), ProductSearch); 1105}) (React.Component), 1106FilterBar = (function (_React$Component2) { 1107 function FilterBar() { 1108 return (_classCallCheck(this, FilterBar), _possibleConstructorReturn(this, (FilterBar.__proto__ || Object.getPrototypeOf(FilterBar)).apply(this, arguments))); 1109 } 1110 return (_inherits(FilterBar, _React$Component2), _createClass(FilterBar, [ 1111 { 1112 key: 'render', 1113 value: function () { 1114 return React.createElement('div', { 1115 className: 'contentWrapper' 1116 }, React.createElement('section', { 1117 className: 'productFilterBar u-vr_x1half' 1118 }, React.createElement('div', { 1119 className: 'productFilterBar-inner' 1120 }, React.createElement('form', { 1121 className: 'productFilterBar-form u-vr_x1', 1122 }, React.createElement('div', { 1123 className: 'productFilterBar-form-search', 1124 }, React.createElement('img', { 1125 className: 'productFilterBar-form-search-background', 1126 src: assetsUrl + 'images/triangle-bg.png', 1127 }), React.createElement('h1', { 1128 className: 'hdg hdg_2 u-color_inverse u-vr_x1half', 1129 }, 'Search'), React.createElement('hr', { 1130 className: 'hdg_u_short', 1131 }), React.createElement('input', { 1132 type: 'text', 1133 name: 'searchText', 1134 className: 'input input_text mix-input_search mix-input_inverse u-color_inverse', 1135 placeholder: langStrings.placeholderSearch, 1136 value: this.props.searchText, 1137 onChange: this.props.handleTextChange, 1138 })), React.createElement('div', { 1139 className: 'productFilterBar-form-select', 1140 }, React.createElement('img', { 1141 className: 'productFilterBar-form-select-background', 1142 src: assetsUrl + 'images/triangle-bg.png', 1143 }), React.createElement('h1', { 1144 className: 'hdg hdg_2 u-color_inverse u-vr_x1half', 1145 }, 'Filter'), React.createElement('hr', { 1146 className: 'hdg_u_short', 1147 }), React.createElement('div', { 1148 className: 'productFilterBar-form-select-selects', 1149 }, React.createElement('div', { 1150 className: 'label-select-div', 1151 }, React.createElement('lable', { 1152 className: 'label u-color_inverse', 1153 }, 'Solution'), React.createElement(MakeOptionList, { 1154 type: 'solution', 1155 typeList: this.props.solution, 1156 handleSelectChange: this.props.handleSelectChange, 1157 solutionSelected: this.props.solutionSelected, 1158 })), React.createElement('div', { 1159 className: 'label-select-div', 1160 }, React.createElement('lable', { 1161 className: 'label u-color_inverse', 1162 }, 'Process'), React.createElement(MakeOptionList, { 1163 type: 'process', 1164 typeList: this.props.process, 1165 handleSelectChange: this.props.handleSelectChange, 1166 })), React.createElement('div', { 1167 className: 'label-select-div', 1168 }, React.createElement('lable', { 1169 className: 'label u-color_inverse', 1170 }, 'Techno
1170logy'), React.createElement(MakeOptionList, { 1171 type: 'technology', 1172 typeList: this.props.technology, 1173 handleSelectChange: this.props.handleSelectChange, 1174 })))))))); 1175 }, 1176 }, 1177 ]), FilterBar); 1178}) (React.Component), 1179Product = (function (_React$Component3) { 1180 function Product(props) { 1181 _classCallCheck(this, Product); 1182 var _this4 = _possibleConstructorReturn(this, (Product.__proto__ || Object.getPrototypeOf(Product)).call(this, props)); 1183 return ((_this4.state = { 1184 imgUrl: null, 1185 productId: _this4.props.product.id, 1186 }), _this4.fetchImage(), _this4); 1187 } 1188 return (_inherits(Product, _React$Component3), _createClass(Product, [ 1189 { 1190 key: 'componentDidMount', 1191 value: function () { 1192 } 1193 }, 1194 { 1195 key: 'fetchImage', 1196 value: function () { 1197 } 1198 }, 1199 { 1200 key: 'render', 1201 value: function () { 1202 var _props = this.props, 1203 product = (_props.props, _props.product), 1204 index = (_props.process, _props.solution, _props.technology, _props.index), 1205 bgStyle = { 1206 }; 1207 return (product.featured_media_src && (bgStyle = { 1208 backgroundImage: 'url(' + product.featured_media_src + ')', 1209 animation: 'fadeIn 1s', 1210 }), React.createElement('div', { 1211 style: { 1212 animation: 'fadeIn 1s' 1213 } 1214 }, React.createElement('div', { 1215 className: 'm14 m14_boxShadow', 1216 'data-id': '#pro' + index, 1217 }, React.createElement('div', { 1218 style: bgStyle, 1219 className: 'm7-tile-img', 1220 }, React.createElement('div', { 1221 className: 'm7-tile-img-inner', 1222 })), React.createElement('div', { 1223 className: 'm14-bd' 1224 }, React.createElement('h5', { 1225 className: 'hdg hdg_3 u-vr_x1', 1226 dangerouslySetInnerHTML: { 1227 __html: product.title.rendered, 1228 }, 1229 }), React.createElement('div', { 1230 className: 'u-bold u-vr_x1' 1231 }, React.createElement('p', { 1232 className: 'productListItem', 1233 }, product.technology_terms.map(function (el, index) { 1234 return React.createElement('span', null, el.name); 1235 }))), React.createElement('div', { 1236 className: ' u-vr_x1' 1237 }, React.createElement('p', { 1238 dangerouslySetInnerHTML: { 1239 __html: product.excerpt.rendered, 1240 }, 1241 })), React.createElement('div', { 1242 className: 'u-vr_x1 m14-bd-solutions', 1243 }, product.solution_terms.map(function (el, index) { 1244 return React.createElement('span', null, !!index && ', ', React.createElement('a', { 1245 href: '/' + el.taxonomy + '/' + el.slug, 1246 }, el.name)); 1247 })), React.createElement('div', null, React.createElement('a', { 1248 href: product.link 1249 }, React.createElement('img', { 1250 src: '/wp-content/uploads/2021/06/right-arrow-dark-green.svg', 1251 height: '44px', 1252 class : 'alignright productcard-arrow-btn', 1253 }))))), React.createElement('div', { 1254 className: 'm7-drawerArrow js-drawerArrow', 1255 'aria-hidden': 'true', 1256 }))); 1257 }, 1258 }, 1259 ]), Product); 1260}) (React.Component); 1261document.getElementById('ProductsSearchApp') && ReactDOM.render(React.createElement(ProductSearch, null), document.getElementById('ProductsSearchApp')), 1262(window.wdsSearchBar = { 1263}), 1264(function (window, $, app) { 1265 (app.init = function () { 1266 app.cache(), 1267 app.attachSearchButtonToggle(); 1268 }), 1269 (app.cache = function () { 1270 (app.searchIsOpen = !1), 1271 (app.$c = { 1272 window: $(window), 1273 searchBar: $('.js-searchBar'), 1274 searchButtons: $('.js-searchBarButton, .js-searchIcon-mobile'), 1275 }); 1276 }), 1277 (app.toggleSearchBar = function () { 1278 app.$c.searchBar.toggleClass('isActive'), 1279 app.searchIsOpen ? (app.$c.searchButtons.find('use').attr('xlink:href', '#icon-search-thin'), app.$c.searchButtons.removeClass('search-active'), app.$c.searchButtons.attr('aria-expanded', false), (app.searchIsOpen = !1)) : (app.$c.searchButtons.find('use').attr('xlink:href', '#icon-close'), app.$c.searchButtons.attr('aria-expanded', true), app.$c.searchButtons.addClass('search-active'), (app.searchIsOpen = !0)); 1280 }), 1281 (app.attachSearchButtonToggle = function () { 1282 app.$c.searchButtons.click(function () { 1283 app.toggleSearchBar(); 1284 }); 1285 }), 1286 $(app.init); 1287}) (window, jQuery, window.wdsSearchBar),
1288(function () { 1289 var isWebkit = - 1 < navigator.userAgent.toLowerCase().indexOf('webkit'), 1290 isOpera = - 1 < navigator.userAgent.toLowerCase().indexOf('opera'), 1291 isIe = - 1 < navigator.userAgent.toLowerCase().indexOf('msie'); 1292 (isWebkit || isOpera || isIe) && document.getElementById && window.addEventListener && window.addEventListener('hashchange', function () { 1293 var element, 1294 id = location.hash.substring(1); 1295 /^[A-z0-9_-]+$/.test(id) && (element = document.getElementById(id)) && (/^(?:a|select|input|button|textarea)$/i.test(element.tagName) || (element.tabIndex = - 1), element.focus()); 1296 }, !1); 1297}) (), 1298(window.wdsVideos = { 1299}), 1300(function (window, $, app) { 1301 (app.init = function () { 1302 app.cache(), 1303 app.$c.videoPlayer && (app.$c.youtube.addClass('video'), app.$c.videoButtons && app.applyButtonHandlers()); 1304 }), 1305 (app.cache = function () { 1306 app.$c = { 1307 window: $(window), 1308 videoPlayer: $('.js-videoPlayer'), 1309 video: $('.js-videoPlayer video'), 1310 videoSource: $('.js-videoPlayer source'), 1311 videoButtons: $('.js-videoPlayer-button'), 1312 youtube: $('#youtube'), 1313 options: $('.optionList'), 1314 youtubeContainer: $('.videoPlayer-video'), 1315 }; 1316 }), 1317 (app.applyButtonHandlers = function () { 1318 app.$c.videoButtons.click(function () { 1319 var newVideo = $(this).data('videoId'); 1320 app.$c.youtube.attr('src', 'https://www.youtube.com/embed/' + newVideo + '?rel=0&autoplay=1'), 1321 app.$c.youtube.attr('title', this.getElementsByClassName('video-playlist-font') [0].innerText), 1322 app.$c.videoButtons.removeClass('isActive'), 1323 $(this).addClass('isActive'); 1324 }); 1325 }), 1326 (app.setHeightOfOptions = function () { 1327 var videoHeight = app.$c.youtubeContainer.outerHeight(); 1328 app.$c.window.innerWidth() < 750 ? app.$c.options.removeAttr('style') : app.$c.options.css('height', videoHeight); 1329 }), 1330 (app.attachHeightChange = function () { 1331 app.$c.window.on('resize', app.setHeightOfOptions); 1332 }), 1333 $(app.init); 1334}) (window, jQuery, window.wdsVideos), 1335(window.wdsWindowReady = { 1336}), 1337(function (window, $, app) { 1338 (app.init = function () { 1339 app.cache(), 1340 app.bindEvents(); 1341 }), 1342 (app.cache = function () { 1343 app.$c = { 1344 window: $(window), 1345 body: $(document.body) 1346 }; 1347 }), 1348 (app.bindEvents = function () { 1349 app.$c.window.on('load', function() {app.addBodyClass}); 1350 }), 1351 (app.addBodyClass = function () { 1352 app.$c.body.addClass('ready'); 1353 }), 1354 $(app.init); 1355}) (window, jQuery, window.wdsWindowReady); 1356
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.