PageSourceSearch

https://doctorstolberg.com/cdn/shop/t/46/assets/announcement-schedule.js?v=119065264913450192661788989887

js doctorstolberg.com collected 2026-10-08 05:49:29 UTC 3,678 bytes, 2 lines download raw bytes

1(function(){var TZ="America/Los_Angeles";function parsePacificDateTime(iso){if(!iso||!iso.trim())return null;var match=iso.trim().match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/);if(!match)return null;for(var year=Number(match[1]),month=Number(match[2]),day=Number(match[3]),hour=Number(match[4]),minute=Number(match[5]),second=Number(match[6]),guess=Date.UTC(year,month-1,day,hour+8,minute,second),i=0;i<5;i++){var formatted=new Intl.DateTimeFormat("en-CA",{timeZone:TZ,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(new Date(guess)),target=String(year).padStart(4,"0")+"-"+String(month).padStart(2,"0")+"-"+String(day).padStart(2,"0")+"T"+String(hour).padStart(2,"0")+":"+String(minute).padStart(2,"0")+":"+String(second).padStart(2,"0");if(formatted===target)return guess;var parts=formatted.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/);if(!parts)return guess;var diffMs=Date.UTC(year,month-1,day,hour,minute,second)-Date.UTC(Number(parts[1]),Number(parts[2])-1,Number(parts[3]),Number(parts[4]),Number(parts[5]),Number(parts[6]));guess+=diffMs}return guess}function isWithinSchedule(startStr,endStr){var now=Date.now(),start=parsePacificDateTime(startStr),end=parsePacificDateTime(endStr);return!(start!=null&&now<start||end!=null&&now>end)}function isAnnouncementVisible(el){return!el.classList.contains("announcement--schedule-controlled")||el.classList.contains("is-schedule-visible")}function refreshSlideshows(){document.querySelectorAll("slideshow-component.announcement-bar").forEach(function(slideshow){var visibleSlides=Array.from(slideshow.sliderItems||[]).filter(function(slide){return slide.clientWidth>0}),sliderWrapper=slideshow.querySelector(".announcement-bar-slider"),singleVisible=visibleSlides.length<=1;if(sliderWrapper&&(sliderWrapper.classList.toggle("announcement-bar-slider--no-controls",singleVisible),sliderWrapper.classList.toggle("announcement-bar-slider--single",singleVisible)),!(!slideshow.slider||visibleSlides.length===0)){if(slideshow.slider.scrollLeft=singleVisible?0:visibleSlides[0].offsetLeft,slideshow.sliderFirstItemNode=visibleSlides[0],typeof slideshow.resetPages=="function"&&slideshow.resetPages(),typeof slideshow.setSlideVisibility=="function"&&slideshow.setSlideVisibility(),visibleSlides.length<=1){typeof slideshow.pause=="function"&&slideshow.pause();return}slideshow.slider.getAttribute("data-autoplay")==="true"&&typeof slideshow.play=="function"&&(!slideshow.reducedMotion||!slideshow.reducedMotion.matches)&&!slideshow.announcementBarArrowButtonWasClicked&&slideshow.play()}})}function init(){document.querySelectorAll(".announcement--schedule-controlled").forEach(function(el){el.classList.toggle("is-schedule-visible",isWithinSchedule(el.dataset.scheduleStart,el.dataset.scheduleEnd))}),document.querySelectorAll(".announcement-bar-section").forEach(function(section){var announcements=section.querySelectorAll(".utility-bar__grid > .announcement-bar, .utility-bar__grid .slideshow__slide"),visibleCount=0;announcements.forEach(function(el){isAnnouncementVisible(el)&&visibleCount++});var hideBar=announcements.length>0&&visibleCount===0;section.style.display=hideBar?"none":"",section.querySelectorAll(".announcement-bar, slideshow-component.announcement-bar").forEach(function(bar){bar.style.display=hideBar?"none":""})}),refreshSlideshows()}init(),document.addEventListener("shopify:section:load",init),document.addEventListener("shopify:section:select",init),document.addEventListener("shopify:block:select",init)})();
2//# sourceMappingURL=/cdn/shop/t/46/assets/announcement-schedule.js.map?v=119065264913450192661788989887

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.