1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function(Drupal){Drupal.behaviors.codeVersion={attach:function(context,settings){console.log("Berkley v1.0.54");}};})(Drupal);; 3(function(Drupal){Drupal.behaviors.toggleSwitcher={attach:function(context,settings){const toggleContainers=context.querySelectorAll('.toggle-buttons:not([data-toggle-processed])');toggleContainers.forEach((toggleContainer)=>{toggleContainer.setAttribute('data-toggle-processed','true');const buttons=toggleContainer.querySelectorAll('.toggle-option');const wrapper=context.querySelector('.toggle-background');if(!wrapper)return;function getDevice(){return window.matchMedia('(max-width: 767px)').matches?'mobile':'desktop';}function getBackgroundUrl(type,device){const image=context.querySelector(`.bg-${type}-${device}`);return image?image.getAttribute('src'):'';}function switchToType(type){const device=getDevice();const bgUrl=getBackgroundUrl(type,device);if(bgUrl){wrapper.style.backgroundImage=`linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${bgUrl}')`;wrapper.style.backgroundSize='cover';wrapper.style.backgroundPosition='center';wrapper.style.backgroundRepeat='no-repeat';}else wrapper.style.backgroundImage='';buttons.forEach((btn)=>{btn.classList.toggle('active',btn.getAttribute('data-toggle-value')===type);});if(type==='type1'){toggleContainer.classList.add('type1-active');toggleContainer.classList.remove('type2-active');}else{if(type==='type2'){toggleContainer.classList.add('type2-active');toggleContainer.classList.remove('type1-active');}}}const activeInitial=toggleContainer.querySelector('.toggle-option.active')||buttons[0];if(activeInitial)switchToType(activeInitial.getAttribute('data-toggle-value'));buttons.forEach((button)=>{button.addEventListener('click',function(){const selectedType=this.getAttribute('data-toggle-value');switchToType(selectedType);});});window.addEventListener('resize',()=>{const activeBtn=toggleContainer.querySelector('.toggle-option.active');if(activeBtn)switchToType(activeBtn.getAttribute('data-toggle-value'));});});}};})(Drupal);; 4(function(Drupal){Drupal.behaviors.toggleYouTubeVideo={attach:function(context,settings){const heroComponents=context.querySelectorAll('.hero-banner-full-width:not([data-youtube-toggle-processed])');heroComponents.forEach((component,index)=>{component.setAttribute('data-youtube-toggle-processed','true');if(typeof gsap!=='undefined'&&typeof ScrollTrigger!=='undefined'&&component.classList.contains('animated')){gsap.registerPlugin(ScrollTrigger);let lastScrollY=window.scrollY;let isMarginsAdded=false;let hasScrolled=false;window.addEventListener('scroll',function(){const currentScrollY=window.scrollY;const goingDown=currentScrollY>lastScrollY;lastScrollY=currentScrollY<=0?0:currentScrollY;if(!hasScrolled)hasScrolled=true;if(!hasScrolled)return;const rect=component.getBoundingClientRect();const componentMiddle=rect.top+rect.height/2;const inView=rect.bottom>0&&rect.top<window.innerHeight;const inViewMiddle=componentMiddle>0&&componentMiddle<window.innerHeight;if(!inView)return;if(goingDown&&!isMarginsAdded){gsap.to(component,{width:'calc(100% - 40px)',marginLeft:'20px',marginRight:'20px',ease:'none',duration:0.3,overwrite:'auto'});isMarginsAdded=true;}else{if(!goingDown&&isMarginsAdded&&inViewMiddle){gsap.to(component,{width:'100%',marginLeft:'0px',marginRight:'0px',ease:'none',duration:0.3,overwrite:'auto'});isMarginsAdded=false;}}});}const iframes=component.querySelectorAll('iframe[src*="youtube.com/embed/"]');const button=component.querySelector('.toggle-play');if(!iframes.length||!button)return;iframes.forEach((iframe,i)=>{iframe.setAttribute('tabindex','-1');iframe.setAttribute('aria-hidden','true');iframe.setAttribute('title','');if(!iframe.id)iframe.id=`youtube-player-${index}-${i}`;});if(typeof YT==='undefined'||typeof YT.Player==='undefined'){const tag=document.createElement('script');tag.src='https://www.youtube.com/iframe_api';document.head.appendChild(tag);}window.onYouTubeIframeAPIReady=window.onYouTubeIframeAPIReady||function(){document.querySelectorAll('.hero-banner-full-width').forEach((hero,idx)=>{const localIframes=hero.querySelectorAll('iframe[src*="youtube.com/embed/"]');const localButton=hero.querySelector('.toggle-play');const localPlayers=[];
4localIframes.forEach((iframe,i)=>{const player=new YT.Player(iframe.id,{events:{onReady:function(){localPlayers.push(player);}}});});setTimeout(()=>{localButton?.addEventListener('click',function(){const isAnyPaused=localPlayers.some((player)=>player.getPlayerState()===YT.PlayerState.PAUSED||player.getPlayerState()===YT.PlayerState.ENDED);if(isAnyPaused){localPlayers.forEach((player)=>player.playVideo());localButton.setAttribute('aria-label','Pause video');localButton.classList.add('is-playing');}else{localPlayers.forEach((player)=>player.pauseVideo());localButton.setAttribute('aria-label','Play video');localButton.classList.remove('is-playing');}});},500);});};});}};})(Drupal);; 5(function(Drupal){Drupal.behaviors.carouselTeaser={attach:function(context,settings){context.querySelectorAll('.carousel-teaser-component').forEach((container)=>{const swiperEl=container.querySelector('.swiper');if(!swiperEl||swiperEl.classList.contains('swiper-initialized'))return;const slideCount=swiperEl.querySelectorAll('.swiper-slide').length;const isDesktop=window.innerWidth>=1085;const shouldInitializeSwiper=!(isDesktop&&slideCount<4);const prevBtn=container.querySelector('.swiper-button-prev');const nextBtn=container.querySelector('.swiper-button-next');const paginationEl=container.querySelector('.swiper-pagination');const toggleUIElements=(hide)=>{[prevBtn,nextBtn,paginationEl].forEach((el)=>{if(el)el.classList.toggle('swiper-hide-element',hide);});};if(!shouldInitializeSwiper){toggleUIElements(true);return;}swiperEl.classList.add('swiper-initialized');const swiper=new Swiper(swiperEl,{loop:false,grabCursor:true,watchOverflow:true,centeredSlides:false,slidesPerView:'auto',a11y:{enabled:true,prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',firstSlideMessage:'This is the first slide',lastSlideMessage:'This is the last slide',slideLabelMessage:'{{index}} / {{slidesLength}}'},navigation:{nextEl:nextBtn,prevEl:prevBtn},pagination:{el:paginationEl,type:'progressbar'},breakpoints:{0:{spaceBetween:16,slidesOffsetAfter:40},768:{spaceBetween:16,slidesOffsetAfter:90},1024:{spaceBetween:16,slidesOffsetAfter:90},1440:{spaceBetween:24,slidesOffsetAfter:120},2000:{spaceBetween:40,slidesOffsetAfter:312}}});const handleResize=()=>{const isNowDesktop=window.innerWidth>=1085;const hideUI=isNowDesktop&&slideCount<4;toggleUIElements(hideUI);};handleResize();window.addEventListener('resize',handleResize);});}};})(Drupal);; 6(function(Drupal){Drupal.behaviors.carouselContentBlock={attach:function(context,settings){const components=document.querySelectorAll('.carousel-content-block-component',context);const swiperInstances=new Map();function initSwipers(){components.forEach((component)=>{const swiperEl=component.querySelector('.swiper');if(window.innerWidth<=1023&&!swiperInstances.has(component)){const swiperInstance=new Swiper(swiperEl,{slidesPerView:'auto',spaceBetween:40,a11y:{enabled:true,prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',firstSlideMessage:'This is the first slide',lastSlideMessage:'This is the last slide',slideLabelMessage:'{{index}} / {{slidesLength}}'},navigation:{nextEl:component.querySelector('.swiper-button-next'),prevEl:component.querySelector('.swiper-button-prev')},pagination:{el:component.querySelector('.swiper-pagination'),type:'progressbar'},breakpoints:{0:{slidesOffsetAfter:40},768:{slidesOffsetAfter:90}}});swiperInstances.set(component,swiperInstance);component.classList.add('swiper-initialized');}});}function destroySwipers(){swiperInstances.forEach((instance,component)=>{if(window.innerWidth>1023){instance.destroy(true,true);swiperInstances.delete(component);component.classList.remove('swiper-initialized');}});}initSwipers();destroySwipers();let resizeTimeout;window.addEventListener('resize',()=>{clearTimeout(resizeTimeout);resizeTimeout=setTimeout(()=>{initSwipers();destroySwipers();},200);});}};})(Drupal);; 7(function(Drupal){Drupal.behaviors.heroBannerEnhancements={attach:function(context,settings){const containers=context.querySelectorAll('.hero-banner__images');if(containers.length===0)return;
7function updateHeroBanners(){containers.forEach((container)=>{const wrappers=Array.from(container.querySelectorAll('.image-wrapper'));const validDesktopWrappers=[];const validMobileWrappers=[];wrappers.forEach((wrapper)=>{wrapper.style.display='none';const imgDesktop=wrapper.querySelector('.img-desktop');const imgMobile=wrapper.querySelector('.img-mobile');const srcDesktop=imgDesktop?.getAttribute('src')?.trim();const srcMobile=imgMobile?.getAttribute('src')?.trim();if(srcDesktop)validDesktopWrappers.push(wrapper);if(srcMobile)validMobileWrappers.push(wrapper);});const isMobile=window.innerWidth<=767;const wrappersToShow=[];if(isMobile){for(let wrapper of wrappers){const imgMobile=wrapper.querySelector('.img-mobile');const srcMobile=imgMobile?.getAttribute('src')?.trim();if(srcMobile){wrappersToShow.push(wrapper);if(wrappersToShow.length===2)break;}}}else wrappersToShow.push(...validDesktopWrappers);wrappersToShow.forEach((wrapper)=>{wrapper.style.display='';});container.classList.remove('is-1','is-2','is-3');if(wrappersToShow.length>0){container.style.display='';if(!isMobile)container.classList.add(`is-${wrappersToShow.length}`);}else container.style.display='none';});}const ctas=context.querySelectorAll('.hero-banner-cta');ctas.forEach((cta)=>{if(cta.textContent.trim())cta.classList.remove('is-hidden');});updateHeroBanners();if(!window.heroBannerEnhancementResizeBound){let resizeTimeout;window.addEventListener('resize',()=>{clearTimeout(resizeTimeout);resizeTimeout=setTimeout(()=>{const visibleBanners=document.querySelectorAll('.hero-banner__images');if(visibleBanners.length>0)updateHeroBanners();},200);});window.heroBannerEnhancementResizeBound=true;}}};})(Drupal);; 8(function(Drupal,once){function applyScrollAnimation(wrapperEl,speed,reverse=false){const contentWidth=wrapperEl.scrollWidth/2;const classId=`scrolling-${Math.floor(Math.random()*100000)}`;const direction=reverse?'reverse':'normal';const style=document.createElement('style');style.innerHTML=` 9 @keyframes ${classId} { 10 0% { transform: translateX(0); } 11 100% { transform: translateX(-${contentWidth}px); } 12 } 13 .${classId} { 14 animation: ${classId} ${(contentWidth/speed)}s linear infinite; 15 animation-direction: ${direction}; 16 } 17 `;document.head.appendChild(style);wrapperEl.classList.add(classId);return classId;}function extendSlidesIfNeeded(wrapperEl){const containerWidth=wrapperEl.parentElement.offsetWidth;const originalSlides=Array.from(wrapperEl.querySelectorAll('.swiper-slide:not(.cloned-slide)'));wrapperEl.querySelectorAll('.cloned-slide').forEach((clone)=>clone.remove());let cloneCount=0;while(wrapperEl.scrollWidth<containerWidth*3&&cloneCount<20){originalSlides.forEach((slide)=>{const clone=slide.cloneNode(true);clone.classList.add('cloned-slide');wrapperEl.appendChild(clone);});cloneCount++;}}Drupal.behaviors.logoCarousel={attach(context){const baseConfig={slidesPerView:'auto',allowTouchMove:false,loop:false};const carouselContainers=once('logo-carousel-component','.logo-carousel-component',context);carouselContainers.forEach((container)=>{let isMobile=window.innerWidth<=767;const swiper1=container.querySelector('.desktop-swiper-1');const swiper2=container.querySelector('.desktop-swiper-2');const toggleButton=container.querySelector('.toggle-play');const mobileSwiperWrapper=container.querySelector('.mobile-swiper .swiper-wrapper');const mobileSwiperEl=container.querySelector('.mobile-swiper');if(!swiper1||!swiper2||!toggleButton)return;let wrapper1=swiper1.querySelector('.swiper-wrapper');let wrapper2=swiper2.querySelector('.swiper-wrapper');let wrapper1Class='';let wrapper2Class='';let mobileSwiperInstance=null;const setupDesktop=()=>{if(!swiper1.classList.contains('swiper-initialized')){new Swiper(swiper1,baseConfig);extendSlidesIfNeeded(wrapper1);wrapper1Class=applyScrollAnimation(wrapper1,50,false);}if(!swiper2.classList.contains('swiper-initialized')){new Swiper(swiper2,baseConfig);extendSlidesIfNeeded(wrapper2);wrapper2Class=applyScrollAnimation(wrapper2,50,true);}};const setupMobile=()=>{if(!mobileSwiperEl||!mobileSwiperWrapper)return;if(mobileSwiperInstance&&mobileSwiperInstance.destroy){mobileSwiperInstance.destroy(true,true);mobileSwiperInstance=null;}mobileSwiperWrapper.innerHTML='';const logos1=Array.from(container.querySelectorAll('.desktop-swiper-1 .swiper-slide:not(.cloned-slide):not(.duplicate-sl
17ide) img'));const logos2=Array.from(container.querySelectorAll('.desktop-swiper-2 .swiper-slide:not(.cloned-slide):not(.duplicate-slide) img'));const allLogos=[...logos1,...logos2];const groupSize=4;for(let i=0;i<allLogos.length;i+=groupSize){const slide=document.createElement('div');slide.className='swiper-slide';allLogos.slice(i,i+groupSize).forEach((img)=>{slide.appendChild(img.cloneNode(true));});mobileSwiperWrapper.appendChild(slide);}mobileSwiperInstance=new Swiper(mobileSwiperEl,{slidesPerView:'auto',spaceBetween:40,pagination:{el:container.querySelector('.swiper-pagination'),type:'progressbar'}});};if(isMobile)setupMobile();else setupDesktop();toggleButton.addEventListener('click',()=>{const isPlaying=toggleButton.classList.contains('is-playing');[wrapper1,wrapper2].forEach((wrapper)=>{wrapper.style.animationPlayState=isPlaying?'paused':'running';});toggleButton.classList.toggle('is-playing');toggleButton.setAttribute('aria-label',isPlaying?'Play carousel':'Pause carousel');});[wrapper1,wrapper2].forEach((wrapper)=>{wrapper.addEventListener('mouseenter',()=>{wrapper.style.animationPlayState='paused';});wrapper.addEventListener('mouseleave',()=>{if(toggleButton.classList.contains('is-playing'))wrapper.style.animationPlayState='running';});});let resizeTimeout;window.addEventListener('resize',()=>{clearTimeout(resizeTimeout);resizeTimeout=setTimeout(()=>{const nowMobile=window.innerWidth<=767;if(nowMobile!==isMobile){isMobile=nowMobile;if(isMobile)setupMobile();else{wrapper1.classList.remove(wrapper1Class);wrapper2.classList.remove(wrapper2Class);extendSlidesIfNeeded(wrapper1);extendSlidesIfNeeded(wrapper2);wrapper1Class=applyScrollAnimation(wrapper1,50,false);wrapper2Class=applyScrollAnimation(wrapper2,50,true);}}},300);});});}};})(Drupal,once);; 18(function(Drupal){Drupal.behaviors.carouselIconCardSwiper={attach:function(context){context.querySelectorAll('.carousel-icon-card-component').forEach((container)=>{const swiperEl=container.querySelector('.swiper');if(!swiperEl||swiperEl.classList.contains('swiper-initialized'))return;const prevBtn=container.querySelector('.swiper-button-prev');const nextBtn=container.querySelector('.swiper-button-next');const paginationEl=container.querySelector('.swiper-pagination');const swiperInstance=new Swiper(swiperEl,{loop:false,slidesPerView:'auto',spaceBetween:20,navigation:prevBtn&&nextBtn?{nextEl:nextBtn,prevEl:prevBtn}:undefined,pagination:paginationEl?{el:paginationEl,type:'progressbar'}:undefined,a11y:{enabled:true,prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',paginationBulletMessage:'Go to slide {{index}}',slideLabelMessage:'{{index}} / {{slidesLength}}'},breakpoints:{0:{spaceBetween:16,slidesOffsetBefore:20,slidesOffsetAfter:20},768:{spaceBetween:16,slidesOffsetBefore:45,slidesOffsetAfter:45},1024:{spaceBetween:16,slidesOffsetBefore:0,slidesOffsetAfter:90},1440:{spaceBetween:20,slidesOffsetBefore:0,slidesOffsetAfter:60},2000:{spaceBetween:20,slidesOffsetBefore:0,slidesOffsetAfter:156}}});const updateUIVisibility=()=>{const slideCount=swiperEl.querySelectorAll('.swiper-slide').length;const width=window.innerWidth;let shouldHide=false;if(width>=1780&&slideCount<=3)shouldHide=true;else{if(width>=768&&slideCount<=2)shouldHide=true;}const toggleClass=(el)=>{if(!el)return;el.classList.toggle('swiper-hide-element',shouldHide);};toggleClass(prevBtn);toggleClass(nextBtn);toggleClass(paginationEl);};updateUIVisibility();window.addEventListener('resize',updateUIVisibility);});}};})(Drupal);; 19(function(Drupal){Drupal.behaviors.contactUs={attach:function(context,settings){const wrappers=document.querySelectorAll('.form-contact-us-component',context);wrappers.forEach((wrapper)=>{const selectBusinessForm=wrapper.querySelector('.webform-submission-company-selector-form');if(selectBusinessForm){const companySelect=wrapper.querySelector('#edit-select-a-company');const inputSubmit=wrapper.querySelector('#edit-actions-submit');if(!companySelect.value)inputSubmit.disabled=true;companySelect.addEventListener('change',()=>{if(!companySelect.value)inputSubmit.disabled=true;else inputSubmit.disabled=false;});selectBusinessForm.addEventListener('submit',(e)=>{e.preventDefault();window.open(companySelect.value,'_blank').focus();});selectBusinessForm.querySelectorAll('.form-item').forEach((formItem)=>{const required=formItem.querySelector('.required');if(required)formItem.classList.add('required');});}const inquiryForm=wrapper.querySelector('.webform-submission-berkley-contact-us-form');if(!inquiryForm)return;const submitBtn=inquiryForm.querySelector('.form-submit');const formActions=inquiryForm.querySelector('.form-actions');inquiryForm.querySelectorAll('.form-item').forEach((formItem)=>{const required=formItem.querySelector('.required');if(required)formItem.classList.add('required');});const config={childList:true,subtree:true};let loaderObserver=new MutationObserver((mutationsList)=>{mutationsList.forEach((mutationRecord)=>
19{mutationRecord.addedNodes.forEach((node)=>{if(node.classList&&node.classList.contains('ajax-progress')){node.classList.add('hidden');formActions?.classList.add('loading');submitBtn.classList.add('loading');submitBtn.value='Submitting';}});mutationRecord.removedNodes.forEach((node)=>{if(node.classList&&node.classList.contains('ajax-progress')){formActions?.classList.remove('loading');submitBtn.value='Submit';submitBtn.classList.remove('loading');}});});});loaderObserver.observe(inquiryForm,config);});const v1_wrappers=document.querySelectorAll('.form-contact-us-component-v1',context);v1_wrappers.forEach((wrapper)=>{const selectBusinessForm=wrapper.querySelector('.webform-submission-berkley-company-selector-v1-form');if(selectBusinessForm){const companySelect=wrapper.querySelector('#edit-select-a-company');selectBusinessForm.addEventListener('submit',(e)=>{e.preventDefault();window.open(companySelect.value,'_blank').focus();});}});}};})(Drupal);; 20(function(Drupal,once){Drupal.behaviors.testimonialSwiper={attach(context){const swiperContainer=once('testimonial-swiper-init','.testimonial-carousel .swiper',context).shift();if(!swiperContainer)return;const swiperInstance=new Swiper(swiperContainer,{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:true},loop:false,speed:800,a11y:{enabled:true,prevSlideMessage:'Previous testimonial',nextSlideMessage:'Next testimonial',firstSlideMessage:'This is the first testimonial',lastSlideMessage:'This is the last testimonial',paginationBulletMessage:'Go to testimonial {{index}}'}});const tabButtons=once('testimonial-tabs-init','.testimonial-carousel .tab-button',context);swiperInstance.on('slideChange',function(){const activeIndex=swiperInstance.realIndex;tabButtons.forEach((btn,index)=>{if(index===activeIndex){btn.classList.add('is-active');btn.setAttribute('aria-selected','true');}else{btn.classList.remove('is-active');btn.setAttribute('aria-selected','false');}});});tabButtons.forEach((btn,index)=>{btn.setAttribute('role','tab');btn.setAttribute('aria-selected','false');btn.setAttribute('aria-controls',`testimonial-slide-${index}`);btn.setAttribute('id',`testimonial-tab-${index}`);const logoImg=btn.querySelector('img');const title=btn.querySelector('.tab-title');const hasLogo=logoImg&&logoImg.getAttribute('src')&&logoImg.getAttribute('src').trim()!=='';if(hasLogo){if(title)title.style.display='none';logoImg.style.display='block';}else{if(logoImg)logoImg.style.display='none';if(title)title.style.display='block';}btn.addEventListener('click',()=>{swiperInstance.slideTo(index);tabButtons.forEach((b)=>{b.classList.remove('is-active');b.setAttribute('aria-selected','false');});btn.classList.add('is-active');btn.setAttribute('aria-selected','true');});});if(tabButtons.length>0){tabButtons[0].classList.add('is-active');tabButtons[0].setAttribute('aria-selected','true');}const slides=swiperContainer.querySelectorAll('.swiper-slide');slides.forEach((slide,index)=>{slide.setAttribute('id',`testimonial-slide-${index}`);slide.setAttribute('role','tabpanel');slide.setAttribute('aria-labelledby',`testimonial-tab-${index}`);slide.removeAttribute('aria-label');});}};})(Drupal,once);; 21(function(Drupal,once){Drupal.behaviors.testimonialSwiperNoImage={attach(context){const swiperContainer=once('testimonial-no-image-swiper-init','.testimonial-carousel-no-image .swiper',context).shift();if(!swiperContainer)return;const swiperInstance=new Swiper(swiperContainer,{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:true},loop:false,speed:800,a11y:{enabled:true,prevSlideMessage:'Previous testimonial',nextSlideMessage:'Next testimonial',firstSlideMessage:'This is the first testimonial',lastSlideMessage:'This is the last testimonial',paginationBulletMessage:'Go to testimonial {{index}}'}});const tabButtons=once('testimonial-no-image-tabs-init','.testimonial-carousel-no-image .tab-button',context);swiperInstance.on('slideChange',function(){const activeIndex=swiperInstance.realIndex;tabButtons.forEach((btn,index)=>{if(index===activeIndex){btn.classList.add('active');btn.setAttribute('aria-selected','true');}else{btn.classList.remove('active');btn.setAttribute('aria-selected','false');}});});tabButtons.forEach((btn,index)=>{btn.setAttribute('role','tab');btn.setAttribute('aria-selected','false');btn.setAttribute('aria-controls',`testimonial-no-image-slide-${index}`);btn.setAttribute('id',`testimonial-no-image-tab-${index}`);const logoImg=btn.querySelector('img');const title=btn.querySelector('.tab-title');const hasLogo=logoImg&&logoImg.getAttribute('src')&&logoImg.getAttribute('src').trim()!=='';if(hasLogo){if(title)title.style.display='none';logoImg.style.display='block';}else{if(logoImg)logoImg.style.display='none';if(title)title.style.display='block';}btn.addEventListener('click',()=>{swiperInstance.slideTo(index);tabButtons.forEach((b)=>{b.classList.remove('active');b.setAttribute('aria-selected','false');});btn.classList.add('active');btn.setAttribute('aria-selected','true');});});if(tabButtons.length>0){tabButtons[0].classList.add('active');tabButtons[0].setAttribute('aria-selected','true');}const slides=swiperContainer.querySelectorAll('.swiper-slide');
21slides.forEach((slide,index)=>{slide.setAttribute('id',`testimonial-no-image-slide-${index}`);slide.setAttribute('role','tabpanel');slide.setAttribute('aria-labelledby',`testimonial-no-image-tab-${index}`);slide.removeAttribute('aria-label');});}};})(Drupal,once);; 22(function(Drupal,once){Drupal.behaviors.informationSwiper={attach(context){const swiperContainer=once('information-swiper-init','.information-carousel .swiper',context).shift();if(!swiperContainer)return;const swiperInstance=new Swiper(swiperContainer,{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:true},loop:false,speed:800,a11y:{enabled:true,prevSlideMessage:'Previous Information',nextSlideMessage:'Next information',firstSlideMessage:'This is the first information',lastSlideMessage:'This is the last information',paginationBulletMessage:'Go to information {{index}}'}});const tabButtons=once('information-tabs-init','.information-carousel .coh-button',context);tabButtons.forEach((btn,index)=>{btn.setAttribute('role','tab');btn.setAttribute('aria-selected','false');btn.setAttribute('aria-controls',`information-slide-${index}`);btn.setAttribute('id',`information-tab-${index}`);const numberSpan=btn.querySelector('.tab-number');if(numberSpan)numberSpan.textContent=index+1;btn.addEventListener('click',()=>{swiperInstance.slideTo(index);tabButtons.forEach((b)=>{b.classList.remove('is-tab-active');b.setAttribute('aria-selected','false');});btn.classList.add('is-tab-active');btn.setAttribute('aria-selected','true');});});if(tabButtons.length>0){tabButtons[0].classList.add('is-tab-active');tabButtons[0].setAttribute('aria-selected','true');}const slides=swiperContainer.querySelectorAll('.swiper-slide');slides.forEach((slide,index)=>{slide.setAttribute('id',`information-slide-${index}`);slide.setAttribute('role','tabpanel');slide.setAttribute('aria-labelledby',`information-tab-${index}`);slide.removeAttribute('aria-label');});}};})(Drupal,once);; 23(function(Drupal){Drupal.behaviors.industryProductListCardsMobile={attach:function(context,settings){const mainContainers=context.querySelectorAll('.list-cards-main-container');if(mainContainers.length===0)return;function applyMobileBehavior(){const isMobile=window.innerWidth<768;mainContainers.forEach((mainContainer)=>{const showCount=mainContainer.querySelector('.showing-count');const showAllBtn=mainContainer.querySelector('.show-all-btn');const children=mainContainer.querySelectorAll('.views-row');if(!showCount||!showAllBtn||!children.length)return;const setInitialState=()=>{children.forEach((child,index)=>{if(index>=10&&!child.classList.contains('show-all-btn'))child.classList.add('hidden-mobile');else child.classList.remove('hidden-mobile');});showCount.textContent=`Showing 10 of ${children.length}`;showAllBtn.textContent='Show All';showAllBtn.dataset.expanded='false';};const setExpandedState=()=>{children.forEach((child)=>child.classList.remove('hidden-mobile'));showCount.textContent=`Showing ${children.length} of ${children.length}`;showAllBtn.textContent='Show Less';showAllBtn.dataset.expanded='true';};if(isMobile)if(children.length>10){showCount.classList.remove('hidden');showAllBtn.classList.remove('hidden');setInitialState();if(!showAllBtn.dataset.listenerAdded){showAllBtn.addEventListener('click',()=>{const expanded=showAllBtn.dataset.expanded==='true';if(expanded)setInitialState();else setExpandedState();});showAllBtn.dataset.listenerAdded='true';}}else{showCount.classList.add('hidden');showAllBtn.classList.add('hidden');}else{children.forEach((child)=>child.classList.remove('hidden-mobile'));showCount.classList.add('hidden');showAllBtn.classList.add('hidden');}});}applyMobileBehavior();let resizeTimeout;window.addEventListener('resize',()=>{clearTimeout(resizeTimeout);resizeTimeout=setTimeout(applyMobileBehavior,200);});}};})(Drupal);; 24(function(Drupal){Drupal.behaviors.infoCalloutsReveal={attach:function(context,settings){if(typeof gsap==='undefined'||typeof ScrollTrigger==='undefined')return;const components=once('info-callouts-animation','.info-callouts-component.animated',context);if(!components.length)return;
24components.forEach((component)=>{const title=component.querySelector('.info-callouts-title');const columns=component.querySelectorAll('.info-callouts-column');const legend=component.querySelector('.info-callouts-legend');if(title)gsap.set(title,{opacity:0,x:-30});gsap.set(columns,{opacity:0,y:30});if(legend)gsap.set(legend,{opacity:0});ScrollTrigger.create({trigger:component,start:'top 90%',end:'bottom 10%',onEnter:()=>{if(title)gsap.to(title,{opacity:1,x:0,duration:0.8,ease:'power2.out'});gsap.to(columns,{opacity:1,y:0,duration:1.2,ease:'power2.out',stagger:{each:0.6,from:'start'},onComplete:()=>{if(legend)gsap.to(legend,{opacity:1,duration:0.5,ease:'power2.out'});}});},onEnterBack:()=>{if(legend)gsap.to(legend,{opacity:0,duration:0.5,ease:'power2.in'});gsap.to(columns,{opacity:0,y:30,duration:1.2,ease:'power2.in',stagger:{each:0.3,from:'end'},onComplete:()=>{if(title)gsap.to(title,{opacity:0,x:-30,duration:0.5,ease:'power2.in'});}});}});});}};})(Drupal);; 25(function(Drupal){Drupal.behaviors.gsapScrollCards={attach:function(context,settings){if(typeof gsap==='undefined'||typeof ScrollTrigger==='undefined'){console.log('GSAP or ScrollTrigger are not loaded.');return;}const containers=once('gsap-scroll-container','.image-card-02-animated-component',context);if(!containers.length)return;gsap.registerPlugin(ScrollTrigger);containers.forEach((el)=>{const desktopContainer=el.querySelector('.desktop-version');const mobileContainer=el.querySelector('.mobile-version');if(desktopContainer){const wrapper=desktopContainer.querySelector('.image-card-wrapper');const pinWrapper=desktopContainer.querySelector('.pin-wrapper');const left=wrapper?.querySelector('.image-card-left-wrapper');const cards=left?.querySelectorAll('.image-card-block')||[];if(!cards.length||cards.length<2)return;const vh=window.innerHeight;const cardHeight=vh;desktopContainer.style.height=`${vh+(cards.length-1)*cardHeight}px`;wrapper.style.height=`${vh}px`;cards.forEach((card)=>card.style.height=`${cardHeight}px`);ScrollTrigger.create({trigger:desktopContainer,start:'top top',end:`+=${(cards.length-1)*cardHeight}`,pin:pinWrapper,anticipatePin:1,invalidateOnRefresh:true});gsap.timeline({defaults:{ease:"none"},scrollTrigger:{trigger:desktopContainer,start:'top top',end:`+=${(cards.length-1)*cardHeight}`,scrub:true,invalidateOnRefresh:true}}).to(left,{y:`-${(cards.length-1)*cardHeight}px`});}if(mobileContainer){const blocks=mobileContainer.querySelectorAll('.image-card-block');if(blocks.length){gsap.set(blocks,{opacity:0,y:30});blocks.forEach((block)=>{ScrollTrigger.create({trigger:block,start:'top 80%',end:'top 30%',onEnter:()=>{gsap.to(block,{opacity:1,y:0,duration:0.6,ease:'power2.out'});},onLeaveBack:()=>{gsap.to(block,{opacity:0,y:30,duration:0.6,ease:'power2.in'});}});});}const image=mobileContainer.querySelectorAll('.image-card-image-container');if(image.length){gsap.set(image,{opacity:0});image.forEach((right)=>{ScrollTrigger.create({trigger:right,start:'top 85%',end:'top 30%',onEnter:()=>{gsap.to(right,{opacity:1,duration:0.5,ease:'power2.out'});},onLeaveBack:()=>{gsap.to(right,{opacity:0,duration:0.5,ease:'power2.in'});}});});}}window.addEventListener('resize',()=>ScrollTrigger.refresh());document.addEventListener("visibilitychange",()=>{if(!document.hidden)ScrollTrigger.refresh();});window.addEventListener('load',()=>ScrollTrigger.refresh());});}};})(Drupal);; 26(function(Drupal,once){Drupal.behaviors.timelineCarousel={attach(context){const container=once('timeline-carousel-init','.timeline-carousel-component',context).shift();if(!container)return;const decadesWrapper=container.querySelector('.timeline-decades');const decadeNodes=Array.from(container.querySelectorAll('.timeline-decade'));const cardsPanel=container.querySelector('#timeline-cards-panel');const decadeIdCounters={};const uniqueDecades=[...new Set(decadeNodes.map((btn)=>btn.getAttribute('data-decade')))].sort((a,b)=>parseInt(a)-parseInt(b));const allDecadeButtons=uniqueDecades.map((decade)=>decadeNodes.find((btn)=>btn.getAttribute('data-decade')===decade));let currentIndex=0;let visibleDecadeOrder=[];let visibleCount=7;let sideCount=Math.floor(visibleCount/2);function updateTabSelection(activeDecade){container.querySelectorAll('.timeline-decade').forEach((btn)=>{const isActive=btn.getAttribute('data-decade')===activeDecade;btn.setAttribute('aria-selected',isActive?'true':'false');btn.classList.toggle('is-active',isActive);});if(cardsPanel){const activeTab=container.querySelector(`.timeline-decade[data-decade="${activeDecade}"]`);if(activeTab)cardsPanel.setAttribute('aria-labelledby',activeTab.id);}}function assignDecadeToCards(){const cards=container.querySelectorAll('.timeline-card');cards.forEach((card)=>{const yearEl=card.querySelector('.card-year');if(!yearEl)return;const year=parseInt(yearEl.textContent.trim(),10);if(!isNaN(year))card.setAttribute('data-decade',Math.floor(year/10)*10);});}function updateCards(decade){const cards=Array.from(container.querySelectorAll('.timeline-card'));const viewAllContainer=container.querySelector('.timeline-view-all-container');const viewAllBtn=container.querySelector('.timeline-view-all');const isMobile=window.innerWidth<=768;const visibleLimit=isMobile?2:3;cards.forEach((card)=>{card.classList.remove('is-visible');card.setAttribute('aria-hidden','true');});const matchedCards=cards.filter((card)=>card.getAttribute('data-decade')===String(decade));matchedCards.forEach((card,index)=>{if(index<visibleLimit){card.classList.add('is-visible');card.setAttribute('aria-hidden','false');}});if(viewAllContainer&&matchedCards.length>visibleLimit){viewAllContainer.classList.remove('hidden');let expanded=false;viewAllBtn.classList.add('collapsed');viewAllBtn.classList.remove('expanded');viewAllBtn.onclick=()=>{expanded=!expanded;matchedCards.forEach((card,index)=>{const shouldShow=expanded||index<visibleLimit;card.classList.toggle('is-visible',shouldShow);card.setAttribute('aria-hidden',shouldShow?'false':'true');});viewAllBtn.textContent=expanded?'View Less':'View All';viewAllBtn.setAttribute('aria-expanded',expanded?'true':'false');viewAllBtn.classList.toggle('expanded',expanded);viewAllBtn.classList.toggle('collapsed',!expanded);};}else{if(viewAllContainer){viewAllContainer.classList.add('hidden');viewAllBtn.classList.remove('collapsed','expanded');}}}function updateVisibleCount(){const width=window.innerWidth;if(width<768)visibleCount=3;else if(width<1024)visibleCount=5;else if(width<1440)visibleCount=7;else if(width<2000)visibleCount=9;else visibleCount=11;sideCount=Math.floor(visibleCount/2);decadesWrapper.classList.remove('is-xs','is-sm','is-md','is-lg','is-xl');if(visibleCount===3)decadesWrapper.classList.add('is-xs');else if(visibleCount===5)decadesWrapper.classList.add('is-sm');else if(visibleCount===7)decadesWrapper.classList.add('is-md');else if(visibleCount===9)decadesWrapper.classList.add('is-lg');else decadesWrapper.classList.add('is-xl');}function getVisibleDecades(){const total=allDecadeButtons.length;const left=[];const right=[];for(let i=sideCount;i>0;i--)left.push(allDecadeButtons[(currentIndex-i+total)%total]);const center=allDecadeButtons[currentIndex];for(let i=1;i<=sideCount;i++)right.push(allDecadeButtons[(currentIndex+i)%total]);return [...left,center,...right];}function updateDecadesView(){updateVisibleCount();visibleDecadeOrder=[];const visibleBtns=getVisibleDecades();const html=visibleBtns.map((btn)=>{const decade=btn.getAttribute('data-decade');if(!decadeIdCounters[decade])decadeIdCounters[decade]=0;decadeIdCounters[decade]+=1;
26btn.id=`timeline-tab-${decade}-${decadeIdCounters[decade]}`;visibleDecadeOrder.push(decade);const outer=btn.closest('li');return outer.outerHTML;}).join('');decadesWrapper.style.transition='transform 0.4s ease';decadesWrapper.innerHTML=html;decadesWrapper.querySelectorAll('.timeline-decade').forEach((btn)=>{const decade=btn.getAttribute('data-decade');btn.addEventListener('click',()=>animateToDecade(decade));});updateTabSelection(allDecadeButtons[currentIndex].getAttribute('data-decade'));}function animateToDecade(targetDecade){const newIndex=allDecadeButtons.findIndex((btn)=>btn.getAttribute('data-decade')===targetDecade);if(newIndex===-1||newIndex===currentIndex)return;currentIndex=newIndex;updateDecadesView();updateTabSelection(targetDecade);updateCards(targetDecade);}assignDecadeToCards();updateDecadesView();updateCards(allDecadeButtons[currentIndex].getAttribute('data-decade'));const nextBtn=container.querySelector('.timeline-nav-next');const prevBtn=container.querySelector('.timeline-nav-prev');if(nextBtn)nextBtn.addEventListener('click',()=>{currentIndex=(currentIndex+1)%allDecadeButtons.length;const decade=allDecadeButtons[currentIndex].getAttribute('data-decade');updateDecadesView();updateCards(decade);updateTabSelection(decade);});if(prevBtn)prevBtn.addEventListener('click',()=>{currentIndex=(currentIndex-1+allDecadeButtons.length)%allDecadeButtons.length;const decade=allDecadeButtons[currentIndex].getAttribute('data-decade');updateDecadesView();updateCards(decade);updateTabSelection(decade);});window.addEventListener('resize',()=>{updateDecadesView();const decade=allDecadeButtons[currentIndex].getAttribute('data-decade');updateCards(decade);});}};})(Drupal,once);; 27(function(Drupal,drupalSettings){Drupal.behaviors.carouselFeature={attach:function(context,settings){const locatorUrl=drupalSettings.locator_url;const createCard=(business,index)=>{return ` 28 <div class="swiper-slide" style="margin-right: 16px;" role="group" aria-label="${index+1} / 4"> 29 <div class="business-card featured-business-carousel__card"> 30 <div class="card-content-container"> 31 <div class="card-content"> 32 <div class="logo-container"> 33 ${business.logo} 34 </div> 35 <h3 class="coh-style-berkley-heading-6-redesign-light"> ${business.name} </h3> 36 <p class="coh-style-berkley-p1-regular-redesign-light"> ${business.description} </p> 37 </div> 38 </div> 39 <div class="button-container"> 40 <div> 41 <div> 42 <a class="card-icon-link" href="${locatorUrl}?name_autocomplete=[${business.name}:COMPANYNAME:9]&openModal=1" aria-label="Go to the company"> 43 <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="currentColor"> 44 <path fill-rule="evenodd" clip-rule="evenodd" d="M20.9625 21.6V27.5347C20.9625 28.199 20.4344 28.75 19.7678 28.75C19.1013 28.75 18.5732 28.199 18.5732 27.5347V21.6H12.7778C12.1135 21.6 11.5625 21.0719 11.5625 20.4053C11.5625 19.7388 12.1135 19.2107 12.7778 19.2107H18.5732V13.0903C18.5732 12.426 19.1013 11.875 19.7678 11.875C20.4344 11.875 20.9625 12.426 20.9625 13.0903V19.2107H27.2222C27.8865 19.2107 28.4375 19.7388 28.4375 20.4053C28.4375 21.0719 27.8865 21.6 27.2222 21.6H20.9625Z"></path> 45 <path fill-rule="evenodd" clip-rule="evenodd" d="M20 6.875C27.7665 6.875 33.125 12.2333 33.125 20C33.125 27.7665 27.7667 33.125 20 33.125C12.2335 33.125 6.875 27.7665 6.875 20C6.875 12.2335 12.2335 6.875 20 6.875ZM20 4.375C28.6293 4.375 35.625 11.3707 35.625 20C35.625 28.6295 28.6293 35.625 20 35.625C11.3705 35.625 4.375 28.6295 4.375 20C4.375 11.3707 11.3705 4.375 20 4.375Z"></path> 46 </svg> 47 </a> 48 </div> 49 </div> 50 </div> 51 </div> 52 </div> 53 `;};const lsItem=localStorage.getItem('previously_viewed_businesses');const previousBusinesses=JSON.parse(lsItem)??[];const carousel=context.querySelector('.featured-business-carousel-v2');if(carousel){if(previousBusinesses.length==0)carousel.classList.add('hidden');const wrapper=carousel.querySelector('.swiper .swiper-wrapper');
53previousBusinesses.forEach((business,index)=>{const newCard=createCard(business,index);wrapper.innerHTML+=newCard;});}context.querySelectorAll('.featured-business-carousel').forEach((container)=>{['.products-card-tags','.industries-card-tags'].forEach((selector)=>{container.querySelectorAll(selector).forEach((tagWrapper)=>{const cardTag=tagWrapper.querySelector('.card-tag');if(!cardTag||cardTag.innerHTML.trim()==='')tagWrapper.classList.add('tag-hidden');});});['.products-card-tags','.industries-card-tags'].forEach((selector)=>{container.querySelectorAll(selector).forEach((tagContainer)=>{const tags=tagContainer.querySelectorAll('.card-tag');const moreBtn=tagContainer.querySelector('.show-more-tags');if(!moreBtn)return;if(tags.length>1){const extraCount=tags.length-1;tags.forEach((tag,index)=>{if(index>0)tag.classList.add('tag-hidden');});moreBtn.classList.remove('button-hidden');moreBtn.textContent=`+${extraCount} More`;let iconLink=null;const cardEl=tagContainer.closest('.featured-business-carousel__card');if(cardEl)iconLink=cardEl.querySelector('.card-icon-link');if(!iconLink)iconLink=container.querySelector('.card-icon-link');if(iconLink){const realHref=iconLink.getAttribute('href');if(realHref)moreBtn.setAttribute('href',realHref);}}else moreBtn.classList.add('button-hidden');});});const swiperEl=container.querySelector('.swiper');if(!swiperEl||swiperEl.classList.contains('swiper-initialized'))return;const slideCount=swiperEl.querySelectorAll('.swiper-slide').length;const isDesktop=window.innerWidth>=1085;const shouldInitializeSwiper=!(isDesktop&&slideCount<4);const prevBtn=container.querySelector('.swiper-button-prev');const nextBtn=container.querySelector('.swiper-button-next');const paginationEl=container.querySelector('.swiper-pagination');const toggleUIElements=(hide)=>{[prevBtn,nextBtn,paginationEl].forEach((el)=>{if(el)el.classList.toggle('swiper-hide-element',hide);});};if(!shouldInitializeSwiper)toggleUIElements(true);else{const swiper=new Swiper(swiperEl,{loop:false,grabCursor:true,watchOverflow:true,centeredSlides:false,slidesPerView:'auto',a11y:{enabled:true,prevSlideMessage:'Previous slide',nextSlideMessage:'Next slide',firstSlideMessage:'This is the first slide',lastSlideMessage:'This is the last slide',slideLabelMessage:'{{index}} / {{slidesLength}}'},navigation:{nextEl:nextBtn,prevEl:prevBtn},pagination:{el:paginationEl,type:'progressbar'},breakpoints:{0:{spaceBetween:16,slidesOffsetAfter:40},768:{spaceBetween:16,slidesOffsetAfter:90},1024:{spaceBetween:16,slidesOffsetAfter:90},1440:{spaceBetween:24,slidesOffsetAfter:120},2000:{spaceBetween:40,slidesOffsetAfter:312}}});}container.querySelectorAll('.featured-business-carousel__card').forEach((card)=>{card.addEventListener('click',(e)=>{if(e.target.closest('a')||e.target.closest('button'))return;const iconLink=card.querySelector('.card-icon-link');if(iconLink){const href=iconLink.getAttribute('href');if(href){const newHref=href.includes('?')?`${href}&openModal=1`:`${href}?openModal=1`;window.location.href=newHref;}}});});const handleResize=()=>{const isNowDesktop=window.innerWidth>=1085;const hideUI=isNowDesktop&&slideCount<4;toggleUIElements(hideUI);};handleResize();window.addEventListener('resize',handleResize);function getCookie(name){const cookies=document.cookie.split('; ');for(let i=0;i<cookies.length;i++){const cookie=cookies[i];const [cookieName,cookieValue]=cookie.split('=');if(decodeURIComponent(cookieName)===name)return decodeURIComponent(cookieValue);}return null;}const cookieUrl=getCookie('locator_filters_url');const cookieListRaw=getCookie('locator_filters_list');const wrapper=container.querySelector('.hide-searches');if(cookieUrl&&cookieListRaw)try{const items=JSON.parse(cookieListRaw);if(!Array.isArray(items)||items.length===0)throw new Error();if(wrapper)wrapper.classList.remove('hide-searches');const relatedLink=container.querySelector('.related-searches-container-link');if(relatedLink)relatedLink.setAttribute('href',`${locatorUrl}${cookieUrl}`);const resultsEl=container.querySelector('.related-searches-container-results');if(resultsEl)resultsEl.textContent=items.join(' | ');}catch(e){if(wrapper)wrapper.classList.add('hide-searches');}else{if(wrapper)wrapper.classList.add('hide-searches');}});}};})(Drupal,drupalSettings);; 54(function(Drupal){Drupal.behaviors.locatorToolV2={attach:function(context,settings){const pagerSize=12;let shownPages=1;const content=context.querySelector('.locator-v2-content');if(!content)return;if(!Drupal.behaviors.locatorToolV2.initialized)Drupal.behaviors.locatorToolV2.initialized=true;const isMobile=window.matchMedia('(max-width: 767px)').matches;function getElements(){const contentEl=document.querySelector('.locator-v2-content');const resultItems=contentEl?.querySelectorAll('.locator-view__result-item-v2')||[];return {contentEl,resultItems,showingCount:document.querySelector('.showing-count'),showMoreBtn:document.querySelector('.js-show-more-btn'),showLessBtn:document.querySelector('.js-show-less-btn'),selectContainer:document.querySelector('.locator-select-container'),codeAutocomplete:document.querySelector('.locator-code-autocomplete'),sideFilters:document.querySelector('.locator-side-filters'),showBtnContainer:document.querySelector('.show-btn-container'),exposedForm:document.querySelector('.views-exposed-form'),showCodeBtn:document.querySelector('.js-show-code-autocomplete'),showSelectBtn:document.querySelector('.js-show-select-container'),filtersToggleMobile:document.querySelector('.filters-locator-content'),companiesAutocomplete:document.querySelector('.js-form-item-companies input'),companiesDatalist:document.querySelector('.js-form-item-companies datalist'),locatorSelectedFilterList:document.querySelector('.js-locator-view-selected-filter-list'),locatorSelectedFilterListClearBtn:document.querySelector('.js-locator-view-selected-filter-list-clear-btn'),filterSummary:document.querySelector('.filter-summary'),sortContainer:document.querySelector('.sort-container')};}const params=new URLSearchParams(window.location.search);if(!Drupal.behaviors.locatorToolV2.modalOpened&¶ms.get('openM
54odal')==='1'){Drupal.behaviors.locatorToolV2.modalOpened=true;const waitForElement=(selector,callback,maxAttempts=50,interval=50)=>{let attempts=0;const timer=setInterval(()=>{const el=document.querySelector(selector);if(el){clearInterval(timer);callback(el);}else{if(++attempts>=maxAttempts)clearInterval(timer);}},interval);};waitForElement('button.toggle-modal',(modalBtn)=>{const els=getElements();if(isMobile&&els.filtersToggleMobile){els.filtersToggleMobile.textContent='Filters';els.sideFilters?.classList.add('hidden');}refreshShownItems(els);modalBtn.click();const url=new URL(window.location.href);url.searchParams.delete('openModal');window.history.replaceState({},document.title,url.toString());});}const opSearch=params.get('op')==='Search';const industryParam=params.get('industry');const productParam=params.get('product');const shouldExpand=opSearch||(industryParam&&industryParam!=='All')||(productParam&&productParam!=='All');if(shouldExpand&&!Drupal.behaviors.locatorToolV2.filterExpanded){Drupal.behaviors.locatorToolV2.filterExpanded=true;const els=getElements();if(isMobile&&els.filtersToggleMobile){els.filtersToggleMobile.textContent='Filters';els.sideFilters?.classList.add('hidden');}refreshShownItems(els);}function ajaxSideFilters(){const els=getElements();const searchBtn=document.querySelector('.search-container .js-form-submit');const checkboxGroups=['country','state','distribution'];checkboxGroups.forEach((group)=>{const checkboxes=els.sideFilters.querySelectorAll(`.edit-${group} input.form-checkbox`);checkboxes.forEach((checkbox)=>{checkbox.addEventListener('change',()=>{changeSortToRelevant();searchBtn.click();});});});const businessName=els.sideFilters.querySelector('[data-drupal-selector="edit-name-autocomplete"]');if(businessName.value!=="All"){const selectedOption=businessName.options[businessName.selectedIndex];els.companiesAutocomplete.value=selectedOption.text;}els.companiesAutocomplete.addEventListener('input',()=>{if(els.companiesAutocomplete.value.length===0){businessName.value="All";searchBtn.click();}else{const optionsArray=Array.from(els.companiesDatalist.options);const index=optionsArray.findIndex((option)=>option.value.toLowerCase()===els.companiesAutocomplete.value.toLowerCase());if(index>=0){businessName.value=businessName.options[index+1].value;searchBtn.click();}}});businessName.addEventListener('change',()=>{searchBtn.click();});const sort=els.sideFilters.querySelector('.sort-select');const sort_by_select=els.sideFilters.querySelector('.js-form-item-sort-by select');const sort_order_select=els.sideFilters.querySelector('.js-form-item-sort-order select');sort.value=sort_by_select.value+'_'+sort_order_select.value;sort.addEventListener('change',()=>{const selectedValue=sort.value;const [sort_by,sort_order]=selectedValue.split('_');sort_by_select.value=sort_by;sort_order_select.value=sort_order;searchBtn.click();});const autocompleteInputs=document.querySelectorAll('.form-autocomplete');autocompleteInputs.forEach((input)=>{input.addEventListener('keydown',(event)=>{if(event.key==='Enter'&&input.value.trim()!==''){event.preventDefault();changeSortToRelevant();searchBtn.click();}});});const showCodeButtons=document.querySelectorAll('.js-show-code-autocomplete');showCodeButtons.forEach((button)=>{button.addEventListener('click',()=>{const container=button.closest('.search-container, .coh-container, form')||document;const autocompleteInput=container.querySelector('.form-autocomplete');if(autocompleteInput)setTimeout(()=>{autocompleteInput.focus();},100);});});}function createListFilters(){const els=getElements();const codeAutocompleteInput=els.codeAutocomplete.querySelector('input');if(codeAutocompleteInput&&codeAutocompleteInput.value!=="")createNewFilterButton(els,codeAutocompleteInput,"Code: "+codeAutocompleteInput.value);const industrySelect=els.selectContainer.querySelector('.js-form-item-industry select');if(industrySelect&&industrySelect.value!=="All"){const selectedIndex=industrySelect.selectedIndex;createNewFilterButton(els,industrySelect,"Industry: "+industrySelect.options[selectedIndex].text);}const productSelect=els.selectContainer.querySelector('.js-form-item-product select');if(productSelect&&productSelect.value!=="All"){const selectedIndex=
54productSelect.selectedIndex;createNewFilterButton(els,productSelect,"Product: "+productSelect.options[selectedIndex].text);}const checkboxGroups=['country','state','distribution'];checkboxGroups.forEach((group)=>{const checkboxes=els.sideFilters.querySelectorAll(`.edit-${group} input.form-checkbox`);checkboxes.forEach((checkbox)=>{if(checkbox.checked){const label=checkbox.nextElementSibling;createNewFilterButton(els,checkbox,group.charAt(0).toUpperCase()+group.slice(1)+": "+label.textContent);}});});}function handleClearAllLink(){const els=getElements();const clearBtn=els.locatorSelectedFilterListClearBtn;if(!clearBtn)return;clearBtn.addEventListener('click',(e)=>{e.preventDefault();const url=new URL(window.location.href);url.search='';window.location.href=url.toString();});}function createNewFilterButton(els,target,newText){if(target.type=='checkbox')var id="button-"+target.value;else var id="button-"+target.name;var newFilterButton=document.getElementById(id);var parts=newText.split(':');var label=parts[0]?parts[0].trim()+':':'';var value=parts[1]?parts[1].trim():'';if(newFilterButton){newFilterButton.classList.add('filter-pill-button');newFilterButton.innerHTML=` 55 <span class="label">${label}</span> 56 <span class="value">${value}</span> 57 `;}else{newFilterButton=document.createElement('button');newFilterButton.className='filter-pill-button';newFilterButton.innerHTML=` 58 <span class="label">${label}</span> 59 <span class="value">${value}</span> 60 `;newFilterButton.setAttribute('data-input-field',target.id);newFilterButton.setAttribute('data-input-tag',target.tagName);newFilterButton.setAttribute('id',id);newFilterButton.setAttribute('aria-label',`${newText}. Remove filter.`);newFilterButton.addEventListener('click',deleteNewFilterButton);var li=document.createElement('li');li.appendChild(newFilterButton);els.locatorSelectedFilterList.insertBefore(li,els.locatorSelectedFilterListClearBtn.parentNode);}}function deleteNewFilterButton(event){var elementTag=event.target.dataset.inputTag,$selectTarget=document.getElementById(event.target.dataset.inputField);switch(elementTag){case "SELECT":$selectTarget.value=berkley_components_Locator_CONSTANTS.DEFAULT_OPTION;break;case "INPUT":if($selectTarget.type=='checkbox')$selectTarget.checked=false;else $selectTarget.value='';break;case "OPTION":$selectTarget.removeAttribute('checked');break;}event.target.parentNode.remove();document.querySelector('.search-container .js-form-submit').click();}function setSeparatorHeight(expanded){if(isMobile){const separator=document.querySelector('.vertical-separator:not(.content-separator)');if(!separator)return;separator.style.height='370px';}else{const separators=document.querySelectorAll('.vertical-separator');let extraHeight=0;const els=getElements();if(els.filterSummary&&!els.filterSummary.classList.contains('hidden'))extraHeight=els.filterSummary.clientHeight-70;separators.forEach((separator)=>{separator.style.height=null;const baseHeight=separator.clientHeight;separator.style.height=baseHeight+extraHeight+'px';});}}function updateFilterSummaryVisibility(els,expanded){if(!els.filterSummary)return;if(!expanded)els.filterSummary.classList.add('hidden');else{const validItems=Array.from(els.filterSummary.querySelectorAll('li')).filter((li)=>!li.querySelector('.js-locator-view-selected-filter-list-clear-btn'));els.filterSummary.classList.toggle('hidden',validItems.length===0);}if(!isMobile){const finalExpanded=expanded&&!els.filterSummary.classList.contains('hidden');setSeparatorHeight(finalExpanded);}else{setSeparatorHeight(expanded);if(els.sortContainer)if(expanded&&!els.filterSummary.classList.contains('hidden')){const filterSummaryHeight=els.filterSummary.offsetHeight;els.sortContainer.style.bottom=`-${filterSummaryHeight+55}px`;}else els.sortContainer.style.bottom='-55px';}}function observeFilterSummary(els){if(!els.filterSummary)return;if(Drupal.behaviors.locatorToolV2.filterObserverInitialized)return;Drupal.behaviors.locatorToolV2.filterObserverInitialized=true;let currentFilterSummary=els.filterSummary;const observerCallback=(mutationsList)=>{for(const mutation of mutationsList)if(mutation.type==='childList')updateFilterSummaryVisibility({filterSummary:currentFilterSummary},true);};const observer=new MutationObserver(observerCallback);observer.observe(currentFilterSummary,{childList:true});updateFilterSummaryVisibility({filterSummary:currentFilterSummary},true);const parentObserver=new MutationObserver((mutationsList)=>{for(const mutation of mutationsList){for(const node of mutation.addedNodes)if(node.nodeType===1&&node.classList.contains('filter-summary')){observer.disconnect();currentFilterSummary=node;observer.observe(currentFilterSummary,{childList:true});updateFilterSummaryVisibility({filterSummary:currentFilterSummary},true);}}});const parent=currentFilterSummary.parentNode;if(parent)parentObserver.observe(parent,{childList:true});}function refreshShownItems(els){const totalItems=els.resultItems.length;const shownItems=Math.min(pagerSize*shownPages,totalItems);
60els.resultItems.forEach((item,index)=>{item.classList.toggle('hidden',index>=shownItems);});els.showingCount.textContent=`Showing 1-${shownItems} of ${totalItems}`;els.showMoreBtn?.classList.toggle('hidden',shownItems>=totalItems);els.showLessBtn?.classList.toggle('hidden',shownPages===1);}function changeSortToRelevant(){const sort_by_select=els.sideFilters.querySelector('.js-form-item-sort-by select');sort_by_select.value='relevance';const sort_order_select=els.sideFilters.querySelector('.js-form-item-sort-order select');sort_order_select.value='ASC';}if(!Drupal.behaviors.locatorToolV2.delegated){document.addEventListener('click',(e)=>{const target=e.target;const els=getElements();const actions=[{selector:'.filters-locator-content',handler:(btn)=>{if(!isMobile)return;const sideFilters=els.sideFilters;if(!sideFilters)return;const isCurrentlyHidden=sideFilters.classList.contains('hidden');sideFilters.classList.toggle('hidden',!isCurrentlyHidden);btn.textContent=isCurrentlyHidden?'Hide Filters':'Filters';}},{selector:'.js-show-more-btn',handler:()=>{shownPages+=1;refreshShownItems(els);}},{selector:'.js-show-less-btn',handler:()=>{if(shownPages>1)shownPages-=1;refreshShownItems(els);setTimeout(()=>{const buttonArea=els.showBtnContainer||els.showLessBtn||els.showMoreBtn;if(buttonArea){const rect=buttonArea.getBoundingClientRect();const scrollTop=window.pageYOffset+rect.top-(window.innerHeight-rect.height);window.scrollTo({top:scrollTop,behavior:'smooth'});}},100);}},{selector:'.filter-toggle',handler:(btn)=>{const filterContent=btn.nextElementSibling;if(!filterContent)return;const isCollapsed=btn.classList.contains('collapsed');btn.classList.toggle('collapsed',!isCollapsed);btn.classList.toggle('expanded',isCollapsed);filterContent.classList.toggle('hidden',!isCollapsed);}},{selector:'.js-show-code-autocomplete',handler:()=>{els.showCodeBtn.classList.add('hidden');els.showSelectBtn?.classList.remove('hidden');els.selectContainer?.classList.add('hidden');els.codeAutocomplete?.classList.remove('hidden');const url=new URL(window.document.URL);url.searchParams.set('search','advanced');window.history.replaceState(null,"",url.toString());}},{selector:'.js-show-select-container',handler:()=>{els.showSelectBtn.classList.add('hidden');els.showCodeBtn?.classList.remove('hidden');els.selectContainer?.classList.remove('hidden');els.codeAutocomplete?.classList.add('hidden');const url=new URL(window.document.URL);url.searchParams.delete('search');window.history.replaceState(null,"",url.toString());}}];for(const action of actions){const btn=target.closest(action.selector);if(btn){e.preventDefault();action.handler(btn);break;}}});Drupal.behaviors.locatorToolV2.delegated=true;}$(document).ajaxComplete(function(event,xhr,settings){if(settings.extraData?.view_name==='berkley_locator_component_v2'){const els=getElements();const noResults=els.contentEl?.querySelector('.locator-view__no-results');if(noResults){[els.sideFilters,els.showingCount,els.showBtnContainer].forEach((el)=>{el?.classList.add('hidden');});els.exposedForm?.classList.add('hide-filters');if(els.filterSummary){els.filterSummary.classList.remove('hidden');if(!isMobile)els.filterSummary.style.top='94px';}return;}if(!isMobile)els.sideFilters?.classList.remove('hidden');if(isMobile&&els.filtersToggleMobile){els.filtersToggleMobile.classList.remove('hidden');els.filtersToggleMobile.textContent='Filters';els.sideFilters?.classList.add('hidden');}setSeparatorHeight(true);shownPages=1;refreshShownItems(els);updateFilterSummaryVisibility(els,true);}});function initEvents(){const selects=context.querySelectorAll('.form-select');selects.forEach((select)=>{select.addEventListener('keydown',()=>{if(event.key==='Enter')select.showPicker();});});const els=getElements();const industrySelect=els.selectContainer.querySelector('.js-form-item-industry select');industrySelect.addEventListener('change',()=>{changeSortToRelevant();});const productSelect=els.selectContainer.querySelector('.js-form-item-product select');productSelect.addEventListener('change',()=>{changeSortToRelevant();});refreshShownItems(els);
60const codeAutocompleteInput=els.codeAutocomplete.querySelector('input');codeAutocompleteInput.addEventListener('change',(event)=>{if(codeAutocompleteInput&&codeAutocompleteInput.value!=="")changeSortToRelevant();});if(isMobile&&els.filtersToggleMobile){els.filtersToggleMobile.classList.remove('hidden');els.filtersToggleMobile.textContent='Filters';els.sideFilters?.classList.add('hidden');}let url=new URL(window.location.href);let params=new URLSearchParams(url.search);if(params.get('search')==="advanced"){els.showCodeBtn.classList.add('hidden');els.showSelectBtn?.classList.remove('hidden');els.selectContainer?.classList.add('hidden');els.codeAutocomplete?.classList.remove('hidden');}}ajaxSideFilters();createListFilters();handleClearAllLink();initEvents();const els=getElements();observeFilterSummary(els);}};})(Drupal);; 61(function($,Drupal){'use strict';Drupal.behaviors.businessmodal={attach:function(context,settings){const $modal=$('#details-modal',context);const $modalContent=$modal.find('.modal__content');const $bottomContent=$modal.find('.modal__footer');let focusableElements=[];let firstFocusable,lastFocusable;$('[data-modal-trigger]',context).on('click',function(e){e.preventDefault();const businessCard=$(this).closest('.business-card');const $sourceContent=businessCard.find('.modal-content');const $sourceBottomContent=businessCard.find('.bottom-container');const $logo=businessCard.find('.logo')[0]?.firstElementChild?.outerHTML??null;const $name=businessCard.find('.views-field-name .field-content')[0].innerHTML;const $description=businessCard.find('.views-field-description .field-content')[0].innerHTML;const lsItem=localStorage.getItem('previously_viewed_businesses');let previousBusinesses=JSON.parse(lsItem)??[];const clickedBusiness={logo:$logo,name:$name,description:$description};previousBusinesses=previousBusinesses.filter((item)=>item.name!=clickedBusiness.name);previousBusinesses.unshift(clickedBusiness);previousBusinesses=previousBusinesses.slice(0,4);localStorage.setItem('previously_viewed_businesses',JSON.stringify(previousBusinesses));if($sourceContent.length){$modalContent.html($sourceContent.html());$bottomContent.html($sourceBottomContent.html());initializeTabs($modalContent);$modal.removeAttr('hidden');setTimeout(()=>{$modal.addClass('is-open');$('body').addClass('no-scroll');$modal.find('.modal__close').focus();focusableElements=$modal.find('a[href], area[href], input:not([disabled]), select:not([disabled]), '+'textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])');firstFocusable=focusableElements.first();lastFocusable=focusableElements.last();},20);}else console.error('modal source content not found.');});$('[data-modal-close]',context).on('click',function(e){e.preventDefault();$modal.removeClass('is-open');$modal.one('transitionend',function(){if(!$modal.hasClass('is-open')){$('body').removeClass('no-scroll');$modal.attr('hidden','hidden');$modalContent.empty();focusableElements=[];}});});$(document).on('keydown',function(e){if(!$modal.hasClass('is-open'))return;if(e.key==='Escape')$modal.find('[data-modal-close]').first().trigger('click');if(e.key==='Tab')if(e.shiftKey){if(document.activeElement===firstFocusable[0]){e.preventDefault();lastFocusable.focus();}}else{if(document.activeElement===lastFocusable[0]){e.preventDefault();firstFocusable.focus();}}});function initializeTabs($container){const $tabs=$modalContent.find('.tabs-tab');const $panels=$modalContent.find('.tabs-panel');$tabs.on('click',function(e){e.preventDefault();const $clickedTab=$(this);const targetPanelId=$clickedTab.attr('aria-controls');$tabs.removeClass('is-active').attr('aria-selected','false').attr('tabindex','-1');$panels.removeClass('is-active').attr('hidden','hidden');$clickedTab.addClass('is-active').attr('aria-selected','true').removeAttr('tabindex');$('#'+targetPanelId,$modalContent).addClass('is-active').removeAttr('hidden');});}}};})(jQuery,Drupal);; 62(function(Drupal){Drupal.behaviors.bulletedListToggle={attach:function(context,settings){const components=context.querySelectorAll('.bulleted-list-component');
62components.forEach((component)=>{const rightContainer=component.querySelector('.bulleted-list-right.has-view-all');if(!rightContainer)return;const columnsWrapper=component.querySelector('.bulleted-list-columns');if(!columnsWrapper)return;if(component.dataset.bulletedListInit==='true')return;component.dataset.bulletedListInit='true';const toggleButton=component.querySelector('.bulleted-list-toggle');function animateItem(li,show){const height=li.scrollHeight;li.style.transition=`height 300ms ease, opacity 300ms ease`;li.style.overflow='hidden';li.style.display='flex';if(show){li.classList.add('bulleted-list-visible');li.classList.remove('bulleted-list-hidden');li.style.height='0px';li.style.opacity=0;requestAnimationFrame(()=>{li.style.height=height+'px';li.style.opacity=1;});li.addEventListener('transitionend',function handler(e){if(e.propertyName==='height'){li.style.height='auto';li.style.transition='';li.style.overflow='';li.removeEventListener('transitionend',handler);}});}else{li.style.height=height+'px';li.style.opacity=1;requestAnimationFrame(()=>{li.style.height='0px';li.style.opacity=0;});li.addEventListener('transitionend',function handler(e){if(e.propertyName==='height'){li.classList.add('bulleted-list-hidden');li.classList.remove('bulleted-list-visible');li.style.height='';li.style.transition='';li.style.opacity='';li.style.overflow='';li.removeEventListener('transitionend',handler);}});}}function enforceDesktopVisibility(){const cols=columnsWrapper.querySelectorAll('.bulleted-list-column');let total=0;cols.forEach((col)=>{const items=col.querySelectorAll('li');items.forEach((li,idx)=>{if(idx<6){li.classList.add('bulleted-list-visible');li.classList.remove('bulleted-list-hidden');li.style.height='auto';li.style.opacity=1;}else{li.classList.add('bulleted-list-hidden');li.classList.remove('bulleted-list-visible');li.style.height='0px';li.style.opacity=0;}});total+=items.length;});if(toggleButton)toggleButton.style.display=total<=12?'none':'';return total;}function applyMobileView(){const cols=columnsWrapper.querySelectorAll('.bulleted-list-column');if(cols.length<2)return;if(!component.dataset.originalColumnsHtml)component.dataset.originalColumnsHtml=columnsWrapper.innerHTML;const firstUl=cols[0].querySelector('ul');const ulClasses=firstUl?firstUl.className:'';const itemsCol1=Array.from(cols[0].querySelectorAll('li'));const itemsCol2=Array.from(cols[1].querySelectorAll('li'));const visible1=itemsCol1.slice(0,6);const visible2=itemsCol2.slice(0,6);const hidden1=itemsCol1.slice(6);const hidden2=itemsCol2.slice(6);const ordered=[...visible1,...visible2,...hidden1,...hidden2];const combinedList=document.createElement('ul');combinedList.className=(ulClasses?ulClasses+' ':'')+'bulleted-list-combined';ordered.forEach((li,idx)=>{const clone=li.cloneNode(true);clone.style.display='flex';if(idx<12){clone.classList.add('bulleted-list-visible');clone.classList.remove('bulleted-list-hidden');clone.style.height='auto';clone.style.opacity=1;}else{clone.classList.add('bulleted-list-hidden');clone.classList.remove('bulleted-list-visible');clone.style.height='0px';clone.style.opacity=0;}combinedList.appendChild(clone);});columnsWrapper.innerHTML='';columnsWrapper.appendChild(combinedList);component._combinedList=combinedList;if(toggleButton&&toggleButton.classList.contains('expanded')){const combinedItems=combinedList.querySelectorAll('li');combinedItems.forEach((li,idx)=>{if(idx>=12)animateItem(li,true);});}}function restoreDesktopMarkup(){if(component.dataset.originalColumnsHtml)columnsWrapper.innerHTML=component.dataset.originalColumnsHtml;component._combinedList=null;enforceDesktopVisibility();if(toggleButton&&toggleButton.classList.contains('expanded')){const cols=columnsWrapper.querySelectorAll('.bulleted-list-column');cols.forEach((col)=>{const lis=col.querySelectorAll('li');lis.forEach((li,idx)=>{if(idx>=6)animateItem(li,true);});});}}function toggleHandler(){const willExpand=!toggleButton.classList.contains('expanded');toggleButton.classList.toggle('expanded',willExpand);toggleButton.classList.toggle('collapsed',!willExpand);toggleButton.setAttribute('aria-expanded',String(willExpand));toggleButton.textContent=willExpand?'View Less':'View All Entities';const isMobileNow=window.matchMedia('(max-width: 767px)').matches;if(isMobileNow&&component._combinedList){const combinedItems=component._combinedList.querySelectorAll('li');
62combinedItems.forEach((li,idx)=>{if(idx>=12)animateItem(li,willExpand);});}else{const cols=columnsWrapper.querySelectorAll('.bulleted-list-column');cols.forEach((col)=>{const lis=col.querySelectorAll('li');lis.forEach((li,idx)=>{if(idx>=6)animateItem(li,willExpand);});});}}if(toggleButton&&!toggleButton.dataset.listenerAttached){toggleButton.addEventListener('click',toggleHandler);toggleButton.dataset.listenerAttached='true';}const mq=window.matchMedia('(max-width: 767px)');function handleMqChange(e){if(e.matches)applyMobileView();else restoreDesktopMarkup();}enforceDesktopVisibility();if(mq.matches)applyMobileView();if(!component.dataset.mqListener){mq.addEventListener('change',handleMqChange);component.dataset.mqListener='true';}});}};})(Drupal);; 63(function(Drupal){const mobileMaxCards=12;const mobileBreakpoint=767;function updateStatus(panel){const status=panel.querySelector('.bld-status');const cards=panel.querySelectorAll('.bld-card');if(!status||!cards.length)return;const visibleCards=Array.from(cards).filter((card)=>!card.classList.contains('hide-card')).length;const totalCards=cards.length;status.textContent=`Showing ${visibleCards} of ${totalCards}`;}function limitCardsOnMobile(panel){const cards=panel.querySelectorAll('.bld-card');const showMoreBtn=panel.querySelector('.bld-show-more');if(!cards.length||!showMoreBtn)return;if(window.innerWidth<=mobileBreakpoint){cards.forEach((card,index)=>{if(index>=mobileMaxCards)card.classList.add('hide-card');else card.classList.remove('hide-card');});if(cards.length>mobileMaxCards){showMoreBtn.classList.add('is-visible');showMoreBtn.textContent='Show More';}else showMoreBtn.classList.remove('is-visible');}else{cards.forEach((card)=>card.classList.remove('hide-card'));showMoreBtn.classList.remove('is-visible');}updateStatus(panel);}function setupShowMore(panel){const cards=panel.querySelectorAll('.bld-card');const showMoreBtn=panel.querySelector('.bld-show-more');if(!showMoreBtn)return;showMoreBtn.addEventListener('click',()=>{const hiddenCardsExist=Array.from(cards).some((card)=>card.classList.contains('hide-card'));if(hiddenCardsExist){cards.forEach((card)=>card.classList.remove('hide-card'));showMoreBtn.textContent='Show Less';}else{cards.forEach((card,index)=>{if(index<mobileMaxCards)card.classList.remove('hide-card');else card.classList.add('hide-card');});showMoreBtn.textContent='Show More';}updateStatus(panel);});}Drupal.behaviors.businessListingsDirectory={attach:function(context){const components=context.querySelectorAll('.business-listings-directory:not([data-bld-tabs-processed])');components.forEach((component)=>{component.setAttribute('data-bld-tabs-processed','true');const tabs=component.querySelectorAll('.bld-tab');const panels=component.querySelectorAll('.bld-panel');tabs.forEach((tab,index)=>{const tabId=`bld-tab-${index+1}`;const panelId=`bld-panel-${index+1}`;const panel=panels[index];tab.setAttribute('id',tabId);tab.setAttribute('aria-controls',panelId);tab.setAttribute('role','tab');if(panel){panel.setAttribute('id',panelId);panel.setAttribute('aria-labelledby',tabId);panel.setAttribute('role','tabpanel');}if(index===0){tab.classList.add('is-active');tab.setAttribute('aria-selected','true');panel?.classList.add('is-active');panel?.classList.remove('hidden');limitCardsOnMobile(panel);setupShowMore(panel);}else{tab.setAttribute('aria-selected','false');panel?.classList.remove('is-active');panel?.classList.add('hidden');}tab.addEventListener('click',function(event){event.preventDefault();tabs.forEach((t,i)=>{t.classList.remove('is-active');t.setAttribute('aria-selected','false');panels[i]?.classList.remove('is-active');panels[i]?.classList.add('hidden');});tab.classList.add('is-active');tab.setAttribute('aria-selected','true');panel?.classList.add('is-active');panel?.classList.remove('hidden');tab.focus();if(panel){limitCardsOnMobile(panel);setupShowMore(panel);}});tab.addEventListener('keydown',function(event){const key=event.key;if(key==='ArrowRight'||key==='ArrowLeft'){event.preventDefault();const newIndex=key==='ArrowRight'?(index+1)%tabs.length:(index-1+tabs.length)%tabs.length;tabs[newIndex].focus();}if(key==='Enter'||key===' '){event.preventDefault();tab.click();}});});window.addEventListener('resize',()=>{const activePanel=component.querySelector('.bld-panel.is-active');if(activePanel)limitCardsOnMobile(activePanel);});});}};})(Drupal);; 64(function(Drupal){Drupal.behaviors.articleListingBatch={attach:function(context){const containers=context.querySelectorAll(".article-listing:not([data-article-listing-processed])");
64containers.forEach((container)=>{container.setAttribute("data-article-listing-processed","true");const batchSize=6;const cards=container.querySelectorAll(".article-listing__list .views-row");const showMoreBtn=container.querySelector(".js-show-more-btn");const showLessBtn=container.querySelector(".js-show-less-btn");const statusText=container.querySelector(".showing-count");const totalCards=cards.length;let currentEnd=Math.min(batchSize,totalCards);function updateCards(){cards.forEach((card,index)=>{if(index<currentEnd)card.classList.remove("hidden");else card.classList.add("hidden");});statusText.textContent=`Showing ${currentEnd} of ${totalCards}`;if(currentEnd<totalCards)showMoreBtn.classList.remove("hidden");else showMoreBtn.classList.add("hidden");if(currentEnd>batchSize)showLessBtn.classList.remove("hidden");else showLessBtn.classList.add("hidden");}showMoreBtn.addEventListener("click",()=>{currentEnd=Math.min(currentEnd+batchSize,totalCards);updateCards();});showLessBtn.addEventListener("click",()=>{const remainder=currentEnd%batchSize;if(remainder===0)currentEnd=Math.max(currentEnd-batchSize,batchSize);else currentEnd=currentEnd-remainder;updateCards();});updateCards();});}};})(Drupal);; 65(function(Drupal){Drupal.behaviors.bodyContentShareLinks={attach:function(context){context.querySelectorAll('.body-content').forEach(function(bodyContent){if(bodyContent.dataset.shareInitialized)return;const url=window.location.href;const title=document.querySelector('meta[property="og:title"]')?.content||document.title;function showToast(message){const toast=document.createElement('div');toast.className='share-toast';toast.setAttribute('role','status');toast.setAttribute('aria-live','polite');toast.textContent=message;document.body.appendChild(toast);setTimeout(()=>toast.classList.add('visible'),10);setTimeout(()=>{toast.classList.remove('visible');setTimeout(()=>toast.remove(),300);},2000);}function copyToClipboard(text,msg){navigator.clipboard.writeText(text).then(()=>{showToast(msg||'Link copied!');});}const copyBtn=bodyContent.querySelector('.share-copy');if(copyBtn)copyBtn.addEventListener('click',function(e){e.preventDefault();copyToClipboard(url,'Link copied to clipboard!');});const igBtn=bodyContent.querySelector('.share-instagram');if(igBtn)igBtn.addEventListener('click',function(e){e.preventDefault();copyToClipboard(url,'Link copied! Paste it in Instagram.');});const fbBtn=bodyContent.querySelector('.share-facebook');if(fbBtn)fbBtn.href=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;const lnBtn=bodyContent.querySelector('.share-linkedin');if(lnBtn)lnBtn.href=`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`;const xBtn=bodyContent.querySelector('.share-x');if(xBtn)xBtn.href=`https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(title)}`;bodyContent.dataset.shareInitialized=true;});}};})(Drupal);; 66(function(Drupal){Drupal.behaviors.locatorToolLoader={attach:function(context,settings){const content=context.querySelector('.locator-v2-content');if(!content)return;const sideFilters=context.querySelector('.locator-side-filters');const searchBtn=document.querySelector('.search-container .js-form-submit');const loaderSpacer=context.querySelector('.loader-spacer');const loaderContainer=context.querySelector('.loader-container');const spinner=loaderContainer?.querySelector('.svg-container');const filterSummary=context.querySelector('.filter-summary');const targetNode=document.body;const config={childList:true,subtree:true};let loaderObserver=new MutationObserver((mutationsList)=>{mutationsList.forEach((mutationRecord)=>{mutationRecord.addedNodes.forEach((node)=>{if(node.classList&&node.classList.contains('ajax-progress')){content?.classList.add('hidden');sideFilters.classList.add('hidden');searchBtn.classList.add('loading');searchBtn.value='Searching';searchBtn.disabled=true;loaderSpacer.classList.remove('hidden');if(filterSummary.classList.contains('hidden')){loaderContainer.classList.remove('extra-top-margin');
66loaderSpacer.classList.remove('extra-top-margin');}else{loaderContainer.classList.add('extra-top-margin');loaderSpacer.classList.add('extra-top-margin');}spinner.classList.add('spin-animation');loaderContainer.classList.remove('hidden');}});mutationRecord.removedNodes.forEach((node)=>{if(node.classList?.contains('ajax-progress')){content?.classList.remove('hidden');sideFilters.classList.remove('hidden');searchBtn.classList.add('loading');searchBtn.value='Search';searchBtn.disabled=false;loaderSpacer.classList.add('hidden');loaderContainer.classList.add('hidden');spinner.classList.remove('spin-animation');}});});});loaderObserver.observe(targetNode,config);}};})(Drupal);;
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.