1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2347],{20261:function(e,r,t){t.d(r,{$:function(){return s}});var o=t(32994),n=t(73192),i=t(44334),a=t(66704),l=t(67294);let d=e=>async(r,t)=>await (0,o.Nd)(e).jjkadvantageEmailValidationCreate(t,r,{}),s=e=>{var r;let{settings:t}=(0,n.Wq)(),o=(0,l.useMemo)(()=>[{storeId:null!==(r=t.storeId)&&void 0!==r?r:""},a.il],[t.storeId]),{data:s,trigger:c,isMutating:u,reset:p}=(0,i.Z)(o,async()=>d(!0)(e,t.storeId));return{emailResponseData:s,trigger:c,isMutating:u,reset:p}}},51155:function(e,r,t){t.d(r,{G:function(){return o},j:function(){return n}});let o={ERR_ADV_USER:"_ERR_ADVANTAGE_USER",ERR_ADV_TRIAL_USER:"_ERR_ADVANTAGE_TRIAL_USER",ERR_DIAMOND_USER:"_ERR_DIAMOND_USER"},n={ACTION_ADD_TO_CART:"addtocart",ACTION_LOGIN:"login"}},80213:function(e,r,t){t.d(r,{CV:function(){return i},GX:function(){return o},sj:function(){return n}});let o={"& .MuiDrawer-paper":{boxSizing:"border-box",width:"375px",padding:"24px 24px 24px",backgroundColor:"background.lightgray"},"& .MuiFormControlLabel-label":{fontSize:"12px",fontWeight:"400",color:"text.main"},"& #btn-wrapper":{"& .MuiButtonBase-root":{"& svg":{marginRight:".25rem"}}}},n={paddingBottom:"16px",borderBottom:"1px solid",borderColor:"border.grayDark",marginBottom:"24px","& h3":{color:"heading.dark"},"> span":{position:"absolute",top:"24px",right:"24px",cursor:"pointer","& svg":{color:"icons.fillcolor"}}},i={gap:"1.25rem","& > *":{flex:{xs:"auto",md:"1 !important"}},"& .MuiInputBase-root":{backgroundColor:"primary.contrastText","& input":{padding:"12.5px 14px",fontSize:"16px",color:"icons.fillcolor",height:"auto"},"& fieldset":{border:"1px solid",borderColor:"border.grayHover",borderRadius:"4px"}},"& .MuiFormHelperText-root":{color:"#fff !important",margin:"4px 0px 0 8px !important"},"& .MuiButtonBase-root":{mt:"3px",backgroundColor:"background.paper",color:"links.blue",maxHeight:"initial","&:hover":{backgroundColor:"background.paper"},"&:active":{backgroundColor:"background.paper"},"&.Mui-disabled":{backgroundColor:"border.grayDark",color:"button.disabledText"}}}},32347:function(e,r,t){t.r(r),t.d(r,{AdvantageMembershipFlyout:function(){return S}});var o=t(85893),n=t(15861),i=t(23795),a=t(58826),l=t(87357),d=t(98456),s=t(51233),c=t(86886),u=t(50135),p=t(11057),x=t(67294),m=t(50594),g=t(80213),h=t(64887),v=t(21937),b=t(12381),f=t(98824),E=t(50075),j=t(23390),k=t(99603),A=t
1(87072),C=t(47041),y=t(20261),R=t(26708),_=t(51155),I=t(59582),Z=t(79739);let S=e=>{var r,t,S,D;let{jjkDrawerOpen:B,setJJKDrawerOpen:T,advMembershipPartNumEspot:w,advMembershipContentEspotName:G,subscribedFromCheckout:N=!1}=e,M=(0,E.ql)("AdvantagePDP"),[F,z]=(0,x.useState)(!1),[V,W]=(0,x.useState)(!1),{addToCart:O}=(0,h.jD)(),[U,L]=(0,x.useState)(""),[H,P]=(0,x.useState)(!1),{data:q}=(0,f.fF)(w),{data:J,loading:$}=(0,f.fF)(G),X=q&&Array.isArray(q)?null===(r=q[0])||void 0===r?void 0:r.text:null,{product:Y}=(0,v.iB)({id:X}),K=G===I.mJ,Q=!!J&&null!=J&&null!==(t=J.at(0))&&void 0!==t&&!!t.text&&(null==J?void 0:null===(D=J.at(0))||void 0===D?void 0:null===(S=D.text)||void 0===S?void 0:S.includes("adv-member-checkbox")),ee=/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/,{user:er}=(0,R.aF)(),et=!!er&&(null==er?void 0:er.isLoggedIn),eo=er?null==er?void 0:er.email:null,{emailResponseData:en,trigger:ei,reset:ea}=(0,y.$)({program:K?"advantage":"advantage_trial",emailId:U}),el=(0,x.useCallback)(()=>{O(parseInt(X),"1",()=>{z(!0),T(!1)})},[O,X,"1",T,z]),ed=(0,x.useCallback)(e=>{e.stopPropagation(),ee.test(U)?(ei(),P(!1),T(!0)):P(!0)},[U,ei,P,T,ee]);return(0,x.useEffect)(()=>{en&&!en.errorExists&&el()},[en,el]),(0,x.useEffect)(()=>{et&&eo&&L(eo)},[et,eo]),(0,x.useEffect)(()=>{let e=null,r=setTimeout(()=>{var r;(e=null===(r=document)||void 0===r?void 0:r.querySelector("#adv-member-checkbox"))&&(null==e||e.addEventListener("click",()=>{var r;W(null!==(r=null==e?void 0:e.checked)&&void 0!==r&&r)}))},1e3);return B||W(!1),()=>{clearTimeout(r),e&&(null==e||e.removeEventListener("click",()=>{var r;W(null!==(r=null==e?void 0:e.checked)&&void 0!==r&&r)}))}},[B]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.ZP,{anchor:"right",open:B,sx:g.GX,children:(0,o.jsxs)(l.Z,{children:[(0,o.jsxs)(l.Z,{component:"div",sx:g.sj,children:[(0,o.jsx)(n.Z,{variant:"h3",children:M.JJKAdvantage.t()}),(0,o.jsx)(n.Z,{variant:"strong",component:"span",onClick:()=>{T(!1)},children:(0,o.jsx)(m.Z,{fontSize:"small"})})]}),(0,o.jsx)(l.Z,{children:$?(0,o.jsx)(d.Z,{sx:{color:"radio.burgundy",display:"block",margin:"0 auto"}}):(0,o.jsx)(o.Fragment,{children:J&&Array.isArray(J)?(0,o.jsx)(s.Z,{component:"div",children:(0,o.jsx)(n.Z,{variant:"body3Bold",sx:{fontWeight:"400",color:"#4A5055"},children:null==J?void 0:J.map(e=>(0,j.U)(e))})}):null})}),N?(0,o.jsx)(s.Z,{component:"div",id:"btn-wrapper",children:(0,o.jsx)(p.Z,{type:"submit",variant:"blue-outlined",size:"large","data-testid":"button-email-cancel",id:"button-email-cancel",onClick:()=>{K&&(0,C.deleteCookie)("addAdvNow"),T(!1)},sx:{backgroundColor:"transparent",lineHeight:"27px"},children:M.Close.t()})}):(0,o.jsxs)(s.Z,{component:"div",id:"btn-wrapper",children:[(0,o.jsx)(c.ZP,{container:!0,sx:g.CV,children:(0,o.jsx)(c.ZP,{item:!0,xs:12,md:12,children:(0,o.jsxs)(s.Z,{component:"form",noValidate:!0,children:[(0,o.jsx)(u.Z,{required:!0,type:"email",fullWidth:!0,id:"email",name:"email",autoComplete:"email",placeholder:M.Error.EnterEmail.t(),error:H,helperText:H?(0,o.jsx)("span",{style:{color:"#BE241E",fontFamily:"Inter"},children:M.Error.ValidEmail.t()}):null,value:U,onChange:e=>{let r=e.target.value;L(r),ee.test(r)&&P(!1),U||ea()}}),U&&(null==en?void 0:en.errorExists)===!0&&(null==en?void 0:en.errorCode)?(0,o.jsx)(l.Z,{children:(e=>{switch(e){case null===_.G||void 0===_.G?void 0:_.G.ERR_DIAMOND_USER:return(0,o.jsxs)(n.Z,{sx:{fontSize:"12px",fontWeight:"400",margin:"4px 0px 0 8px",color:"#BE241E !important",fontFamily:"Inter"},children:["Your account is currently associated with a different savings program. Please call a customer service representative at ",(0,o.jsx)(i.Z,{sx:{fontWeight:"600",color:"#BE241E !important",textDecoration:"underline"},href:"tel:1-877-564-2333",children:"1-877-564-2333"})," for more details."]});case null===_.G||void 0===_.G?void 0:_.G.ERR_ADV_USER:if((null==en?void 0:en.action)===_.j.ACTION_LOGIN)return(0,o.jsxs)(n.Z,{sx:{fontSize:"12px",fontWeight:"400",margin:"4px 0px 0 8px",color:"#BE241E !important",fontFamily:"Inter"},children:[M.Error.AlreadyAdvMembership.t(),(0,o.jsx)(i.Z,{sx:{fontWeight:"600",color:"#BE241E !important",textDecoration:"underline",fontFamily:"Inter"},href:"/login",children:M.SignIn.t()})]});return(0,o.jsxs)(n.Z,{sx:{fontSize:"12px",fontWeight:"400",margin:"4px 0px 0 8px",color:"#BE241E !important",fontFamily:"Inter"},children:[M.Error.AlreadyAdvMembership.t(),(0,o.jsx)(Z.Br,{sx:{fontSize:"12px",fontWeight:"600",padding:"0",color:"#BE241E !important",textDecoration:"underline",fontFamily:"Inter"},href:"/advantage/membership",children:M.ViewAccount.t()})]});case null===_.G||void 0===_.G?void 0:_.G.ERR_ADV_TRIAL_USER:if(!K)return(0,o.jsxs)(n.Z,{sx:{fontSize:"12px",fontWeight:"400",margin:"4px 0px 0 8px",color:"#BE241E !important",fontFamily:"Inter"},children:[M.Error.AlreadyHaveAdvMembershipTrial.t(),(0,o.jsx)("br",{}),(0,o.jsx)(Z.Br,{sx:{fontSize:"12px",fontWeight:"600",padding:"0",borderBottom:"1px solid",borderColor:"#BE241E",borderRadius:"0px",lineHeight:"normal",color:"#BE241E !important","&:hover":{textDecoration:"none"}},type:"link",variant:"link",onClick:()=>{T(!1)},href:"javascript:void(0);",children:M.Error.PurchaseAdvMembership.t()})]});default:return null}})(null==en?void 0:en.errorCode)}):null]})})}),(0,o.jsxs)(p.Z,{type:"submit",variant:"contained",size:"large","data-testid":"button-email-submit",id:"button-email-submit",disabled:!!Q&&!V,sx:{margin:"24px 0 16px 0",lineHeight:"27px"},onClick:ed,children:[(0,o.jsx)(k.G,{fontSize:"16px",icon:A.yYj}),M.AddToCart.t()]}),(0,o.jsx)(p.Z,{type:"submit",variant:"blue-outlined",size:"large","data-testid":"button-email-cancel",id:"button-email-cancel",onClick:()=>{K&&(0,C.deleteCookie)("addAdvNow"),T(!1)},sx:{backgroundColor:"transparent",lineHeight:"27px"},children:M.NoThanks.t()})]})]})}),N?null:(0,o.jsx)(b.Cart,{drawerOpen:F,...Y,setDrawerOpen:z,quantity:Number("1")})]})}}}]);
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.