document.addEventListener("DOMContentLoaded",(event)=>{var allCheckBox=document.querySelectorAll(".acceptanceCheckBox");allCheckBox.forEach((elem)=>{elem.querySelector("input").addEventListener("click",(e)=>{console.log(elem.querySelector("input").checked);if(elem.querySelector("input").checked){elem.querySelector(".acceptanceCheckBoxLinks_outerBox").style.display="block";}else{elem.querySelector(".acceptanceCheckBoxLinks_outerBox").style.display="none";}});});});document.addEventListener("DOMContentLoaded",(event)=>{document.querySelectorAll('.abpi__contactUsForm').forEach(function(form){var subjectDropdown=form.querySelector('.subject select');subjectDropdown.onchange=ContactUsSubjectChange;form.querySelectorAll('.subject select option').forEach(function(dropdownItem){var dropdownItemSegments=dropdownItem.value.split('|');if(dropdownItemSegments&&dropdownItemSegments.length>1){dropdownItem.textContent=dropdownItemSegments[1];}});});});function ContactUsSubjectChange(event){var contactUsForm=this.closest('.abpi__contactUsForm');var actualsubject=contactUsForm.querySelector('.actualsubject .hidden');actualsubject.value=this.options[this.selectedIndex].text;var actualemail=contactUsForm.querySelector('.actualemail .hidden');actualemail.value=this.value.split('|')[0];} document.addEventListener("DOMContentLoaded",(event)=>{var allContentBoxOnlyItemsInGrid=document.querySelectorAll('.customgridwrapper .row .column:nth-child(1) > div > .contentbox:nth-child(1)');if(allContentBoxOnlyItemsInGrid){allContentBoxOnlyItemsInGrid.forEach(function(firstColumnContentBox){var parentRow=firstColumnContentBox.closest(".row");if(parentRow){var allColumnData=parentRow.querySelectorAll('.column > div');if(allColumnData){var contentBoxExclusiveRow=false;for(var i=0;i{checkCookie();});function checkCookie(){var hasCookieConsent=getCookie("cookiePopupAccepted");var cookieAccept=document.querySelector(".cookie-container__actions__accept");var cookieBanner=document.querySelector(".cookie-container");if(cookieBanner){if(hasCookieConsent!=""){cookieBanner.classList.add("hidden");}else{cookieBanner.classList.remove("hidden");} if(cookieBanner){cookieAccept.addEventListener("click",(e)=>{cookieBanner.classList.add("hidden");setCookie("cookiePopupAccepted","true",365);setCookie("cookieAnalyticsAccepted","true",365);e.preventDefault();});}}} function getCookie(cname){var name=cname+"=";var ca=document.cookie.split(";");for(var i=0;i{var allowAnalytics=document.getElementById('allowAnalytics');if(allowAnalytics){allowAnalytics.addEventListener('input',function(evt){document.querySelector('.cookiesettings__savebutton').classList.add('cookiesettings__savebutton--pulse');});}});var promoNavResizeTimer;var secondLevelNavResizeTimer;document.addEventListener("DOMContentLoaded",(event)=>{if(window.innerWidth>991){let secondMenuItems=document.querySelectorAll(".menu__item__second-level-container__area:not(.onlyLink)");let thirdMenus=document.querySelectorAll(".menu__item__third-level-container");secondMenuItems.forEach((secondMenuItem)=>{secondMenuItem.addEventListener("click",(e)=>{e.preventDefault();secondMenuItem.classList.toggle("shown");secondMenuItems.forEach((_)=>secondMenuItem!=_&&_.classList.remove("shown"));const thirdLevelMenu=e.currentTarget.nextElementSibling;thirdLevelMenu.classList.toggle("open");thirdMenus.forEach((t)=>{if(t!==thirdLevelMenu){t.classList.remove("open");}});});});window.onclick=(e)=>{let menuItems=document.querySelectorAll(".menu__item__area");menuItems.forEach((item)=>{if(!item.parentNode.contains(e.target)){item.parentNode.classList.remove("firstLevelNavActive");item.parentNode.querySelector(".shown")?.classList.remove("shown");item.parentNode.querySelector(".open")?.classList.remove("open");}});};} window.addEventListener("resize",function(event){clearTimeout(promoNavResizeTimer);promoNavResizeTimer=setTimeout(ResetPromoNavHeight,250);clearTimeout(secondLevelNavResizeTimer);secondLevelNavResizeTimer=setTimeout(ResetSecondLevelNavHeight,250);});var menuItems=document.getElementsByClassName("menu__item__area");var liList=document.querySelectorAll(".menu__item__mainnav__global > li");for(var x=0;x{elem.addEventListener("click",(e)=>{if(document.documentElement.clientWidth<992){var secondLevelItems=elem.nextElementSibling.firstElementChild.firstElementChild.nextElementSibling.nextElementSibling.children;if(secondLevelItems.length>0){if(elem.nextElementSibling){e.preventDefault();var count=elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container").length;if(count==1){const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.remove("SlideOut");elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.add("SlideIn");},100);elem.nextElementSibling.getElementsByClassName("menu__item__third-level-container")[0].classList.add("active");elem.nextElementSibling.getElementsByClassName("menu__item__second-level-container__area")[0].classList.add("non-active");}else{const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");},100);} elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.text=elem.firstElementChild.innerHTML;if(elem.href){elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.href=elem.href;}else{elem.nextElementSibling.firstElementChild.getElementsByClassName("menu__header")[0].firstElementChild.href="javascript:;";} elem.nextElementSibling.classList.add("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.add("non-active");});}}}});elem.addEventListener("keydown",function(e){if(e.keyCode===40||e.keyCode===13){e.preventDefault();elem.setAttribute("aria-expanded",true);var mainNavChildren=Array.from(elem.parentElement.parentElement.children);mainNavChildren.forEach((elem)=>{if(elem.classList.contains("firstLevelNavActive")) elem.classList.remove("firstLevelNavActive");});elem.parentElement.classList.add("firstLevelNavActive");}else if(e.keyCode===38||e.keyCode===27){e.preventDefault();if(elem.getAttribute("aria-expanded")=="true"){elem.setAttribute("aria-expanded",false);elem.parentElement.classList.remove("firstLevelNavActive");}}});elem.addEventListener("focusin",(event)=>{var mainNavChildren=Array.from(elem.parentElement.parentElement.children);mainNavChildren.forEach((elem)=>{if(elem.classList.contains("firstLevelNavActive")){elem.classList.remove("firstLevelNavActive");} if(elem.firstElementChild.getAttribute("aria-expanded")=="true"){elem.firstElementChild.setAttribute("aria-expanded",false);}});});});var secondLevelMenuElement=document.querySelectorAll(".menu__item__second-level-container__area");secondLevelMenuElement.forEach((elem)=>{elem.addEventListener("click",(e)=>{if(document.documentElement.clientWidth<992){var thirdLevelItems=elem.nextElementSibling.firstElementChild.firstElementChild.children;if(thirdLevelItems.length>0){e.preventDefault();const timeout=setTimeout(()=>{elem.nextElementSibling.classList.remove("SlideOut");elem.nextElementSibling.classList.add("SlideIn");},100);elem.nextElementSibling.classList.add("active");secondLevelMenuElement.forEach((elem)=>{elem.classList.add("non-active");});elem.parentElement.parentElement.previousElementSibling.firstElementChild.text=elem.firstElementChild.innerHTML;if(elem.href){elem.parentElement.parentElement.previousElementSibling.firstElementChild.href=elem.href;}else{elem.parentElement.parentElement.previousElementSibling.firstElementChild.href="javascript:;";}}}});elem.addEventListener("keydown",function(e){if(e.keyCode===27){e.preventDefault();if(elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.getAttribute("aria-expanded")=="true"){elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.setAttribute("aria-expanded",false);elem.parentElement.parentElement.parentElement.parentElement.parentElement.classList.remove("firstLevelNavActive");}}});});var thirdLevelMenuElement=document.querySelectorAll(".menu__item__third-level-container__area");thirdLevelMenuElement.forEach((elem)=>{elem.addEventListener("keydown",function(e){if(e.keyCode===27){e.preventDefault();elem.parentElement.parentElement.parentElement.parentElement.classList.remove("open");elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.focus();elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.classList.remove("shown");elem.parentElement.parentElement.parentElement.parentElement.previousElementSibling.classList.remove("shown");}});});var backElement=document.querySelectorAll(".menu__back");backElement.forEach((elem)=>{var count=elem.nextElementSibling.nextElementSibling.getElementsByClassName("menu__item__third-level-container").length;elem.addEventListener("click",(e)=>{var secondLevel=elem.nextElementSibling.nextElementSibling.children;var isThirdLevel=false;for(var i=0;i{elem.parentElement.parentElement.classList.remove("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);}else{elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.add("SlideOut");elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.remove("SlideIn");const timeout=setTimeout(()=>{elem.nextElementSibling.nextElementSibling.getElementsByClassName("active")[0].classList.remove("active");secondLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);elem.nextElementSibling.firstElementChild.text=elem.parentElement.parentElement.previousElementSibling.firstElementChild.innerHTML;if(elem.parentElement.parentElement.previousElementSibling.href){elem.nextElementSibling.firstElementChild.href=elem.parentElement.parentElement.previousElementSibling.href;}else{elem.nextElementSibling.firstElementChild.href="javascript:;";}}}else{elem.parentElement.parentElement.classList.remove("SlideIn");elem.parentElement.parentElement.classList.add("SlideOut");const timeout=setTimeout(()=>{elem.parentElement.parentElement.classList.remove("active");firstLevelMenuElement.forEach((elem)=>{elem.classList.remove("non-active");});},400);}});});var firstLevelMenuNav=document.querySelectorAll(".menu__item__mainnav > ul > li");firstLevelMenuNav.forEach((elem)=>{elem.addEventListener("mouseover",(e)=>{if(document.documentElement.clientWidth>992){var secondLevelNavItems=elem.getElementsByClassName("menu__item__second-level-container__columns");if(!secondLevelNavItems[0].firstElementChild){secondLevelNavItems[0].parentElement.parentElement.classList.add("flyoutnonactive");secondLevelNavItems[0].parentElement.parentElement.previousElementSibling.classList.add("hovertriangle");} SetSamePromoNavHeight(elem);SetSameSecondLevelNavHeight(elem);}});elem.addEventListener("mouseout",(e)=>{if(document.documentElement.clientWidth>992){var secondLevelNavItems=elem.getElementsByClassName("menu__item__second-level-container__columns");if(!secondLevelNavItems[0].firstElementChild){secondLevelNavItems[0].parentElement.parentElement.classList.remove("flyoutnonactive");secondLevelNavItems[0].parentElement.parentElement.previousElementSibling.classList.remove("hovertriangle");}}});});document.getElementById("skiplink").onclick=function(e){e.preventDefault();var mainContent=document.getElementById("maincontent");var focusable=mainContent.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');focusable[0].focus();};});var GlobalNavList=[];function SetSamePromoNavHeight(elem){var allPromos=Array.from(elem.getElementsByClassName("promoitem"));GlobalNavList.length=0;if(allPromos.length>0){allPromos.forEach((elem)=>{GlobalNavList.push(elem.clientHeight);});} var maxHeight=Math.max.apply(null,GlobalNavList);if(allPromos.length>0){allPromos.forEach((elem)=>{elem.style.height=maxHeight+"px";});}} function ResetPromoNavHeight(){var activeNavItem;var firstLevelnav=document.querySelectorAll(".menu__item__mainnav > ul > li");firstLevelnav.forEach((elem)=>{var navFlyout=elem.firstElementChild.nextElementSibling;if(navFlyout){if(window.getComputedStyle(navFlyout).display==="flex"){activeNavItem=navFlyout;}}});if(activeNavItem){var allPromos=activeNavItem.querySelectorAll(".promoitem");allPromos.forEach((elem)=>{elem.style.height=null;});setTimeout(SetSamePromoNavHeight(activeNavItem),150);}} var GlobalSecondLevelNavList=[];function SetSameSecondLevelNavHeight(elem){var allSecondLevelNavs=Array.from(elem.getElementsByClassName("menu__item__second-level-container__area"));GlobalSecondLevelNavList.length=0;if(allSecondLevelNavs.length>0){allSecondLevelNavs.forEach((elem)=>{GlobalSecondLevelNavList.push(elem.clientHeight);});} var maxHeight=Math.max.apply(null,GlobalSecondLevelNavList);if(allSecondLevelNavs.length>0){allSecondLevelNavs.forEach((elem)=>{elem.style.height=maxHeight+"px";});}} function ResetSecondLevelNavHeight(){var activeNavItem;var firstLevelnav=document.querySelectorAll(".menu__item__mainnav > ul > li");firstLevelnav.forEach((elem)=>{var navFlyout=elem.firstElementChild.nextElementSibling;if(navFlyout){if(window.getComputedStyle(navFlyout).display==="flex"){activeNavItem=navFlyout;}}});if(activeNavItem){var allSecondLevelNavs=activeNavItem.querySelectorAll(".menu__item__second-level-container__area");allSecondLevelNavs.forEach((elem)=>{elem.style.height=null;});setTimeout(SetSameSecondLevelNavHeight(activeNavItem),150);}} document.addEventListener("DOMContentLoaded",(event)=>{var localNavitems=document.querySelectorAll('.local-nav-container .sub-nav-container__items__item');localNavitems.forEach((elem)=>{elem.addEventListener('mouseover',showMoreInfo);elem.addEventListener('mouseout',hideMoreInfo);});var localNavFirstElement=document.querySelector(".sub-nav-container__items__item__title");if(localNavFirstElement){localNavFirstElement.addEventListener('click',(e)=>{e.preventDefault();if(document.documentElement.clientWidth<992){var items=Array.from(localNavFirstElement.parentElement.parentElement.children);if(localNavFirstElement.parentElement.parentElement.getElementsByClassName('active').length===localNavFirstElement.parentElement.parentElement.getElementsByClassName('sub-nav-container__items__item').length){items.forEach((elem)=>{elem.classList.remove('active');elem.classList.remove('borderbottom');}) localNavFirstElement.parentElement.classList.add('active');localNavFirstElement.firstElementChild.nextElementSibling.nextElementSibling.classList.remove('open');} else{items.forEach((elem)=>{elem.classList.add('active');elem.classList.add('borderbottom');}) localNavFirstElement.firstElementChild.nextElementSibling.nextElementSibling.classList.add('open');}}});}});function showMoreInfo(e){if(document.getElementById('sub-nav__moreinfo__desc').innerHTML.length>0){document.querySelector('.sub-nav__moreinfo').classList.toggle('visibility-toggle');}} function hideMoreInfo(e){if(document.getElementById('sub-nav__moreinfo__desc').innerHTML.length>0){document.querySelector('.sub-nav__moreinfo').classList.toggle('visibility-toggle');}} function hover(description){document.getElementById('sub-nav__moreinfo__desc').innerHTML=description;} var buttonContainer;document.addEventListener("DOMContentLoaded",(event)=>{var showGraphInstance=function(graphInstance,graphInstanceName){var allGraphContainer=Array.from(graphInstance.parentElement.children);allGraphContainer.forEach((elem)=>{elem.classList.remove('active');});if(graphInstance.dataset.graphName==graphInstanceName){graphInstance.classList.add('active');graphInstance.src=graphInstance.dataset.src;}};var multiGraphInstanceContainer=document.querySelectorAll("section.multiGraphInstanceContainer");multiGraphInstanceContainer.forEach((elem)=>{var currentGraph=elem;var parentContainer=elem.parentElement;parentContainer.firstElementChild.classList.add('active');elem.querySelectorAll("iframe").forEach((elem)=>{elem.src=elem.dataset.src;});parentContainer.classList.add('multiGraphInstanceParent');if(parentContainer.getElementsByClassName('multiGraphInstanceContainer').length>1) {if(parentContainer.getElementsByClassName('multiGraphInstanceButtonContainer').length<1){buttonContainer=document.createElement("DIV");buttonContainer.className="multiGraphInstanceButtonContainer";parentContainer.appendChild(buttonContainer);} var activateButton=document.createElement('a');activateButton.className="multiGraphInstanceButton";activateButton.href="#";activateButton.addEventListener("click",function(e){e.preventDefault();var allactivateButton=Array.from(e.target.parentElement.children);allactivateButton.forEach((elem)=>{elem.classList.remove('active');});e.target.classList.add("active");showGraphInstance(currentGraph,e.target.textContent);});var activateButtonLinkText=document.createTextNode(elem.dataset.graphName);activateButton.appendChild(activateButtonLinkText);activateButton.title=elem.dataset.graphName;buttonContainer.appendChild(activateButton);}});var multiGraphInstanceContainerParent=document.querySelectorAll(".multiGraphInstanceParent");multiGraphInstanceContainerParent.forEach((elem)=>{elem.getElementsByClassName("multiGraphInstanceButtonContainer")[0].firstElementChild.classList.add("active");});});document.addEventListener("DOMContentLoaded",(event)=>{var footerNavitem=document.querySelectorAll(".newsFooter__nav__items__item__title");footerNavitem.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();footerNavitem.forEach((elem)=>{elem.parentElement.classList.remove('active');});var footerNavContent=Array.from(document.querySelector(elem.getAttribute('href')).parentElement.children);footerNavContent.forEach((elem)=>{elem.classList.remove('active');});document.querySelector(elem.getAttribute('href')).classList.add('active');elem.parentElement.classList.add('active');});});});(function(){document.addEventListener("DOMContentLoaded",(event)=>{wowAnimation();});function percentageAnimation(box){var countDown=false;var startPoint;var endPoint;box.querySelectorAll('.count').forEach(function(item){var countTarget=parseInt(item.getAttribute('data-abpi-target'))||100;if(!countDown){startPoint=0;endPoint=countTarget;} else{startPoint=countTarget;endPoint=0;} animateValue(item,startPoint,endPoint,2000);});} function animateValue(obj,start,end,duration){let startTimestamp=null;const step=(timestamp)=>{if(!startTimestamp)startTimestamp=timestamp;const progress=Math.min((timestamp-startTimestamp)/duration,1);obj.innerHTML=Math.floor(progress*(end-start)+start);if(progress<1){window.requestAnimationFrame(step);}};window.requestAnimationFrame(step);} function wowAnimation(){var wow=new WOW({boxClass:'wow',animateClass:'animated',offset:0,mobile:true,live:true,callback:function(box){if(box.classList.contains("countanimation")){percentageAnimation(box);}},scrollContainer:null});wow.init();}})();var carouselQuoteResizeTimer;var carouselQuoteAutoSlideTimer;var CarouselQuoteList=[];document.addEventListener("DOMContentLoaded",(event)=>{var quoteCarousels=[];var slideIndex=[];var slideId=[];window.addEventListener('resize',function(event){clearTimeout(carouselQuoteResizeTimer);carouselQuoteResizeTimer=setTimeout(ResetCarouselQuoteHeight,250);});var getPreviousSibling=function(elem){var previousElement=elem.previousElementSibling;return previousElement;} var getNextSibling=function(elem){var nextElement=elem.nextElementSibling;return nextElement;} var blockquoteItems=document.querySelectorAll(".abpi__blockquote");blockquoteItems.forEach((elem)=>{var previousSibling=getPreviousSibling(elem);if(previousSibling==undefined||previousSibling.nodeName!="BLOCKQUOTE"){var nextSibling=getNextSibling(elem);if(nextSibling==undefined||nextSibling.nodeName=="BLOCKQUOTE"){var seriesOfQuotes=[elem];while(nextSibling&&nextSibling.nodeName=="BLOCKQUOTE") {seriesOfQuotes.push(nextSibling);nextSibling=getNextSibling(nextSibling);} if(seriesOfQuotes.length>1) {var wrapper=document.createElement('div');wrapper.className="abpi__multipleblockquotes";seriesOfQuotes[0].parentNode.insertBefore(wrapper,seriesOfQuotes[0]);for(var i=0;iquoteSlideElem.length){slideIndex[no]=1} if(n<1){slideIndex[no]=quoteSlideElem.length} for(k=0;k0){allCarouselQuotes.forEach((elem)=>{elem.style.display="block";CarouselQuoteList.push(elem.clientHeight);elem.style.display="none";});} var maxHeight=Math.max.apply(null,CarouselQuoteList);if(allCarouselQuotes.length>0){allCarouselQuotes[0].parentNode.style.height=maxHeight+"px";}} function ResetCarouselQuoteHeight(){var allCarouselQuotes=Array.from(document.getElementsByClassName("abpi__multipleblockquotes"));allCarouselQuotes.forEach((elem)=>{elem.style.height=null;SetQuoteCarouselHeight(elem);});} var stickyNavScrollTimer;var stickyNavResizeTimer;var stickyNavList=[];document.addEventListener("DOMContentLoaded",(event)=>{GetStickyNavList();window.onscroll=function(){clearTimeout(stickyNavScrollTimer);stickyNavScrollTimer=setTimeout(CheckStickyNavStatus,10);};window.onresize=function(){clearTimeout(stickyNavResizeTimer);stickyNavResizeTimer=setTimeout(GetStickyNavList,250);};if(window.location.hash){setTimeout(function(){var headerOffset=document.querySelector('header').offsetHeight;var elementPosition=document.scrollingElement.scrollTop;var offsetPosition=elementPosition-headerOffset;window.scrollTo({top:offsetPosition,});},1);}});function GetStickyNavList(){var allStickyNavs=document.querySelectorAll('.sticky-nav-container');stickyNavList.length=0;allStickyNavs.forEach((elem)=>{var sentinal=elem.previousElementSibling;stickyNavList.push(elem);});CheckStickyNavStatus();} function CheckStickyNavStatus(){var stickyNavSet=false;for(var i=stickyNavList.length-1;i>-1;i--){var anchoringNavInstance=stickyNavList[i];if(stickyNavSet==false){var backtotop=anchoringNavInstance.getElementsByClassName("back-to-top__button");if(stickyNavList[i].offsetTop0){backtotop[0].classList.add("back-to-top__button--sticky");}} else{anchoringNavInstance.classList.remove("sticky-nav");if(backtotop.length>0){backtotop[0].classList.remove("back-to-top__button--sticky");}}} else{anchoringNavInstance.classList.remove("sticky-nav");}}} document.addEventListener("DOMContentLoaded",(event)=>{let timeout;let isDesktop=window.innerWidth>991;window.onresize=()=>{timeout&&clearTimeout(timeout) timeout=setTimeout(()=>{isDesktop=window.innerWidth>991;},300);} var videoTranscripts=document.querySelectorAll(".gridelement__videoTranscript");videoTranscripts.forEach((elem)=>{elem.addEventListener('click',(e)=>{const wrapper=elem.closest(".aboutvideo:not(.contained), .HighlightedContent:not(.contained") if(elem.classList.contains("VideoBlockopen")){if(wrapper&&isDesktop){wrapper.style.height=wrapper.getBoundingClientRect().height-elem.getBoundingClientRect().height+"px";} elem.classList.remove("VideoBlockopen");}else{elem.classList.add("VideoBlockopen");if(wrapper&&isDesktop){wrapper.style.height=wrapper.getBoundingClientRect().height+elem.getBoundingClientRect().height+"px";}}});});});(function(){document.addEventListener("DOMContentLoaded",(event)=>{wowAnimation();});const animateCSS=(element,animation,prefix='animate__')=>new Promise((resolve,reject)=>{const animationName=`${prefix}${animation}`;var node=null;if(typeof element==='string'||element instanceof String){node=document.querySelector(element);} else{node=element;} node.classList.add(`${prefix}animated`,animationName);function handleAnimationEnd(event){event.stopPropagation();node.classList.remove(`${prefix}animated`,animationName);resolve('Animation ended');} node.addEventListener('animationend',handleAnimationEnd,{once:true});});function yearsAnimation(box){box.querySelector('.animatedyeartext').style.visibility='hidden';box.querySelectorAll('.checkboxes div').forEach(element=>{element.style.visibility='hidden';});;var year=box.querySelector('.sepanimatedyearlabel');if(year){animateCSS('.sepanimatedyearlabel','bounceInDown').then((message)=>{console.log(message);box.querySelector('.animatedyeartext').style.visibility='visible';animateCSS('.animatedyeartext','fadeIn').then((message)=>{box.querySelectorAll('.checkboxes div').forEach(element=>{animateCSS(element,'zoomIn');});;});});} var firstlabel=box.querySelector('.sepanimatedyearlabel .firstlabel');if(firstlabel){console.log('found first');animateCSS(firstlabel,'bounce');} var secondlabel=box.querySelector('.sepanimatedyearlabel .secondlabel');if(secondlabel){secondlabel.classList.add('animate__animated','animate__bounce');} var thirdlabel=box.querySelector('.sepanimatedyearlabel .thirdlabel');if(thirdlabel){thirdlabel.classList.add('animate__animated','animate__bounce');} var fourthLabel=box.querySelector('.sepanimatedyearlabel .fourthlabel');if(fourthLabel){fourthLabel.classList.add('animate__animated','animate__bounce');}} function animateValue(obj,start,end,duration){let startTimestamp=null;const step=(timestamp)=>{if(!startTimestamp)startTimestamp=timestamp;const progress=Math.min((timestamp-startTimestamp)/duration,1);obj.innerHTML=Math.floor(progress*(end-start)+start);if(progress<1){window.requestAnimationFrame(step);}};window.requestAnimationFrame(step);} function wowAnimation(){var wow=new WOW({boxClass:'wow',animateClass:'animated',offset:0,mobile:true,live:true,callback:function(box){if(box.classList.contains("yearanimation")){yearsAnimation(box);}},scrollContainer:null});wow.init();}})();document.addEventListener("DOMContentLoaded",()=>{let playerWrappers=document.querySelectorAll(".aboutvideo__section--player");playerWrappers.forEach((playerWrapper)=>{let playerIcon=playerWrapper?.querySelector(".player__icon");let player=playerWrapper?.querySelector(".player");playerIcon?.addEventListener("click",(e)=>{player[player.paused?"play":"pause"]();playerIcon.style.display="none";player.setAttribute("controls",true);e.preventDefault();});player?.addEventListener("pause",()=>{playerIcon.style.display="grid";player.removeAttribute("controls");});if(document.documentElement.clientWidth>768){let content=playerWrapper.previousElementSibling;if(content){if(content.clientHeight>playerWrapper.clientHeight){playerWrapper.style.paddingTop=(content.clientHeight-playerWrapper.clientHeight)/2+"px";}else{content.style.paddingTop=(playerWrapper.clientHeight-content.clientHeight)/2+"px";}}}});});document.addEventListener("DOMContentLoaded",(event)=>{var acc=document.querySelectorAll(".accordion__heading");acc.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(elem.parentElement.open){setTimeout(function(){elem.parentElement.open=false;},100);} else{acc.forEach((elem)=>{if(elem.parentElement.open){elem.parentElement.open=false;}});}});});});document.addEventListener("DOMContentLoaded",(event)=>{var anchorNavArrowElement=document.querySelectorAll(".sub-nav-container__items__item__arrow");anchorNavArrowElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(document.documentElement.clientWidth<992){var items=Array.from(elem.parentElement.parentElement.children);if(elem.parentElement.parentElement.getElementsByClassName('active').length===elem.parentElement.parentElement.getElementsByClassName('sub-nav-container__items__item').length){items.forEach((elem)=>{elem.classList.remove('active');elem.classList.remove('borderbottom');}) elem.parentElement.classList.add('active');elem.classList.remove('open');} else{items.forEach((elem)=>{elem.firstElementChild.nextElementSibling.classList.remove('arrow-active');elem.classList.add('active');elem.classList.add('borderbottom');}) items[0].firstElementChild.nextElementSibling.classList.add('arrow-active');elem.classList.add('open');}}});});var anchorNavElement=document.querySelectorAll(".anchoring-nav-container .sub-nav-container__items__item__title");anchorNavElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();if(document.documentElement.clientWidth<992){var items=Array.from(elem.parentElement.parentElement.children);items.forEach((elem)=>{elem.classList.remove('active');}) elem.parentElement.classList.add('active');var arrowItems=Array.from(elem.parentElement.parentElement.getElementsByClassName('arrow-active'));arrowItems.forEach((elem)=>{elem.classList.remove('arrow-active');}) elem.nextElementSibling.classList.add('arrow-active');elem.nextElementSibling.classList.remove('open');elem.parentElement.classList.remove('borderbottom');} var StickyElementsHeight=CalculateStickyElementsHeight();const href=elem.getAttribute("href");var topOfElement=document.querySelector(href).offsetTop-StickyElementsHeight;window.scroll({top:topOfElement,behavior:"smooth"});});});var anchorNavElement=document.querySelector(".back-to-top__button");if(anchorNavElement){anchorNavElement.addEventListener('click',(e)=>{e.preventDefault();window.scrollTo({top:0,behavior:'smooth'});});}});function CalculateStickyElementsHeight(){var globalNavHeight=0;var anchoringNavHeight=0;var localNavHeight=0;var stickyElementsHeight=0;var offset=90;if(document.querySelectorAll('.anchoring-nav-container').length>0){anchoringNavHeight=document.querySelectorAll('.anchoring-nav-container')[0].offsetHeight*document.querySelectorAll('.anchoring-nav-container').length;} if(document.querySelectorAll('.local-nav-container').length>0){localNavHeight=document.querySelectorAll('.local-nav-container')[0].offsetHeight*document.querySelectorAll('.local-nav-container').length;} if(document.documentElement.clientWidth<992){stickyElementsHeight=anchoringNavHeight-offset;} else{globalNavHeight=document.querySelector('header').offsetHeight;stickyElementsHeight=anchoringNavHeight+globalNavHeight-offset;} return stickyElementsHeight;} document.addEventListener("DOMContentLoaded",(event)=>{var paginationBtnElement=document.querySelectorAll(".pagination__btn");paginationBtnElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();var pageNo=elem.getAttribute("href").slice(1);var parentId=elem.closest(".abpi__pagination__parent").id;var paramName=parentId+"_"+"page";var paramValue=pageNo;var searchParams=new URLSearchParams(window.location.search);searchParams.set(paramName,paramValue);window.location.search=searchParams.toString();})})}) document.addEventListener("DOMContentLoaded",(event)=>{document.addEventListener('keydown',(event)=>{if(event.key==='Escape'){event.preventDefault() document.querySelector('.hero__link--selected .hero__anchor')?.focus();document.querySelector('.hero__link--selected .hero__anchor')?.dispatchEvent(new Event('click')) document.querySelectorAll('.hero__anchor').forEach(element=>{element.setAttribute('tabindex','0')})}});document.querySelectorAll(".hero_linkdetailclosebutton").forEach(element=>{element.setAttribute('tabindex','-1');}) document.querySelectorAll(".hero__linkdetailwrapper a").forEach(element=>{element.setAttribute('tabindex','-1');}) var heroAnchors=document.getElementsByClassName('hero__anchor');var closeButtons=document.getElementsByClassName('hero__linkdetailclosebutton');var otherCloseButtons=document.querySelectorAll(".hero__linkdetail button");var shownLinkDetailDivsClassName='hero__linkdetailwrapper--show';var selectedHeroLinksClassName='hero__link--selected';for(var i=0;i{element.setAttribute('tabindex','-1')}) current.setAttribute('tabindex','0') document.querySelectorAll(current.getAttribute('href')+" a").forEach(element=>{element.setAttribute('tabindex','0')});document.querySelectorAll(current.getAttribute('href')+" a")[document.querySelectorAll(current.getAttribute('href')+" a").length-1].addEventListener('blur',function(event){document.querySelectorAll('.hero__anchor').forEach(element=>{element.setAttribute('tabindex','0')}) if(document.querySelector('.hero__link--selected').nextElementSibling!=null){document.querySelector('.hero__link--selected').nextElementSibling.querySelector('.hero__anchor').focus();}}) var shownLinkDetailDivs=document.getElementsByClassName(shownLinkDetailDivsClassName);var selectedHeroLinks=document.getElementsByClassName(selectedHeroLinksClassName);var id=this.hash.substring(1);var linkDetailDiv=document.getElementById(id);if(current.parentNode.classList.contains(selectedHeroLinksClassName)===false) {for(var i=0;i{if(event.code==="Space"){event.preventDefault() event.target.dispatchEvent(new Event('click'))}})} var wireUpCloseButtons=function(e){var current=this;var divWithId;if(current.parentNode.classList.contains("hero__linkdetaillinksbox")){divWithId=current.parentNode.parentNode.parentNode;} else{divWithId=current.parentNode.parentNode;} divWithId.classList.remove(shownLinkDetailDivsClassName);var els=document.querySelectorAll("a[href='#"+divWithId.id+"']");els[0].parentNode.classList.remove(selectedHeroLinksClassName);e.preventDefault();};for(var i=0;i{document.querySelectorAll("figcaption").forEach((element)=>{let sqBrackets=element.textContent.match(/\[[^\]]*]/g);let uniqueSqBrackets=[];uniqueSqBrackets=sqBrackets?.filter((value,index)=>{return sqBrackets?.indexOf(value)==index;});uniqueSqBrackets.forEach((item)=>{element.textContent=element.textContent.replaceAll(item,item.sup());});element.innerHTML=element.textContent;});});document.addEventListener("DOMContentLoaded",()=>{let playerWrappers=document.querySelectorAll(".newHighlightedContent__section--player ");playerWrappers.forEach((playerWrapper)=>{let playerIcon=playerWrapper?.querySelector(".player__icon");let player=playerWrapper?.querySelector(".player");playerIcon?.addEventListener("click",(e)=>{player[player.paused?"play":"pause"]();playerIcon.style.display="none";player.setAttribute("controls",true);e.preventDefault();});player?.addEventListener("pause",()=>{playerIcon.style.display="grid";player.removeAttribute("controls");});if(document.documentElement.clientWidth>768){let content=playerWrapper.previousElementSibling;if(content){if(content.clientHeight>playerWrapper.clientHeight){playerWrapper.style.paddingTop=(content.clientHeight-playerWrapper.clientHeight)/2+"px";}else{content.style.paddingTop=(playerWrapper.clientHeight-content.clientHeight)/2+"px";}}}});});document.addEventListener("DOMContentLoaded",(event)=>{var popOutvideoTranscripts=document.querySelectorAll(".gridelement__video__inner__typescript");popOutvideoTranscripts.forEach((elem)=>{elem.addEventListener('click',(e)=>{if(elem.classList.contains("popOutTranscriptopen")){elem.classList.remove("popOutTranscriptopen");}else{elem.classList.add("popOutTranscriptopen");}});});});document.addEventListener("DOMContentLoaded",(event)=>{var paginationBtnElement=document.querySelectorAll(".socialMediaResource__fiterButton");paginationBtnElement.forEach((elem)=>{elem.addEventListener('click',(e)=>{e.preventDefault();var filterText=elem.text;var parentId=elem.closest(".abpi__pagination__parent").id;var paramName=parentId+"_"+"cat";var paramPage=parentId+"_"+"page";var paramValue=filterText;var searchParams=new URLSearchParams(window.location.search);searchParams.set(paramName,paramValue);searchParams.set(paramPage,1);window.location.search=searchParams.toString();})})});;