PageSourceSearch

https://voluum.com/wp-content/themes/voluum/dist/about_page.js?x24013

js voluum.com collected 2026-10-02 03:55:50 UTC 3,942 bytes, 2 lines download raw bytes

1!function(){"use strict";const e="panels__slot--empty";class t extends HTMLElement{constructor(){super(),this.activeIndex=0,this.handleClick=this.handleClick.bind(this),this.handleSeek=this.handleSeek.bind(this),this.syncOverflow=this.syncOverflow.bind(this)}connectedCallback(){this.resolveElements(),this.addListeners(),this.promote(this.activeIndex),this.syncOverflow()}disconnectedCallback(){window.removeEventListener("resize",this.syncOverflow),this.activateElements.forEach((e=>{e.removeEventListener("click",this.handleClick)})),this.progressElements.forEach((e=>{e.removeEventListener("input",this.handleSeek)}))}resolveElements(){this.featuredElement=this.querySelector("[data-featured]"),this.listElement=this.querySelector("[data-list]"),this.slotElements=Array.from(this.querySelectorAll("[data-slot]")),this.itemElements=Array.from(this.querySelectorAll("[data-item]")),this.videoElements=Array.from(this.querySelectorAll("video")),this.progressElements=Array.from(this.querySelectorAll("[data-progress]")),this.durationElements=Array.from(this.querySelectorAll("[data-duration]")),this.durationLabels=this.durationElements.map((e=>e.textContent)),this.activateElements=Array.from(this.querySelectorAll("[data-activate]"));const e=this.itemElements.findIndex((e=>e.classList.contains("active")));this.activeIndex=-1===e?0:e}addListeners(){window.addEventListener("resize",this.syncOverflow),this.activateElements.forEach((e=>{e.addEventListener("click",this.handleClick)})),this.progressElements.forEach((e=>{e.addEventListener("input",this.handleSeek)})),this.videoElements.forEach(((e,t)=>{e.addEventListener("play",(()=>{this.itemElements[t].classList.add("playing")})),e.addEventListener("pause",(()=>{this.itemElements[t].classList.remove("playing")})),e.addEventListener("timeupdate",(()=>{this.updateProgress(t),this.updateDuration(t)})),e.addEventListener("ended",(()=>{this.resetDuration(t)}))}))}syncOverflow(){if(!this.listElement)return;const e=this.listElement.scrollHeight>this.listElement.clientHeight;this.classList.toggle("panels__panel--scrollable",e)}updateProgress(e){const t=this.videoElements[e],s=this.progressElements[e];s&&t.duration&&this.setProgress(s,t.currentTime/t.duration*100)}updateDuration(e){const t=this.durationElements[e];t&&(t.textContent=this.formatTime(this.videoElements[e].currentTime))}resetDuration(e){const t=this.durationElements[e];t&&(t.textContent=this.durationLabels[e])}formatTime(e){const t=Math.max(0,Math.floor(e));return`${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}setProgress(e,t){e&&(e.value=t,e.style.setProperty("--panels-played",`${t}%`))}handleSeek(e){const t=e.currentTarget,s=this.videoElements[this.progressElements.indexOf(t)];s?.duration?(s.currentTime=Number(t.value)/100*s.duration,this.setProgress(t,Number(t.value))):s?.play()}promote(t){const s=this.itemElements[t],i=this.slotElements[t];s&&i&&this.featuredElement&&s.parentElement!==this.featuredElement&&(this.featuredElement.appendChild(s),i.classList.add(e))}demote(){const t=this.itemElements[this.activeIndex],s=this.slotElements[this.activeIndex];t&&s&&t.parentElement!==s&&(s.appendChild(t),s.classList.remove(e))}setActive(e){e!==this.activeIndex&&this.itemElements[e]&&(this.demote(),this.activeIndex=e,this.itemElements.forEach(((t,s)=>{t.classList.toggle("active",s===e)})),this.videoElements.forEach(((t,s)=>{s!==e&&(t.pause(),t.currentTime=0,this.resetDuration(s),this.setProgress(this.progressElements[s],0))})),this.promote(e),this.scrollToFeatured())}scrollToFeatured(){window.matchMedia("(max-width: 959px)").matches&&this.featuredElement?.scrollIntoView({behavior:"smooth",block:"start"})}handleClick(e){const t=this.activateElements.indexOf(e.currentTarget),s=this.videoElements[t];t!==this.activeIndex?(this.setActive(t),s?.play()):s.paused?s.play():s.pause()}}window.customElements.define("panels-player",t)}();
2//# sourceMappingURL=about_page.js.map

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.