document.addEventListener("DOMContentLoaded",function(){function i(n){let t=n-new Date,i=Math.floor(t/6e4%60),r=Math.floor(t/36e5%24),u=Math.floor(t/864e5);return{days:u,hours:r,minutes:i}}function r(t,r){function u(){let u=i(r),f=u.days,e=("0"+u.hours).slice(-2),o=("0"+u.minutes).slice(-2);t.innerText=u.minutes<0?"":$.R(n,"TimerText","до конца акции {0} : {1} : {2}",[f,e,o])}u();setInterval(u,6e4)}function u(n){let r=n.split(" ")[0],u=n.split(" ")[1],t=r.split("-"),i=u.split(":");return new Date(Date.UTC(t[0],+t[1]-1,t[2],i[0],i[1],i[2]))}const n="~/js/custom/shares/timer-end-share.js";let t=document.getElementsByClassName("span-time-to-end");[...t].forEach(n=>{r(n,u(n.dataset.endDate))})})