1customElements.get("countdown-timer")||customElements.define("countdown-timer",class extends HTMLElement{constructor(){super();const date=this.getAttribute("date");this.date=date?date*1e3:Date.parse(new Date),this.updateClock=this.updateClock.bind(this),this.getRemainingTime=this.getRemainingTime.bind(this),this.end=this.end.bind(this),this.updateClock(),this.interval=setInterval(this.updateClock,1e3)}getRemainingTime(){const t=this.date-Date.parse(new Date),seconds=Math.floor(t/1e3%60),minutes=Math.floor(t/1e3/60%60),hours=Math.floor(t/(1e3*60*60)%24),days=Math.floor(t/(1e3*60*60*24));return{total:t,days:days<=0?0:days,hours:hours<=0?0:hours,minutes:minutes<=0?0:minutes,seconds:seconds<=0?0:seconds}}updateClock(){const{total,days,hours,minutes,seconds}=this.getRemainingTime(),daysEl=this.querySelector(".countdown-days"),hoursEl=this.querySelector(".countdown-hours"),minutesEl=this.querySelector(".countdown-minutes"),secondsEl=this.querySelector(".countdown-seconds");[[daysEl,days],[hoursEl,hours],[minutesEl,minutes],[secondsEl,seconds]].forEach(([element,value])=>this.updateTimerValue(element,value.toString().padStart(2,"0"))),total<=0&&this.end()}updateTimerValue(element,value){if(!element)return;const html=value.toString().split("").map(point=>`<span class="countdown-value">${point}</span>`).join("");element.innerHTML=html}end(){window.clearInterval(this.interval)}}); 2//# sourceMappingURL=/cdn/shop/t/36/assets/countdown.js.map?v=99488935918984126661716275876
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.