PageSourceSearch

https://dz.diesel.com/on/demandware.static/Sites-DieselWW-Site/-/e…/js/component-GiftcardMessage.chunks.js

js diesel.com collected 2026-09-24 08:42:52 UTC 2,965 bytes, 1 lines download raw bytes

1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[6205],{9542:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var a=i(12737);const c=i(10948).default,n="giftcardRecipientName",s="giftcardRecipientEmail",r="giftcardRecipientMessage";class o extends c{constructor(e){super(e),a.Z.on("giftcard:init",(e=>this.initGiftCardMessage(e.element)))}buttonsEventHandler(){this.closeButtonModal=this.element.querySelector(".js-side-panel__close-modal-panel[data-panel-close]"),this.closeButton=this.closeButtonModal,this.element.querySelector(".js-side-panel-close")&&this.element.querySelector(".js-side-panel-close").addEventListener("click",this.close.bind(this),{once:!0}),this.element.querySelector("[data-close]")&&this.element.querySelector("[data-close]").addEventListener("click",this.close.bind(this),{once:!0})}initGiftCardMessage(e){this.form=this.element.querySelector("form.giftcard__message-form"),this.giftcardRecipientName=this.element.querySelector("input[name$=".concat(n,"]")),this.giftcardRecipientEmail=this.element.querySelector("input[name$=".concat(s,"]")),this.giftcardMessage=this.element.querySelector("textarea[name$=".concat(r,"]")),this.addToCartForm=e,this.form.addEventListener("submit",(e=>{if(e.preventDefault(),e.currentTarget.checkValidity()){this.createFields();const e=document.querySelector('[data-component="AddToCart"]');
1e&&e.componentInstance&&(a.Z.emit("body:loading"),e.componentInstance.submitHandler())}}))}isValid(){return this.form.checkValidity()}createFields(){if(!(document.querySelector("#maincontent").dataset.action.indexOf("Search-Show")>=0)){if(this.giftcardRecipientName||(this.giftcardRecipientName=this.element.querySelector(".giftcard-input_name")),this.giftcardRecipientEmail||(this.giftcardRecipientEmail=this.element.querySelector(".giftcard-input_email")),this.giftcardMessage||(this.giftcardMessage=this.element.querySelector(".giftcard-input_message")),this.addToCartForm.querySelector('input[name="'.concat(n,'"]'))||this.giftcardRecipientName)this.addToCartForm.querySelector('input[name="'.concat(n,'"]')).value=this.giftcardRecipientName.value;else{const e=document.createElement("input");e.type="hidden",e.value=this.giftcardRecipientName.value,e.name=n,this.addToCartForm.appendChild(e)}if(this.addToCartForm.querySelector('input[name="'.concat(s,'"]'))||this.giftcardRecipientEmail)this.addToCartForm.querySelector('input[name="'.concat(s,'"]')).value=this.giftcardRecipientEmail.value;else{const e=document.createElement("input");e.type="hidden",e.value=this.giftcardRecipientEmail.value,e.name=s,this.addToCartForm.appendChild(e)}if(this.addToCartForm.querySelector('input[name="'.concat(r,'"]'))||this.giftcardMessage)this.addToCartForm.querySelector('input[name="'.concat(r,'"]')).value=this.giftcardMessage.value;else{const e=document.createElement("input");e.type="hidden",e.value=this.giftcardMessage.value,e.name=r,this.addToCartForm.appendChild(e)}this.close()}}}}}]);

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.