PageSourceSearch

https://isamaya.com/cdn/shop/t/173/assets/dev-custom.js?v=144885602418458971681788358451

js isamaya.com collected 2026-09-24 11:51:22 UTC 15,070 bytes, 12 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll('[data-section-type="related-products"]').forEach(section=>{const tabsContainer=section.querySelector(".custom-tabs-header");if(!tabsContainer)return;const tabTitles=tabsContainer.querySelectorAll(".custom-tab-title"),tabPanels=section.querySelectorAll('[role="tabpanel"]'),panelMap=new Map;tabPanels.forEach(panel=>{panelMap.set(panel.id,panel)});function initializeProductRecommendations(){section.querySelectorAll("product-recommendations").forEach(element=>{const originalDisplay=element.style.display,originalVisibility=element.style.visibility;if(element.style.visibility="hidden",element.style.display="block",element.load&&typeof element.load=="function")element.load();else{const event=new Event("intersect");element.dispatchEvent(event)}setTimeout(()=>{element.style.display=originalDisplay,element.style.visibility=originalVisibility},50)})}function switchTab(activeTitle){const targetPanelId=activeTitle.getAttribute("aria-controls"),targetPanel=panelMap.get(targetPanelId);targetPanel&&requestAnimationFrame(()=>
1{tabTitles.forEach(t=>t.classList.remove("active")),tabPanels.forEach(panel=>{panel.hidden=!0,panel.classList.remove("current")}),activeTitle.classList.add("active"),targetPanel.hidden=!1,targetPanel.classList.add("current")})}tabsContainer.addEventListener("click",function(e){const clickedTab=e.target.closest(".custom-tab-title");clickedTab&&switchTab(clickedTab)}),tabsContainer.addEventListener("keydown",function(e){const focusedTab=e.target.closest(".custom-tab-title");focusedTab&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),switchTab(focusedTab))}),!tabsContainer.querySelector(".custom-tab-title.active")&&tabTitles.length>0&&switchTab(tabTitles[0]),setTimeout(initializeProductRecommendations,100)})});class TabbedSectionsInitializer{constructor(){this.init(),this.bindEvents()}init(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.initAllTabbedSections()}):this.initAllTabbedSections(),window.addEventListener("load",()=>{setTimeout(()=>this.initAllTabbedSections(),100)})}bindEvents(){document.addEventListener("shopify:section:load",event=>{setTimeout(()=>this.initSectionTabs(event.target),50)}),document.addEventListener("shopify:section:select",event=>{setTimeout(()=>this.initSectionTabs(event.target),50)})}initAllTabbedSections(){console.log("\u{1F50D} Initializing theme tabs...");const tabsElements=document.querySelectorAll("tabs-element");console.log(`Found ${tabsElements.length} tabs-element(s)`),tabsElements.forEach((tabsElement,index)=>{this.initTabsElement(tabsElement,index)})}initSectionTabs(section){section.querySelectorAll("tabs-element").forEach((tabsElement,index)=>{this.initTabsElement(tabsElement,index)})}initTabsElement(tabsElement,index){const section=tabsElement.closest('[id^="shopify-section-"]'),sectionId=section?section.id:`unknown-${index}`;console.log(`Initializing tabs for: ${sectionId}`),tabsElement.hasAttribute("selected-index")||tabsElement.setAttribute("selected-index","0");const buttons=tabsElement.querySelectorAll('button[role="tab"]'),selectedIndex=parseInt(tabsElement.getAttribute("selected-index"))||0;this.updateTabStates(tabsElement,selectedIndex);const activePanel=tabsElement.querySelector(`#${buttons[selectedIndex]?.getAttribute("aria-controls")}`);activePanel&&this.initPanelComponents(activePanel),this.addTabChangeListener(tabsElement),console.log(`\u2705 Tabs initialized for: ${sectionId}`)}updateTabStates(tabsElement,selectedIndex){tabsElement.querySelectorAll('button[role="tab"]').forEach((button,buttonIndex)=>{const panelId=button.getAttribute("aria-controls"),panel=document.getElementById(panelId);panel&&(buttonIndex===selectedIndex?(panel.hidden=!1,panel.setAttribute("aria-hidden","false"),panel.classList.add("current")):(panel.hidden=!0,panel.setAttribute("aria-hidden","true"),panel.classList.remove("current")),buttonIndex===selectedIndex?(button.classList.add("button-active"),button.disabled=!0,button.setAttribute("aria-selected","true")):(button.classList.remove("button-active"),button.disabled=!1,button.setAttribute("aria-selected","false")))});const section=tabsElement.closest('[id^="shopify-section-"]')||tabsElement.closest("#custom_content");section&&section.querySelectorAll("[data-tab-position]").forEach((panel,index)=>{index===selectedIndex?(panel.hidden=!1,panel.setAttribute("aria-hidden","false")):(panel.hidden=!0,panel.setAttribute("aria-hidden","true"))})}addTabChangeListener(tabsElement){const observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type==="attributes"&&mutation.attributeName==="selected-index"){const newIndex=parseInt(tabsElement.getAttribute("selected-index"));this.updateTabStates(tabsElement,newIndex);const activeButton=tabsElement.querySelectorAll('button[role="tab"]')[newIndex];if(activeButton){const panelId=activeButton.getAttribute("aria-controls"),activePanel=document.getElementById(panelId);activePanel&&setTimeout(()=>{this.initPanelComponents(activePanel)},200)}}})});observer.observe(tabsElement,{attributes:!0,attributeFilter:["selected-index"]}),tabsElement._tabObserver=observer}initPanelComponents(panel){if(!panel)return;panel.querySelectorAll("image-comparison").forEach(comp=>{comp.init&&typeof comp.init=="function"&&comp.init(),comp.animate&&typeof comp.animate=="function"&&setTimeout(()=>comp.animate(),500)}),panel.querySelectorAll('img[is="lazy-image"]').forEach(img=>{typeof window.initLazyImage=="function"&&window.initLazyImage(img)}),panel.querySelectorAll("video").forEach(video=>{(video.hasAttribute("autoplay")||video.autoplay)&&(video.muted=!0,video.play().catch(()=>
1{console.log("Video autoplay failed")}))}),panel.querySelectorAll("motion-list").forEach(list=>{list.load&&typeof list.load=="function"&&list.load()}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},100)}switchToTab(sectionSelector,tabIndex){const section=document.querySelector(sectionSelector);if(!section)return;const tabsElement=section.querySelector("tabs-element");tabsElement&&tabsElement.setAttribute("selected-index",tabIndex.toString())}getActiveTab(sectionSelector){const section=document.querySelector(sectionSelector);if(!section)return null;const tabsElement=section.querySelector("tabs-element");if(!tabsElement)return null;const selectedIndex=parseInt(tabsElement.getAttribute("selected-index"))||0,activeButton=tabsElement.querySelectorAll('button[role="tab"]')[selectedIndex],activePanel=activeButton?document.getElementById(activeButton.getAttribute("aria-controls")):null;return{button:activeButton,panel:activePanel,index:selectedIndex}}}function initTabAnchoring(){let lastProcessedHash="",isProcessingHash=!1;function openTabByPosition(){const hash=window.location.hash;if(!hash.match(/#tab-(\d+)/)||hash===lastProcessedHash||isProcessingHash)return;const match=hash.match(/#tab-(\d+)/);if(match){isProcessingHash=!0,lastProcessedHash=hash;const position=match[1],tabIndex=parseInt(position)-1,tabPanel=document.querySelector(`[data-tab-position="${position}"]`);if(tabPanel){const tabContainer=tabPanel.closest("#custom_content");if(tabContainer){const tabsElement=tabContainer.querySelector("tabs-element");tabsElement&&(tabsElement.setAttribute("selected-index",tabIndex.toString()),setTimeout(()=>{const targetPanel=document.querySelector(`[data-tab-position="${position}"]`);targetPanel&&targetPanel.hidden&&(targetPanel.hidden=!1,targetPanel.setAttribute("aria-hidden","false"))},50)),setTimeout(()=>{tabContainer.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{isProcessingHash=!1},1e3)},150)}}else isProcessingHash=!1}}window.location.hash.match(/#tab-(\d+)/)&&setTimeout(()=>{openTabByPosition()},200),window.addEventListener("hashchange",e=>{e.newURL!==e.oldURL&&window.location.hash.match(/#tab-(\d+)/)&&openTabByPosition()})}function initHelpDrawerAnchoring(){let lastProcessedDrawerHash="",isProcessingDrawerHash=!1;function openHelpDrawerFromHash(){const hash=window.location.hash;if(hash!=="#help-drawer"||hash===lastProcessedDrawerHash||isProcessingDrawerHash)return;isProcessingDrawerHash=!0,lastProcessedDrawerHash=hash;const primaryTrigger=document.querySelector('a[aria-controls="HelpDrawer"]');primaryTrigger?setTimeout(()=>{primaryTrigger.click(),setTimeout(()=>{isProcessingDrawerHash=!1},500)},100):isProcessingDrawerHash=!1}document.querySelectorAll('a[href="#help-drawer"]').forEach(link=>{link.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),history.pushState(null,null,"#help-drawer");const primaryTrigger=document.querySelector('a[aria-controls="HelpDrawer"]');primaryTrigger&&primaryTrigger.click()})}),window.location.hash==="#help-drawer"&&setTimeout(()=>{openHelpDrawerFromHash()},200),window.addEventListener("hashchange",e=>{e.newURL!==e.oldURL&&window.location.hash==="#help-drawer"&&openHelpDrawerFromHash()})}function initSectionAnchoring(){let lastProcessedSectionHash="",isProcessingSectionHash=!1;function scrollToSection(){const hash=window.location.hash;if(!hash||hash.match(/#tab-(\d+)/)||hash==="#help-drawer"||hash===lastProcessedSectionHash||isProcessingSectionHash)return;const targetId=hash.substring(1),targetElement=document.getElementById(targetId);targetElement?(isProcessingSectionHash=!0,lastProcessedSectionHash=hash,setTimeout(()=>{targetElement.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{isProcessingSectionHash=!1},1e3)},100)):(lastProcessedSectionHash="",isProcessingSectionHash=!1)}document.addEventListener("click",e=>{const link=e.target.closest('a[href^="#"]');if(!link)return;const href=link.getAttribute("href");if(href.match(/#tab-(\d+)/)||href==="#help-drawer")return;const targetId=href.substring(1),targetElement=document.getElementById(targetId);targetElement&&(e.preventDefault(),e.stopPropagation(),history.pushState(null,null,href),setTimeout(()=>{targetElement.scrollIntoView({behavior:"smooth",block:"start"})},50))}),window.location.hash&&!window.location.hash.match(/#tab-(\d+)/)&&window.location.hash!=="#help-drawer"&&setTimeout(()=>{scrollToSection()},200),window.addEventListener("hashchange",e=>{e.newURL!==e.oldURL&&!window.location.hash.match(/#tab-(\d+)/)&&window.location.hash!=="#help-drawer"&&scrollToSection()})}document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>
1{initTabAnchoring(),initHelpDrawerAnchoring(),initSectionAnchoring()},100)});class VariantFilterManager{constructor(){this.activeFilters=new Map,this.filterConfigs=new Map,this.init()}init(){this.addAntiFlashCSS(),this.setupHTMLInterception(),this.setupEventListeners(),this.initializeFilters()}enableUnavailableSwatches(containerElement){if(!containerElement)return;containerElement.querySelectorAll("input:disabled, option:disabled").forEach(selector=>{selector.removeAttribute("disabled"),selector.classList.add("unavailable")})}addAntiFlashCSS(){if(document.getElementById("variant-filter-styles"))return;const style=document.createElement("style");style.id="variant-filter-styles",style.textContent=`
2      .variant-picker.updating .filter-btn {
3        visibility: hidden !important;
4      }
5      .variant-picker.updating * {
6        transition: none !important;
7      }
8      .filter-btn {
9        transition: all 0.05s ease;
10      }
11    `,document.head.appendChild(style)}setupEventListeners(){typeof theme<"u"&&theme.pubsub&&theme.pubsub.subscribe(theme.pubsub.PUB_SUB_EVENTS.optionValueSelectionChange,event=>{const variantPicker=event.data.target.closest('[id^="VariantPicker-"]');variantPicker&&this.hasFilterButtons(variantPicker)&&this.markAsUpdating(variantPicker)}),document.addEventListener("shopify:section:load",()=>{setTimeout(()=>this.initializeFilters(),100)})}setupHTMLInterception(){if(typeof theme>"u"||!theme.HTMLUpdateUtility)return;const originalViewTransition=theme.HTMLUpdateUtility.viewTransition;theme.HTMLUpdateUtility.viewTransition=(targetElement,sourceElement,preProcessCallbacks)=>{this.enableUnavailableSwatches(sourceElement),targetElement.id&&targetElement.id.startsWith("VariantPicker-")&&this.hasFilterButtons(sourceElement)&&this.preserveFilterState(targetElement.id,sourceElement);const result=originalViewTransition.call(theme.HTMLUpdateUtility,targetElement,sourceElement,preProcessCallbacks);return targetElement.id&&targetElement.id.startsWith("VariantPicker-")&&requestAnimationFrame(()=>this.initializeFilters()),result}}hasFilterButtons(element){return element.querySelectorAll(".filter-btn").length>0}initializeFilters(){document.querySelectorAll('[id^="VariantPicker-"]').forEach(picker=>{this.enableUnavailableSwatches(picker);const pickerId=picker.id,filterButtons=picker.querySelectorAll(".filter-btn");if(filterButtons.length===0)return;const filterKey=picker.dataset.filterKey||"color_temperature",availableFilters=Array.from(filterButtons).map(btn=>
11btn.dataset.filter).filter(filter=>filter!=="all");this.filterConfigs.set(pickerId,{filterKey,availableFilters}),filterButtons.forEach(button=>{button.onclick=e=>{e.preventDefault(),e.stopPropagation();const filter=button.dataset.filter;return this.activeFilters.set(pickerId,filter),this.applyFilter(pickerId,filter),!1}});const currentFilter=this.activeFilters.get(pickerId)||"all";this.applyFilter(pickerId,currentFilter)})}applyFilter(pickerId,filter){const variantPicker=document.getElementById(pickerId);if(!variantPicker)return;const filterButtons=variantPicker.querySelectorAll(".filter-btn"),swatchItems=variantPicker.querySelectorAll(".swatch-item.filterable-swatch");filterButtons.forEach(btn=>{btn.classList.toggle("active",btn.dataset.filter===filter)}),swatchItems.forEach(item=>{const itemFilterValues=(item.dataset.filterValues||"neutral").toLowerCase(),filterLower=filter.toLowerCase();let shouldShow=!1;filter==="all"?shouldShow=!0:shouldShow=itemFilterValues.split(",").map(f=>f.trim()).includes(filterLower),item.style.display=shouldShow?"":"none",item.style.visibility=shouldShow?"visible":"hidden"})}preserveFilterState(pickerId,sourceElement){const currentFilter=this.activeFilters.get(pickerId)||"all";if(currentFilter!=="all"){const filterButtons=sourceElement.querySelectorAll(".filter-btn"),swatchItems=sourceElement.querySelectorAll(".swatch-item.filterable-swatch");filterButtons.forEach(btn=>
11{btn.classList.toggle("active",btn.dataset.filter===currentFilter)}),swatchItems.forEach(item=>{const itemFilterValues=(item.dataset.filterValues||"neutral").toLowerCase(),filterLower=currentFilter.toLowerCase();let shouldShow=!1;currentFilter==="all"?shouldShow=!0:shouldShow=itemFilterValues.split(",").map(f=>f.trim()).includes(filterLower),shouldShow||(item.style.display="none",item.style.visibility="hidden")})}}markAsUpdating(variantPicker){variantPicker.classList.add("updating"),setTimeout(()=>{variantPicker.classList.remove("updating")},200)}}document.addEventListener("DOMContentLoaded",()=>{window.variantFilterManager=new VariantFilterManager});
12//# sourceMappingURL=/cdn/shop/t/173/assets/dev-custom.js.map?v=144885602418458971681788358451

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.