(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{83236:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return i(61070)}])},57125:function(e,n,i){"use strict";i.d(n,{ql:function(){return y},uW:function(){return M},Ut:function(){return C},hu:function(){return P},Pz:function(){return _},MA:function(){return L},ZP:function(){return N}});var t=i(85893),a=i(67294),r=i(46205),s=i(16608),l=i(78201),o=i(16899),d=i(19521),c=i(87543),g=i(91277),h=i(77010);let p=e=>{let{isActive:n}=e,i=n?"#85B978":"#E26250";return(0,t.jsxs)("div",{className:"flex gap-[12px] items-center",children:[(0,t.jsx)("svg",{width:"8",height:"9",viewBox:"0 0 8 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("circle",{cx:"4",cy:"4.75977",r:"4",fill:i})}),(0,t.jsx)("span",{style:{color:i},className:"text-[14px]",children:n?"Active":"Cancelled"})]})};var m=i(408),u=i(11163);let x=d.ZP.div.withConfig({componentId:"sc-b992a27-0"})(["position:relative;grid-column:span 12;background:var(--lightGrey);background:#f5f2ee;max-width:100%;background:var(--defBBg);"]),f=d.ZP.div.withConfig({componentId:"sc-b992a27-1"})(["margin:auto;position:relative;max-width:"," "," ","{padding:","}","{padding:"," > p:last-child{margin-bottom:0px;}","}"],e=>e.fullWidth?"none;":"calc(var(--blockWide) + (2 * var(--deskMegaMargin)));",e=>e.innerWidth?"max-width: ".concat(e.innerWidth,";"):"",c.Z.small,e=>e.padLess?"0;":"var(--mobContentMargin);",c.Z.large,e=>e.padLess?"0;":"var(--deskMegaMargin);",e=>e.split?"\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      grid-gap: var(--deskContentMargin);\n    ":null),v=d.ZP.div.withConfig({componentId:"sc-b992a27-2"})(["height:",";"],e=>e.hemLess?"0":"10px"),b=e=>(0,t.jsxs)(x,{className:"block ".concat(e.className),BBg:e.BBg,BBgLarge:e.BBgLarge,children:[(0,t.jsx)(j,{}),(0,t.jsx)("div",{children:(0,t.jsxs)(f,{split:e.split,fullWidth:e.fullWidth,padLess:e.padLess,innerWidth:e.innerWidth,children:[e.children,(0,t.jsx)(v,{hemLess:e.hemLess})]})})]}),w=d.ZP.div.withConfig({componentId:"sc-b992a27-3"})(["position:sticky;top:var(--headerHeight);top:0;display:flex;align-items:center;justify-content:space-between;background:",";z-index:var(--zBanner);","{padding:0 var(--mobContentMargin);height:var(--bannerHeightMob);font-size:0.9rem;}","{padding:0 var(--deskMegaMargin);height:var(--bannerHeightDesk);top:0;}"],e=>e.BBan?e.BBan:"var(--defBBan)",c.Z.small,c.Z.large),j=e=>{var n,i;let{ledgerSpaceLabel:r}=a.useContext(g.w0),{memberships:s,isReady:l}=a.useContext(m.S),{selectedSubscription:o}=a.useContext(g.w0);null==s||null===(i=s.data)||void 0===i||null===(n=i.memberships)||void 0===n||n.length;let{pathname:d,push:c}=(0,u.useRouter)(),x=l?d.includes("ledger-space")?"ledger_space":d.includes("membership")?"membership":d.includes("manage-credits")?"manage_credits":d.includes("leave-the-ledger")?"leave_ledger":d.includes("update-payment-method")?"update_payment_method":"membership":"Ffern Ledger Portal",f=(()=>{if("ledger_space"===x||"manage_credits"===x||"leave_ledger"===x)return"/portal"})();return(0,t.jsx)(w,{children:(0,t.jsx)("div",{className:"max-w-[var(--blockWide)] m-auto w-full",children:(0,t.jsxs)("div",{className:"flex justify-between w-full items-center",children:[(0,t.jsxs)("a",{className:"flex gap-[12px] items-center cursor-pointer",onClick:()=>f&&c(f),children:[f&&(0,t.jsx)(B,{}),(0,t.jsx)(h.by,{color:"Brown/Reddish",children:l?"ledger_space"===x?"Manage Ledger Space":"manage_credits"===x?"Manage Your Credits":"update_payment_method"===x?"Update Payment Method":"leave_ledger"===x?"Leave the Ledger":r:""})]}),("ledger_space"===x||"update_payment_method"===x)&&o&&(0,t.jsx)(p,{isActive:(null==o?void 0:o.status)==="active"})]})})})},B=()=>(0,t.jsx)("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M6.24219 11.2461L1.24219 6.24609L6.24219 1.24609",stroke:"#9A6040",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})});var k=i(40324);let _=e=>{var n,i;let{children:a,seoTitle:d,seoDescription:c,heroImage:g="boss_morris",fragrances:h}=e,p=(0,k.aC)()&&(null===(i=location)||void 0===i?void 0:null===(n=i.pathname)||void 0===n?void 0:n.includes("leave-the-ledger"));return(0,t.jsx)("main",{children:(0,t.jsxs)(s.Z,{fragrances:h,simple:!0,simpleAlignStart:!0,hideWl:!0,abarContent:"Ledger Portal",SeoTitle:d,SeoDescription:c,disableFade:!0,showFooter:!0,children:[(0,t.jsx)(r.Q,{}),(0,t.jsxs)(l.t,{children:["boss_morris"===g&&!p&&(0,t.jsx)(o.D6,{}),("fallen_bottle"===g||p)&&(0,t.jsx)(o.s3,{}),(0,t.jsx)(b,{padLess:!0,children:a})]})]})})},C=e=>{let{children:n}=e;return(0,t.jsx)("div",{className:"p-[20px] md:px-[70px] md:py-[30px] w-full",children:n})},L=e=>{let{children:n}=e;return(0,t.jsx)("div",{className:"md:grid md:gap-[40px] grid-cols-account-desktop",children:n})},y=e=>{let{children:n}=e;return(0,t.jsx)("section",{className:"flex flex-col gap-[20px] mb-[20px] basis-[40%]",children:n})},M=e=>{let{children:n}=e;return(0,t.jsx)("section",{className:"grow",children:n})},P=e=>{let{children:n}=e;return(0,t.jsx)("section",{className:"w-full",children:n})};var N=_},78201:function(e,n,i){"use strict";i.d(n,{g:function(){return b},t:function(){return m}});var t=i(85893);i(67294);var a=i(19521),r=i(87543),s=i(8204),l=i(46633);let o=a.ZP.div.withConfig({componentId:"sc-9cf22daf-0"})(["position:sticky;top:var(--headerHeight);top:0;display:flex;align-items:center;justify-content:space-between;background:",";z-index:var(--zBanner);","{padding:0 var(--mobContentMargin);height:var(--bannerHeightMob);font-size:0.9rem;}","{padding:0 var(--deskMegaMargin);height:var(--bannerHeightDesk);top:0;}"],e=>e.BBan?e.BBan:"var(--defBBan)",r.Z.small,r.Z.large),d=a.ZP.div.withConfig({componentId:"sc-9cf22daf-1"})(["max-width:var(--blockWide);margin:auto;width:100%;color:",";font-weight:400;font-size:1rem;&:hover{a{color:var(--grey);}}a{color:",";opacity:0.5;font-weight:600;&:hover{color:var(--grey);}}"],e=>e.BTi?e.BTi:l.O["ffern-terracotta"][500],e=>e.BTi?e.BTi:l.O["ffern-sand"][300]),c=a.ZP.div.withConfig({componentId:"sc-9cf22daf-2"})(["position:absolute;","{height:var(--bannerHeightMob);transform:translateY(calc(-1 * var(--headerHeight)));}","{height:var(--bannerHeightDesk);}"],r.Z.small,r.Z.large);var g=e=>(0,t.jsxs)(o,{BBan:e.BBan,children:[(0,t.jsx)(c,{id:e.tag}),(0,t.jsxs)(d,{className:"",BTi:e.BTi,children:[(0,s.Qs)(e.title)," ",(0,t.jsx)("a",{href:"#".concat(e.tag),children:"#"})]})]}),h=i(21804),p=i.n(h);let m=a.ZP.div.withConfig({componentId:"sc-2f9a2795-0"})(["display:grid;grid-template-columns:repeat(12,1fr);grid-column-gap:var(--mobContentMargin);","{margin:0;grid-gap:0;}"],r.Z.large),u=a.ZP.div.withConfig({componentId:"sc-2f9a2795-1"})(["position:relative;grid-column:span 12;background:var(--lightGrey);background:#f5f2ee;max-width:100%;background:",";","{}"],e=>e.BBg?"".concat(e.BBg,";"):"var(--defBBg)",r.Z.large),x=a.ZP.div.withConfig({componentId:"sc-2f9a2795-2"})([""]),f=a.ZP.div.withConfig({componentId:"sc-2f9a2795-3"})(["margin:auto;position:relative;max-width:"," ","  ","{padding:","}","{padding:"," > p:last-child{margin-bottom:0px;}","}"],e=>e.fullWidth?"none;":"calc(var(--blockWide) + (2 * var(--deskMegaMargin)));",e=>e.innerWidth?"max-width: ".concat(e.innerWidth,";"):"",r.Z.small,e=>e.padLess?"0;":"var(--mobContentMargin);",r.Z.large,e=>e.padLess?"0;":"var(--deskContentMargin) var(--deskMegaMargin) var(--deskMegaMargin) var(--deskMegaMargin);",e=>e.split?"\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      grid-gap: var(--deskContentMargin);\n    ":null),v=a.ZP.div.withConfig({componentId:"sc-2f9a2795-4"})(["height:",";"],e=>e.hemLess?"0":"10px"),b=e=>{let n=p()(e.title.replace(/\s+/g,"-").toLowerCase());return(0,t.jsxs)(u,{className:"block ".concat(e.className),BBg:e.BBg,BBgLarge:e.BBgLarge,children:[e.bannerless?"":(0,t.jsx)(g,{title:e.title,tag:n,BBan:e.BBan,BTi:e.BTi}),(0,t.jsx)(x,{className:null==e?void 0:e.innerWrapClassName,children:(0,t.jsxs)(f,{split:e.split,fullWidth:e.fullWidth,padLess:e.padLess,innerWidth:e.innerWidth,children:[e.children,(0,t.jsx)(v,{hemLess:e.hemLess})]})})]})}},61070:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSG:function(){return f},default:function(){return v}});var t=i(85893),a=i(67294),r=i(14848);i(58583);var s=i(19521),l=i(67751);let o=()=>{var e,n;let i=a.useContext(r.V),[s,l]=a.useState(""),[o,h]=a.useState(""),[m,u]=a.useState("mobile"),x="idle"===i.state,f=i.hasError,v=null!==(n=null==i?void 0:null===(e=i.error)||void 0===e?void 0:e.message)&&void 0!==n?n:({idle:"The account area is for ledger members only. Please use the mobile number associated with your ledger space to log in.",phone_pre_validating:"We’re sending a one time passcode (OTP) to ".concat(s,"."),email_pre_validating:"We’re sending a login link to ".concat(o,"."),phone_code_sent:"We’ve sent a one time passcode (OTP) to ".concat(s,", please use this to log in."),email_link_sent:"We’ve sent a login email to ".concat(o,", please use this to login."),email_link_verifying:"Verifying your email link"})[i.state],b=["phone_code_sent","phone_pre_validating"].includes(i.state);return(0,t.jsxs)(g,{expanded:b,children:["mobile"===m&&(0,t.jsx)(d,{phoneNumber:s,setPhoneNumber:l}),"email"===m&&(0,t.jsx)(c,{email:o,setEmail:h}),(0,t.jsxs)(p,{className:"text-center",children:[v,x&&(0,t.jsxs)("span",{children:[" ","Prefer to"," ",(0,t.jsx)("a",{"data-ga-element-id":"Change Login Mode: ".concat("email"===m?"Mobile":"Email"),style:{cursor:"pointer"},onClick:()=>u("email"===m?"mobile":"email"),children:"login with ".concat("email"===m?"mobile":"email","?")})]}),f&&(0,t.jsxs)("a",{"data-ga-element-id":"Reset Login Link",style:{cursor:"pointer"},onClick:async()=>{await i.reset(),l(""),h("")},children:[" ","Please try again."]})]})]})},d=e=>{let{phoneNumber:n,setPhoneNumber:i}=e;return(0,t.jsxs)(h,{children:[(0,t.jsx)(m,{children:"Login with Mobile"}),(0,t.jsx)(l.zv,{phoneNumber:n,onUpdatePhoneNumber:e=>i(e)}),(0,t.jsx)(l.er,{})]})},c=e=>{let{email:n,setEmail:i}=e;return(0,t.jsxs)(h,{children:[(0,t.jsx)(m,{children:"Login with Email"}),(0,t.jsx)(l.Ah,{email:n,onUpdateEmail:e=>i(e)})]})},g=s.ZP.div.withConfig({componentId:"sc-85ed665b-0"})(["display:flex;flex-direction:column;gap:22px;"]),h=s.ZP.div.withConfig({componentId:"sc-85ed665b-1"})(["background:#eae7e1;border-radius:10px;padding:20px;padding-top:16px;display:flex;flex-direction:column;"]),p=s.ZP.p.withConfig({componentId:"sc-85ed665b-2"})(["color:#9a9a9a;font-size:1.06667rem;"]),m=s.ZP.h2.withConfig({componentId:"sc-85ed665b-3"})(["color:#7a7366;font-size:1.06667rem;text-align:center;margin:0;padding:0;margin-bottom:12px;"]);var u=i(57125),x=i(11163),f=!0,v=e=>{let{fragrances:n}=e,{push:i}=(0,x.useRouter)(),s=a.useContext(r.V);return a.useEffect(()=>{s.isLoggedIn&&i(s.loginRedirect)},[s.isLoggedIn]),(0,t.jsx)(u.Pz,{fragrances:n,seoTitle:"Ffern Ledger Portal",seoDescription:"Login to the Ffern Ledger Portal",children:(0,t.jsx)(u.Ut,{children:(0,t.jsx)(u.hu,{children:(0,t.jsx)("div",{className:"w-full flex justify-center",children:(0,t.jsx)("div",{className:"md:max-w-[460px] w-full md:pt-[40px]",children:(0,t.jsx)(o,{})})})})})})}}},function(e){e.O(0,[9412,6570,8631,8683,8006,6608,2888,9774,179],function(){return e(e.s=83236)}),_N_E=e.O()}]);