PageSourceSearch

https://www.skinnydiplondon.com/cdn/shop/t/914/assets/quick-buy-modal.js?v=176408928849317300211787651064

js skinnydiplondon.com collected 2026-09-24 08:44:04 UTC 3,965 bytes, 2 lines download raw bytes

1class QuickBuyModal extends window.BAO.CustomElement(){setupListeners(){super.setupListeners(),this.handleClose=this.handleClose.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleModalClick=this.handleModalClick.bind(this),this.listeners.add(document,"keydown",this.handleKeyDown),this.listeners.add(this,"click",this.handleModalClick),this.els?.close?.elements?.forEach(close=>{this.listeners.add(close,"click",this.handleClose)})}get isOpen(){return this.getAttribute("aria-hidden")==="false"}show(){this.activeTrigger=document.activeElement,document.body.classList.toggle("util-SiteOverflowed",!0),this.setAttribute("aria-hidden","false"),this.focusFirstElement()}handleModalClick(event){event.target.closest("[data-drawers-trigger], [data-drawers-close], [data-drawers-close-all], [data-drawers-back-key]")||event.stopPropagation()}handleClose(){this.setAttribute("aria-hidden","true"),document.body.classList.contains("util-Search-open")||document.body.classList.toggle("util-SiteOverflowed",!1),this.returnFocus()}focusFirstElement(){setTimeout(()=>{const focusTarget=this.querySelector('button[data-quick-buy-modal-el="close"]')||this.getFocusableElements()[0];focusTarget&&focusTarget.focus()},350)}returnFocus(){this.activeTrigger&&(this.activeTrigger.focus(),this.activeTrigger=null)}handleKeyDown(event){if(this.isOpen){if(event.key==="Escape"){this.handleClose();return}event.key==="Tab"&&this.trapFocus(event)}}trapFocus(event){const focusableEls=this.getFocusableElements();if(!focusableEls.length)return;const firstFocusableEl=focusableEls[0],lastFocusableEl=focusableEls[focusableEls.length-1];if(!this.contains(document.activeElement)){event.preventDefault(),firstFocusableEl.focu
1s();return}event.shiftKey&&document.activeElement===firstFocusableEl?(event.preventDefault(),lastFocusableEl.focus()):!event.shiftKey&&document.activeElement===lastFocusableEl&&(event.preventDefault(),firstFocusableEl.focus())}getFocusableElements(){return Array.from(this.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="email"]:not([disabled]), input[type="tel"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])')).filter(el=>!el.closest("[hidden]")&&el.getClientRects().length>0)}}customElements.get("quick-buy-modal")||customElements.define("quick-buy-modal",QuickBuyModal);class QuickBuyModalForm extends window.BAO.CustomElement(){connectedCallback(){super.connectedCallback()}setupListeners(){this.formEl.dataset.zakekeProduct==="true"?(this.handleZakekeProduct=this.handleZakekeProduct.bind(this),this.listeners.add(this.submitBtnEl,"click",this.handleZakekeProduct)):(this.closeModal=this.closeModal.bind(this),window.BAO.eventBus.addEventListener(window.BAO.EVENTS.PUSH_CART.BEFORE_ADD_FROM_FORM,this.closeModal))}closeModal(et){this.modalEl?.handleClose();const cartEvent=new CustomEvent("quickBuy:added");document.dispatchEvent(cartEvent)}handleZakekeProduct(evt){evt.preventDefault(),evt.stopPropagation();const pid=this.formEl.querySelector('input[name="zakeke-product-id"]').value,originalAction=this.formEl.action;this.formEl.action=`${window.zakekeUrl||"/apps/zakeke"}?pid=${pid}`,window.onpageshow=function(event){event.persisted&&(this.formEl.action=originalAction)},this.formEl.submit()}get modalEl(){return this.externalEls?.modal?.element}get formEl(){return this.els?.form?.element}get submitBtnEl(){return this.els?.button?.element}get optionChoicesEl(){return this.containerEl?.querySelector('[data-product-variant-dropdown-external-el="option-choice"]')}get containerEl(){return this.closest('[data-product-variant-dropdown-external-el="container"]')}}customElements.get("quick-buy-modal-form")||customElements.define("quick-buy-modal-form",QuickBuyModalForm);
2//# sourceMappingURL=/cdn/shop/t/914/assets/quick-buy-modal.js.map?v=176408928849317300211787651064

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.