1(function(){"use strict";const TZ="Europe/Berlin";function berlinParts(d){const f=new Intl.DateTimeFormat("en-GB",{timeZone:TZ,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1,weekday:"short"}),o={};return f.formatToParts(d).forEach(p=>o[p.type]=p.value),{y:+o.year,m:+o.month,d:+o.day,h:+o.hour%24,min:+o.minute}}const pad=n=>String(n).padStart(2,"0");function isWorkday(date,holidays){const dow=date.getUTCDay();if(dow===0||dow===6)return!1;const md=pad(date.getUTCMonth()+1)+"-"+pad(date.getUTCDate()),ymd=date.getUTCFullYear()+"-"+md;return!(holidays.has(md)||holidays.has(ymd))}function addWorkdays(date,n,holidays){const d=new Date(date);let added=0;for(;added<n;)d.setUTCDate(d.getUTCDate()+1),isWorkday(d,holidays)&&added++;return d}function nextWorkday(date,holidays){const d=new Date(date);do d.setUTCDate(d.getUTCDate()+1);while(!isWorkday(d,holidays));return d}function renderDelivery(el){const min=+el.dataset.min||0,max=+el.dataset.max||min,cutoff=+el.dataset.cutoff||14,holidays=new Set((el.dataset.holidays||"").split(",").map(s=>s.trim()).filter(Boolean)),locale=el.dataset.locale||document.documentElement.lang||"de-DE",now=berlinParts(new Date),today=new Date(Date.UTC(now.y,now.m-1,now.d,12)),beforeCutoff=now.h<cutoff,dispatch=isWorkday(today,holidays)&&beforeCutoff?today:nextWorkday(today,holidays),earliest=addWorkdays(dispatch,min,holidays),latest=addWorkdays(dispatch,max,holidays),fmt=d=>d.toLocaleDateString(locale,{weekday:"short",day:"2-digit",month:"2-digit",timeZone:"UTC"}),minutesNow=now.h*60+now.min;let left=Math.round((dispatch-today)/864e5)*1440+cutoff*60-minutesNow;left<0&&(left=0);const h=Math.floor(left/60),m=left%60,countdown=h+" "+(el.dataset.h||"Std.")+" "+m+" "+(el.dataset.m||"Min.");el.querySelectorAll("[data-jg-earliest]").forEach(n=>n.textContent=fmt(earliest)),el.querySelectorAll("[data-jg-latest]").forEach(n=>n.textContent=fmt(latest)),el.querySelectorAll("[data-jg-countdown]").forEach(n=>n.textContent=countdown),el.classList.add("is-ready")}function initDelivery(root){(root||document).querySelectorAll("[data-jg-delivery]").forEach(el=>{renderDelivery(el),el._jgTimer||(el._jgTimer=setInterval(()=>renderDelivery(el),3e4))})}customElements.get("jg-sticky-atc")||customElements.define("jg-sticky-atc",class extends HTMLElement{connectedCallback(){const section=this.dataset.section;if(this.parentElement!==document.body){document.querySelectorAll('body > jg-sticky-atc[data-section="'+section+'"]').forEach(n=>n.remove()),document.body.appendChild(this);return}if(this._init||(this._init=!0,this.mainBtn=document.getElementById("ProductSubmitButton-"+section),!this.mainBtn))return;this.form=this.mainBtn.closest("product-form")||this.mainBtn,this.hidden=!1;const setH=()=>document.documentElement.style.setProperty("--jg-sticky-h",this.offsetHeight+"px");setH(),window.addEventListener("resize",setH,{passive:!0});let ticking=!1;const update=()=>{ticking=!1;const r=this.mainBtn.getBoundingClientRect(),inView=r.bottom>0&&r.top<window.innerHeight;this.classList.toggle("is-visible",!inView&&window.scrollY>250)},onScroll=()=>{ticking||(ticking=!0,requestAnimationFrame(update))};window.addEventListener("scroll",onScroll,{passive:!0}),window.addEventListener("resize",onScroll,{passive:!0}),update(),this.querySelector("button").addEventListener("click",()=>{this.dataset.mode==="add"&&!this.mainBtn.disabled?this.mainBtn.click():this.form.scrollIntoView({behavior:"smooth",block:"center"})}),typeof subscribe=="function"&&typeof PUB_SUB_EVENTS<"u"&&subscribe(PUB_SUB_EVENTS.variantChange,()=>setTimeout(()=>this.sync(section),50))}sync(section){const price=document.querySelector("#price-"+section+" .price__sale:not([hidden]) .price-item--sale, #price-"+section+" .price-item--regular"),target=this.querySelector(".jg-sticky-atc__now")||this.querySelector(".jg-sticky-atc__price");price&&target&&(target.textContent=price.textContent.trim());const btn=this.querySelector("button");btn.disabled=this.mainBtn.disabled}}),document.addEventListener("click",e=>{const tipBtn=e.target.closest("[data-jg-tip]");if(tipBtn){const tip=document.getElementById(tipBtn.getAttribute("aria-controls")),open=tipBtn.getAttribute("aria-expanded")!=="true";tipBtn.setAttribute("aria-expanded",String(open)),tip&&(tip.hidden=!open);return}if(e.target.closest("[data-jg-open-lab]")){const details=[...document.querySelectorAll(".product__accordion details")].find(d=>d.querySelector(".jg-analyses"));details&&(e.preventDefault(),details.open=!0,details.scrollIntoView({behavior:"smooth",block:"center"}));return}const proxy=e.target.closest("[data-jg-atc-proxy]");if(proxy){if(proxy.getAttribute("aria-disabled")==="true"){e.preventDefault();return}const main=document.querySelector('button[id^="ProductSubmitButton-"]');main&&!main.disabled&&(e.preventDefault(),main.click())}});function initCompare(root){(root||document).querySelectorAll("[data-jg-compare]").forEach(el=>{const input=el.querySelector("input[type=range]");if(!input||input._jg)return;input._jg=!0;const set=()=>el.style.setProperty("--jg-pos",input.value+"%");input.addEventListener("input",set),set()})}function initSteps(root){(root||document).querySelectorAll("[data-jg-steps]").forEach(el=>{if(el._jg)return;el._jg=!0;const tabs=el.querySelectorAll("[data-step-tab]"),panes=el.querySelectorAll("[data-step-media]"),activate=i=>
1{tabs.forEach((t,j)=>{t.classList.toggle("is-active",i===j),t.setAttribute("aria-selected",i===j)}),panes.forEach((p,j)=>p.classList.toggle("is-active",i===j))};tabs.forEach((t,i)=>{t.addEventListener("click",()=>activate(i)),el.dataset.motion==="hover"&&t.addEventListener("mouseenter",()=>activate(i))})})}function initMaps(root){(root||document).querySelectorAll("[data-jg-map]").forEach(el=>{const btn=el.querySelector("[data-jg-map-load]");!btn||btn._jg||(btn._jg=!0,btn.addEventListener("click",()=>{const f=document.createElement("iframe");f.src=el.dataset.src,f.loading="lazy",f.referrerPolicy="no-referrer-when-downgrade",f.title=el.dataset.title||"Map",el.querySelector(".jg-map__frame").replaceChildren(f)}))})}function fillMarquee(track){const groups=track.querySelectorAll(".jg-marquee__group"),first=groups[0];if(!first)return;const w=first.getBoundingClientRect().width;if(!w)return;const needed=Math.max(2,Math.ceil(window.innerWidth/w)+1);for(let i=groups.length;i<needed;i++){const c=first.cloneNode(!0);c.setAttribute("aria-hidden","true"),track.appendChild(c)}const n=track.querySelectorAll(".jg-marquee__group").length;track.style.setProperty("--jg-marquee-shift",-100/n+"%")}function initMarquees(root){(root||document).querySelectorAll("[data-jg-marquee]").forEach(fillMarquee)}let jgMarqueeResize;window.addEventListener("resize",()=>{clearTimeout(jgMarqueeResize),jgMarqueeResize=setTimeout(()=>initMarquees(),200)});function jgCartSections(inDrawer){return inDrawer?["cart-drawer","cart-icon-bubble"]:[...document.querySelectorAll("#main-cart-items[data-id], #main-cart-footer[data-id]")].map(el=>el.dataset.id).concat("cart-icon-bubble")}
1function jgRenderCart(state,inDrawer){const drawer=document.querySelector("cart-drawer");if(inDrawer&&drawer&&typeof drawer.renderContents=="function"){drawer.renderContents(state);return}const sections=state.sections||{};Object.keys(sections).forEach(id=>{const target=document.getElementById("shopify-section-"+id),html=sections[id]&&new DOMParser().parseFromString(sections[id],"text/html").querySelector(".shopify-section");target&&html&&(target.innerHTML=html.innerHTML)})}document.addEventListener("click",async e=>{const btn=e.target.closest("[data-jg-gift-add]");if(!btn)return;const inDrawer=!!btn.closest("cart-drawer");btn.disabled=!0,btn.classList.add("loading");try{const res=await fetch((window.routes&&window.routes.cart_add_url?window.routes.cart_add_url:"/cart/add")+".js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(btn.dataset.jgGiftAdd),quantity:1}],sections:jgCartSections(inDrawer)})});if(!res.ok)throw new Error(res.status);jgRenderCart(await res.json(),inDrawer)}catch{btn.disabled=!1,btn.classList.remove("loading")}});const jgGiftSheet=(box,open,step)=>{const sheet=box&&box.querySelector("[data-jg-gift-sheet]");if(sheet&&(sheet.hidden=!open,box.classList.toggle("is-open",open),sheet.querySelectorAll("[data-jg-gift-step]").forEach(s=>{s.hidden=s.dataset.jgGiftStep!==String(step||1)}),open)){const cur=sheet.querySelector("[data-jg-gift-step]:not([hidden])"),focus=cur&&(cur.querySelector(".jg-gift__row.is-active")||cur.querySelector(".jg-gift__row"));focus&&focus.focus({preventScroll:!0})}};document.addEventListener("click",async e=>{const box=e.target.closest("[data-jg-gift]");if(!box)return;if(e.target.closest("[data-jg-gift-open]"))return jgGiftSheet(box,!0,1);if(e.target.closest("[data-jg-gift-close]"))return jgGiftSheet(box,!1);if(e.target.closest("[data-jg-gift-back]"))return jgGiftSheet(box,!0,1);if(e.target.closest("[data-jg-gift-group]"))return jgGiftSheet(box,!0,2);const pick=e.target.closest("[data-jg-gift-pick]");if(!pick||(jgGiftSheet(box,!1),pick.classList.contains("is-active")))return;const inDrawer=!!pick.closest("cart-drawer"),key=box.dataset.key,post=(path,body)=>fetch((window.routes&&window.routes[path+"_url"]||"/"+path.replace("_","/"))+".js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(body)}).then(r=>{if(!r.ok)throw new Error(r.status);return r.json()});box.setAttribute("aria-busy","true");const variantId=Number(pick.dataset.jgGiftPick),{title,err:errText}=box.dataset;try{key&&await post("cart_change",{id:key,quantity:Math.max(0,Number(box.dataset.qty||1)-1)});let state=await post("cart_add",{items:[{id:variantId,quantity:1}],sections:jgCartSections(inDrawer)}),blocked=!1;const lines=(await fetch((window.routes&&window.routes.cart_url||"/cart")+".js",{headers:{Accept:"application/json"}}).then(r=>r.json())).items.filter(i=>i.variant_id===variantId),free=lines.some(i=>(i.line_level_discount_allocations||[]).some(a=>a.amount>0&&a.discount_application&&a.discount_application.title===title));if(lines.length&&!free){blocked=!0;const l=lines[lines.length-1];state=await post("cart_change",{id:l.key,quantity:l.quantity-1,sections:jgCartSections(inDrawer)})}if(jgRenderCart(state,inDrawer),blocked&&errText){const scope=inDrawer?document.querySelector("cart-drawer"):document,nb=scope&&scope.querySelector("[data-jg-gift]");nb&&nb.insertAdjacentHTML("beforeend",'<p class="jg-gift__err" role="alert"></p>'),nb&&(nb.lastElementChild.textContent=errText)}}catch{box.removeAttribute("aria-busy")}}),document.addEventListener("keyup",e=>{if(e.key!=="Escape")return;const box=document.querySelector("[data-jg-gift].is-open");box&&(jgGiftSheet(box,!1),e.stopPropagation())},!0),customElements.get("jg-cart-discount")||customElements.define("jg-cart-discount",class extends HTMLElement{connectedCallback(){this.form=this.querySelector("[data-jg-discount-form]"),this.error=this.querySelector(".jg-discount__error"),this.list=this.querySelector("[data-jg-list]"),this.currentCodes=[...this.querySelectorAll("[data-jg-remove]")].map(b=>
1b.dataset.jgRemove).filter(Boolean),this.form&&this.form.addEventListener("submit",e=>{e.preventDefault(),this.add()}),this.addEventListener("click",e=>{const b=e.target.closest("[data-jg-remove]");b&&b.dataset.jgRemove&&this.remove(b.dataset.jgRemove)});const add=this.querySelector(".jg-discount__add");add&&add.addEventListener("toggle",()=>{!add.open||!this.form||requestAnimationFrame(()=>{this.form.querySelector("input")?.focus({preventScroll:!0});const scroller=this.closest(".drawer__inner");if(!scroller)return this.form.scrollIntoView({block:"nearest",behavior:"smooth"});const cta=scroller.querySelector(".jg-drawer-cta"),limit=cta&&getComputedStyle(cta).position==="sticky"?cta.getBoundingClientRect().top:scroller.getBoundingClientRect().bottom,over=this.form.getBoundingClientRect().bottom+12-limit;over>0&&scroller.scrollBy({top:over,behavior:"smooth"})})}),this.load()}async load(){try{const cart=await(await fetch((window.routes&&window.routes.cart_url?window.routes.cart_url:"/cart")+".js",{headers:{Accept:"application/json"}})).json();this.renderCodes(cart.discount_codes||[])}catch{}}renderCodes(list){if(this.currentCodes=list.map(d=>d.code),!this.list)return;const amounts={};this.list.querySelectorAll(".jg-discount__chip").forEach(li=>{const code=li.querySelector(".jg-discount__code")?.textContent.trim().toLowerCase();code&&(amounts[code]=li.querySelector(".jg-discount__amount")?.textContent||"")});const tpl=this.querySelector("[data-jg-chip-template]"),msg=this.querySelector(".jg-discount__message"),invalid=[];this.list.replaceChildren(...list.map(d=>{const li=tpl.content.firstElementChild.cloneNode(!0);li.querySelector(".jg-discount__code").textContent=d.code,li.querySelector(".jg-discount__amount").textContent=d.applicable&&amounts[d.code.toLowerCase()]||"";const btn=li.querySelector("[data-jg-remove]");return btn.dataset.jgRemove=d.code,btn.setAttribute("aria-label",(btn.dataset.label||"").replace("__CODE__",d.code)),d.applicable||(li.classList.add("is-invalid"),invalid.push(d.code)),li})),msg&&(msg.hidden=!invalid.length,msg.textContent=invalid.map(c=>(msg.dataset.msg||"").replace("__CODE__",c)).join(" "))}codes(){return(this.currentCodes||[]).slice()}add(){const input=this.form.querySelector('input[name="code"]'),code=(input.value||"").trim();if(!code){input.focus();return}const codes=this.codes().filter(c=>c.toLowerCase()!==code.toLowerCase());codes.push(code),this.update(codes)}remove(code){this.update(this.codes().filter(c=>c.toLowerCase()!==code.toLowerCase()))}sections(){return this.dataset.context==="drawer"?["cart-drawer","cart-icon-bubble"]:[...document.querySelectorAll("#main-cart-items[data-id], #main-cart-footer[data-id]")].map(el=>el.dataset.id).concat("cart-icon-bubble")}async update(codes){this.setAttribute("aria-busy","true"),this.querySelectorAll("button").forEach(b=>b.disabled=!0),this.error&&(this.error.hidden=!0);try{const res=await fetch((window.routes&&window.routes.cart_update_url?window.routes.cart_update_url:"/cart/update")+".js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({discount:codes.join(","),sections:this.sections()})});if(!res.ok)throw new Error(res.status);const state=await res.json();this.render(state)}catch{this.removeAttribute("aria-busy"),this.querySelectorAll("button").forEach(b=>b.disabled=!1),this.error&&(this.error.textContent=this.error.dataset.msg||this.error.textContent,this.error.hidden=!1)}}render(state){const sections=state.sections||{},drawer=document.querySelector("cart-drawer");if(this.dataset.context==="drawer"&&drawer&&typeof drawer.renderContents=="function"){drawer.renderContents(state);return}Object.keys(sections).forEach(id=>{const target=document.getElementById("shopify-section-"+id),html=sections[id]&&new DOMParser().parseFromString(sections[id],"text/html").querySelector(".shopify-section");target&&html&&(target.innerHTML=html.innerHTML)})}});function initProductReviews(root){(root||document).querySelectorAll("[data-jg-prv]").forEach(box=>{if(box._jg)return;box._jg=!0;const list=box.querySelector(".jg-prv__list");if(!list)return;const src=box.querySelector("template[data-jg-prv-src]"),setup=()=>{src&&(list.appendChild(src.content),src.remove());const items=[...list.children],per=parseInt(box.dataset.perPage,10)||3,more=box.querySelector("[data-jg-prv-more]"),sortSel=box.querySelector("[data-jg-prv-sort]"),reset=box.querySelector("[data-jg-prv-reset]"),status=box.querySelector("[data-jg-prv-status]"),bars=[...box.querySelectorAll("[data-jg-prv-filter]")],byDate=(a,b)=>b.dataset.t.localeCompare(a.dataset.t),sorts={newest:byDate,best:(a,b)=>b.dataset.r-a.dataset.r||byDate(a,b),worst:(a,b)=>a.dataset.r-b.dataset.r||byDate(a,b)};
1let shown=per,filter=box.dataset.defaultFilter==="top"?"top":0,sort="newest";const render=()=>{const match=i=>filter==="top"?+i.dataset.r>=4:!filter||+i.dataset.r===filter,visible=items.filter(match).sort(sorts[sort]);items.forEach(i=>{i.hidden=!0}),visible.forEach((i,idx)=>{list.appendChild(i),i.hidden=idx>=shown}),more&&(more.hidden=visible.length<=shown),bars.forEach(b=>b.setAttribute("aria-pressed",String(+b.dataset.jgPrvFilter===filter))),reset&&(reset.hidden=!filter),status&&(filter==="top"?status.textContent=(box.dataset.labelTop||"").replace("__N__",visible.length).replace("__T__",items.length):status.textContent=filter?(box.dataset.labelFiltered||"").replace("__N__",visible.length).replace("__S__",filter):"")};more&&more.addEventListener("click",()=>{shown+=Math.max(per*2,6),render()}),sortSel&&sortSel.addEventListener("change",()=>{sort=sortSel.value,shown=per,render()}),reset&&reset.addEventListener("click",()=>{filter=0,shown=per,render()}),bars.forEach(b=>b.addEventListener("click",()=>{const s=+b.dataset.jgPrvFilter;filter=filter===s?0:s,shown=per,render()})),render(),box.classList.add("is-ready")};if(src&&"IntersectionObserver"in window){let done=!1;const evs=["scroll","pointerdown","keydown","touchstart"],run=()=>{done||(done=!0,io.disconnect(),evs.forEach(ev=>window.removeEventListener(ev,run)),setup())},io=new IntersectionObserver(entries=>{entries.some(e=>e.isIntersecting)&&run()},{rootMargin:"800px 0px"});io.observe(box),evs.forEach(ev=>window.addEventListener(ev,run,{passive:!0}))}else setup()})}function initTsReviewArrows(root){(root||document).querySelectorAll("[data-jg-tsr]").forEach(track=>{if(track._jg)return;track._jg=!0;const list=track.querySelector(".jg-tsr__list"),prev=track.querySelector("[data-jg-tsr-prev]"),next=track.querySelector("[data-jg-tsr-next]");if(!list||!prev||!next)return;const step=()=>{const item=list.querySelector(".jg-tsr__item");return item?item.getBoundingClientRect().width+12:list.clientWidth*.8},update=()=>{const pad2=parseFloat(getComputedStyle(list).paddingLeft)||0;prev.hidden=list.scrollLeft<=pad2+4,next.hidden=list.scrollLeft+list.clientWidth>=list.scrollWidth-4};prev.addEventListener("click",()=>list.scrollBy({left:-step(),behavior:"smooth"})),next.addEventListener("click",()=>list.scrollBy({left:step(),behavior:"smooth"})),list.addEventListener("scroll",update,{passive:!0}),window.addEventListener("resize",update,{passive:!0}),update()})}function startBgVideos(){const reduce=window.matchMedia("(prefers-reduced-motion: reduce)").matches,saveData=navigator.connection&&navigator.connection.saveData;reduce||saveData||document.querySelectorAll("video[data-jg-bg-video]:not([src])").forEach(v=>{const mobile=window.matchMedia("(max-width: 749px)").matches;v.src=mobile&&v.dataset.srcMobile||v.dataset.src,v.muted=!0,v.addEventListener("playing",()=>v.classList.add("is-playing"),{once:!0});const p=v.play();p&&p.catch&&p.catch(()=>{})})}document.readyState==="complete"?setTimeout(startBgVideos,300):window.addEventListener("load",()=>setTimeout(startBgVideos,300));function setHeaderHeight(){const h=document.querySelector(".section-header");h&&document.documentElement.style.setProperty("--jg-header-h",Math.round(h.getBoundingClientRect().height)+"px")}setHeaderHeight(),window.addEventListener("resize",setHeaderHeight,{passive:!0});function placeSliderArrows(){document.querySelectorAll("slider-component").forEach(sc=>{if(!sc.querySelector(":scope > .product-grid, :scope > .blog__posts"))return;const img=sc.querySelector(".card__inner");if(!img)return;const top=img.getBoundingClientRect().top-sc.getBoundingClientRect().top+img.offsetHeight/2;top>0&&sc.style.setProperty("--jg-arrow-top",Math.round(top)+"px")})}let jgArrowResize;window.addEventListener("resize",()=>{clearTimeout(jgArrowResize),jgArrowResize=setTimeout(placeSliderArrows,150)});function mountLazyApp(el){const tpl=el.querySelector("template");tpl&&el.replaceChildren(tpl.content.cloneNode(!0))}function initLazyApps(root){const els=[...(root||document).querySelectorAll("[data-jg-lazy-app]")].filter(el=>!el._jg);if(!els.length)return;
1if(!("IntersectionObserver"in window)){els.forEach(mountLazyApp);return}const io=new IntersectionObserver(entries=>{entries.forEach(e=>{e.isIntersecting&&(io.unobserve(e.target),mountLazyApp(e.target))})},{rootMargin:"800px 0px"});els.forEach(el=>{el._jg=!0,io.observe(el)})}document.addEventListener("click",e=>{if(e.target.closest(".header__heading-link"))try{sessionStorage.removeItem("jgLanding")}catch{}});function jgCartLink(variantId,qty){return(window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root||"/")+"cart/"+variantId+":"+qty}function jgFallbackGo(variantId,qty){window.location.href=jgCartLink(variantId,qty)}async function jgAddAndGo(variantId,qty,data,setIds){const updates={};(setIds||[]).forEach(id=>{id&&(updates[id]=0)}),updates[variantId]=qty;const ctrl="AbortController"in window?new AbortController:null,timer=ctrl?setTimeout(()=>ctrl.abort(),8e3):null;try{if(!(await fetch((window.routes&&window.routes.cart_update_url||"/cart/update")+".js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({updates}),signal:ctrl?ctrl.signal:void 0})).ok)throw new Error("cart update failed")}catch{jgFallbackGo(variantId,qty);return}finally{timer&&clearTimeout(timer)}window.location.href=data.dataset.directCheckout==="true"?"/checkout":window.routes&&window.routes.cart_url||"/cart"}document.addEventListener("submit",e=>{const form=e.target;if(!form||!form.matches||!form.matches('form[action*="/cart/add"]'))return;let data,currentId,qty,dialog;try{const scope=form.closest(".product__info-container, product-info, section")||document;if(data=scope.querySelector&&scope.querySelector("[data-jg-upsell]")||document.querySelector("[data-jg-upsell]"),!data)return;const idInput=form.querySelector('input[name="id"]'),qtyInput=document.querySelector('input[name="quantity"][form="'+form.getAttribute("id")+'"], .product-form__quantity input[name="quantity"]');if(qty=Math.max(1,parseInt(qtyInput&&qtyInput.value,10)||1),currentId=idInput&&idInput.value||data.dataset.currentVariant,dialog=document.querySelector("dialog.jg-upsell"),!currentId)return}catch{return}e.preventDefault(),e.stopImmediatePropagation();const upId=dialog&&dialog.dataset.upsellVariant,setIds=[currentId,upId];if(!dialog||typeof dialog.showModal!="function"){jgAddAndGo(currentId,qty,data,setIds);return}try{dialog.open||dialog.showModal()}catch{jgAddAndGo(currentId,qty,data,setIds);return}dialog.querySelectorAll("[data-jg-upsell-choice]").forEach(btn=>{btn.onclick=()=>{const id=btn.dataset.jgUpsellChoice==="up"&&upId?upId:currentId;dialog.querySelectorAll("button").forEach(b=>{b.disabled=!0}),btn.classList.add("loading"),jgAddAndGo(id,qty,data,setIds).catch(()=>jgFallbackGo(id,qty))}})},!0),document.addEventListener("click",e=>{if(e.target.matches&&e.target.matches("dialog.jg-upsell[open]")){const no=e.target.querySelector(".jg-upsell__no");no&&!no.disabled&&no.click()}}),document.addEventListener("cancel",e=>{if(e.target.matches&&e.target.matches("dialog.jg-upsell")){e.preventDefault();const no=e.target.querySelector(".jg-upsell__no");no&&!no.disabled&&no.click()}},!0);const SIZE_SECTIONS=["main","jg_offer_cta","jg_lab_proof","jg_ts_product_reviews","jg_ts_product_reviews_all"],sizeCache={};function sizeSectionIds(){return[...document.querySelectorAll('[id^="shopify-section-template--"]')].map(el=>el.id.replace("shopify-section-","")).filter(id=>SIZE_SECTIONS.some(s=>id.endsWith("__"+s)))}function fetchSize(url){const ids=sizeSectionIds();if(!ids.length)return null;const u=new URL(url,location.origin);return u.searchParams.set("sections",ids.join(",")),sizeCache[url]||(sizeCache[url]=fetch(u.toString()).then(r=>r.ok?r.json():Promise.reject(r.status))),sizeCache[url]}async function switchSize(link,push){const url=link.getAttribute("href"),box=link.closest(".jg-sizes");box&&box.classList.add("is-loading");try{const data=await fetchSize(url);if(!data)throw new Error("keine Sektionen");Object.entries(data).forEach(([id,html])=>{const current=document.getElementById("shopify-section-"+id);if(!current||!html)return;const next=new DOMParser().parseFromString(html,"text/html").getElementById("shopify-section-"+id);next&&(current.replaceWith(next),initAll(next))});const h1=document.querySelector(".product__title h1");h1&&(document.title=h1.textContent.trim()+" \u2013 "+(document.title.split(" \u2013 ").pop()||"")),push&&history.pushState({jgSize:!0},"",url)}catch{location.href=url}}document.addEventListener("click",e=>
1{const link=e.target.closest(".jg-sizes__opt");!link||e.metaKey||e.ctrlKey||e.shiftKey||e.button!==0||(e.preventDefault(),!link.classList.contains("is-active")&&switchSize(link,!0))}),["pointerenter","touchstart"].forEach(ev=>document.addEventListener(ev,e=>{const link=e.target.closest&&e.target.closest(".jg-sizes__opt:not(.is-active)");link&&fetchSize(link.getAttribute("href"))},{capture:!0,passive:!0})),window.addEventListener("popstate",e=>{e.state&&e.state.jgSize&&location.reload()}),document.querySelector(".jg-sizes")&&history.replaceState({jgSize:!0},"",location.href);function jgFormatMoney(cents,format){const fmt=(n,d,ts,ds)=>{const[i,f]=(n/100).toFixed(d).split(".");return i.replace(/\B(?=(\d{3})+(?!\d))/g,ts)+(f?ds+f:"")};return(format||"{{amount}}").replace(/\{\{\s*(\w+)\s*\}\}/,(_,key)=>key==="amount_no_decimals"?fmt(cents,0,",","."):key==="amount_with_comma_separator"?fmt(cents,2,".",","):key==="amount_no_decimals_with_comma_separator"?fmt(cents,0,".",","):key==="amount_with_apostrophe_separator"?fmt(cents,2,"'","."):fmt(cents,2,",","."))}let creditSubscribed=!1;function initCredit(){creditSubscribed||typeof subscribe!="function"||typeof PUB_SUB_EVENTS>"u"||(creditSubscribed=!0,subscribe(PUB_SUB_EVENTS.variantChange,e=>{const v=e&&e.data&&e.data.variant;v&&document.querySelectorAll('[data-jg-credit][data-section="'+e.data.sectionId+'"]').forEach(el=>{const cents=Math.round(v.price*Number(el.dataset.percent)/100),amount=el.querySelector("strong");amount&&(amount.textContent=jgFormatMoney(cents,el.dataset.format)),el.hidden=cents<=0})}),subscribe(PUB_SUB_EVENTS.cartUpdate,e=>{const total=e&&e.cartData&&e.cartData.total_price;typeof total=="number"&&document.querySelectorAll("[data-jg-cart-credit]").forEach(el=>{const cents=Math.round(total*Number(el.dataset.percent)/100),amount=el.querySelector("strong");amount&&(amount.textContent="+ "+jgFormatMoney(cents,el.dataset.format)),el.hidden=cents<=0})}))}document.addEventListener("click",e=>{const label=e.target.closest("label.jg-cdc__more, label.jg-readmore__btn");if(!label)return;const input=document.getElementById(label.htmlFor);if(!input)return;e.preventDefault();const top=label.getBoundingClientRect().top;input.checked=!input.checked;const delta=label.getBoundingClientRect().top-top;delta&&window.scrollBy({top:delta,behavior:"instant"})});function initAll(root){initCredit(),initDelivery(root),initCompare(root),initSteps(root),initMaps(root),initLazyApps(root),initMarquees(root),placeSliderArrows(),initTsReviewArrows(root),initProductReviews(root)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>initAll()):initAll(),document.addEventListener("shopify:section:load",e=>initAll(e.target))})(); 2//# sourceMappingURL=/cdn/shop/t/14/assets/jegit.js.map?v=166989598373603259631791191661
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.