1(()=>{"use strict";function e(e=document.body,t="js-"){const a=[...e.querySelectorAll(t?`[class*="${t}"]`:"*")],n=t?"classList":"dataset";return a.reduce(((e,a)=>([].slice.call(t?a[n]:Object.entries(a[n])).forEach((n=>{let r;t&&n.slice(0,t.length)===t?r=n.slice(t.length,n.length):t||([r]=n),r&&(e[r]=e.hasOwnProperty(r)?e[r].constructor===Array?e[r].concat(a):[e[r],a]:a)})),e)),{})}const t={productImages:window.component((async(t,a)=>{const{imageSlider:n,next:r,prev:o,pagination:i,slide:s}=e(t,null),c=[].concat(s);var l;await(l="Swiper",new Promise((e=>{window?.hasLoaded?.scripts?.[l]?e():window.app.on(`${l}:loaded`,e)})));const d=new Swiper(n,{grabCursor:!0,slidesPerView:1,speed:400,navigation:{nextEl:r,prevEl:o},pagination:{el:i,clickable:!0,bulletClass:"product-images-bullet"}});a.on("variant:change",((e,t)=>{c.forEach(((e,a)=>{e?.dataset?.variantImage?.includes(t.id)&&d.slideTo(a)}))}))})),productIntro:window.component((e=>{const t=e.querySelector("[data-faq-url] a");t&&(()=>{const e=t.href,a=e.split("#")[1];e.indexOf(!1)&&t.addEventListener("click",(e=>{e.preventDefault();const t=document.querySelector(`#${a}`).getBoundingClientRect().top,n=document.querySelector("#SiteHeader").offsetHeight;window.scrollTo({left:0,top:t-n+document.documentElement.scrollTop,behavior:"smooth"})}))})()})),productForm:window.component((async(t,a)=>{const{input:n,mainSelect:r}=e(t,null),o=[].concat(n),{selectedOrFirstAvailableVariant:i,product:{variants:s}}=JSON.parse(document.querySelector(".js-product-json").innerHTML);o&&o.forEach((e=>{e.addEventListener("input",(e=>{const t=e.target.dataset.index,{value:n}=e.target,r=s.find((e=>e[t]===n));a.emit("variant:change",null,r)}))})),a.on("variant:change",((e,t)=>{r.value=t.id,(e=>{const t=new URL(window.location.href),a=new URLSearchParams(t.search.slice(1));e.forEach((({name:e,value:t})=>{""!==t?a.set(e,encodeURIComponent(t)):a.delete(e)})),window.history.replaceState({},"",`${window.location.pathname}?${a.toString()}`)})([{name:"variant",value:t.id}])}))})),subscriptionToggle:window.component((e=>{const t=e.querySelector("[data-subscription-toggle]");if(!t)return;const a=[...t.querySelectorAll("[data-subscription-toggle-input]")],n=[...document.querySelectorAll("[data-purchase-mode-target]")],r=[...document.querySelectorAll('[data-subscription-bundle="true"]')],o=t.dataset.refillVariantId,i=t.dataset.caseVariantId,s=t.dataset.refillSellingPlanId;let c=a.find((e=>e.checked))?.value||"subscribe";const l=e=>{c=e,n.forEach((t=>t.setAttribute("data-purchase-mode",e))),r.forEach((e=>{const t=e.querySelector("form");if(!t)return;const a=t.querySelector('input[name="id"]');if(!a)return;a.dataset.originalValue||(a.dataset.originalValue=a.value);let n=t.querySelector('input[name="selling_plan"][data-subscription-toggle-managed]');"subscribe"===c?(a.value=o,n||(n=document.createElement("input"),n.type="hidden",n.name="selling_plan",n.dataset.subscriptionToggleManaged="true",a.insertAdjacentElement("afterend",n)),n.value=s):(a.value=a.dataset.originalValue,n&&n.remove())}))},d=()=>{if(document.getElementById("subscription-toggle-suppress-upcart"))return;const e=document.createElement("style");if(e.id="subscription-toggle-suppress-upcart",e.textContent="#upCart, #CartPopup, .upcart-drawer { display: none !important; visibility: hidden !important; }",document.head.appendChild(e),window.upcartOnCartUpdated=()=>{},"function"==typeof window.upcartCloseCart)try{window.upcartCloseCart()}catch(e){}},u=async e=>{e&&(e.setAttribute("aria-disabled","true"),e.classList.add("loading"),e.querySelector(".loading__spinner")?.classList.remove("hidden")),d();const t=Date.now();try{await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:o,quantity:1,selling_plan:s,properties:{_unique_box_id:t}},{id:i,quantity:1,properties:{_unique_box_id:t}}]})})}catch(t){return console.error("subscription-toggle: bundle add failed",t),void(e&&(e.removeAttribute("aria-disabled"),e.classList.remove("loading"),e.querySelector(".loading__spinner")?.classList.add("hidden")))}d(),window.location.href="/checkout"};a.forEach((e=>{e.addEventListener("change",(e=>{e.target.checked&&l(e.target.value)}))})),r.forEach((e=>{e.addEventListener("submit",(e=>{if("subscribe"!==c)return;e.preventDefault(),e.stopImmediatePropagation();const t=e.target.closest("form")?.querySelector('[type="submit"]');u(t)}),!0),e.addEventListener("click",(e=>{if("subscribe"!==c)return;const t=e.target.closest('button[type="submit"], button[name="add"]');t&&(e.preventDefault(),e.stopImmediatePropagation(),u(t))}),!0)})),l(c)}))};window.app.add(t),window.app.mount()})();
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.