PageSourceSearch

https://www.risevision.com/hubfs/hub_generated/module_assets/1/195…/module_Compare_Features.min.js

js risevision.com collected 2026-09-24 08:55:37 UTC 6,718 bytes, 2 lines download raw bytes

1var module_195481396600=function(){function initStickyHeader(){const header=document.getElementById("compare-features-header");if(!header)return;const offset=parseInt(header.getAttribute("data-sticky-offset")||"70",10);header.style.position="sticky",header.style.top=`${offset}px`,header.classList.add("z-20"),header.querySelectorAll("[data-device-plan]").forEach(btn=>{btn.addEventListener("click",()=>{const key=btn.getAttribute("data-device-plan"),target=(plan=key,document.getElementById(`tier-${plan}`)||document.querySelector(`[data-tier="${plan}"]`));var plan;const rect=header.getBoundingClientRect(),isSticky=rect.top<=offset&&rect.top>=0;!function(el,extraOffset=0){if(!el)return;const rect=el.getBoundingClientRect(),y0=window.pageYOffset||document.documentElement.scrollTop,y=rect.top+y0-extraOffset;window.scrollTo({top:y,behavior:"smooth"})}(target,offset+(isSticky?rect.height:0))})})}document.addEventListener("DOMContentLoaded",()=>{try{const header=document.getElementById("compare-features-header");header&&header.setAttribute("data-cf-js","cf-debug-2025-10-03-01"),console.log("[CompareFeatures] JS loaded: cf-debug-2025-10-03-01")}catch{}initStickyHeader(),function(){const acc=document.getElementById("device-features-acc");if(!acc)return;const buttons=acc.querySelectorAll("button[data-accordion-target]"),getPanel=btn=>{const sel=btn.getAttribute("data-accordion-target");try{return sel?document.querySelector(sel):null}catch{return null}},updateButtonState=btn=>{const panel=getPanel(btn),expanded=panel?!panel.classList.contains("hidden"):"true"===btn.getAttribute("aria-expanded");btn.setAttribute("aria-expanded",expanded?"true":"false"),((btn,expanded)=>{btn.classList.toggle("bg-[#F5F5F5]",expanded),btn.classList.toggle("bg-white",!expanded)})(btn,expanded),((btn,expanded)=>{const icon=btn.querySelector(".accordion-icon")||btn.querySelector("svg");icon&&(icon.classList.add("transform","transition-transform","duration-200"),icon.classList.toggle("rotate-180",expanded))})(btn,expanded)},updateAll=()=>buttons.forEach(updateButtonState);updateAll(),buttons.forEach(btn=>{btn.addEventListener("click",()=>setTimeout(updateAll,0))});const observer=new MutationObserver(updateAll);buttons.forEach(btn=>{const panel=getPanel(btn);panel&&observer.observe(panel,{attributes:!0,attributeFilter:["class"]})})}(),function(){const header=document.getElementById("compare-features-header");if(!header)return;const apply=()=>{const active=header.getAttribute("data-active-device")||"mp",isDesktop=window.matchMedia("(min-width: 768px)").matches;header.querySelectorAll("[data-root-device]").forEach(grp=>{isDesktop?grp.classList.remove("hidden"):grp.classList.toggle("hidden",grp.getAttribute("data-root-device")!==active)}),document.querySelectorAll(".compare-features .device-col").forEach(node=>{isDesktop?node.classList.remove("hidden"):node.classList.toggle("hidden",node.getAttribute("data-root-device")!==active)}),header.querySelectorAll(".device-toggle").forEach(btn=>{const on=btn.getAttribute("data-device")===active;btn.setAttribute("aria-selected",on?"true":"false"),btn.classList.toggle("active",on)})};header.querySelectorAll(".device-toggle").forEach(btn=>{btn.addEventListener("click",()=>{header.setAttribute("data-active-device",btn.getAttribute("data-device")),apply()})}),window.addEventListener("resize",apply),apply()}(),function(){try{const root=document.querySelector(".compare-features"),header=document.getElementById("compare-features-header"),rail=header?header.querySelector(".rail-header"):null,labels=rail?rail.querySelectorAll(".text-xs"):[];if(console.groupCollapsed("[CompareFeatures][cf-debug-2025-10-03-01] init"),console.log("Root:",root),console.log("Header:",header),console.log("Rail:",rail),console.log("Test class present?:",!!document.querySelector(".test-class")),labels&&labels.length?(console.log("Header labels found:",labels.length),labels.forEach((el,i)=>{const parentCell=el.closest(".text-center.shrink-0")||el.parentElement,hasBr=!!el.querySelector("br");console.groupCollapsed(`Label[${i}] ${hasBr?"HAS <br>":"no <br>"}`),console.log("parentCell.className:",parentCell&&parentCell.className),console.log("label.className:",el.className),console.log("label.innerHTML:",el.innerHTML),console.log("label.textContent:",el.textContent),console.groupEnd()})):console.warn("No labels (.text-xs) found under .rail-header"),rail){const cells=rail.querySelectorAll(".text-center.shrink-0"),sample=Array.from(cells).slice(0,4);console.groupCollapsed("First 4 rail cells (className snapshot)"),sample.forEach((cell,i)=>{console.log(`cell[${i}].className:`,cell.className)}),console.groupEnd()}if(rail){const cleanupAndLog=sourceMutation=>{const brs=rail.querySelectorAll(".text-xs br");if(brs.length){console.groupCollapsed(`[CompareFeatures][cf-debug-2025-10-03-01] <br> detected under header labels (${brs.length}
1)`),console.log("Mutation:",sourceMutation),brs.forEach((br,idx)=>{const label=br.closest(".text-xs");console.log(`br[${idx}] label.className:`,label&&label.className),console.log("label.innerHTML:",label&&label.innerHTML)});try{throw new Error("Stack snapshot for <br> insertion")}catch(e){console.log(e)}console.groupEnd()}};new MutationObserver(mutations=>{for(const m of mutations)"childList"===m.type&&(m.addedNodes.length||m.removedNodes.length)&&rail.querySelector(".text-xs br")&&cleanupAndLog(m)}).observe(rail,{childList:!0,subtree:!0}),console.log("[CompareFeatures] MutationObserver active on .rail-header")}window.CompareFeaturesDebug={version:"cf-debug-2025-10-03-01",dump(){console.group("[CompareFeatures] dump()");const hdr=document.getElementById("compare-features-header"),lbls=hdr?hdr.querySelectorAll(".rail-header .text-xs"):[];console.log("Header:",hdr),console.log("Labels count:",lbls.length),lbls.forEach((el,i)=>{console.group(`Label[${i}]`),console.log("innerHTML:",el.innerHTML),console.log("textContent:",el.textContent),console.log("has <br>:",!!el.querySelector("br"));const parentCell=el.closest(".text-center.shrink-0")||el.parentElement;console.log("parentCell.className:",parentCell&&parentCell.className),console.groupEnd()}),console.groupEnd()},removeBr(){const hdr=document.getElementById("compare-features-header");if(!hdr)return 0;const brs=hdr.querySelectorAll(".rail-header .text-xs br");return brs.forEach(br=>br.replaceWith(document.createTextNode(" "))),console.log(`[CompareFeatures] removeBr(): removed ${brs.length} <br>`),brs.length}},console.groupEnd()}catch(err){console.error("[CompareFeatures] debug init error:",err)}}()})}();
2//# sourceURL=https://2700250.fs1.hubspotusercontent-na1.net/hubfs/2700250/hub_generated/module_assets/1/195481396600/1769025891487/module_Compare_Features.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.