PageSourceSearch

https://diamondeternity.store/cdn/shop/t/43/assets/global.js?v=15226143933268075711783667790

js diamondeternity.store collected 2026-10-04 02:39:55 UTC 20,762 bytes, 2 lines download raw bytes

1"use-strict";var BlsLazyloadImg=(function(){return{init:function(){this.lazyReady()},lazyReady:function(){if(window.IntersectionObserver){let observer=new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{if(entry.isIntersecting){const onImageLoad=e=>{const target=e.currentTarget;setTimeout(()=>{target?.closest("motion-element")?.classList.remove("bls-loading-image"),target?.classList.remove("bls-loading-image")},600),e.currentTarget.removeEventListener("load",onImageLoad)};entry.target.width=entry.boundingClientRect.width,entry.target.height=entry.boundingClientRect.height,entry.target.sizes=`${entry.boundingClientRect.width}px`,entry.target.addEventListener("load",onImageLoad),observer2.unobserve(entry.target)}})},{rootMargin:"10px"});document.querySelectorAll(".bls-image-js img").forEach(img=>{observer.observe(img)})}}}})();BlsLazyloadImg.init();function CloseAllPopup(data){publish("closeCanvas",data)}const imageReady=imageOrArray=>imageOrArray?(imageOrArray=imageOrArray instanceof Element?[imageOrArray]:Array.from(imageOrArray),Promise.all(imageOrArray.map(image=>new Promise(resolve=>{image.tagName==="IMG"&&image.complete||!image.offsetParent?setTimeout(()=>{image.closest("motion-element")?.classList.remove("bls-loading-image"),image.classList.remove("bls-loading-image"),resolve()},100):image.addEventListener("load",e=>{e.currentTarget.closest("motion-element")?.classList.remove("bls-loading-image"),e.currentTarget.classList.remove("bls-loading-image"),resolve()})})))):Promise.resolve();function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}class SlideSection extends HTMLElement{constructor(){super(),this.globalSlide=null,this.init()}init(){document.body.classList.contains("index")?window.pageYOffset>0||document.body.classList.contains("swiper-lazy")?this.initSlide():this.classList.contains("lazy-loading-swiper-before")?this.initSlide():this.classList.add("lazy-loading-swiper-after"):this.initSlide()}initSlide(){const _this=this;var autoplaying=_this?.dataset.autoplay==="true";const loop=_this?.dataset.loop==="true",itemDesktop=_this?.dataset.desktop?_this?.dataset.desktop:4;var itemTablet=_this?.dataset.tablet?_this?.dataset.tablet:"";const itemMobile=_this?.dataset.mobile?_this?.dataset.mobile:1,direction=_this?.dataset.direction?_this?.dataset.direction:"horizontal";var autoplaySpeed=_this?.dataset.autoplaySpeed?_this?.dataset.autoplaySpeed*1e3:3e3,speed=_this?.dataset.speed?_this?.dataset.speed:400;const effect=_this?.dataset.effect?_this?.dataset.effect:"slide",row=_this?.dataset.row?_this?.dataset.row:1;var spacing=_this?.dataset.spacing?_this?.dataset.spacing:30;const progressbar=_this?.dataset.paginationProgressbar==="true",autoItem=_this?.dataset.itemMobile==="true",autoHeight=_this?.dataset.autoHeight==="true",paginationCustom=_this?.dataset.customPagination,slideShow=_this?.dataset.slideshow==="true",revealSlideshow=_this?.dataset.revealSlideshow==="true",customNavigation=_this?.dataset.customNavigation==="true",customPrev=_this?.dataset.customPrev,customNext=_this?.dataset.customNext,arrowCenterimage=_this?.dataset.arrowCenterimage?_this?.dataset.arrowCenterimage:0;spacing=Number(spacing),autoplaySpeed=Number(autoplaySpeed),speed=Number(speed),autoplaying&&(autoplaying={delay:autoplaySpeed}),itemTablet||(itemDesktop<2?itemTablet=1:itemDesktop<3?itemTablet=2:itemTablet=3),direction=="vertical"&&(_this.style.maxHeight=_this.offsetHeight+"px"),this.globalSlide=new Swiper(_this,{slidesPerView:autoItem?"auto":itemMobile,spaceBetween:spacing>=15?15:spacing,autoplay:autoplaying,direction,loop,effect,autoHeight,speed,watchSlidesProgress:!0,watchSlidesVisibility:!0,centeredSlides:!1,grabCursor:!0,grid:{rows:row,fill:"row"},navigation:{nextEl:customNavigation?document.querySelector(`.${customNext}`):_this.querySelector(".swiper-button-next"),prevEl:customNavigation?document.querySelector(`.${customPrev}`):_this.querySelector(".swiper-button-prev")},pagination:{clickable:!0,el:paginationCustom==null?_this.querySelector(".parent-pagination")||_this.querySelector(".swiper-pagination"):_this.querySelector(`.${paginationCustom}`),type:progressbar?"progressbar":"bullets"},breakpoints:{768:{slidesPerView:itemTablet,spaceBetween:spacing>=30?30:spacing,type:progressbar?"progressbar":"bullets",autoHeight:!1,centeredSlides:!1},1025:{slidesPerView:itemDesktop,spaceBetween:spacing,type:progressbar?"progressbar":"bullets",autoHeight:!1,centeredSlides:!!(slideShow&&itemDesktop==1.5)}},thumbs:{swiper:this.thumbnailSlide?this.thumbnailSlide:null},on:{init:function(e){var sec__tiktok=_this.closest(".sec__tiktok-video");if(e.autoplay.stop(),_this?.dataset.autoplay==="true"&&Motion.inView(_this,async()=>{e.autoplay.start()},{margin:"0px 0px -50px 0px"}),sec__tiktok&&(_this.initSecTiktok(sec__tiktok),window.addEventListener("resize",function(){setTimeout(()=>{_this.initSecTiktok(sec__tiktok)},150)})),arrowCenterimage){var items_slide=_this.querySelectorAll(".product-item__media--ratio");if(items_slide.length!=0){var oH=[];items_slide.forEach(e2=>{oH.push(e2.offsetHeight/2)});var max=Math.max(...oH),arrowsOffset="--arrows-offset-top: "+max+"px";_this.querySelectorAll(".swiper-arrow")&&_this.querySelectorAll(".swiper-arrow").forEach(arrow=>{arrow.setAttribute("style",arrowsOffset)})}}var video=_this.querySelector("video.slideshow");if(video){const handleIntersection=(entries,observer)=>{if(!entries[0].isIntersecting)return;observer.unobserve(_this),_this.querySelectorAll("video").forEach(video2=>{const dataSrc=video2.dataset.src;dataSrc&&(video2.src=dataSrc,video2.removeAttribute("data-src"))})};new IntersectionObserver(handleIntersection.bind(_this),{rootMargin:"0px 0px 200px 0px"}).observe(_this)}},slideChange:function(){const index_currentSlide=this.realIndex+1;_this.closest(".sec__testimonials-single")&&(_this.closest(".sec__testimonials-single").querySelectorAll("single-item").forEach(dot=>{dot.classList.remove("active")}),_this.closest(".sec__testimonials-single").querySelector(".testimonials-author-image[data-position='"+index_currentSlide+"']").classList.add("active"))},slideChangeTransitionStart:function(){if(!slideShow)return;this.slides[this.activeIndex].querySelectorAll("motion-element").forEach(async motion=>{await motion.preInitialize()})},slideChangeTransitionEnd:function(){if(!slideShow)return;this.slides[this.activeIndex].querySelectorAll("motion-element").forEach(async motion=>{motion.classList.remove("animate-delay"),await motion.initialize()})},afterInit:function(){slideShow&&revealSlideshow&&itemDesktop<=3&&_this.duplicateSlides(this)},touchMove:function(swiper,event){const innerWidth=event.view.innerWidth,swiperMedia=swiper.el.classList.contains("swiper-popup-media"),slidePopup=document.querySelector("slide-section-popup");slidePopup&&swiperMedia&&innerWidth>767&&(slidePopup.swiper.allowTouchMove=!1,slidePopup.swiper.unsetGrabCursor(
1))},touchEnd:function(swiper,event){const innerWidth=event.view.innerWidth,swiperMedia=swiper.el.classList.contains("swiper-popup-media"),slidePopup=document.querySelector("slide-section-popup");swiperMedia&&slidePopup&&innerWidth>767&&(slidePopup.swiper.allowTouchMove=!0,slidePopup.swiper.setGrabCursor())}}})}duplicateSlides(swiper){const _this=this,swiperWrapper=_this.querySelector(".swiper-wrapper"),originalSlides=swiperWrapper.querySelectorAll(".swiper-slide"),paginationEl=_this.querySelector(".swiper-pagination");if(paginationEl){const observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.type==="childList"&&mutation.addedNodes.forEach(node=>{if(node.nodeType===1&&node.classList.contains("swiper-pagination-bullet")){const allBullets=paginationEl.querySelectorAll(".swiper-pagination-bullet");Array.from(allBullets).indexOf(node)>=originalSlides.length&&node.classList.add("swiper-pagination-duplicate")}})}),observer.disconnect()});observer.observe(paginationEl,{childList:!0})}originalSlides.forEach(sli
1de=>{const clonedSlide=slide.cloneNode(!0);clonedSlide.classList.add("swiper-slide-duplicate"),swiperWrapper.appendChild(clonedSlide)}),swiper.update()}initSecTiktok(sec){sec.querySelectorAll(".swiper-slide").forEach(arrow=>{const tiktok=arrow.querySelector(".section_tiktok-image");let width="--item-width: "+arrow.offsetWidth;tiktok.setAttribute("style",width)})}}customElements.define("slide-section",SlideSection);class PopupBase extends HTMLElement{constructor(){super(),this.customClass=this.dataset.customClass,this.modal=null}initPopup(content,text,customClass,modalWidth){const _this=this;this.modal=new tingle.modal({footer:!1,stickyFooter:!1,closeMethods:["overlay","button","escape"],cssClass:[this.customClass||customClass],onOpen:function(){const modalBoxContent=this.modal.querySelector(".tingle-modal-box");modalWidth&&modalBoxContent.style.setProperty("--popup-max-width",modalWidth),document.dispatchEvent(new CustomEvent("modal:opened")),document.documentElement.classList.add("open-popup"),root.style.setProperty("padding-right",getScrollBarWidth.init()+"px");const video=this.modalBox.querySelector("video");video&&(video.play(),this.modal.classList.contains("shopable-video")&&(video.muted=!1))},onClose:function(){document.dispatchEvent(new CustomEvent("modal:closed")),document.documentElement.classList.remove("open-popup"),root.style.removeProperty("padding-right")},beforeClose:function(){return _this.onCloseEvent(),document.documentElement.classList.remove("open-popup"),root.style.removeProperty("padding-right"),!0}}),this.modal.setHeader=function(content2){let popup_content=this.modalBoxContent,popup_header=document.createElement("div");popup_header.classList.add("tingle-modal-box__header"),popup_header.innerHTML=content2,popup_content.parentNode.insertBefore(popup_header,popup_content)},text&&this.modal.setHeader(text),this.modal.setContent(content),this.modal.open()}onClose(){this.modal.close()}onCloseEvent(){}}class SwatchInit extends HTMLElement{constructor(){super(),this.options=null,this.init()}init(){const _this=this;this.querySelectorAll(".product__color-swatches--js").forEach(btn=>{_this.checkSwatches(btn)})}checkSwatches(e){const{color,image,customValue,swatchType,optionSwatchValue}=e.dataset;color&&(swatchType!="variant_images"?optionSwatchValue.length==0||optionSwatchValue==null?this.checkColor(color)?(e.style.backgroundColor=color,e.classList.add(customValue)):(e.classList.add(customValue),image&&(e.classList.add("color__"+color.replace(" ","-")),e.style.backgroundColor=null,e.style.backgroundImage="url('"+image+"')",e.style.backgroundSize="cover",e.style.backgroundRepeat="no-repeat")):e.style.setProperty("--swatch--background",optionSwatchValue):optionSwatchValue==null||optionSwatchValue.length==0?image?(e.classList.add("color__"+color.replace(" ","-")),e.style.backgroundColor=null,e.style.backgroundImage="url('"+image+"')",e.style.backgroundSize="cover",e.style.backgroundRepeat="no-repeat"):(this.checkColor(color)&&(e.style.backgroundColor=color),e.classList.add(customValue)):e.style.setProperty("--swatch--background",optionSwatchValue))}checkColor(strColor){var s=new Option().style;return s.color=strColor,s.color==strColor}updateOptions(){this.options=Array.from(this.querySelectorAll(".product__color-swatches--js.active"),select=>select.getAttribute("data-value")),this.variantData.find(variant=>{this.options.length==1&&{1:variant.option1,2:variant.option2,3:variant.option3}[this.position_swatch]===this.options[0]&&(this.options=variant.options)})}updateMasterId(variantData){return this.currentVariant=variantData.find(variant=>!variant.options.map((option,index)=>this.options[index]===option).includes(!1))}}class DeferredMedia extends HTMLElement{constructor(){super();const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&poster.addEventListener("click",this.loadContent.bind(this))}loadContent(focus=!0){if(pauseAllMedia(),!this.getAttribute("loaded")){const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"));focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}}}function handleErrorMessagePopup(errorMessage=!1){const url=`${window.location.pathname}?section_id=form-message`;fetch(url).then(response=>response.text()).then(responseText=>{const elementErrorMessage=new DOMParser().parseFromString(responseText,"text/html").querySelector(".product-form__error-message-wrapper"),elementMessage=elementErrorMessage.querySelector(".product-form__error-message");elementMessage.textContent=errorMessage,showToast(elementErrorMessage.innerHTML,5e3,"modal-error")}).catch(e=>{throw e})}function showToast(message,duration=3e3,customClass=""){let toastContainer=document.getElementById("toast-container");toastContainer||(toastContainer=document.createElement("div"),toastContainer.id="toast-container",document.body.appendChild(toastContainer));const toast=document.createElement("div");toast.className=`toast show ${customClass}`,toast.innerHTML=message,toastContainer.appendChild(toast),Motion.animate(toast,{opacity:[0,1],scale:[.3,1]},{duration:.3,easing:"ease-out"}),setTimeout(()=>{closeToast(toast)},duration)}function closeToast(toast){Motion.animate(toast,{opacity:0,scale:.5},{duration:.2,easing:"ease-in"}).then(()=>{toast.remove()})}class SlideLazyLoad{constructor(e){this.triggerEventsJs=e,this.eventOptionsJs={passive:!0},this.userEventListenerJs=this.triggerListenerJs.bind(this),this.delayedScriptsJs={normal:[],async:[],defer:[]}}triggerListenerJs(){this._removeUserInteractionListenerJs(this),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this._loadEverythingReadyNow.bind(this)):this._loadEverythingReadyNow()}
1_removeUserInteractionListenerJs(e){this.triggerEventsJs.forEach(t=>window.removeEventListener(t,e.userEventListenerJs,e.eventOptionsJs))}_addUserInteractionListenerJs(e){this.triggerEventsJs.forEach(t=>window.addEventListener(t,e.userEventListenerJs,e.eventOptionsJs))}_preloadAllScriptsJs(){document.body.classList.add("swiper-lazy"),document.body.classList.add("review-lazy"),document.querySelectorAll(".lazy-loading-swiper-after").forEach(el=>{el.classList.remove("lazy-loading-swiper-after"),this.initSlide(el)}),document.querySelectorAll(".review-product-added").forEach(el=>{el.classList.remove("review-product-added"),el.innerHTML=el.querySelector(".product-review-json").innerHTML,el.classList.remove("inline-loading")})}initSlide(el){const _this=el;var autoplaying=_this?.dataset.autoplay==="true";const loop=_this?.dataset.loop==="true",itemDesktop=_this?.dataset.desktop?_this?.dataset.desktop:4;var itemTablet=_this?.dataset.tablet?_this?.dataset.tablet:"";const itemMobile=_this?.dataset.mobile?_this?.dataset.mobile:1,direction=_this?.dataset.direction?_this?.dataset.direction:"horizontal";var autoplaySpeed=_this?.dataset.autoplaySpeed?_this?.dataset.autoplaySpeed*1e3:3e3,speed=_this?.dataset.speed?_this?.dataset.speed:400;const effect=_this?.dataset.effect?_this?.dataset.effect:"slide",row=_this?.dataset.row?_this?.dataset.row:1;var spacing=_this?.dataset.spacing?_this?.dataset.spacing:30;const progressbar=_this?.dataset.paginationProgressbar==="true",autoItem=_this?.dataset.itemMobile==="true",arrowCenterimage=_this?.dataset.arrowCenterimage?_this?.dataset.arrowCenterimage:0;spacing=Number(spacing),autoplaySpeed=Number(autoplaySpeed),speed=Number(speed),autoplaying&&(autoplaying={delay:autoplaySpeed}),itemTablet||(itemDesktop<2?itemTablet=1:itemDesktop<3?itemTablet=2:itemTablet=3),direction=="vertical"&&(_this.style.maxHeight=_this.offsetHeight+"px"),_this.globalSlide=new Swiper(el,{slidesPerView:autoItem?"auto":itemMobile,spaceBetween:spacing>=15?15:spacing,autoplay:autoplaying,direction,loop,effect,speed,watchSlidesProgress:!0,watchSlidesVisibility:!0,grid:{rows:row,fill:"row"},navigation:{nextEl:_this.querySelector(".swiper-button-next"),prevEl:_this.querySelector(".swiper-button-prev")},pagination:{clickable:!0,el:_this.querySelector(".parent-pagination")||_this.querySelector(".swiper-pagination"),type:progressbar?"progressbar":"bullets"},breakpoints:{768:{slidesPerView:itemTablet,spaceBetween:spacing>=30?30:spacing,pagination:{type:progressbar?"progressbar":"bullets"}},1025:{slidesPerView:itemDesktop,spaceBetween:spacing,pagination:{type:progressbar?"progressbar":"bullets"}}},thumbs:{swiper:this.thumbnailSlide?this.thumbnailSlide:null},on:{init:function(e){e.autoplay.stop(),_this?.dataset.autoplay==="true"&&Motion.inView(_this,async()=>{e.autoplay.start()},{margin:"0px 0px -50px 0px"});var sec__tiktok=_this.closest(".sec__tiktok-video");if(sec__tiktok&&(_this.initSecTiktok(sec__tiktok),window.addEventListener("resize",function(){setTimeout(()=>{_this.initSecTiktok(sec__tiktok)},150)})),arrowCenterimage){var items_slide=_this.querySelectorAll(".product-item__media--ratio");if(items_slide.length!=0){var oH=[];items_slide.forEach(e2=>{oH.push(e2.offsetHeight/2)});var max=Math.max(...oH),arrowsOffset="--arrows-offset-top: "+max+"px";_this.querySelectorAll(".swiper-arrow")&&_this.querySelectorAll(".swiper-arrow").forEach(arrow=>{arrow.setAttribute("style",arrowsOffset)})}}},realIndexChange:function(swiper){var slide_visibles=_this.querySelectorAll(".swiper-slide motion-element:not([data-image])");slide_visibles?.forEach(slide=>{slide.hasAttribute("hold")||slide?.setAttribute("hold",!0)})},slideChange:function(){const index_currentSlide=this.realIndex+1;_this.closest(".sec__testimonials-single")&&(_this.closest(".sec__testimonials-single").querySelectorAll("single-item").forEach(dot=>{dot.classList.remove("active")}),_this.closest(".sec__testimonials-single").querySelector(".testimonials-author-image[data-position='"+index_currentSlide+"']").classList.add("active"))}}})}async _loadEverythingReadyNow(){this._preloadAllScriptsJs(),await this._loadScriptsFromListJs(this.delayedScriptsJs.normal),await this._loadScriptsFromListJs(this.delayedScriptsJs.defer),await this._loadScriptsFromListJs(this.delayedScriptsJs.async),await this._triggerDOMContentLoadedJs(),await this._triggerWindowLoadJs(),window.dispatchEvent(new Event("glozinspeed-allScriptsLoaded"))}async _loadScriptsFromListJs(e){const t=e.shift();return t?(await this._transformScript(t),this._loadScriptsFromListJs(e)):Promise.resolve()}
1async _transformScript(e){return await this._requestAnimFrame(),new Promise(t=>{const s=document.createElement("script");let n;[...e.attributes].forEach(e2=>{let t2=e2.nodeName;t2!=="type"&&(t2==="data-glozinlazy-type"&&(t2="type",n=e2.nodeValue),s.setAttribute(t2,e2.nodeValue))}),e.hasAttribute("src")?(s.addEventListener("load",t),s.addEventListener("error",t)):(s.text=e.text,t()),e.parentNode.replaceChild(s,e)})}async _triggerDOMContentLoadedJs(){this.domReadyFired=!0,await this._requestAnimFrame(),document.dispatchEvent(new Event("glozinspeed-DOMContentLoaded")),await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-DOMContentLoaded")),await this._requestAnimFrame(),document.dispatchEvent(new Event("glozinspeed-readystatechange")),await this._requestAnimFrame(),document.glozinonreadystatechange&&document.glozinonreadystatechange()}async _triggerWindowLoadJs(){await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-load")),await this._requestAnimFrame(),window.glozinonload&&window.glozinonload(),await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-pageshow")),await this._requestAnimFrame(),window.glozinonpageshow&&window.glozinonpageshow()}async _requestAnimFrame(){return new Promise(e=>requestAnimationFrame(e))}static run(){const e=new SlideLazyLoad(["keydown","mousemove","touchmove","touchstart","touchend","wheel"]);e._addUserInteractionListenerJs(e)}}SlideLazyLoad.run();class CopyButton extends HTMLElement{constructor(){super(),this.content=this.dataset.content,this.init()}init(){this.content&&this.addEventListener("click",this.onClick.bind(this))}onClick(){navigator.clipboard.writeText(this.content),this.classList.add("copied")}updateUrl(newContent){this.content=newContent}}customElements.define("copy-button",CopyButton);
2//# sourceMappingURL=/cdn/shop/t/43/assets/global.js.map?v=15226143933268075711783667790

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.