PageSourceSearch

https://www.debeers.com/on/demandware.static/Sites-DeBeersInternat…/v1790175681219/js/checkoutReminderModal.js

js debeers.com collected 2026-09-24 09:55:01 UTC 3,648 bytes, 1 lines download raw bytes

1!function(){"use strict";var e={7264:function(e,t,o){const r=o(6012),i="chk_mod_tmp",s=e=>{"[object Object]"===Object.prototype.toString.call(e.data)&&e.data.modalUrl&&fetch(e.data.modalUrl).then(e=>e.json()).then(e=>self.postMessage(e))};e.exports=new class{constructor(){this.enabled=$("#COReminderModalEnabled").val(),this.modalUrl=$("#COReminderModalURL").val(),this.onResponseWorkerMessage=this.onResponseWorkerMessage.bind(this),this.init()}init(){this.enabled&&this.modalUrl&&window.Worker?(this.registerWebWorker(),this.getTimeoutFromPref(),this.getTimeoutFromStorage(),this.handleLocalStorageTimeout(),this.registerEvents()):localStorage.removeItem(i)}registerEvents(){$(document).on("COReminderModal:start",()=>{this.timeoutPointer&&clearTimeout(this.timeoutPointer),this.timeoutPointer=setTimeout(()=>{this.worker.postMessage({modalUrl:this.modalUrl})},this.timeoutPref),localStorage.setItem(i,Date.now())}),$(document).on("COReminderModal:finish",()=>{this.timeoutPointer&&clearTimeout(this.timeoutPointer),localStorage.removeItem(i)})}handleLocalStorageTimeout(){null!==this.timeoutStorage&&this.timeoutPref>=this.timeoutStorage?this.timeoutPointer=setTimeout(()=>{this.worker.postMessage({modalUrl:this.modalUrl})},this.timeoutPref-this.timeoutStorage):null!==this.timeoutStorage&&this.timeoutPref<this.timeoutStorage&&localStorage.removeItem(i)}registerWebWorker(){const e=new Blob(["self.onmessage = ",s.toString()],{type:"text/javascript"});this.worker=new Worker(URL.createObjectURL(e)),this.worker.onmessage=this.onResponseWorkerMessage}getTimeoutFromStorage(){const e=localStorage.getItem(i);if(e){const t=Date.now()-Number(e);this.timeoutStorage=t>=0?t:null}else this.timeoutStorage=null}getTimeoutFromPref(){const e=parseInt($("#COReminderModalTimeout").val(),10);this.timeoutPref=1e3*e}sliderSetup(){$("#coReminderModalSlick").slick({slidesToShow:1,slidesToScroll:1,dots:!0,arrows:!0,infinite:!0})}onResponseWorkerMessage(e){if(e.data&&"[object Object]"===Object.prototype.toString.call(e.data)){const{success:t,modalHTML:o}=e.data;if(!t||"string"!=typeof o)return;$("#coReminderModal").remove();const r=$.parseHTML(o.trim());$("body").append(r),this.sliderSetup(),this.trapFocus(),$("#coReminderModal").modal("show")}}trapFocus(e){$("body").on("keydown","#coReminderModal",function(e){var t={event:e,containerSelector:"#coReminderModal",firstElementSelector:".close",lastElementSelector:".reminder-modal__button"};r.setTabNextFocus(t)})}}},6012:function(e){e.exports={setTabNextFocus:function(e){var t,o;("Tab"===e.event.key||9===e.event.keyCode)&&(e.containerSelector instanceof jQuery&&e.firstElementSelector instanceof jQuery?(t=$(e.containerSelector).find(e.firstElementSelector),o=$(e.containerSelector).find(e.lastElementSelector)):(t=$
1(e.containerSelector+" "+e.firstElementSelector),o=$(e.containerSelector+" "+e.lastElementSelector)),e.containerSelector instanceof jQuery&&e.lastElementSelector instanceof jQuery&&e.nextToLastElementSelector instanceof jQuery?($(e.containerSelector).find(e.lastElementSelector).is(":disabled")||$(e.containerSelector).find(e.lastElementSelector).is(":hidden"))&&(o=$(e.containerSelector).find(e.nextToLastElementSelector)):($(e.containerSelector+" "+e.lastElementSelector).is(":disabled")||$(e.containerSelector+" "+e.lastElementSelector).is(":hidden"))&&(o=$(e.containerSelector+" "+e.nextToLastElementSelector)),e.event.shiftKey?$(":focus").is(t)&&(o.focus(),e.event.preventDefault()):$(":focus").is(o)&&(t.focus(),e.event.preventDefault()))}}}},t={};!function o(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,o),s.exports}(7264)}();

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.