PageSourceSearch

https://www.lyfgeniahcp.com/hubfs/hub_generated/template_assets/1/…/1788288956420/template_chart-scroll.min.js

js lyfgeniahcp.com collected 2026-10-04 13:24:02 UTC 3,764 bytes, 2 lines download raw bytes

1!function(){var ARROW='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M4 12h14M13 6l6 6-6 6" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>',CHEVRON='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M9 5l7 7-7 7" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';function enhance(scroll){if(!scroll.dataset.chartScrollReady){var track=scroll.querySelector(".bar-chart-track");if(track){scroll.dataset.chartScrollReady="1";var leftArrow=document.createElement("button");leftArrow.type="button",leftArrow.className="bar-chart-arrow bar-chart-arrow--left",leftArrow.setAttribute("aria-label","Scroll chart left"),leftArrow.innerHTML=ARROW;var rightArrow=document.createElement("button");rightArrow.type="button",rightArrow.className="bar-chart-arrow bar-chart-arrow--right",rightArrow.setAttribute("aria-label","Scroll chart right"),rightArrow.innerHTML=ARROW,scroll.appendChild(leftArrow),scroll.appendChild(rightArrow);var controls=document.createElement("div");controls.className="bar-chart-controls",controls.innerHTML='<div class="bar-chart-progress"><span class="bar-chart-progress-thumb"></span></div><div class="bar-chart-nav"><button type="button" class="bar-chart-prev">'+CHEVRON+'<span>Previous</span></button><button type="button" class="bar-chart-next"><span>Next</span>'+CHEVRON+"</button></div>",scroll.parentNode.insertBefore(controls,scroll.nextSibling);var thumb=controls.querySelector(".bar-chart-progress-thumb"),progress=controls.querySelector(".bar-chart-progress"),prevBtn=controls.querySelector(".bar-chart-prev"),nextBtn=controls.querySelector(".bar-chart-next");leftArrow.addEventListener("click",function(){step(-1)}),rightArrow.addEventListener("click",function(){step(1)}),prevBtn.addEventListener("click",function(){step(-1)}),nextBtn.addEventListener("click",function(){step(1)});var dragging=!1;progress.addEventListener("pointerdown",function(e){dragging=!0,progress.setPointerCapture(e.pointerId),scrubTo(e.clientX)}),progress.addEventListener("pointermove",function(e){dragging&&scrubTo(e.clientX)}),progress.addEventListener("pointerup",function(){dragging=!1}),progress.addEventListener("pointercancel",function(){dragging=!1}),track.addEventListener("scroll",function(){window.requestAnimationFrame(sync)},{passive:!0}),window.addEventListener("resize",function(){window.requestAnimationFrame(sync)}),sync(),scroll.querySelectorAll("img").forEach(function(img){img.complete||img.addEventListener("load",sync,{once:!0})})}}function maxScroll(){return track.scrollWidth-track.clientWidth}function sync(){var max=maxScroll(),atStart=track.scrollLeft<=2,atEnd=track.scrollLeft>=max-2,noScroll=max<=1;leftArrow.hidden=noScroll||atStart,rightArrow.hidden=noScroll||atEnd,controls.hidden=noScroll,prevBtn.disabled=atStart,nextBtn.disabled=atEnd;var frac=track.scrollWidth>0?track.clientWidth/track.scrollWidth:1,pct=Math.max(18,Math.min(100,100*frac));thumb.style.width=pct+"%",thumb.style.left=(max>0?track.scrollLeft/max*(100-pct):0)+"%"}function step(dir){track.scrollBy({left:dir*Math.max(.8*track.clientWidth,120),behavior:"smooth"})}function scrubTo(clientX){var rect=progress.getBoundingClientRect(),ratio=Math.max(0,Math.min(1,(clientX-rect.left)/rect.width));track.scrollLeft=ratio*maxScroll()}}function init(){document.querySelectorAll(".bar-chart-scroll").forEach(enhance)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",init):init()}();
2//# sourceURL=https://50895703.fs1.hubspotusercontent-na1.net/hubfs/50895703/hub_generated/template_assets/1/216059520154/1788288956420/template_chart-scroll.js

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.