1function generateRandomInteger(maxValue){return maxValue=maxValue-1,Math.floor(Math.random()*(maxValue+1))}function pushEventToDl(event,location,version){window.dataLayer||(window.dataLayer=[]),window.dataLayer.push({event,action:location,version})}function validateEmail(email){return!!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email)}function createAndReturnHTMLElement(type,classname,id,innerTextOrHtml,inner){let element=document.createElement(type);return element.classList.add(classname),element.setAttribute("id",id),innerTextOrHtml=="html"?element.innerHTML=inner:element.innerText=inner,element}function extractReviews(parentclass){console.log("extractReviews",parentclass);const reviews=document.querySelectorAll(parentclass),extractedReviews=[];return reviews.forEach(review=>{const author=review.querySelector(".jdgm-rev__author").textContent.trim(),score=review.querySelector(".jdgm-rev__rating").getAttribute("data-score"),title=review.querySelector(".jdgm-rev__title").textContent.trim(),body=review.querySelector(".jdgm-rev__body").textContent.trim(),timestamp=review.querySelector(".jdgm-rev__timestamp").getAttribute("data-content"),buyerBadge=review.querySelector(".jdgm-rev__buyer-badge")?"yes":"no";extractedReviews.push({author,score,title,body,timestamp,buyerBadge})}),extractedReviews}function extractReviewStats(parentclass){const widget=document.querySelector(parentclass),revCount=widget.getAttribute("data-number-of-reviews"),avgRating=widget.getAttribute("data-average-rating");let ratingSplit=[];return document.querySelectorAll(".jdgm-histogram__row").forEach(row=>{let rating=row.getAttribute("data-rating"),count=row.getAttribute("data-frequency");rating!=="null"&&ratingSplit.push({rating,ratingcount:count})}),ratingSplit}function scrollToAnchorUtil(anchor){const el=document.querySelector(anchor);if(el)return el.scrollIntoView({behavior:"smooth"})}function scrollToAnchorOnLoadUtil(){const hash=window.location.hash;if(hash)return window.scrollToAnchorUtil(hash)}function openCartDrawerUtil(){document.querySelector('a[href="/cart"].Header__Icon').click();const drawerOpenedEvent=new CustomEvent("drawerOpened");window.dispatchEvent(drawerOpenedEvent)}function addToCartUtil(id,quantity,openCartDrawer=!0){!id||!quantity||jQuery.ajax({type:"POST",url:"/cart/add.js",data:{id,quantity},dataType:"json",success:function(response){document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),openCartDrawer&&openCartDrawerUtil()},error:function(xhr,status,error){console.error("Fehler beim Hinzuf\xFCgen zum Warenkorb:",error)}})}function debounceButtonClickUtil(button,callback){button.disabled||(button.disabled=!0,callback(),setTimeout(()=>{button.disabled=!1},500))}function initScrollSnapCarousel(config){var sections=document.querySelectorAll(config.sectionSelector);sections.forEach(function(section){var sectionId=section.getAttribute("data-section-id");if(sectionId){var scrollableContainer=section.querySelector(config.containerSelector),itemsContainer=section.querySelector(config.itemsContainerSelector.replace("{sectionId}",sectionId)),paginationContainer=section.querySelector(config.paginationSelector.replace("{sectionId}",sectionId));if(!(!scrollableContainer||!itemsContainer)){var items=itemsContainer.querySelectorAll(config.itemSelector),totalItems=items.length;if(totalItems!==0){if(totalItems<=1){paginationContainer&&(paginationContainer.style.display="none");return}if(paginationContainer){_generateCarouselDots(paginationContainer,totalItems,scrollableContainer,items,config.dotClass),_setupCarouselScrollListener(scrollableContainer,paginationContainer,items,config.dotClass);var initialIndex=_getCarouselCurrentIndex(scrollableContainer,items);_updateCarouselActiveDot(paginationContainer,initialIndex,config.dotClass)}}}}})}function _generateCarouselDots(container,totalItems,scrollableContainer,items,dotClass){container.innerHTML="";for(var i=0;i<totalItems;i++){var dot=document.createElement("button");dot.className=dotClass,dot.setAttribute("data-index",i),dot.setAttribute("aria-label","Go to item "+(i+1)+" of "+totalItems),dot.setAttribute("role","tab"),i===0?(dot.classList.add("active"),dot.
1setAttribute("aria-selected","true"),dot.setAttribute("tabindex","0")):(dot.setAttribute("aria-selected","false"),dot.setAttribute("tabindex","-1")),(function(index){dot.addEventListener("click",function(){_scrollCarouselToItem(scrollableContainer,items,index),_updateCarouselActiveDot(container,index,dotClass)}),dot.addEventListener("keydown",function(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),_scrollCarouselToItem(scrollableContainer,items,index),_updateCarouselActiveDot(container,index,dotClass))})})(i),container.appendChild(dot)}}function _scrollCarouselToItem(container,items,index){if(!(index<0||index>=items.length)){var targetItem=items[index];targetItem&&targetItem.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}}function _updateCarouselActiveDot(container,activeIndex,dotClass){if(container){var dots=container.querySelectorAll("."+dotClass);dots.length!==0&&dots.forEach(function(dot,index){var isActive=index===activeIndex;dot.classList.toggle("active",isActive),dot.setAttribute("aria-selected",isActive?"true":"false"),dot.setAttribute("tabindex",isActive?"0":"-1"),dot.setAttribute("aria-current",isActive?"page":"false")})}}function _getCarouselCurrentIndex(container,items){if(!container||items.length===0)return 0;var bestIndex=0,maxVisibleArea=0;return items.forEach(function(item,index){var itemRect=item.getBoundingClientRect(),containerRect=container.getBoundingClientRect(),left=Math.max(itemRect.left,containerRect.left),right=Math.min(itemRect.right,containerRect.right),visibleWidth=Math.max(0,right-left);visibleWidth>maxVisibleArea&&(maxVisibleArea=visibleWidth,bestIndex=index)}),bestIndex}function _setupCarouselScrollListener(container,paginationContainer,items,dotClass){if(container){var scrollTicking=!1,lastKnownIndex=-1,handleScroll=function(){scrollTicking||(requestAnimationFrame(function(){var currentIndex=_getCarouselCurrentIndex(container,items);(lastKnownIndex===-1||currentIndex!==lastKnownIndex)&&(lastKnownIndex=currentIndex,_updateCarouselActiveDot(paginationContainer,currentIndex,dotClass)),scrollTicking=!1}),scrollTicking=!0)};container.addEventListener("scroll",handleScroll,{passive:!0});var scrollTimeout;container.addEventListener("scroll",function(){clearTimeout(scrollTimeout),scrollTimeout=setTimeout(function(){var currentIndex=_getCarouselCurrentIndex(container,items);_updateCarouselActiveDot(paginationContainer,currentIndex,dotClass)},150)},{passive:!0})}}var reviewSliderVisibleTracked=!1;function trackReviewSliderEvent(eventName){typeof pushEventToDataLayer=="function"&&pushEventToDataLayer(eventName,"",window.location.href,"")}function initReviewsHighlightsCarousel(config){var INTERVAL=config.interval||6e3,sections=document.querySelectorAll(config.sectionSelector);sections.forEach(function(section){if(section.getAttribute("data-reviews-carousel-ready")==="true")return;section.setAttribute("data-reviews-carousel-ready","true");var viewport=section.querySelector(".global-reviews-highlights__viewport"),track=section.querySelector(".global-reviews-highlights__track"),nav=section.querySelector(".global-reviews-highlights__nav");if(!viewport||!track)return;var slides=track.querySelectorAll(".global-reviews-highlights__slide"),dots=section.querySelectorAll("[data-global-reviews-dot]"),prevBtn=section.querySelector("[data-global-reviews-prev]"),nextBtn=section.querySelector("[data-global-reviews-next]"),toggleBtn=section.querySelector("[data-global-reviews-toggle]");if(slides.length<=1){nav&&(nav.style.display="none");return}function stepWidth(){return slides.length>1?slides[1].offsetLeft-slides[0].offsetLeft:viewport.clientWidth}function currentIndex(){var step=stepWidth()||1;return Math.round(viewport.scrollLeft/step)}function updateDots(activeIndex){dots.forEach(function(dot,i){dot.classList.toggle("active",i===activeIndex)}),slides.forEach(function(slide,i){slide.setAttribute("aria-hidden",i===activeIndex?"false":"true")})}
1function scrollToIndex(index){index<0&&(index=slides.length-1),index>=slides.length&&(index=0),viewport.scrollTo({left:index*stepWidth(),behavior:"smooth"}),updateDots(index)}var reduceMotion=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,userPaused=reduceMotion,timer=null;function stopTimer(){timer&&(clearInterval(timer),timer=null)}function canPlay(){return!userPaused&&!document.hidden}function maybeStartTimer(){stopTimer(),canPlay()&&(timer=setInterval(function(){scrollToIndex(currentIndex()+1)},INTERVAL))}function updateToggle(){toggleBtn&&(toggleBtn.classList.toggle("is-paused",userPaused),toggleBtn.setAttribute("aria-pressed",userPaused?"true":"false"),toggleBtn.setAttribute("aria-label",userPaused?"Autoplay starten":"Autoplay pausieren"))}toggleBtn&&toggleBtn.addEventListener("click",function(){userPaused=!userPaused,updateToggle(),userPaused?stopTimer():maybeStartTimer()});function handleArrow(delta){trackReviewSliderEvent("reviewSectionClicked"),scrollToIndex(currentIndex()+delta),maybeStartTimer()}prevBtn&&prevBtn.addEventListener("click",function(){handleArrow(-1)}),nextBtn&&nextBtn.addEventListener("click",function(){handleArrow(1)}),document.addEventListener("visibilitychange",function(){document.hidden?stopTimer():maybeStartTimer()});var visibilityTarget=section.querySelector("[data-global-reviews-highlights]");if(typeof IntersectionObserver=="function"&&visibilityTarget){var visibilityObserver=new IntersectionObserver(function(entries){entries.forEach(function(entry){entry.intersectionRatio<.5||(visibilityObserver.disconnect(),!reviewSliderVisibleTracked&&(reviewSliderVisibleTracked=!0,trackReviewSliderEvent("reviewSliderVisible")))})},{threshold:.5});visibilityObserver.observe(visibilityTarget)}updateDots(0),updateToggle(),maybeStartTimer()})}(function(){window.onpageshow=function(){if(window.theme.showPageTransition){var pageTransition=document.querySelector(".PageTransition");pageTransition&&(pageTransition.style.visibility="visible",pageTransition.style.opacity="0")}document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}})(),window.dispatchEvent(new CustomEvent("utils-js-loaded",{detail:{ready:!0}})); 2//# sourceMappingURL=/cdn/shop/t/78/assets/utils.js.map?v=101488522847776487601788272306
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.