https://shop.lonelyplanet.com/cdn/shop/t/449/assets/productpage-cu…?v=127040970734592989851790107411
1document.querySelectorAll(".block-swatch__radio").forEach(el=>{el.addEventListener("click",e=>{const swatch=el.closest(".block-swatch"),swatchPosition=swatch.getAttribute("data-item-index"),label=el.closest(".block-swatch")?.querySelector(".block_text"),text=label?label.textContent.trim():null,discountElement=swatch.querySelector(".discounted-price--wrapper");let priceText=null;if(discountElement){const priceTextElement=discountElement.querySelector(".block_price_text")||discountElement;if(priceTextElement){const nestedPriceBox=priceTextElement.querySelector(".price_box_inner");if(nestedPriceBox){const nestedPriceText=nestedPriceBox.querySelector(".block_price_text");nestedPriceText&&(priceText=nestedPriceText.textContent.trim())}else priceText=priceTextElement.textContent.trim()}}else priceText=el.closest(".block-swatch")?.querySelector(".price_box_inner").querySelector(".block_price_text")?.textContent.trim()||swatch.querySelector(".js-price")?.textContent.trim();if(swatch.classList.contains("is-membership-variant")){if(document.querySelector(".js-membership-subscription")){let valueCheck=document.querySelector(".js-membership-subscription").checked;tagular("ElementClicked",{actionOutcome:valueCheck?"SELECT":"UNSELECT",outboundUrl:null,webElement:{elementType:"Button",htmlId:null,location:"PDP - Product Options",name:"LP Insider",position:"4",text:null,variant:null}})}}else tagular("ElementClicked",{actionOutcome:"SELECT",outboundUrl:null,webElement:{elementType:"Button",htmlId:null,location:"PDP - Product Options",name:text,position:swatchPosition,text:`${text} ${priceText}`,variant:null}})})}),setTimeout(function(){var checkboxes=document.querySelectorAll(".cbb-frequently-bought-selector-input");checkboxes.forEach(function(checkbox,index){checkbox.addEventListener("change",function(){var isChecked=checkbox.checked,swatch=checkbox.closest("li"),titleElement=swatch.querySelector("h3")||null,guidebookTitle=titleElement?titleElement.innerText.trim():null;tagular("ElementClicked",{actionOutcome:isChecked?"CHECK":"UNCHECK",outboundUrl:null,webElement:{elementType:"Checkbox",htmlId:null,location:"PDP Product Recs",name:guidebookTitle,position:(index+1).toString(),text:null,variant:null}})})})},2500),setTimeout(function(){document.querySelectorAll(".cbb-recommendations-variant-select").forEach((dropdown,index)=>{dropdown.addEventListener("change",function(){const titleElement=dropdown.closest("li").querySelector("h3"),guidebookTitle=titleElement?titleElement.innerText.trim():null,selectedOption=dropdown.options[dropdown.selectedIndex],variantText=selectedOption?selectedOption.textContent.trim():null;tagular("ElementClicked",{actionOutcome:"SELECT",outboundUrl:null,webElement:{elementType:"Dropdown",htmlId:null,location:"PDP Product Recs",name:`${guidebookTitle} - ${variantText}`,position:(index+1).toString(),text:null,variant:null}})})})},2500),document.querySelectorAll(".js-zoom-image").forEach(mainImage=>{mainImage&&mainImage.addEventListener("click",function(){tagular("ElementClicked",{actionOutcome:"POPUP",outboundUrl:null,webElement:{elementType:"Image",htmlId:null,location:"PDP - Image Gallery",name:"Main Gallery",position:null,text:null,variant:null}})})});{let membershipSwatchMain=document.querySelector(".membership_swatch_main summary");membershipSwatchMain&&membershipSwatchMain.addEventListener("click",function(){let detailsEl=membershipSwatchMain.closest("details"),actionOutcome=detailsEl&&detailsEl.hasAttribute("open")?"COLLAPSE":"EXPAND";tagular("ElementClicked",{actionOutcome,outboundUrl:null,webElement:{elementType:"Button",htmlId:null,location:"PDP - Product Options",name:"LP Insider",position:"4",text:null,variant:null}})})} 2//# sourceMappingURL=/cdn/shop/t/449/assets/productpage-customer-events.js.map?v=127040970734592989851790107411
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.