PageSourceSearch

https://www.lewiscellars.com/_next/static/chunks/427.a0e6446d0519687a.js

js lewiscellars.com collected 2026-09-26 05:51:32 UTC 13,489 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="18291977-79dc-4246-a0d9-5cd405430f1a",e._sentryDebugIdIdentifier="sentry-dbid-18291977-79dc-4246-a0d9-5cd405430f1a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[427],{18455:(e,o,t)=>{t.d(o,{A:()=>r});var r={_getCss:function(){return l},close:"loginForm-module_close__dEUDI",form:"loginForm-module_form__7WOzw",goldButton:"loginForm-module_goldButton__Snhak",goldButtonMagicLink:"loginForm-module_goldButtonMagicLink__AtBB3",magicLink:"loginForm-module_magicLink__-eruu",formBody:"loginForm-module_formBody__HxmGL",page:"loginForm-module_page__X21ja",header:"loginForm-module_header__exkYL",fullWidth:"loginForm-module_fullWidth__4ddRr",submissionMessage:"loginForm-module_submissionMessage__3UxJi"},l='.loginForm-module_close__dEUDI{background:none;border:none;cursor:pointer;height:42px;position:absolute;right:20px;top:20px;width:42px}.loginForm-module_close__dEUDI:hover{opacity:1}.loginForm-module_close__dEUDI:after,.loginForm-module_close__dEUDI:before{background-color:#000;content:" ";height:1rem;left:50%;position:absolute;top:50%;transform:translateY(-50%);width:1px}.loginForm-module_close__dEUDI:before{transform:translateY(-50%) rotate(45deg)}.loginForm-module_close__dEUDI:after{transform:translateY(-50%) rotate(-45deg)}.loginForm-module_form__7WOzw p{max-width:375px}.loginForm-module_form__7WOzw input{height:48px;padding:0 1rem;width:100%}.loginForm-module_form__7WOzw p.loginForm-module_goldButton__Snhak{letter-spacing:0;margin-bottom:.25rem;margin-top:1.5rem;text-align:left}.loginForm-module_form__7WOzw p.loginForm-module_goldButton__Snhak.loginForm-module_goldButtonMagicLink__AtBB3{margin-bottom:1.5rem;margin-top:1rem}.loginForm-module_form__7WOzw p.loginForm-module_goldButton__Snhak button{background:none;border:none;cursor:pointer;font-weight:700;padding:0}.loginForm-module_form__7WOzw p.loginForm-module_goldButton__Snhak button.loginForm-module_magicLink__-eruu{text-transform:uppercase}.loginForm-module_form__7WOzw .loginForm-module_formBody__HxmGL{margin-bottom:1rem}.loginForm-module_form__7WOzw:not(.loginForm-module_page__X21ja) p.loginForm-module_goldButton__Snhak.loginForm-module_goldButtonMagicLink__AtBB3{margin-top:0}.loginForm-module_form__7WOzw:not(.loginForm-module_page__X21ja) .loginForm-module_header__exkYL{margin-bottom:1rem;text-align:center}.loginForm-module_form__7WOzw:not(.loginForm-module_page__X21ja) .loginForm-module_fullWidth__4ddRr{margin:1rem auto 0;padding-left:1rem;padding-right:1rem;width:100%}.loginForm-module_form__7WOzw.loginForm-module_page__X21ja{display:flex;flex-direction:column;padding-bottom:4rem}@media only screen and (min-width:768px){.loginForm-module_form__7WOzw.loginForm-module_page__X21ja{flex-direction:row}}.loginForm-module_form__7WOzw.loginForm-module_page__X21ja .loginForm-module_header__exkYL{margin:1.5rem 0;text-align:left}.loginForm-module_form__7WOzw.loginForm-module_page__X21ja .loginForm-module_fullWidth__4ddRr{max-width:fit-content}@media only screen and (min-width:768px){.loginForm-module_form__7WOzw.loginForm-module_page__X21ja .loginForm-module_fullWidth__4ddRr{flex:0 0 auto;margin-left:0;width:75%}}@media only screen and (min-width:1024px){.loginForm-module_form__7WOzw.loginForm-module_page__X21ja .loginForm-module_fullWidth__4ddRr{flex:0 0 auto;width:66.6666666667%}}.loginForm-module_submissionMessage__3UxJi{word-wrap:break-word;margin-bottom:1.5rem;padding:1rem}'},30427:(e,o,t)=>{t.r(o),t.d(o,{LoginForm:()=>W});var r=t(71450),l=t(95155),n=t(12115),a=t(22544),i=t(27122),d=t(72378),u=t(67909),_=t(69691),m=t(97625),s=t(87449),p=t(98127),c=t(60609),g=t(17362),h=t(77753),f=t(80566),x=t(55262),I=t(68111),b=t(18455);let O=(0,u.default)(()=>t.e(5139).then(t.bind(t,25139)),{loadableGenerated:{webpack:()=>[require.resolveWeak("./OtherAuthForm/OtherAuthForm.js")]}}),W=(0,m.X)(function(e){let o=(0,f.w)(),{callback:t,isModal:u,siteName:m,hideCloseButton:W,buttonDesign:w="gold"}=e,{customer:F,token:k,cartData:Y,appConfig:v}
1=(0,f.P)(),[A,E]=(0,n.useState)(!1),[y,j]=(0,n.useState)(""),B=(0,n.useRef)(null),{register:J,handleSubmit:C,formState:{errors:K}}=(0,a.mN)({mode:"onSubmit"}),[N,L]=(0,n.useState)("");return(0,n.useEffect)(()=>{k&&F&&t()},[F,k,t]),(0,l.jsxs)("div",{"data-testid":"login-form",className:(0,_.$)("login-form",b.A.form,!u&&[b.A.page,"login-form--page"]),children:[(0,l.jsxs)("div",{className:(0,_.$)(!u&&"col-md-5 offset-md-1"),"aria-live":"polite",children:[N?null:(0,l.jsx)("h2",{id:I.s.LOGIN_FORM_HEADING_ID,className:(0,_.$)(b.A.header,"login-form__header","no-margins"),children:u?"Account Login":"Returning Customer"}),F?(0,l.jsxs)("p",{children:["Welcome ",F.firstName,"!"]}):N?N?(0,l.jsx)(O,{altForm:N,setAltForm:L,closeButtonRef:B}):null:(0,l.jsxs)("form",{id:"login-form",onSubmit:C(e=>(0,r.sH)(this,[e],void 0,function*(e){var t;let{email:r,password:l}=e;if(l&&r){j(""),E(!0);try{o({type:"SET_CART",disabled:!0});let e=d.A.get("cartId"),n=Y&&(null==(t=null==Y?void 0:Y.items)?void 0:t.length)>0,a=yield x.A.login(r,l,v,e&&n?e:void 0);if(401===a.statusCode||408===a.statusCode){let e=(null==a?void 0:a.message)&&["Unauthorized user","Unauthenticated User"].includes(a.message)?"Invalid Login":a.message;return j("Error: ".concat(e)),E(!1),void o({type:"SET_CART",disabled:!1})}let{token:u}=a;"undefined"!=typeof window&&u?((0,h.m8)({email:r}),(0,c.W)({event:g.Z.ACTIVE_ON_SITE,userData:{user:{email:r}}}),d.A.set("customerToken",u,{expires:365}),o({type:"SET_CUSTOMER_TOKEN",token:u})):u||(j("Error: Please try again"),(0,i.wd)("handleLogin",{level:"error",contexts:{handleLogin:{body:a,email:r}}})),o({type:"SET_CART",disabled:!1})}catch(e){j("Error: ".concat(e.message)),E(!1),o({type:"SET_CART",disabled:!1})}E(!1)}else j("Email and password are required")})),noValidate:!0,children:[y?(0,l.jsx)("div",{className:(0,_.$)(b.A.submissionMessage,"login-form__submission-message"),role:"alert",children:y}):null,(0,l.jsx)(p.A,{id:"email-login",reactHookFormsRegister:J("email",{required:"Email address is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}}),placeholder:"Email ([email protected])",type:"email",autoComplete:"email",dataTestId:"login-form__email",errors:null==K?void 0:K.email,ariaRequired:!0}),(0,l.jsx)("br",{}),(0,l.jsx)(p.A,{id:"password",reactHookFormsRegister:J("password",{required:"Password is required"}),placeholder:"password",type:"password",autoComplete:"current-password",dataTestId:"login-form__password",errors:null==K?void 0:K.password,ariaRequired:!0}),(0,l.jsx)("p",{className:(0,_.$)("login-form__gold-button",b.A.goldButton),"data-testid":"login__forgot-creds",children:(0,l.jsx)("button",{type:"button","aria-haspopup":"dialog",onClick:()=>{var e;L("forgotPassword"),null==(e=B.current)||e.focus()},children:"Forgot password?"})}),(0,l.jsxs)("p",{className:(0,_.$)("login-form__gold-button",b.A.goldButton,b.A.goldButtonMagicLink),"data-testid":"login__magic-link",children:["Or quickly login with a \xa0",(0,l.jsx)("button",{type:"button","aria-haspopup":"dialog",onClick:()=>{var e;L("magicLink"),null==(e=B.current)||e.focus()},className:b.A.magicLink,"data-testid":"magic-link",children:"magic link"})]}),(0,l.jsx)(s.default,{type:"submit",as:"button",design:w,className:b.A.fullWidth,disabled:A,"data-testid":"login-form__cta--submit",children:"Login"}),u&&(0,l.jsx)(s.default,{as:"a",href:"/profile/create-account",design:w,outlined:u,className:b.A.fullWidth,disabled:A,children:"Create Account"})]})]}),!u&&(0,l.jsxs)("div",{className:(0,_.$)(!u&&"col-md-5 offset-md-1"),children:[(0,l.jsx)("h2",{children:"Create an Account"}),(0,l.jsxs)("p",{className:"create-account-body",children:["New to ",m,"? It only takes a moment to create an account."]}),(0,l.jsx)(s.default,{as:"a",href:"/profile/create-account",design:"gold",className:(0,_.$)(b.A.fullWidth),disabled:A,children:"Create Account"})]}),u&&!W&&(0,l.jsx)("button",{className:b.A.close,ref:B,onClick:()=>t(),type:"button",autoFocus:!0,"aria-label":"Close Login Modal"})]})},b.A)},98127:(e,o,t)=>{t.d(o,{A:()=>m});var r=t(71450),l=t(95155),n=t(67909),a=t(69691),i=t(97625),d={_getCss:function(){return u},inputWrapper:"OutlinedInput-module_inputWrapper__K3YJ4",inputPlaceholder:"OutlinedInput-module_inputPlaceholder__fEYkW",textareaPlaceholder:"OutlinedInput-module_textareaPlaceholder__B2gA9",noErrorBorderColor:"OutlinedInput-module_noErrorBorderColor__MI1ZY",error:"OutlinedInput-module_error__7OJSz"},u='.OutlinedInput-module_inputWrapper__K3YJ4{width:100%}.OutlinedInput-module_inputWrapper__K3YJ4 label{display:flex;flex-wrap:wrap;padding-top:1rem;position:relative}.OutlinedInput-module_inputWrapper__K3YJ4 .OutlinedInput-module_inputPlaceholder__fEYkW{align-items:center;cursor:text;display:flex;height:14px;order:0;padding-left:1rem;position:absolute;text-align:left;text-transform:uppercase;transition:transform .15s ease;width:100%}.OutlinedInput-module_inputWrapper__K3YJ4 .OutlinedInput-module_inputPlaceholder__fEYkW:not(.OutlinedInput-module_textareaPlaceholder__B2gA9){top:calc(50% + 1rem);transform:translateY(calc(-50% - .5rem))}.OutlinedInput-module_inputWrapper__K3YJ4 .OutlinedInput-module_inputPlaceholder__fEYkW.OutlinedInput-module_textareaPlaceholder__B2gA9{top:2.2rem;transform:none}.OutlinedInput-module_inputWrapper__K3YJ4 input,.OutlinedInput-module_inputWrapper__K3YJ4 textarea{border-radius:0;height:48px;order:1;padding:1rem;width:100%}.OutlinedInput-module_inputWrapper__K3YJ4 input::placeholder,.OutlinedInput-module_inputWrapper__K3YJ4 textarea::placeholder{color:transparent}.OutlinedInput-module_inputWrapper__K3YJ4 input:focus,.OutlinedInput-module_inputWrapper__K3YJ4 input[aria-invalid=true],.OutlinedInput-module_inputWrapper__K3YJ4 input[placeholder]:not([placeholder=""]):not(:placeholder-shown),.OutlinedInput-module_inputWrapper__K3YJ4 input[value]:not([value=""]),.OutlinedInput-module_inputWrapper__K3YJ4 textarea:focus,.OutlinedInput-module_inputWrapper__K3YJ4 textarea[aria-invalid=true],.OutlinedInput-module_inputWrapper__K3YJ4 textarea[placeholder]:not([placeholder=""]):not(:placeholder-shown),.OutlinedInput-module_inputWrapper__K3YJ4 textarea[value]:not([value=""]){opacity:1}.OutlinedInput-module_inputWrapper__K3YJ4 input:focus,.OutlinedInput-module_inputWrapper__K3YJ4 textarea:focus{outline:none}.OutlinedInput-module_inputWrapper__K3YJ4 input:not(.OutlinedInput-module_noErrorBorderColor__MI1ZY)[aria-invalid=true],.OutlinedInput-module_inputWrapper__K3YJ4 textarea:not(.OutlinedInput-module_noErrorBorderColor__MI1ZY)[aria-invalid=true]{border-color:#d52a23}.OutlinedInput-module_inputWrapper__K3YJ4 input[aria-invalid=true]~.OutlinedInput-module_inputPlaceholder__fEYkW,.OutlinedInput-module_inputWrapper__K3YJ4 textarea[aria-invalid=true]~.OutlinedInput-module_inputPlaceholder__fEYkW{color:#d52a23}.OutlinedInput-module_inputWrapper__K3YJ4 input:focus~.OutlinedInput-module_inputPlaceholder__fEYkW,.OutlinedInput-module_inputWrapper__K3YJ4 input:not(:placeholder-shown)~.OutlinedInput-module_inputPlaceholder__fEYkW,.OutlinedInput-module_inputWrapper__K3YJ4 textarea:focus~.OutlinedInput-module_inputPlaceholder__fEYkW,.OutlinedInput-module_inputWrapper__K3YJ4 textarea:not(:placeholder-shown)~.OutlinedInput-module_inputPlaceholder__fEYkW{transform:translateY(calc(-100% - 2.5rem))}.OutlinedInput-module_inputWrapper__K3YJ4 input:focus~.OutlinedInput-module_textareaPlaceholder__B2gA9,.OutlinedInput-module_inputWrapper__K3YJ4 input:not(:placeholder-shown)~.OutlinedInput-module_textareaPlaceholder__B2gA9,.OutlinedInput-module_inputWrapper__K3YJ4 textarea:focus~.OutlinedInput-module_textareaPlaceholder__B2gA9,.OutlinedInput-module_inputWrapper__K3YJ4 textarea:not(:placeholder-shown)~.OutlinedInput-module_textareaPlaceholder__B2gA9{transform:translateY(-2.7rem)}.OutlinedInput-module_inputWrapper__K3YJ4 .OutlinedInput-module_error__7OJSz{background-color:transparent}';let _=(0,n.default)(()=>t.e(4239).then(t.bind(t,34239)),{loadableGenerated:{webpack:()=>[require.resolveWeak("../../../modules/CustomErrorMessage/CustomErrorMessage.js")]}}),m=(0,i.X)(e=>{var{id:o,type:t,placeholder:n,ariaLabel:i,isDisabled:u,tabIndex:m,className:s,autoComplete:p,noErrorBorder:c,ariaRequired:g,dataTestId:h,errors:f,reactHookFormsRegister:x}=e,I=(0,r.Tt)(e,["id","type","placeholder","ariaLabel","isDisabled","tabIndex","className","autoComplete","noErrorBorder","ariaRequired","dataTestId","errors","reactHookFormsRegister"]);let b=(0,a.$)("outlined-input",d.inputWrapper,s&&s);return(0,l.jsxs)("div",{className:b,children:[(0,l.jsxs)("label",{"data-testid":h,children:[(0,l.jsx)("textarea"===t?"textarea":"input",Object.assign({id:o,"aria-label":i,tabIndex:m,placeholder:n,autoComplete:p,disabled:u,className:c?d.noErrorBorderColor:"","aria-required":g,"aria-invalid":!!f,"aria-describedby":(null==f?void 0:f.message)?"".concat(o,"-error"):void 0},"textarea"===t?{rows:1}:{type:t},x,I)),(0,l.jsx)("span",{className:(0,a.$)(d.inputPlaceholder,"outlined-input__placeholder","textarea"===t&&d.textareaPlaceholder),children:n})]}),(null==f?void 0:f.message)?(0,l.jsx)(_,{id:"".concat(o,"-error"),classes:(0,a.$)(d.error,"outlined-input__error"),children:null==f?void 0:f.message}):null]})},d)}}]);
2//# sourceMappingURL=427.a0e6446d0519687a.js.map

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.