1"use strict";(self.webpackChunksocialUX=self.webpackChunksocialUX||[]).push([[4842],{1821:function(t,e,n){function i(t){const e=document.createElement("template");return e.innerHTML=t,{template:e,getElement(){return e.content.cloneNode(!0).firstElementChild}}}n.d(e,{A:function(){return i}})},4414:function(t,e){e.A=(t,e)=>t.parentNode.insertBefore(e,t)},5315:function(t,e,n){n.d(e,{A:function(){return o}});var i=n(4414);function o(t,e){(0,i.A)(t,e),e.appendChild(t)}},4842:function(t,e,n){n.r(e),n.d(e,{default:function(){return m}});var i=n(1821);const o=t=>(0,i.A)(`\n <div class="dots-container" style="${t.style}">\n <div class="product-dot-cont">\n <div class="product-dot">\n <div class="details-container hidden desktop">\n <div class="description-container">\n <p class="dots-container__title">${t.title}</p>\n <img src="${t.thumbnail}" class="dots-container__image" />\n <p class="dots-container__price">${t.price}</p>\n </div>\n <div class="info-container">\n <a class="dots-container__link" href="${t.href}" target="_blank">"${t.buyCaption}"</a>\n </div>\n </div>\n <div class="details-container hidden mobile">\n <div class="description-container">\n <img src="${t.thumbnail}" class="dots-container__image" />\n <p class="dots-container__title">${t.title}</p>\n </div>\n <div class="info-container">\n <p class="dots-container__price">${t.price}</p>\n <a class="dots-container__link" href="${t.href}" target="_blank">"${t.buyCaption}"</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n`).getElement();var c=n(5315),l=n(3989);function a(t){let e=document.createElement("div"),n=document.createElement("button"),i=document.createElement("button");return e.className="product-image-container",i.className="hide-products hidden",i.appendChild(document.createTextNode(t&&t.hideProductsCaption?t.hideProductsCaption:"TAP TO HIDE PRODUCTS")),n.className="view-products",n.appendChild(document.createTextNode(t&&t.viewProductsCaption?t.viewProductsCaption:"TAP TO VIEW PRODUCTS")),{productContainer:e,hideButton:i,showButton:n}}function r(t,e){let n=e.productContainer;(0,c.A)(t.closest(".share-tab-img")||t,n),n.appendChild(e.showButton),n.appendChild(e.hideButton)}function d(t,e,n){t.forEach((t=>{!function(t,e){let n=document.createElement("div");n.className="products-container hidden",t.forEach((t=>{n.appendChild(o(t))})),e.productContainer.appendChild(n)}(Array.from(t.querySelectorAll("area")).map((t=>{const[n,i]=(t.coords||"").split(",");return!(!n||!i)&&{style:`top: ${i}%; left: ${n}%;`,title:t.title,href:t.href,price:t.dataset.price,thumbnail:t.dataset.imageSrc,buyCaption:e}})).filter(Boolean),n)}))}function s(t){t.preventDefault(),t.currentTarget.parentNode.querySelectorAll(".products-container, .hide-products, .view-products, .share-media-panel").forEach((t=>{t.classList.toggle("hidden")}))}function u(t){t.productContainer.querySelectorAll(".details-container").forEach((t=>{t.classList.toggle("hidden",!0)}))}function p(t){t.showButton.addEventListener("click",s),t.hideButton.addEventListener("click",s),t.productContainer.querySelectorAll(".product-dot-cont").forEach((e=>{e.addEventListener("click",(e=>{let n=e.currentTarget,i="mobile"===(0,l.A)()?n.querySelector(".details-container.mobile"):n.querySelector(".details-container.desktop"),o=i.closest(".product-image-container"),c=i.classList.contains("hidden");if(u(t),i.classList.toggle("hidden",!c),c){let e=i.getBoundingClientRect(),c=o.getBoundingClientRect(),a=e.left+window.scrollX+i.clientWidth-80,r=c.left+window.scrollX+o.clientWidth,d=e.top+window.scrollY+i.clientHeight,s=c.top+window.scrollY+o.clientHeight;if("mobile"===(0,l.A)()){let e=n.querySelector(".details-container.mobile");e.style.top=(o.clientHeight-e.clientHeight)/2+"px",e.style.left=o.clientWidth-e.clientWidth+"px",window.addEventListener("scroll",(function(){u(t)}))}else if(e.left-c.left<i.clientWidth/2&&i.classList.add("left"),r-a<i.clientWidth/2&&i.classList.add("right"),s-d<-30){let t=-1*(i.clientHeight+36);i.classList.add("bottom"),i.style.top=`${t}px`}}else window.removeEventListener("scroll",u,!0)}))}))}function h(t){if(t.post.media_html.match(/<map/g)){const e=a(),n=document.querySelector(".widget__image");if(n.closest(".product-image-container"))return;r(n,e),function(t,e,n){const i=document.createElement("div");i.innerHTML=e,d(i.querySelectorAll("map"),t.closest("article").dataset.buyCaption||"Buy",n)}(n,t.post.media_html,e),p(e)}}function m(t,e){if(!e.querySelectorAll(".product-image-container").length)if(e.useMap){const t=a(e.closest("article").dataset);r(e,t),function(t,e){const n=(t.useMap||"").replace(/^#/,"");d(document.querySelectorAll(`map[name="${n}"]`),t.closest("article").dataset.buyCaption||"Buy",e)}(e,t),p(t)}else REBELMOUSE_STDLIB.getBootstrap().then(h)}}}]); 2//# sourceMappingURL=4842.60c4dffef0fc43b08578.bundle.mjs.map
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.