1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8300],{2950:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var r=(0,a(92921).A)("outline","shield-lock","IconShieldLock",[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}],["path",{d:"M12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 12l0 2.5",key:"svg-2"}]])},8049:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r=a(37876),n=a(14232);function l(e){let{length:t=6,onComplete:a,onChange:l,className:s=""}=e,[i,o]=(0,n.useState)(Array(t).fill("")),c=(0,n.useRef)([]);(0,n.useEffect)(()=>{c.current[0]&&c.current[0].focus()},[]);let d=e=>{e.preventDefault();let r=e.clipboardData.getData("text/plain").replace(/\D/g,"").slice(0,t);if(r){var n;let e=Array(t).fill("");for(let t=0;t<r.length;t++)e[t]=r[t];o(e);let s=e.join("");null==l||l(s);let i=Math.min(r.length,t-1);null==(n=c.current[i])||n.focus(),s.length===t&&(null==a||a(s))}};return(0,r.jsx)("div",{className:"flex gap-[9px] ".concat(s),children:i.map((e,n)=>(0,r.jsx)("input",{ref:e=>c.current[n]=e,type:"text",inputMode:"numeric",maxLength:1,value:e,onChange:e=>((e,r)=>{if(r&&!/^\d$/.test(r))return;let n=[...i];n[e]=r,o(n);let s=n.join("");if(null==l||l(s),r&&e<t-1){var d;null==(d=c.current[e+1])||d.focus()}s.length===t&&(null==a||a(s))})(n,e.target.value),onKeyDown:e=>((e,a)=>{var r,n,s;if("Backspace"===a.key)if(!i[e]&&e>0)null==(r=c.current[e-1])||r.focus();else{let t=[...i];t[e]="",o(t),null==l||l(t.join(""))}else"ArrowLeft"===a.key&&e>0?null==(n=c.current[e-1])||n.focus():"ArrowRight"===a.key&&e<t-1&&(null==(s=c.current[e+1])||s.focus())})(n,e),onPaste:d,onFocus:()=>{var e;null==(e=c.current[n])||e.select()},className:"w-14 h-12 text-center text-lg outline-none font-semibold rounded-lg border border-gray-200 focus:ring-[1px] focus:ring-primary-500 transition-colors","aria-label":"OTP digit ".concat(n+1)},n))})}},42985:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var r=(0,a(92921).A)("outline","mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]])},43584:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/signup",function(){return a(92644)}])},49426:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var r=(0,a(92921).A)("outline","arrow-left","IconArrowLeft",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]])},53474:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(14232);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,[t,a]=(0,r.useState)([]),[n,l]=(0,r.useState)(()=>Date.now());(0,r.useEffect)(()=>{if(!t.length)return;let e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[t.length]);let s=t.filter(e=>n-e<6e4),i=s.length<e,o=i?0:Math.max(1,Math.ceil((s[0]+6e4-n)/1e3));return{canResend:i,secondsLeft:o,registerSend:(0,r.useCallback)(()=>{let e=Date.now();l(e),a(t=>[...t.filter(t=>e-t<6e4),e])},[])}}},89735:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(37876),n=a(77328),l=a.n(n);function s(e){var t,a,n,s,i,o;let{no_index:c=!1,...d}=e;return(0,r.jsxs)(l(),{children:[(0,r.jsx)("title",{children:d.title}),(0,r.jsx)("meta",{name:"description",content:d.description}),d.canonical&&(0,r.jsx)("link",{rel:"canonical",href:d.canonical}),(0,r.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,r.jsx)("meta",{property:"og:title",content:(null==d||null==(t=d.og)?void 0:t.title)||d.title}),(0,r.jsx)("meta",{property:"og:description",content:d.description}),(0,r.jsx)("meta",{property:"og:type",content:(null==d||null==(a=d.og)?void 0:a.type)||"website"}),(null==d||null==(n=d.og)?void 0:n.type)==="article"&&(null==d||null==(s=d.og)?void 0:s.published_time)&&(0,r.jsx)("meta",{property:"article:published_time",content:d.og.published_time}),(null==d||null==(i=d.og)?void 0:i.type)==="article"&&(null==d||null==(o=d.og)?void 0:o.author)&&(0,r.jsx)("meta",{property:"article:author",content:d.og.author}),(0,r.jsx)("meta",{property:"og:site_name",content:d.brand_name}),(0,r.jsx)("meta",{property:"og:image",content:d.og.image}),(0,r.jsx)("meta",{property:"og:image:secure_url",content:d.og.image}),(0,r.jsx)("meta",{name:"twitter:title",content:d.title}),(0,r.jsx)("meta",{name:"twitter:description",content:d.description}),(0,r.jsx)("meta",{name:"twitter:site",content:"@".concat(d.brand_name||d.title)}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:image",content:d.og.image}),c&&(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]})}a(14232)},91391:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var r=(0,a(92921).A)("outline","loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]])},92046:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var r=(0,a(92921).A)("outline","phone","IconPhone",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]])},92644:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>k,default:()=>N});var r=a(37876),n=a(96969),l=a(8049),s=a(89735),i=a(87043),o=a(29502),c=a(97701),d=a(94051),u=a(53474),m=a(42985),x=a(92046),h=a(75405),p=a(2950),g=a(49426),y=a(48230),v=a.n(y),f=a(89099),j=a(14232);let b=e=>{var t;let{store:a}=e,s=(0,f.useRouter)(),{registerOtp:y,verifyOtp:b,isLoggedIn:k}=(0,i.h)(),{formattedStore:N}=(0,o.P)(),w=(null==N?void 0:N.name)||(null==a?void 0:a.name)||"our store",A=null==N?void 0:N.logo,_=(0,c.T)(a).login,S="centered"!==(_.layout||"split"),C=_.background||(null==N||null==(t=N.hero_images)?void 0:t[0]),E=_.headline||"Join ".concat(w),z=_.subtext||"Create an account with a one-time code â no password needed.",M=!1!==_.show_perks,P=!1!==_.show_phone_login,[R,D]=(0,j.use
1State)("email"),[X,F]=(0,j.useState)(""),[I,q]=(0,j.useState)(""),[L,T]=(0,j.useState)(""),[B,O]=(0,j.useState)(""),[W,Y]=(0,j.useState)(""),[J,K]=(0,j.useState)(!1),[U,V]=(0,j.useState)(!1),{canResend:$,secondsLeft:G,registerSend:H}=(0,u.A)(3);(0,j.useEffect)(()=>{if(!s.isReady)return;let e=s.query,t=String(e.channel||"");("email"===t||"phone"===t)&&D(t),e.email&&q(String(e.email)),e.phone&&T(String(e.phone))},[s.isReady]);let Q="string"==typeof s.query.redirect&&s.query.redirect?s.query.redirect:"/account";(0,j.useEffect)(()=>{k&&s.replace(Q)},[k]);let Z="email"===R?I:L,ee=async()=>y({store:null==a?void 0:a._id,channel:R,name:X.trim(),email:I.trim()||void 0,phone:L.trim()||void 0}),et=async e=>{if(e.preventDefault(),!X.trim())return void d.A.error("Error","Please enter your name.");K(!0);try{let e=await ee();Y(e),V(!0),H()}catch(t){let e=(null==t?void 0:t.message)||"Could not start signup. Please check your details and try again.";d.A.error("Error",e)}K(!1)},ea=async e=>{if(e.preventDefault(),6!==B.length)return void d.A.error("Error","Please enter the 6-digit code.");K(!0);try{await b({token:W,otp:Number(B)}),s.replace(Q)}catch(e){console.error("OTP ERR",e),d.A.error("Error","Invalid or expired code. Please try again.")}K(!1)},er=async()=>{if($){K(!0);try{let e=await ee();Y(e),O(""),H(),d.A.succces("Sent","A new code is on its way.")}catch(e){d.A.error("Error","Could not resend the code. You may have reached the limit â try again shortly.")}K(!1)}},en=Array.isArray(_.perks)&&_.perks.length?_.perks:["Track your orders and view order history","Save your details for a faster checkout","Build a wishlist and earn loyalty rewards"],el="w-full rounded-lg border border-gray-200 bg-gray-50 py-3 pl-11 pr-4 text-gray-900 outline-none transition-colors focus:border-primary-500 focus:bg-white focus:ring-2 focus:ring-primary-500/30 dark:border-white/10 dark:bg-[var(--dark-secondary-background)] dark:text-[var(--dark-primary-text)]";return(0,r.jsxs)("div",{className:"min-h-screen bg-white dark:bg-[var(--dark-primary-background)] ".concat(S?"md:grid md:grid-cols-2":"flex items-center justify-center"),children:[(0,r.jsxs)("div",{className:"relative flex-col justify-between overflow-hidden p-12 text-white ".concat(S?"hidden md:flex":"hidden"),children:[C?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:C,alt:w,className:"absolute inset-0 h-full w-full object-cover"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-900/85 via-primary-800/70 to-primary-700/60"})]}):(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-600 to-primary-900"}),(0,r.jsx)("div",{className:"relative z-10",children:(0,r.jsx)(v(),{href:"/",className:"inline-flex items-center",children:A?(0,r.jsx)("img",{src:A,alt:w,className:"h-12 w-auto"}):(0,r.jsx)("span",{className:"text-2xl font-bold",children:w})})}),(0,r.jsxs)("div",{className:"relative z-10 max-w-sm",children:[(0,r.jsx)("h2",{className:"text-3xl font-semibold leading-tight",children:E}),(0,r.jsx)("p",{className:"mt-3 text-white/80",children:z}),(0,r.jsx)("ul",{className:"mt-8 space-y-3 ".concat(M?"":"hidden"),children:en.map(e=>(0,r.jsxs)("li",{className:"flex items-start gap-3 text-sm text-white/90",children:[(0,r.jsx)("span",{className:"mt-0.5 flex h-5 w-5 flex-none items-center justify-center rounded-full bg-white/20",children:(0,r.jsx)("svg",{className:"h-3 w-3",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M16.7 5.3a1 1 0 010 1.4l-7.5 7.5a1 1 0 01-1.4 0L3.3 9.7a1 1 0 011.4-1.4l3.1 3.1 6.8-6.8a1 1 0 011.4 0z",clipRule:"evenodd"})})}),e]},e))})]}),(0,r.jsxs)("div",{className:"relative z-10 text-xs text-white/60",children:["\xa9 ",w]})]}),(0,r.jsx)("div",{className:"flex items-center justify-center p-6 sm:p-10",children:(0,r.jsxs)("div",{className:"w-full max-w-md",children:[(0,r.jsx)("div",{className:"mb-8 flex flex-col items-center text-center ".concat(S?"md:hidden":""),children:(0,r.jsx)(v(),{href:"/",children:A?(0,r.jsx)("img",{src:A,alt:w,className:"h-12 w-auto"}):(0,r.jsx)("span",{className:"text-2xl font-bold text-gray-900 dark:text-[var(--dark-primary-text)]",children:w})})}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-[var(--dark-primary-text)]",children:U?"Enter your co
1de":"Create your account"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-500 dark:text-[var(--dark-secondary-text)]",children:U?(0,r.jsxs)(r.Fragment,{children:["We sent a 6-digit code to"," ",(0,r.jsx)("span",{className:"font-medium text-gray-700 dark:text-[var(--dark-primary-text)]",children:Z})]}):(0,r.jsx)(r.Fragment,{children:"We didn't find an account â let's set one up."})})]}),(0,r.jsxs)("form",{onSubmit:U?ea:et,className:"space-y-5",children:[!U&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid-cols-2 gap-1 rounded-lg bg-gray-100 p-1 dark:bg-[var(--dark-secondary-background)] ".concat(P?"grid":"hidden"),children:["email","phone"].map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>D(e),className:"flex items-center justify-center gap-2 rounded-md py-2 text-sm font-medium transition-colors ".concat(R===e?"bg-white text-primary-700 shadow-sm dark:bg-[var(--dark-primary-background)] dark:text-primary-400":"text-gray-500 hover:text-gray-700 dark:text-[var(--dark-secondary-text)]"),children:["email"===e?(0,r.jsx)(m.A,{size:16}):(0,r.jsx)(x.A,{size:16}),"Code via ","email"===e?"Email":"Phone"]},e))}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-[var(--dark-secondary-text)]",children:"Full name"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5 text-gray-400",children:(0,r.jsx)(h.A,{size:18})}
1),(0,r.jsx)("input",{autoFocus:!0,type:"text",value:X,onChange:e=>F(e.target.value),className:el,placeholder:"Your name",required:!0})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-[var(--dark-secondary-text)]",children:["Email address","email"===R?"":" (optional)"]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5 text-gray-400",children:(0,r.jsx)(m.A,{size:18})}),(0,r.jsx)("input",{type:"email",value:I,onChange:e=>q(e.target.value),className:el,placeholder:"[email protected]",required:"email"===R})]})]}),P&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"mb-1.5 block text-sm font-medium text-gray-700 dark:text-[var(--dark-secondary-text)]",children:["Phone number","phone"===R?"":" (optional)"]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5 text-gray-400",children:(0,r.jsx)(x.A,{size:18})}),(0,r.jsx)("input",{type:"tel",value:L,onChange:e=>T(e.target.value),className:el,placeholder:"98XXXXXXXX",required:"phone"===R})]})]}),(0,r.jsx)(n.A,{type:"submit",loading:J,className:"w-full",children:"Send code"}),(0,r.jsxs)("p",{className:"text-center text-sm text-gray-500 dark:text-[var(--dark-secondary-text)]",children:["Already have an account?"," ",(0,r.jsx)(v(),{href:"/account/login",className:"font-medium text-primary-600 hover:underline dark:text-primary-400",children:"Sign in"})]})]}),U&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.A,{length:6,onChange:O,onComplete:O}),(0,r.jsx)(n.A,{type:"submit",loading:J,className:"w-full",children:(0,r.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,r.jsx)(p.A,{size:18}),"Verify & create account"]})}),(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{V(!1),O(""),Y("")},className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 dark:text-[var(--dark-secondary-text)]",children:[(0,r.jsx)(g.A,{size:16}),"Edit details"]}),(0,r.jsx)("button",{type:"button",onClick:er,disabled:J||!$,className:"font-medium text-primary-600 hover:underline disabled:no-underline disabled:opacity-50 dark:text-primary-400",children:$?"Resend code":"Resend in ".concat(G,"s")})]})]})]}),(0,r.jsxs)("p",{className:"mt-8 text-center text-xs text-gray-400 dark:text-[var(--dark-secondary-text)]",children:["By continuing you agree to ",w,"'s terms & privacy policy."]})]})})]})};var k=!0;function N(e){var t,a,n,l,i;let{store:o}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{title:"Sign up | "+((null==o||null==(t=o.customization)?void 0:t.brand_name)||(null==o?void 0:o.name)),brand_name:(null==o||null==(a=o.customization)?void 0:a.brand_name)||(null==o?void 0:o.name),description:(null==o?void 0:o.description)||(null==o||null==(n=o.customization)?void 0:n.top_bar_text),og:{image:(null==o||null==(i=o.customization)||null==(l=i.hero_images)?void 0:l[0])||"/images/empty_store.png"}}),(0,r.jsx)(b,{store:o})]})}},96969:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(37876),n=a(91391),l=a(89742),s=a(14232);function i(e){let{type:t="button",variant:a="primary",className:i="",loading:o=!1,disabled:c=!1,icon:d,onClick:u,children:m,...x}=e,h=(0,s.useMemo)(()=>o?(0,r.jsx)(n.A,{size:16,className:"animate-spin mr-2"}):d||null,[o,d]),p=(0,s.useCallback)(e=>{c||o||!u||u(e)},[c,o,u]);return(0,r.jsxs)("button",{...x,onClick:p,"data-loading":o,disabled:c,className:(0,l.cn)("flex justify-center items-center",{primary:"btn-primary",secondary:"btn-secondary"}[a],i),type:t,children:[h,m]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=43584)),_N_E=e.O()}]);
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.