PageSourceSearch

https://metricfitness.net/wp-content/cache/perfmatters/metricfitne…/minify/59e03d197689.main.min.js?ver=1.0.6

js metricfitness.net collected 2026-10-08 12:27:19 UTC 20,029 bytes, 29 lines download raw bytes

1window.addEventListener('load',()=>{document.querySelectorAll('.wave-path').forEach(path=>{const container=path.closest('section');if(!container||container.dataset.waveInit)return;container.dataset.waveInit='true';const paths=container.querySelectorAll('.wave-path');const waves=Array.from(paths).map((p,i)=>({path:p,amp:12+(i%4)*3,speed:1.5+(i%3)*0.4,phase:i*0.9}));let t0,animationId=null;function tick(now){const t=(now-t0)/1000;waves.forEach(w=>{w.path.style.transform=`translateY(${w.amp * Math.sin(w.speed * t + w.phase)}px)`});animationId=requestAnimationFrame(tick)}
2new IntersectionObserver(([entry])=>{if(entry.isIntersecting){t0=performance.now();animationId=requestAnimationFrame(tick)}else if(animationId){cancelAnimationFrame(animationId);animationId=null}},{threshold:0}).observe(container)})});document.addEventListener('DOMContentLoaded',function(){const sections=document.querySelectorAll('.cta-section');if(!sections.length)return;const sectionData=[];sections.forEach(section=>{const circles={topRight:section.querySelector('.circle-top-right'),bottomLeft:section.querySelector('.circle-bottom-left'),smallTopLeft:section.querySelector('.small-circle-top-left'),smallCenter:section.querySelector('.small-circle'),planetTop:section.querySelector('.planet-top'),planetRight:section.querySelector('.planet-right'),};if(!circles.topRight||!circles.bottomLeft)return;sectionData.push({section,circles})});if(!sectionData.length)return;let ticking=!1;function parallax(){const wh=window.innerHeight;sectionData.forEach(({section,circles})=>{const{top,height}=section.getBoundingClientRect();if(top>=wh||top+height<=0)return;const p=(wh-top)/(wh+height)-0.5;circles.topRight.style.transform=`translate(0, ${p * 1000}px)`;circles.bottomLeft.style.transform=`translate(0, ${p * 1000}px)`;circles.smallTopLeft&&(circles.smallTopLeft.style.transform=`translate(0, ${p * -300}px)`);circles.smallCenter&&(circles.smallCenter.style.transform=`translate(0, calc(-50% + ${p * -400}px))`);circles.planetTop&&(circles.planetTop.style.transform=`translate(-50%, ${p * 300}px)`);circles.planetRight&&(circles.planetRight.style.transform=`translate(0, ${p * 300}px)`)})}
3window.addEventListener('scroll',()=>{if(!ticking){requestAnimationFrame(()=>{parallax();ticking=!1});ticking=!0}});parallax()});document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".coach-author .description-wrapper .description-content, .single-coach .description-wrapper .description-content").forEach(container=>{const content=container.querySelector(".full-content");const btn=container.querySelector(".read-more-btn");if(!content||!btn)return;requestAnimationFrame(()=>{const fullHeight=content.scrollHeight;content.classList.add('truncated-content');container.classList.add('has-truncation');const overlay=document.createElement('div');overlay.className='read-more-overlay';content.appendChild(overlay);let expanded=!1;btn.onclick=()=>{expanded=!expanded;const collapsedHeight=getComputedStyle(content).getPropertyValue('--collapsed-height');if(expanded){content.style.maxHeight=fullHeight+'px';content.classList.remove('truncated-content');content.classList.add('expanded-content')}else{content.style.maxHeight=collapsedHeight;content.classList.remove('expanded-content');content.classList.add('truncated-content')}
4container.classList.toggle('has-truncation',!expanded);overlay.classList.toggle('hidden',expanded);btn.textContent=expanded?'Read Less':'Read More'}})})});document.addEventListener('DOMContentLoaded',function(){const mobileMenu=document.querySelector('#ast-hf-mobile-menu');if(mobileMenu){mobileMenu.addEventListener('click',(e)=>{const button=e.target;const expanded=button.getAttribute('aria-expanded')==='true';button.setAttribute('aria-expanded',!expanded)})}});document.addEventListener('DOMContentLoaded',function(){const header=document.querySelector('#masthead');if(!header)return;function handleScroll(){if(window.scrollY>0){header.classList.add('scrolled')}else{header.classList.remove('scrolled')}}
5window.addEventListener('scroll',handleScroll);handleScroll()});document.addEventListener('DOMContentLoaded',function(){'use strict';if(window.innerWidth>1024)return;const toggles=document.querySelectorAll('.ast-header-break-point .menu-item-has-children > .menu-link .dropdown-menu-toggle');
5toggles.forEach(function(toggle){toggle.addEventListener('click',function(e){e.preventDefault();e.stopPropagation();const menuItem=this.closest('.menu-item-has-children');const subMenu=menuItem.querySelector(':scope > .sub-menu');if(!subMenu)return;const isExpanded=menuItem.classList.contains('ast-submenu-expanded');subMenu.style.overflow='hidden';subMenu.style.transition='height 0.4s ease, opacity 0.4s ease';if(isExpanded){menuItem.classList.remove('ast-submenu-expanded');subMenu.style.height=subMenu.scrollHeight+'px';subMenu.offsetHeight;subMenu.style.height='0';subMenu.style.opacity='0'}else{menuItem.classList.add('ast-submenu-expanded');subMenu.style.display='block';subMenu.style.height='0';subMenu.style.opacity='0';subMenu.offsetHeight;subMenu.style.height=subMenu.scrollHeight+'px';subMenu.style.opacity='1';setTimeout(function(){subMenu.style.height='auto';subMenu.style.overflow='visible'},400)}})});const bar=document.querySelector('.mobile-floating-bar');if(!bar)return;let ticking=!1;function toggleFloatingBar(){const scrollPosition=window.scrollY+window.innerHeight;const pageHeight=document.documentElement.scrollHeight;if(scrollPosition>=pageHeight-20){bar.classList.add('hidden')}else{bar.classList.remove('hidden')}
6ticking=!1}
7function requestTick(){if(!ticking){requestAnimationFrame(toggleFloatingBar);ticking=!0}}
8toggleFloatingBar();window.addEventListener('scroll',requestTick,{passive:!0})});document.addEventListener('DOMContentLoaded',function(){const searchForm=document.querySelector('.blog-search-form');if(searchForm){const searchInput=searchForm.querySelector('input[type="search"]');const originalPlaceholder=searchInput.getAttribute('placeholder');const errorMessage=searchInput.dataset.errorMessage||'Please enter a keyword first';searchForm.addEventListener('submit',function(e){const searchValue=searchInput.value.trim();if(searchValue===''){e.preventDefault();searchInput.classList.add('placeholder-fade-out');setTimeout(()=>{searchInput.setAttribute('placeholder',errorMessage);searchInput.classList.remove('placeholder-fade-out');searchInput.classList.add('search-error');searchInput.focus()},150);setTimeout(()=>{searchInput.classList.add('placeholder-fade-out');setTimeout(()=>{searchInput.setAttribute('placeholder',originalPlaceholder);searchInput.classList.remove('search-error','placeholder-fade-out')},150)},3000)}});searchInput.addEventListener('input',function(){if(this.classList.contains('search-error')){this.classList.add('placeholder-fade-out');setTimeout(()=>{this.setAttribute('placeholder',originalPlaceholder);this.classList.remove('search-error','placeholder-fade-out')},150)}})}});document.addEventListener('DOMContentLoaded',function(){function toggleAccordion(button){const content=button.nextElementSibling;const icon=button.querySelector('.accordion-icon');const isExpanded=button.getAttribute('aria-expanded')==='true';document.querySelectorAll('.accordion-button').forEach((btn)=>{btn.setAttribute('aria-expanded','false');btn.querySelector('.accordion-icon')?.classList.remove('open');const btnContent=btn.nextElementSibling;if(btnContent){btnContent.style.height='0';btnContent.setAttribute('aria-hidden','true')}});if(!isExpanded){button.setAttribute('aria-expanded','true');content.style.height=content.scrollHeight+'px';content.setAttribute('aria-hidden','false');icon?.classList.add('open')}}
9document.querySelectorAll('.accordion-button').forEach((button)=>{button.addEventListener('click',function(){toggleAccordion(this)})})});document.addEventListener('DOMContentLoaded',function(){const nameItems=document.querySelectorAll('.coach-name-item');const slides=document.querySelectorAll('.coach-slide');let hoverTimeout=null;const HOVER_DELAY=150;function setActiveCoach(index){nameItems.forEach(item=>{item.classList.toggle('is-active',item.dataset.coachIndex===index)});
9slides.forEach(slide=>{slide.classList.toggle('is-active',slide.dataset.coachIndex===index)})}
10nameItems.forEach(item=>{item.addEventListener('mouseenter',function(){const index=this.dataset.coachIndex;clearTimeout(hoverTimeout);hoverTimeout=setTimeout(()=>{setActiveCoach(index)},HOVER_DELAY)});item.addEventListener('mouseleave',function(){clearTimeout(hoverTimeout);hoverTimeout=null});item.addEventListener('click',function(){setActiveCoach(this.dataset.coachIndex)})})});document.addEventListener('DOMContentLoaded',function(){function $(s,r){r=r||document;return r.querySelector(s)}
11function $$(s,r){r=r||document;return Array.from(r.querySelectorAll(s))}
12var accordions=$$('.pg-accordion');accordions.forEach(function(acc){var section=acc.closest('.program-goals');if(!section)return;var items=$$('.pg-item',acc);var img=$('.pg-active-image',section);var categoryText=$('.pg-category-text',section);$$('.pg-button[data-src]',acc).forEach(function(b){if(b.dataset.src){var preload=new Image();preload.src=b.dataset.src}});function swapImage(src,srcset,sizes,title){if(!img||!src)return;img.classList.add('is-animating');if(categoryText)categoryText.classList.add('is-animating');setTimeout(function(){img.src=src;if(srcset){img.srcset=srcset}else{img.removeAttribute('srcset')}
13if(sizes){img.sizes=sizes}else{img.removeAttribute('sizes')}
14if(title)img.alt=title;var finishAnimation=function(){requestAnimationFrame(function(){img.classList.remove('is-animating');if(categoryText){categoryText.classList.remove('is-animating');if(title)categoryText.textContent=title}})};if(img.complete){finishAnimation()}else{img.onload=finishAnimation}},250)}
15acc.addEventListener('click',function(e){var btn=e.target.closest('.pg-button');if(!btn)return;var item=btn.closest('.pg-item');if(item.classList.contains('is-open'))return;items.forEach(function(o){if(o!==item&&o.classList.contains('is-open')){o.classList.remove('is-open');var otherBtn=$('.pg-button',o);if(otherBtn)otherBtn.setAttribute('aria-expanded','false');}});item.classList.add('is-open');btn.setAttribute('aria-expanded','true');swapImage(btn.dataset.src,btn.dataset.srcset,btn.dataset.sizes,btn.dataset.title)})})});function initStickySidebars(){var sections=[{wrapper:'.pricing-section',sidebar:'.pricing-sidebar-fixed',column:'.pricing-description',sentinel:'.pricing-sidebar-sentinel',opposite:'.pricing-boxes-vertical',minWidth:769,headerOffset:170,threshold:100},{wrapper:'.programs-section',sidebar:'.programs-sidebar-fixed',column:'.programs-sidebar-column, .column.is-4',sentinel:'.programs-sidebar-sentinel',opposite:'.column.is-8',minWidth:1025,headerOffset:170,threshold:200}];sections.forEach(function(cfg){document.querySelectorAll(cfg.wrapper).forEach(function(sectionEl){var sidebar=sectionEl.querySelector(cfg.sidebar);var sidebarColumn=sectionEl.querySelector(cfg.column);var sentinel=sectionEl.querySelector(cfg.sentinel);var opposite=sectionEl.querySelector(cfg.opposite);if(!sidebar||!sidebarColumn||!sentinel||!opposite)return;var sidebarWidth=sidebarColumn.offsetWidth;function updateState(){if(window.innerWidth<cfg.minWidth)return;var sidebarHeight=sidebar.offsetHeight;var oppositeHeight=opposite.offsetHeight;if(oppositeHeight<sidebarHeight+cfg.threshold){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top='';return}
16var sentinelRect=sentinel.getBoundingClientRect();var oppositeRect=opposite.getBoundingClientRect();var scrolledPastStart=sentinelRect.top<cfg.headerOffset;var sidebarBottom=cfg.headerOffset+sidebarHeight;var reachedBottom=oppositeRect.bottom<sidebarBottom+30;if(!scrolledPastStart){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top=''}else if(reachedBottom){sidebar.classList.remove('is-fixed');sidebar.classList.add('is-bottom');sidebar.style.width=sidebarWidth+'px';sidebar.style.top=''}else{if(!sidebar.classList.contains('is-fixed')){sidebarWidth=sidebarColumn.offsetWidth}
17sidebar.classList.remove('is-bottom');sidebar.classList.add('is-fixed');sidebar.style.width=sidebarWidth+'px';sidebar.style.top=cfg.headerOffset+'px'}}
18var ticking=!1;window.addEventListener('scroll',function(){if(!ticking){window.requestAnimationFrame(function(){updateState();ticking=!1});ticking=!0}},{passive:!0});window.addEventListener('resize',function(){if(window.innerWidth<cfg.minWidth){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top=''}else{sidebarWidth=sidebarColumn.offsetWidth;updateState()}});updateState()})})}
19document.addEventListener('DOMContentLoaded',function(){initStickySidebars()});function copyPostLink(){var btn=document.querySelector('.share-copy');var iconCopy=btn.querySelector('.icon-copy');var iconCheck=btn.querySelector('.icon-check');navigator.clipboard.writeText(window.location.href).then(function(){iconCopy.style.display='none';iconCheck.style.display='block';btn.classList.add('copied');setTimeout(function(){iconCopy.style.display='block';iconCheck.style.display='none';btn.classList.remove('copied')},2000)})}
20document.addEventListener('DOMContentLoaded',function(){document.querySelectorAll('.footer-quick-links-menu .menu-item-has-children, .footer-company-menu .menu-item-has-children').forEach(function(item){var subMenu=item.querySelector(':scope > .sub-menu');if(!subMenu)return;subMenu.style.height='0';subMenu.style.opacity='0';subMenu.style.transform='translateY(-6px)';subMenu.style.transition='height 0.4s ease, opacity 0.3s ease 0.08s, transform 0.3s ease 0.08s';subMenu.style.overflow='hidden';var openSubMenu=function(){subMenu.style.height=subMenu.scrollHeight+'px';subMenu.style.opacity='1';subMenu.style.transform='translateY(0)';item.classList.add('is-open')};var closeSubMenu=function(){subMenu.style.height='0';subMenu.style.opacity='0';subMenu.style.transform='translateY(-6px)';item.classList.remove('is-open')};item.addEventListener('mouseenter',openSubMenu);item.addEventListener('mouseleave',closeSubMenu);var parentLink=item.querySelector(':scope > a');if(parentLink){parentLink.addEventListener('click',function(e){if(window.matchMedia('(max-width: 1024px)').matches){e.preventDefault();if(item.classList.contains('is-open')){closeSubMenu()}else{openSubMenu()}}})}})});(function(){'use strict';var SVG_CHECK='<span class="comparison-table-icon comparison-table-icon-check" aria-label="Yes">'+'<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 26 26" fill="none">'+'<path d="M24.0977 5.71133L20.2898 1.90342C19.0613 0.676 17.4287 0 15.6932 0H10.3079C8.57242 0 6.93983 0.676 5.71133 1.90342L1.90342 5.71133C0.676 6.93983 0 8.57242 0 10.3079V15.6932C0 17.4287 0.676 19.0613 1.90342 20.2898L5.71133 24.0977C6.93983 25.3251 8.57242 26.0011 10.3079 26.0011H15.6932C17.4287 26.0011 19.0613 25.3251 20.2898 24.0977L24.0977 20.2898C25.3251 19.0613 26.0011 17.4287 26.0011 15.6932V10.3079C26.0011 8.57242 25.3251 6.93983 24.0977 5.71133ZM19.8618 10.6524L14.1938 16.3204C13.5298 16.9845 12.6468 17.3507 11.7076 17.3507C10.7683 17.3507 9.88542 16.9845 9.22133 16.3204L6.20208 13.3012C5.7785 12.8776 5.7785 12.1929 6.20208 11.7693C6.62567 11.3458 7.31033 11.3458 7.73392 11.7693L10.7532 14.7886C11.2634 15.2988 12.1528 15.2978 12.662 14.7886L18.33 9.12058C18.7536 8.697 19.4383 8.697 19.8618 9.12058C20.2854 9.54417 20.2854 10.2288 19.8618 10.6524Z" fill="#2A9134"/>'+'</svg></span>';var SVG_CROSS='<span class="comparison-table-icon comparison-table-icon-cross" aria-label="No">'+'<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 26 26" fill="none">'+'<path d="M24.0966 5.71133L20.2887 1.90342C19.0612 0.676 17.4287 0 15.6932 0H10.3079C8.57242 0 6.93983 0.676 5.71133 1.90342L1.90342 5.71133C0.676 6.93983 0 8.57242 0 10.3079V15.6932C0 17.4287 0.676 19.0613 1.90342 20.2898L5.71133 24.0977C6.93983 25.3251 8.57242 26.0011 10.3079 26.0011H15.6932C17.4298 26.0011 19.0612 25.3251 20.2887 24.0977L24.0966 20.2908C25.3251 19.0634 26.0011 17.4308 26.0011 15.6943V10.309C26.0011 8.57242 25.3251 6.93875 24.0966 5.71133ZM17.81 16.3161C18.2336 16.7397 18.2336 17.4243 17.81 17.8479C17.5987 18.0592 17.3214 18.1653 17.0441 18.1653C16.7668 18.1653 16.4894 18.0592 16.2782 17.8479L12.9816 14.5513L9.685 17.8479C9.47375 18.0592 9.19642 18.1653 8.91908 
2018.1653C8.64175 18.1653 8.36442 18.0592 8.15317 17.8479C7.72958 17.4243 7.72958 16.7397 8.15317 16.3161L11.4498 13.0195L8.15317 9.72292C7.72958 9.29933 7.72958 8.61467 8.15317 8.19108C8.57675 7.7675 9.26142 7.7675 9.685 8.19108L12.9816 11.4877L16.2782 8.19108C16.7018 7.7675 17.3864 7.7675 17.81 8.19108C18.2336 8.61467 18.2336 9.29933 17.81 9.72292L14.5134 13.0195L17.81 16.3161Z" fill="#EC2929"/>'+'</svg></span>';function escapeHtml(str){return String(str).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')}
21function closeAllDropdowns(table){table.querySelectorAll('.comparison-table-dropdown').forEach(function(ul){ul.style.display='none'});table.querySelectorAll('.comparison-table-location-header').forEach(function(th){th.classList.remove('is-open')});table.querySelectorAll('.comparison-table-loc-btn').forEach(function(btn){btn.setAttribute('aria-expanded','false')})}
22function updateColumn(table,colIndex,newLocIndex,data){var locations=data.locations||[];var features=data.features||[];var th=table.querySelector('th.comparison-table-location-header[data-col="'+colIndex+'"]');if(!th)return;th.querySelector('.comparison-table-loc-name').textContent=locations[newLocIndex]||'';th.querySelectorAll('.comparison-table-dropdown-item').forEach(function(li){var active=parseInt(li.getAttribute('data-loc-index'),10)===newLocIndex;li.classList.toggle('is-active',active);li.setAttribute('aria-selected',active?'true':'false')});var cells=table.querySelectorAll('tbody .comparison-table-value-cell[data-col="'+colIndex+'"]');cells.forEach(function(cell,rowIndex){var feat=features[rowIndex];if(!feat){cell.innerHTML='';return}
23var val=feat.values[newLocIndex];if(!val){cell.innerHTML='';return}
24var inner;if(val.type==='check'){inner=SVG_CHECK+(val.label?'<span class="comparison-table-text-val">'+escapeHtml(val.label)+'</span>':'')}else if(val.type==='cross'){inner=SVG_CROSS+(val.label?'<span class="comparison-table-text-val">'+escapeHtml(val.label)+'</span>':'')}else{inner='<span class="comparison-table-text-val">'+escapeHtml(val.text)+'</span>'}
25cell.innerHTML='<span class="comparison-table-cell-inner">'+inner+'</span>'})}
26function initComparisonTable(table){var raw=table.getAttribute('data-table');if(!raw)return;var data;try{data=JSON.parse(raw)}catch(e){return}
27var headers=table.querySelectorAll('th.comparison-table-location-header');headers.forEach(function(th){var colIndex=parseInt(th.getAttribute('data-col'),10);var btn=th.querySelector('.comparison-table-loc-btn');var dropdown=th.querySelector('.comparison-table-dropdown');if(!btn||!dropdown)return;btn.addEventListener('click',function(e){e.stopPropagation();var isOpen=dropdown.style.display==='block';closeAllDropdowns(table);if(!isOpen){dropdown.style.display='block';th.classList.add('is-open');btn.setAttribute('aria-expanded','true')}});dropdown.querySelectorAll('.comparison-table-dropdown-item').forEach(function(item){item.addEventListener('click',function(e){e.stopPropagation();var newLocIndex=parseInt(item.getAttribute('data-loc-index'),10);closeAllDropdowns(table);updateColumn(table,colIndex,newLocIndex,data)})})})}
28function initComparisonTables(){var tables=document.querySelectorAll('.comparison-table');if(!tables.length)return;tables.forEach(initComparisonTable);document.addEventListener('click',function(){tables.forEach(closeAllDropdowns)});document.addEventListener('keydown',function(e){if(e.key==='Escape'){tables.forEach(closeAllDropdowns)}})}
29if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',initComparisonTables)}else{initComparisonTables()}})()

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.