1(function(){if(window.__wwSigmaWearableTabs)return;window.__wwSigmaWearableTabs=!0;function activeVideo(root){var w=root.querySelector("[data-bg-index].is-active");return w?w.querySelector("video"):null}function showReplay(root,on){var b=root.querySelector("[data-wearable-replay]");b&&b.classList.toggle("is-visible",on)}function playOnce(v){if(v){try{v.currentTime=0}catch(e){}var p=v.play();p&&p.catch&&p.catch(function(){})}}function frugalNetwork(){var c=navigator.connection;return!!(c&&(c.saveData||/(^|-)2g/.test(c.effectiveType||"")))}function warm(v){if(!(!v||v.readyState>=2||frugalNetwork())){var w=v.closest("[data-bg-index]");if(!(w&&w.classList.contains("is-active")&&!v.paused)){v.preload="auto";try{v.load()}catch(e){}}}}function videoSync(root,i){var vids=root.querySelectorAll("[data-bg-index]");Array.prototype.forEach.call(vids,function(w,j){var on=j===i;w.classList.toggle("is-active",on);var v=w.querySelector("video");v&&(on?playOnce(v):v.pause())}),vids[i+1]&&warm(vids[i+1].querySelector("video")),showReplay(root,!1)}function preloadSequentially(sec){if(sec.__preloadStarted||(sec.__preloadStarted=!0,mobileMq.matches||frugalNetwork()))return;var vids=Array.prototype.slice.call(sec.querySelectorAll("[data-bg-index] video")),i=0;function next(){if(i>=vids.length)return;var v=vids[i++];if(v.readyState>=3)return next();var w=v.closest("[data-bg-index]");if(w&&w.classList.contains("is-active")&&!v.paused)return next();var done=!1,t=setTimeout(finish,5e3);function finish(){done||(done=!0,clearTimeout(t),v.removeEventListener("canplaythrough",finish),next())}v.addEventListener("canplaythrough",finish),v.preload="auto";try{v.load()}catch(e){finish()}}next()}document.addEventListener("click",function(e){var rb=e.target.closest&&e.target.closest("[data-wearable-replay]");if(rb){var rRoot=rb.closest(".ww-sigma-wearable");rRoot&&(rRoot.__tourStop=!0,playOnce(activeVideo(rRoot)),showReplay(rRoot,!1))}}),document.addEventListener("ww:tabchange",function(e){var root=e.target;!root.classList||!root.classList.contains("ww-sigma-wearable")||(e.detail&&e.detail.source==="user"&&(root.__tourStop=!0),videoSync(root,e.detail.index))});var mobileMq=window.matchMedia("(max-width: 768px)"),reduceMq=window.matchMedia("(prefers-reduced-motion: reduce)");function applySources(sec){Array.prototype.forEach.call(sec.querySelectorAll("[data-bg-index] video[data-mobile-src]"),function(v){var want=mobileMq.matches?v.getAttribute("data-mobile-src"):v.getAttribute("data-desktop-src"),srcEl=v.querySelector("source");if(!(!srcEl||srcEl.getAttribute("src")===want)){srcEl.setAttribute("src",want),v.load();var w=v.closest("[data-bg-index]");w&&w.classList.contains("is-active")&&playOnce(v)}})}mobileMq.addEventListener&&mobileMq.addEventListener("change",function(){Array.prototype.forEach.call(document.querySelectorAll(".ww-sigma-wearable"),applySources)});function initBg(root){var secs=(root||document).querySelectorAll(".ww-sigma-wearable");Array.prototype.forEach.call(secs,function(sec){if(!(sec.__bgInit||!sec.querySelector("[data-bg-index]"))){if(sec.__bgInit=!0,applySources(sec),Array.prototype.forEach.call(sec.querySelectorAll("[data-bg-index] video"),function(v){v.addEventListener("ended",function(){var w=v.closest("[data-bg-index]");if(!(!w||!w.classList.contains("is-active"))){if(!sec.__tourStop&&!reduceMq.matches){var wraps=Array.prototype.slice.call(sec.querySelectorAll("[data-bg-index]")),i=wraps.indexOf(w);if(i>-1&&i<wraps.length-1){window.wwTabs?window.wwTabs.activate(sec,i+1):videoSync(sec,i+1);return}sec.__tourStop=!0}showReplay(sec,!0)}})}),typeof IntersectionObserver=="undefined"){playOnce(activeVideo(sec));return}var io=new IntersectionObserver(function(entries){entries.forEach(function(e){if(e.isIntersecting){preloadSequentially(sec);var active=activeVideo(sec);if(active&&!active.ended){var p=active.play();p&&p.catch&&p.catch(function(){})}}else Array.prototype.forEach.call(sec.querySelectorAll("[data-bg-index] video"),function(v){v.pause()})})},{threshold:.15});io.observe(sec)}})}document.readyState!=="loading"?initBg(document):document.addEventListener("DOMContentLoaded",function(){initBg(document)}),document.addEventListener("shopify:section:load",function(e){initBg(e.target)})})(); 2//# sourceMappingURL=/cdn/shop/t/125/assets/ww-sigma-wearable.js.map?v=122903476100748686121786959973
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.