PageSourceSearch

https://www.equinox.com/_next/static/chunks/3864-bbb50703cd7dec28.js

js equinox.com collected 2026-10-01 09:10:40 UTC 63,405 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3864],{52034:function(e,t,a){"use strict";var n=a(36531),i=a(56633);t.Z={namespace:"classCount",basePath:"v6/acq/leads/gf/classes",getClassCountsByFacility(e,t){let a=`${this.basePath}/count/${t}`;return i.Z._post(a,{data:e}).then(e=>e.data?e.data:(n.Z.warn("API: Could not get classes"),null))}}},51256:function(e,t,a){"use strict";var n=a(23184),i=a(77177),o=a(36531),r=a(56633);t.Z={namespace:"joinCorp",corpAbandonedPath:"/v6/acq/leads/corp/abandoned",corpLeadPlans:"v6/acq/corp/lead/plans",emailResendBasePath:"/v6/acq/corp/email/verify/resend",emailTokenVerifyBasePath:"/v6/acq/corp/token/verify",emailVerifyBasePath:"/v6/acq/corp/email/verify",verifyDomainPath:"v6/acq/corp/domain/verify",async createAbandonedCorp({companyEmail:e,CTALabel:t,EmailAddress:a,FacilityId:l,FirstName:s,IsAbandonedLead:c,LastName:d,OutreachCode:u,PhoneNumber:p,receiveTextAlerts:m,SourceUrl:f,newsletter:y,UserLocation:h}){let g=(0,n.Z)();return r.Z._post(this.corpAbandonedPath,{data:{Answers:[{additionalInfo:"",answerId:y?i.tZ:i.cZ}],CTALabel:t,EmailAddress:a,FacilityId:l,FirstName:s,IsAbandonedLead:c,LastName:d,OutreachCode:u,PhoneNumber:p,SourceUrl:f,TransactionId:g,UserLocation:h,companyEmail:e,receiveTextAlerts:m}}).then(e=>e.data?{...e,TransactionId:g}:(o.Z.warn("API|Join Corp: Could not generate corp"),null))},async createAbandonedCorpEmailVerify({firstName:e,lastName:t,personalEmail:a,corporateEmail:i,phoneNumber:l,facilityId:s}){let c=`${this.emailVerifyBasePath}`,d=(0,n.Z)();return r.Z._post(c,{data:{corporateEmail:i,facilityId:s,firstName:e,lastName:t,personalEmail:a,phoneNumber:l}}).then(e=>e.data?{...e,TransactionId:d}:(o.Z.warn("API|Join Corp: Could not generate corp"),null))},async createAbandonedCorpEmailTokenVerify(e,t){let a=`${this.emailTokenVerifyBasePath}`,i=(0,n.Z)();return r.Z._post(a,{data:{email:e,token:t}}).then(e=>e.data?{...e,TransactionId:i}:(o.Z.warn("API|Join Corp: Could not generate corp"),null))},async getMappedCorpPlanFromRegularPlan(e,t,a){let i=`${this.corpLeadPlans}/`+e,l=(0,n.Z)();return r.Z._post(i,{data:{corporateAccountId:a,id:t}}).then(e=>e.data?{...e,TransactionId:l}:(o.Z.warn("API|Join Corp: Could not get a mapped corp plan"),null))},async resendAbandonedCorpEmailTokenVerify(e){let t=`${this.emailResendBasePath}?email=${e}`,a=(0,n.Z)();return r.Z._post(t).then(e=>e.data?{...e,TransactionId:a}:(o.Z.warn("API|Join Corp: Could not generate corp"),null))},async verifyDomain(e,t){let a=`${this.verifyDomainPath}?email=${e}&facilityId=${t}`,i=(0,n.Z)();return r.Z._get(a).then(e=>e.data?{...e,TransactionId:i}:(o.Z.warn("API|Join Corp: An error occurred while trying to verify the domain"),null)).catch(()=>({domainVerified:!1}))},updateAbandonedCorpLead({FacilityId:e,meetingPurpose:t,newsletter:a,OutreachCode:n,PreferredCommunicationMethod:o,PreferredTimeOfDay:l,ScheduledVisitTime:s,TransactionId:c}){return c?.trim()||console.error("Missing TransactionId in JoinCorp.updateAbandonedCorpLead"),r.Z._put(this.corpAbandonedPath,{data:{Answers:[{additionalInfo:"",answerId:a?i.tZ:i.cZ}],FacilityId:e,OutreachCode:n,PreferredCommunicationMethod:o,PreferredTimeOfDay:l,ScheduledVisitTime:s,TransactionId:c,meetingPurpose:t}}).then(e=>e.data.tokenId)},updateCorpLead:({answers:e,facilityId:t,leadTokenId:a,scheduledVisitTime:n})=>r.Z._put("/v6/acq/lead",{data:{TokenId:a,...e?.length>0&&{Answers:[...e]},...t&&{FacilityId:t},...n&&{ScheduledVisitTime:n}}})}},22464:function(e,t,a){"use strict";a.d(t,{N2:function(){return d},pH:function(){return c},zu:function(){return u}});var n=a(23184),i=a(77177),o=a(77387),r=a(22718),l=a(36531),s=a(56633);let c="npeqxNewJoinFlowLead",d="ECID",u="_JOIN";t.ZP={namespace:"joinLead",basePath:"/v6/acq/lead/residential",async createAbandonedLead({id:e,firstName:t,lastName:a,facilityId:p,email:m,newsletter:f,phone:y,postalCode:h,joinOutreachCode:g,outreachCode:b,ecid:I=(0,r.D)(d),receiveTextAlerts:w=!1,sourceUrl:C=(0,r.i)(),companyEmail:E,shareId:A,referringId:v,memberId:S,isCorpLead:T}){let F=`${this.basePath}`,N=(0,n.Z)();return s.Z._post(F,{data:{Answers:[{additionalInfo:"",answerId:f?i.tZ:i.cZ},{additionalInfo:"",answerId:w?i.pj:i.gH}],Ecid:I,EmailAddress:m,FacilityId:p,FirstName:t,Id:e,LastName:a,OutreachCode:T?b:o.modifyOutreachCodeForOptimizelyCampaign(g||b+u||c),PhoneNumber:y,SourceUrl:C,TransactionId:N,Zipcode:h,...E&&{companyEmail:E},...S&&{memberId:S},receiveTextAlerts:w,...v&&{referringId:v},...A&&{shareId:A}}}).then(e=>e.data?{...e,TransactionId:N}
1:(l.Z.warn("API|Join Lead: Could not generate lead"),null))},async convertLeadToEClub({FacilityId:e,leadId:t}){let a=`${this.basePath}`;return s.Z._put(a,{data:{FacilityId:e,leadId:t}}).then(e=>e.data?{...e}:(l.Z.warn("API|Join E-club Lead: Could not generate lead"),null))}}},19711:function(e,t,a){"use strict";var n=a(87014),i=a(6245),o=a(63832),r=a(36531),l=a(56633);t.Z={namespace:"leadappointments",basePath:"/v6/acq/leads/appointments",async findById(e){let t=i.byId[e],a=new Date,s=new Date;s.setDate(s.getDate()+9);let c=t?.timeZone||"America/New_York",d=new URLSearchParams({endDate:(0,n.CV)(s,c,o.p5),facilityId:String(e),startDate:(0,n.CV)(a,c,o.p5)}),u=`${this.basePath}?${d.toString()}`;return l.Z._get(u).then(t=>0===t.data.dateRangeWithTime.length?(r.Z.warn(`API|Schedule: no dates found with id ${e}`),null):t.data)}}},15503:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var n=a(23184),i=a(77177),o=a(77387),r=a(22718),l=a(17277),s=a(36531),c=a(56633),d=a(22464),u={namespace:"leads",createAbandonedLead({firstName:e,lastName:t,facilityId:a,email:u,phone:p,newsletter:m,isAbandonedLead:f,membershipPlanName:y,outreachCode:h,ecid:g=(0,r.D)(d.N2),sourceUrl:b=(0,r.i)(),companyEmail:I,zipCode:w,gclid:C=(0,l.rV)("gclid"),receiveTextAlerts:E=!1}){let A=(0,n.Z)(),v=C&&new Date().getTime()<C.expiryDate;return c.Z._post("/v6/acq/leads/abandoned",{data:{Answers:[{additionalInfo:"",answerId:m?i.tZ:i.cZ}],Ecid:g,EmailAddress:u,FacilityId:a,FirstName:e.replace(/’/g,"'"),IsAbandonedLead:f,LastName:t.replace(/’/g,"'"),OutreachCode:o.modifyOutreachCodeForOptimizelyCampaign(h||"POPUPLEAD"),PhoneNumber:p,SourceUrl:b,TransactionId:A,UserLocation:a,...I&&{companyEmail:I},...v&&{googleAdWords:C.value},Zipcode:w,receiveTextAlerts:E,...y&&{membershipPlanName:y}}}).then(e=>{if(0!==e.data&&("object"!=typeof e.data||e.data.success))return{leadTokenId:"object"==typeof e.data?e.data.tokenId:null,leadTransactionId:A};throw s.Z.warn("API|Leads: lead was not properly created"),Error()})},updateAbandonedLead:({scheduledVisitTime:e,leadTransactionId:t,facilityId:a,meetingPurpose:n,newsletter:r,outreachCode:l,preferedCommunicationMethod:s,preferredTimeOfDay:d})=>(t?.trim()||console.error("Missing leadTransactionId in LeadGen.updateAbandonedLead"),c.Z._put("/v6/acq/leads/abandoned",{data:{Answers:[{additionalInfo:"",answerId:r?i.tZ:i.cZ}],FacilityId:a,OutreachCode:o.modifyOutreachCodeForOptimizelyCampaign(l),PreferredCommunicationMethod:s,PreferredTimeOfDay:d,ScheduledVisitTime:e,TransactionId:t,meetingPurpose:n}}).then(e=>e.data.tokenId)),updateLead:({answers:e,leadTokenId:t,facilityId:a,scheduledVisitTime:n})=>c.Z._put("/v6/acq/lead",{data:{TokenId:t,...e?.length>0&&{Answers:[...e]},...a&&{FacilityId:a},...n&&{ScheduledVisitTime:n}}}),cancelAppointment:({leadTokenId:e,leadTransactionId:t})=>(t?.trim()||console.error("Missing leadTransactionId in LeadGen.cancelAppointment"),c.Z._delete("/v6/acq/lead/appointment",{data:{TokenId:e,TransactionId:t}}))}},75999:function(e,t,a){"use strict";var n=a(36531),i=a(56633);t.Z={namespace:"productToken",basePath:"/v6/acq/payment/token",async generateAccountBalanceProductToken(e){let t=`${this.basePath}`;return i.Z._post(t,{data:e}).then(e=>e.data.success?e.data.result:(n.Z.warn("API|Product Token: Could not generate productToken"),null))},async generateProductToken(e){let t=`${this.basePath}`;return i.Z._post(t,{data:e}).then(e=>e.data.success?e.data.result:(n.Z.warn("API|Product Token: Could not generate productToken"),null))},async getProductDetails(e){let t=`${this.basePath}/${e}`;return i.Z._get(t,{}).then(t=>t.data?t.data:(n.Z.warn(`API|Product Token: Could not find product details for token: ${e}`),null))}}},6565:function(e,t,a){"use strict";a.d(t,{a:function(){return o}});var n=a(29061),i=a(13981);let o=({data:e=null,legacyHost:t=!1,method:a,skipAuthorization:o=!1,url:r})=>{let l={"Access-Control-Allow-Origin":window.location.origin,"Content-Type":"application/json"};return o||(l.Authorization=i.ZP.getAuthToken()),(0,n.Z)({data:e,headers:l,method:a,url:`${t?"https://api.equinox.com":"https://api.production.equinox.com"}${r}`})}},82410:function(e,t,a){"use strict";a.d(t,{Pk:function(){return o},QK:function(){return F},RE:function(){return s},Rg:function(){return C},SA:function(){return S},Ub:function(){return I},VD:function(){return h},VE:function(){return l},X7:function(){return m},XV:function(){return b},Yr:function(){return i},aK:function(){return N},aY:function(){return f},e0:function(){return u},eM:function(){return g},fd:function(){return T},gV:function(){return y},hR:function(){return w},n3:function(){return A},oB:function(){return r},ow:function(){return v},s0:function(){return L},s6:function(){return E},tb:function(){return c},uy:function(){return p},yj:function(){return d}});var n=a(85752);let i=e=>`/v6/personal-training/equifit/pre-questionnaire?source=${e}`,o=e=>`/v6/personal-training/pre-assessment-answer?source=${e}`,r=()=>"/v6/facilities/",l=()=>"/v6/personal-training/equifit/assessment",s=e=>`/v6/personal-training/equifit/summary?source=${e}`,c=()=>"/v6.2/member/billing-information",d=()=>"/v6.2/member/billing/card/balance",u=()=>"/v6.2/member/billing/card",p=()=>"/v6/account/account-information",m=e=>`/v6/acq/digitalsignature/agreement/${e}?_=${n.default.getCurrentTimeStamp()}`,f=(e,t,a,n)=>n?`/v6/acq/digitalsignature/agreement/${e}/${t}/${a}/${n}`:`/v6/acq/digitalsignature/agreement/${e}/${t}/${a}`,y=()=>"/v6/acq/digitalsignature/signcontract",h=()=>`/v6/utility/giftcard/catalog?_=${n.default.getCurrentTimeStamp()}`,g=()=>"/v6/acq/payment/token",b=(e,t)=>`/v6/acq/trialpass/${e}/${t}?_=${n.default.getCurrentTimeStamp()}`,I=()=>"/v6/account/authentication/verify-username",w=()=>"/v6/account/recover/email",C=()=>"/v6/account/registration/validateuser",E=e=>`/v6/utility/token/${e}`,A=()=>"/v6/account/user/activate",v=e=>`/v6/account/verify-email/resend/${e}`,S=()=>"/v6/utility/feedback/club",T=e=>`/v6/acq/referral/info/${e}`,F=()=>"/v6/acq/referral/create",N=()=>"/v6/acq/referral/update",L=e=>`/v6/facilities/facility/${e}`},24873:function(e,t,a){"use strict";a.d(t,{LN:function(){return l},Q0:function(){return s},Ul:function(){return r},iU:function(){return o},z4:function(){return i}});var n=a(27980);let i=async e=>{if(!n.ki.test(e))return console.error("getExtendedFacilityData() expects a valid facilityId",e),null;let t=await fetch(`https://api.production.equinox.com/v6/facilities/facility/${e}`);if(t.ok){let e=await t.json();return e?.facility}return console.error(`getExtendedFacilityData() encountered an error with facilityId, ${e}`,t.status),null},o=async e=>{if(!Array.isArray(e))return console.error("getFacilitiesData() expects an array of facilityIds"),[];let t=await fetch(`/api/cms/facilities?facilityIds=${e.join(",")}`);return t.ok?await t.json():(console.error("getFacilitiesData() encountered an error:",t.status),[])},r=async e=>n.ki.test(e)?(await o([e]))?.[0]||null:(console.error("getFacilityData() expects a valid facilityId"),null),l=async e=>{let t=await fetch(`/api/cms/facilities/${e}/details`);if(t.ok){let e=await t.json();return e?.slides}return console.error("getFacilityGallerySlides() encountered an error:",t.status),[]},s=async e=>{let t=await fetch(`/api/cms/facilities/${e}/details`);return t.ok?await t.json():(console.error("getFacilityGallerySlides() encountered an error:",t.status),[])}},9043:function(e,t,a){"use strict";a.d(t,{C7:function(){return d},Q1:function(){return c},nE:function(){return l}});var n=a(61957),i=a(81999),o=a(34646),r=a(20034);let l={MULTIPLE:"multiple clubs",SINGLE:"single club"},s={CLUB_SELECTED:"club selected",CONFIRMATION:"join confirmation",LEAD_ERROR:"join lead error",LEAD_SUBMIT:"join lead submit",LEAD_VIEW:"join lead view",MEMBERSHIP_SELECTED:"membership selected",MEMBERSHIP_VIEW:"membership view",SELECT_A_CLUB:"join select a club"},c={ENGAGE:"join flow | engage",NON_ENGAGE:"join flow | non-engage"},d={joinFlowSelectAClub:e=>{let t=(0,i.O1)(e);return{event:n.U.pageLoad,joinFlow:{step:s.SELECT_A_CLUB,type:r.Im.NON_EMBEDDED},page:(0,o.NN)(t,void 0,i.cC.JOIN,n.M.types.programmatic),user:{loginStatus:"not-authenticated"}}},joinFlowClubSelected:(e,t,a,n,o,r,l)=>({event:"join-flow",joinFlow:{clubID:a.toString(),clubName:o,clubRegion:n,clubStatus:(0,i.WV)(r),clubType:l&&l.toLowerCase(),facilityID:t,step:s.CLUB_SELECTED,type:e}}),joinFlowMembershipSelected:(e,t,a,n=null)=>({event:"join-flow",joinFlow:{currencyCode:a,membership:e,potentialRevenue:t,step:s.MEMBERSHIP_SELECTED,...n&&{facilityID:n}}}),joinFlowLeadView:e=>{let t=(0,i.O1)("/join/step2/"+e);return{event:n.U.pageLoad,joinFlow:{category:c.ENGAGE,step:s.LEAD_VIEW},page:(0,o.NN)(t,void 0,i.cC.JOIN,n.M.types.programmatic)}},joinFlowMembershipView:(e,t=!1,a=!1)=>{let l=(0,i.O1)(e);return t?{event:"join-flow",joinFlow:{autoDetection:a?"Y":"N",step:s.MEMBERSHIP_VIEW,type:r.Im.EMBEDDED}}:{event:n.U.pageLoad,joinFlow:{autoDetection:a?"Y":"N",step:s.MEMBERSHIP_VIEW,type:r.Im.NON_EMBEDDED},page:(0,o.NN)(l,void 0,i.cC.JOIN,n.M.types.programmatic)}},joinFlowLeadSubmit:(e,t,a,n)=>({event:"join-flow",joinFlow:{category:c.ENGAGE,hashedEmail:e,leadTransactionID:t,step:s.LEAD_SUBMIT,type:r.Im.NON_EMBEDDED,...a&&{activationCode:a.toLowerCase()},...n&&{source:n}}}),joinFlowLeadError:e=>({event:"join-flow",joinFlow:{category:c.ENGAGE,error:e,step:s.LEAD_ERROR}}),joinScrollEvent:(e=!1)=>({event:"join-flow",joinFlow:{step:e?s.MEMBERSHIP_VIEW:s.SELECT_A_CLUB,type:r.Im.EMBEDDED}}),joinFlowConfirmation:(e,t)=>{let a=(0,i.O1)(e);return{event:n.U.pageLoad,joinFlow:{barcode:t,step:s.CONFIRMATION},page:(0,o.NN)(a,void 0,i.cC.JOIN,n.M.types.programmatic)}},joinCtaEvent:(e,t)=>
1({event:"join-flow",joinFlow:{source:`${e.toLowerCase()} | ${t}`,step:"join cta"}}),joinFlowMembershipPageView:(e,t,a,l,c,d,u)=>{let p=(0,i.O1)(e);return{event:n.U.pageLoad,joinFlow:{clubID:a.toString(),clubName:c,clubRegion:l,clubStatus:(0,i.WV)(d),clubType:u&&u.toLowerCase(),facilityID:t,step:s.MEMBERSHIP_VIEW,type:r.Im.NON_EMBEDDED},page:(0,o.NN)(p,void 0,i.cC.JOIN,n.M.types.programmatic),user:{loginStatus:"not-authenticated"}}}}},30021:function(e,t,a){"use strict";var n=a(51256),i=a(19711),o=a(9043),r=a(50146),l=a(93249);t.Z={createNewCorp:async(e,t)=>{try{let a;return e&&(a=await n.Z.createAbandonedCorp({...(0,l.lS)(e),id:null})),t(o.C7.joinFlowLeadSubmit(r.default.encode(e.contactInput["Email Address"]),a?.TransactionId,e.outreachCode,`${e.ctaLabel.toLowerCase()} | body`)),a}catch(e){t(o.C7.joinFlowLeadError(e)),console.error("error: ",e);return}},createEmailCode:async e=>{try{let t;let a=(0,l.Su)(e);return e&&(t=await n.Z.createAbandonedCorpEmailVerify({...a,id:null})),t}catch(e){console.error("error: ",e);return}},verifyEmailToken:async(e,t)=>{try{let a;return t&&(a=await n.Z.createAbandonedCorpEmailTokenVerify(e,t)),a}catch(e){console.error("error: ",e);return}},resendEmailToken:async e=>{try{let t;return e&&(t=await n.Z.resendAbandonedCorpEmailTokenVerify(e)),t}catch(e){console.error("error: ",e);return}},getOpenLeadTimesFromFacilityId:async e=>{try{return await i.Z.findById(e)}catch(e){console.error("error: ",e);return}},updateAbandonedLead:async e=>{try{return e?.leadTransactionId?.trim()||console.error("Missing leadTransactionId in corp-join-flow updateAbandonedLead"),await n.Z.updateAbandonedCorpLead((0,l.lS)(e))}catch(e){console.error("error: ",e);return}},updateLead:async e=>{try{return await n.Z.updateCorpLead(e)}catch(e){console.error("error: ",e);return}},verifyValidCorpEmail:async(e,t)=>{try{let a=await n.Z.verifyDomain(e,t);return a?.data||a}catch(e){console.error("error: ",e);return}},getMappedCorpPlanFromRegularPlan:async(e,t,a)=>{try{let i=await n.Z.getMappedCorpPlanFromRegularPlan(e,t,a);return i?.data}catch(e){console.error("error: ",e);return}}}},32880:function(e,t,a){"use strict";a.d(t,{S:function(){return n}});let n={appointmentConfirmation:5,chooseMembershipPlan:2,confirmation:3,contactInformation:0,emailCodeConfirmation:1,scheduleAppointment:4}},93249:function(e,t,a){"use strict";a.d(t,{MU:function(){return m},PZ:function(){return s},Se:function(){return c},Su:function(){return p},lS:function(){return u},tV:function(){return d}});var n=a(85752),i=a(49600),o=a(88258),r=a(17277),l=a(32880);let s=e=>{n.default.isLocalStorageAvailable()&&(0,r.fC)(i.dA.Xv,e)},c=()=>{n.default.isLocalStorageAvailable()&&((0,r.cl)(i.dA.Xv),(0,r.cl)(i.dA.V5))},d=()=>{let e;if(n.default.isLocalStorageAvailable()&&(e=(0,r.rV)(i.dA.Xv))){let{createdDate:t}=e;return t?Math.abs(t-new Date().getTime())>18e5?(c(),null):e:(c(),null)}if(!e)return{step:l.S.contactInformation}},u=e=>{let t=e.scheduledFacility||e.selectedFacility||e.suggestedFacility;return{Answers:e.answers,CTALabel:e.ctaLabel,EmailAddress:e.contactInput["Personal Email"],FacilityId:t.facilityId,FirstName:e.contactInput["First Name"],IsAbandonedLead:!0,LastName:e.contactInput["Last Name"],OutreachCode:e.outreachCode,PhoneNumber:e.contactInput["Phone Number"],PreferredCommunicationMethod:e.preferedCommunicationMethod,PreferredTimeOfDay:e.preferredTimeOfDay,ScheduledVisitTime:e.scheduledVisitTime,SourceUrl:e.sourceUrl,TransactionId:e.leadTransactionId,UserLocation:t.facilityId,companyEmail:e.contactInput["Company Email"],meetingPurpose:e.meetingPurpose,newsletter:t?.country!==i.od.UNITED_KINGDOM.abbreviation||e.contactInput.subscribeToNewsletter,receiveTextAlerts:e?.receiveTextAlerts}},p=e=>{let t=e.scheduledFacility||e.selectedFacility||e.suggestedFacility;return{corporateEmail:e.contactInput["Company Email"],facilityId:t.facilityId,firstName:e.contactInput["First Name"],lastName:e.contactInput["Last Name"],personalEmail:e.contactInput["Personal Email"],phoneNumber:e.contactInput["Phone Number"]}},m=(e,t)=>{if(!t)return e;let{webName:a,region:n}=t;return(0,o.Z)(e,{"{{CLUB_NAME}}":a,"{{REGION}}":n})}},41198:function(e,t,a){"use strict";var n=a(52034),i=a(51256),o=a(22464),r=a(19711),l=a(15503),s=a(34646),c=a(9043),d=a(20034),u=a(77387),p=a(50146),m=a(8031);t.Z={createNewLead:async({acdlPageData:e,isJoinCta:t=!1,leadFlowState:a,setNewDataLayer:n})=>{try{let i;let r=(0,m.derivePayloadFromState)(a);if(t)i=await o.ZP.createAbandonedLead({...r,id:null}),n(c.C7.joinFlowLeadSubmit(p.default.encode(a.contactInput["Email Address"]),i?.TransactionId,a.isCorpLead?a.outreachCode:u.modifyOutreachCodeForOptimizelyCampaign(a.joinOutreachCode||a.outreachCode+o.zu||o.pH)));else{i=await l.Z.createAbandonedLead(r);let t=a.scheduledFacility||a.selectedFacility||a.suggestedFacility,{clubId:o,status:c,clubType:u,name:p,region:m}=t;if(t?.isAcceptingAppointments){let a=d.YY.scheduleAVisit({clubId:o,clubType:u,facilityId:t.facilityId,name:p,region:m.toLowerCase().split("/")[0],status:c},e);n(a)}n(s.zi.singleFlowLearnMore(e))}return i}catch(e){console.error("error: ",e);return}},fetchWorkoutAppointments:async e=>{let t=await fetch(`https://api.production.equinox.com/v6/acq/leads/appointments?facilityId=${e}&type=guided`);if(!t.ok)return console.error("Error fetching",t),[];let a=await t.json();return a?.dateRangeWithTime},getOpenLeadTimesFromFacilityId:async e=>{try{let t=await r.Z.findById(e);return t?.dateRangeWithTime||[]}catch(e){return console.error("error: ",e),[]}},updateAbandonedLead:async e=>{try{"leadTransactionId"in e&&!e?.leadTransactionId?.trim()&&console.error("Missing leadTransactionId in new-lead-flow updateAbandonedLead");let t=(0,m.derivePayloadFromState)(e);return await l.Z.updateAbandonedLead(t)}catch(e){console.error("error: ",e);return}},updateLead:async e=>{try{"leadTransactionId"in e&&!e?.leadTransactionId?.trim()&&console.error("Missing leadTransactionId in new-lead-flow updateLead");let t=(0,m.derivePayloadFromState)(e);return await l.Z.updateLead(t)}catch(e){console.error("error: ",e);return}},createEmailCode:async e=>{try{let t;let a=(0,m.deriveEmailPayloadFromState)(e);return e&&(t=await i.Z.createAbandonedCorpEmailVerify({...a,id:null})),t}catch(e){console.error("error: ",e);return}},fetchClassCountsByFacility:async(e,t)=>{try{let a=(0,m.deriveClassCountPayloadFromState)(e);if(a?.classNamesAndCategoryRequest?.length>0)return await n.Z.getClassCountsByFacility(a,t)}catch(e){console.error("error: ",e);return}},cancelAppointment:async e=>{try{e?.leadTransactionId?.trim()||console.error("Missing leadTransactionId in new-lead-flow cancelAppointment");let t=(0,m.derivePayloadFromState)(e);return await l.Z.cancelAppointment(t)}catch(e){return}}}},73864:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ep}});var n=a(85893),i=a(13873),o=a(6287),r=a(50290),l=a(5152),s=a.n(l),c=a(11163),d=a(45697),u=a.n(d),p=a(67294),m=a(23059),f=a(18357),y=a(31304),h=a.n(y),g=a(
175999),b=a(89270),I=a(23184),w=a(9043),C=a(85680),E=a(77177),A=a(77387),v=a(50146),S=a(6565),T=a(82410),F={getMemberDetails(e){let t=(0,T.fd)(e);return new Promise((e,a)=>{(0,S.a)({method:"GET",skipAuthorization:!0,url:t}).then(t=>{e(t.data)}).catch(e=>{a(e.response)})})},createReferral({formState:e,formValues:t,receiveTextAlerts:a,setNewDataLayer:n,subscribeToNewsletter:i}){let o=e.scheduledFacility||e.selectedFacility||e.suggestedFacility,r=o?.country||o?.contactInformation?.country,l=(0,T.QK)(),s=r!==C.UNITED_KINGDOM.abbreviation||i,c=t["Zip Code"]||"",d={answers:[{additionalInfo:"",answerId:s?E.tZ:E.cZ}],companyEmail:t["Company Email (optional)"],emailAddress:t["Email Address"],facilityKey:e?.selectedFacility?.facilityId||"",friendId:"",memberId:e?.referrerDetails?.memberId,nameFirst:t["First Name"],nameLast:t["Last Name"],outreachCode:A.modifyOutreachCodeForOptimizelyCampaign(e.outreachCode),phoneNumber:t["Phone Number"],receiveTextAlerts:a,referringId:e?.referrerDetails?.referringId,sendConfirmationEmail:!0,shareId:e?.referrerDetails?.shareId,transactionId:(0,I.Z)(),userLocation:e?.selectedFacility?.city,...c&&{zipCode:c}};return!d?.facilityKey?.trim?.()?.length>0&&console.error("WEB-4754:",d?.transactionId),new Promise((a,i)=>{(0,S.a)({data:d,method:"POST",skipAuthorization:!0,url:l}).then(i=>{n(w.C7.joinFlowLeadSubmit(v.default.encode(t["Email Address"]),d.transactionId,A.modifyOutreachCodeForOptimizelyCampaign(e.outreachCode))),a(i.data)}).catch(e=>{i(e.response)})})},updateReferral(e){let t=(0,T.aK)();return new Promise((a,n)=>{(0,S.a)({data:e,method:"PUT",skipAuthorization:!0,url:t}).then(e=>{a(e.data)}).catch(e=>{n(e.response)})})},getFacilityById(e){let t=(0,T.s0)(e);return new Promise((e,a)=>{(0,S.a)({method:"GET",skipAuthorization:!0,url:t}).then(t=>{e(t.data)}).catch(e=>{a(e.response)})})}},N=a(24873),L=a(20034),P=a(49600),k=a(61957),x=a(90542),D=a(21145),_=a(91949),O=a(83111),Z=a(30021),M=a(32880),j=a(93249),V=a(17133),U=a(34463),G=a(10021),R=a(75077),$=a(88258),B=a(41198),q=a(802),z=a(29251),W=a(8031),Y=a(90841),X=a.n(Y);let H=s()(()=>Promise.all([a.e(2811),a.e(9947),a.e(2666),a.e(8013),a.e(5820)]).then(a.bind(a,15820)),{loadableGenerated:{webpack:()=>[15820]}}),J=s()(()=>Promise.all([a.e(5158),a.e(2761)]).then(a.bind(a,32761)),{loadableGenerated:{webpack:()=>[32761]}}),K=s()(()=>Promise.all([a.e(5158),a.e(8721),a.e(9947),a.e(6777),a.e(3333),a.e(804),a.e(6202),a.e(2200),a.e(2666),a.e(7536),a.e(517),a.e(917),a.e(6706),a.e(9382),a.e(6066),a.e(8013),a.e(3843),a.e(7380),a.e(9669),a.e(6034),a.e(9483)]).then(a.bind(a,65943)),{loadableGenerated:{webpack:()=>[65943]}}),Q=s()(()=>Promise.all([a.e(804),a.e(7536),a.e(7380),a.e(6312)]).then(a.bind(a,87380)),{loadableGenerated:{webpack:()=>[87380]}}),ee=s()(()=>Promise.all([a.e(5158),a.e(9947),a.e(6777),a.e(3333),a.e(804),a.e(6202),a.e(2200),a.e(2666),a.e(7536),a.e(517),a.e(917),a.e(6706),a.e(9382),a.e(6066),a.e(8013),a.e(3843),a.e(7380),a.e(9669),a.e(522)]).then(a.bind(a,11170)),{loadableGenerated:{webpack:()=>[11170]}}),et=s()(()=>Promise.all([a.e(9947),a.e(3638)]).then(a.bind(a,93638)),{loadableGenerated:{webpack:()=>[93638]}}),ea=s()(()=>Promise.all([a.e(9947),a.e(5017)]).then(a.bind(a,25017)),{loadableGenerated:{webpack:()=>[25017]}}),en=s()(()=>Promise.all([a.e(9947),a.e(2666),a.e(8013),a.e(4597)]).then(a.bind(a,24597)),{loadableGenerated:{webpack:()=>[24597]}}),ei=s()(()=>Promise.all([a.e(4589),a.e(1593)]).then(a.bind(a,81593)),{loadableGenerated:{webpack:()=>[81593]}}),eo=s()(()=>Promise.all([a.e(5158),a.e(9947),a.e(1821)]).then(a.bind(a,41821)),{loadableGenerated:{webpack:()=>[41821]}}),er=s()(()=>Promise.all([a.e(9947),a.e(9382),a.e(6374)]).then(a.bind(a,36374)),{loadableGenerated:{webpack:()=>[36374]}}),el=s()(()=>Promise.all([a.e(5158),a.e(9947),a.e(6066),a.e(4391)]).then(a.bind(a,34391)),{loadableGenerated:{webpack:()=>[34391]}}),es=s()(()=>Promise.all([a.e(9947),a.e(9084)]).then(a.bind(a,19084)),{loadableGenerated:{webpack:()=>[19084]}}),ec=s()(()=>Promise.all([a.e(9947),a.e(8513)]).then(a.bind(a,18513)),{loadableGenerated:{webpack:()=>[18513]}}),ed=s()(()=>Promise.all([a.e(5158),a.e(9947),a.e(6777),a.e(3333),a.e(804),a.e(6202),a.e(2200),a.e(2666),a.e(7536),a.e(517),a.e(917),a.e(6706),a.e(9382),a.e(6066),a.e(8013),a.e(3843),a.e(7380),a.e(9669),a.e(522)]).then(a.bind(a,56433)),{loadableGenerated:{webpack:()=>[56433]}}),eu=({ctaEvent:e,data:t={}
1,facility:a=null,isClubDetail:l=!1,isPromo:s=!1,page:d,referrerDetails:u,referringId:y})=>{let I,w;let{acdlPush:C,getLastPageLoadData:E}=(0,G.Z)(),{decrementActivityCount:v,incrementActivityCount:S,isActive:T}=(0,R.Z)(),Y=(0,V.Z)("data-opt-rrr-1062"),eu=(0,V.Z)("data-opt-rrr-1174"),{setNewDataLayer:ep}=(0,p.useContext)(_.K),{getDataLayerInfo:em}=(0,p.useContext)(O.St),ef=(0,p.useRef)(!1),ey=(0,p.useRef)(!1),eh=(0,p.useRef)(!1),eg=(0,p.useRef)(!1),eb=(0,c.useRouter)(),[eI,ew]=(0,p.useState)(""),[eC,eE]=(0,p.useState)(z.Y),[eA,ev]=(0,p.useState)(!1),[eS,eT]=(0,p.useState)(!1),[eF,eN]=(0,p.useState)([]),[eL,eP]=(0,p.useState)([]),[ek,ex]=(0,p.useState)(null),[eD,e_]=(0,p.useState)([]),[eO,eZ]=(0,p.useState)(!1),[eM,ej]=(0,p.useState)(!1),[eV,eU]=(0,p.useState)(!1),[eG,eR]=(0,p.useState)(""),e$=!!Y&&"control"!==Y,{isInEditMode:eB,leadTokenId:eq,personalizeOptionsStep:ez,selectedAppointment:eW,scheduledFacility:eY,selectedFacility:eX,showGuidedWorkouts:eH,step:eJ,stepOrder:eK=z.Y.stepOrder,submittedAppointment:eQ,suggestedFacility:e0}=eC,e1=(0,p.useRef)(!1),e6=eW?(0,i.WU)(eW,"yyyy-MM-dd"):"",e3=eW?(0,i.WU)(eW,"h:mm a"):"",e2=eX||eY||e0,e7=e2||a,e8=e7?.status===P.fv.COMING_SOON,e5=e7?.status===P.fv.PRESALE,e9=(e8||e5)&&(t?.isPresaleBookVisitHidden??!0),e4="/membership"===eb.pathname&&e2?.hasGuidedWorkouts,te=(0,p.useMemo)(()=>{if("undefined"!=typeof document){let e=document.querySelector('[data-is="GlobalHeader"]');if(e)return e.offsetHeight+46}return 0},[]),{ref:tt,inView:ta}=(0,f.YD)({rootMargin:`-${te}px`,triggerOnce:!1});(0,p.useEffect)(()=>(ta&&document.body.setAttribute("data-lead-flow-visible","true"),()=>{document.body.removeAttribute("data-lead-flow-visible")}),[ta]);let tn=t?.contentContactInformation?.fields,ti=t?.contentScheduleVisit?.fields,to=tn?.config?.zipCodeLabel,tr=!!tn?.config?.isZipCodeRequired;if(t?.headlines?.length>0)I=t?.headlines?.[Math.min(eJ,t?.headlines?.length-1)];else switch(eJ){case z.S.contactInformation:I={fields:{...t?.headlineContactInformation?.fields}},I?.fields?.subcopy&&e4&&(I.fields.subcopy=I?.fields?.subcopy+"\n\nWe are a members only club. We invite you to take a guided tour or a complimentary workout.");break;case z.S.scheduleAppointment:I=eH?t?.headlineScheduleWorkout:t?.headlineScheduleVisit;break;case z.S.appointmentConfirmation:I=t?.headlineConfirmation}if(e$)switch(eJ){case z.S.contactInformation:if(eK[1]===z.S.contactInformation){if(eQ){let e;I.fields.title=`Your visit to ${e2?.webName}`,e=(0,o.z)(eQ)?"Today":(0,r.P)(eQ)?"Tomorrow":(0,i.WU)(eQ,"EEEE");let t=(0,i.WU)(eQ,"MMMM d 'at' h:mm a");I.fields.subcopy=`${e}, ${t}`,I.fields.references=[]}else I.fields.title="Continue your Inquiry",I.fields.subcopy="Provide your details and receive an email from us to learn more.",I.fields.references=[{fields:{title:" "}}]}break;case z.S.scheduleAppointment:if(eK[0]===z.S.scheduleAppointment){(I=t?.headlines?.length>0?{fields:{...t?.headlines?.[0]?.fields||{}}}:{fields:{...t?.headlineContactInformation?.fields||{}}}).fields.references||(I.fields.references=[]);let e=t?.headlineScheduleVisit?.fields?.references?.[0];e&&(I.fields.references[0]=e),I.fields.title="Schedule your visit",I.fields.subcopy=null}}let tl=l||s||"/"===eb.pathname||["club-details",b.NB.pageNames.groupFitnessLanding,"groupfitness","groupfitness-category","groupfitness-class",b.NB.pageNames.landing,"memberbenefits","personaltraining","pilates","referrals","sleep"].includes(d),ts="/inquiry/schedule-your-visit"===eb.pathname||"/membership"===eb.pathname||eb.pathname?.indexOf("/membership/")===0,tc=eb.pathname?.indexOf("/clubs")!==0||eC?.hasCreatedLead||eC?.contactInput!==null,td=(eJ===z.S.appointmentConfirmation&&!e2?.isAcceptingAppointments&&5!==ez||eJ===z.S.scheduleAppointment)&&e2?.facilityId&&!ts&&tc&&!y;(0,p.useEffect)(()=>{eb?.pathname!=="/inquiry/schedule-your-visit"&&(eb?.pathname==="/membership"||!eC?.suggestedFacility?.shortName)&&eC?.contactInput===null&&eA&&(0,W.clearStoredState)(),ts&&!eg.current&&(C({club:(0,G.E)(e2),event:k.U.leadFlow,leadFlow:{category:L.X0.ENGAGE,section:"lead-view",step:"lead-view",type:tl?"embedded":"non-embedded"},page:E(),user:em()}),eg.current=!0)},[C,e2,eC,em,E,eA,tl,eg,eb,ts]);let tu=(0,p.useCallback)(async()=>{S();let e={...eC};if(eJ===z.S.scheduleAppointment&&eK[0]===z.S.scheduleAppointment)e.step=eK[1];else if(e.scheduledFacility=e2,e.step=z.S.appointmentConfirmation,eQ||eC.referringId)eC.referringId&&await B.Z.updateLead(eC);else{let t=await B.Z.updateAbandonedLead(e);e.leadTokenId=t}eE(e),v()},[e2,eC,eQ,eJ,eK,eE,S,v]),tp=(0,p.useCallback)(async e=>{if(e){let t=await B.Z.getOpenLeadTimesFromFacilityId(e);t?.length===0&&eJ===z.S.scheduleAppointment?tu():eN(t)}else eN([])},[tu,eJ]),tm=async e=>{e?eP(await B.Z.fetchWorkoutAppointments(e)):eP([])},tf=async e=>{e?ex(await (0,N.LN)(e)):ex([])},ty=(0,p.useCallback)(async e=>{S();let t={...eC,showGuidedWorkouts:!1},a=(0,W.isClubAcceptingAppointments)(e,eC.config),n=await (0,N.z4)(e.facilityId);if(t.selectedFacility={...n,...e,isAcceptingAppointments:a},e$&&A.saveContactInputToSession({},"lead",t.selectedFacility),!a&&(eJ===z.S.scheduleAppointment&&(eN([]),eP([]),t.selectedAppointment=null),eC.hasCreatedLead)){let a=await B.Z.updateAbandonedLead({...eC,club:e});t.leadTokenId=a}eE(t),eT(!1),v()},[eC,eJ,e$,S,v,eT,eE]),th=(0,p.useCallback)(()=>{eT(!0),C({club:(0,G.E)(e2),event:k.U.leadFlow,leadFlow:{category:L.X0.ENGAGE,section:"lead view",step:"club change initiated",type:tl?"embedded":"non-embedded"},page:E(),user:em()})},[C,e2,em,E,tl]),tg=async(e,t)=>{if(e){let a;e2?.isAcceptingAppointments?t.step===z.S.contactInformation&&t.stepOrder[0]===z.S.scheduleAppointment?(a=await B.Z.updateAbandonedLead({...t,leadTransactionId:t?.leadTransactionId?t.leadTransactionId:e.leadTransactionId||e.transactionId}),t.step=z.S.appointmentConfirmation):(t.selectedFacility=e2,t.step=z.S.scheduleAppointment):(t.scheduledFacility=e2,t.step=z.S.appointmentConfirmation,y||(a=await B.Z.updateAbandonedLead({...t,leadTransactionId:t?.leadTransactionId?t.leadTransactionId:e.leadTransactionId||e.transactionId}))),a&&(t.leadTokenId=a),e?.associationToken&&(t.leadTokenId=e?.associationToken),t.hasCreatedLead=!0,t.leadTransactionId=eC?.referrerDetails?e.associationToken:t.leadTransactionId||e.leadTransactionId||e.transactionId,e$&&t.step!==z.S.contactInformation&&A.clearContactInputFromSession("lead")}else ew("An error has occurred. If you've just shared your email address with us, please wait a bit before trying again, or use a different one.");eE({...t}),v()},tb=async e=>{let t;S(),e?.leadTransactionId?t=await B.Z.updateAbandonedLead({...e,leadTransactionId:e.leadTransactionId}
1):(t=await B.Z.createNewLead({acdlPageData:E(),isEmbedded:tl,leadFlowState:e,setNewDataLayer:ep}),C({club:(0,G.E)(e2),event:k.U.leadFlow,leadFlow:{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),category:L.X0.ENGAGE,section:"lead view",step:L.CL.SUBMIT,transactionID:t?.leadTransactionId,type:tl?"embedded":"non-embedded"},page:E(),user:em()}),(0,U.OO)("lead-flow")),tg(t,e),eE({...e}),v()},tI=async e=>{let t=await Z.Z.createEmailCode(e);if(t?.status===200)return e.corporateAccountId=t.data.corporateAccountId,e.corporateContactId=t.data.corporateContactId,e.companyName=t.data.name,j.PZ(e),eb.push("/join/corp");ew("An error has occurred. If you've just shared your email address with us, please wait a bit before trying again, or use a different one.")},tw=async(e,t,a="")=>{let n=sessionStorage.getItem("eqxCurrentUrl"),i=sessionStorage.getItem("eqxPreviousUrl"),o={contactInput:{"Company Email":e["Company Email (optional)"],"First Name":e["First Name"],"Last Name":e["Last Name"],"Personal Email":e["Email Address"],"Phone Number":e["Phone Number"]},createdDate:new Date().getTime(),ctaLabel:"Visit A Club",hasCreatedCorp:null,isReferralFlow:!!y,leadTokenId:a,leadTransactionId:"",outreachCode:A.modifyOutreachCodeForOptimizelyCampaign(t.outreachCode),receiveTextAlerts:e.receiveTextAlerts,referringCtaLabel:"Get Started",referringUrl:i,scheduledFacility:null,selectedFacility:e2,sourceUrl:n,step:M.S.emailCodeConfirmation,subscribeToNewsletter:e.subscribeToNewsletter,suggestedFacility:null};if(j.PZ(o),y)await tI(o);else{let e=await Z.Z.createNewCorp(o,ep);e?.status===200?(o.leadTransactionId=e?.TransactionId,await tI(o)):ew("An error has occurred. If you've just shared your email address with us, please wait a bit before trying again, or use a different one.")}eE(t)},tC=async e=>{ew("");let t={...eC,contactInput:{...e},leadTransactionId:"",membershipPlanName:eb.query.planType,receiveTextAlerts:e.receiveTextAlerts,subscribeToNewsletter:e.subscribeToNewsletter};S(),eE(t);let a=!1;try{if(e["Company Email (optional)"]){let n=await Z.Z.verifyValidCorpEmail(e["Company Email (optional)"],e2?.facilityId);a=n?.domainVerified,t.showNonEligibleBanner=!n?.domainVerified}if(y){let n=await F.createReferral({formState:eC,formValues:{"Email Address":e?.email_address,"First Name":e?.first_name,"Last Name":e?.last_name,"Phone Number":e?.phone_number,"Zip Code":e?.postal_code},receiveTextAlerts:e.receiveTextAlerts,setNewDataLayer:ep,subscribeToNewsletter:e.subscribeToNewsletter});if(a)tw(e,t,n.associationToken);else{let e=!!n?.result&&n;tg(e,t)}}else a?tw(e,t):(tb(t),v())}catch(e){console.error(e),C({club:(0,G.E)(e2),event:k.U.pageLoad,leadFlow:{category:L.X0.ENGAGE,error:e,section:"lead-view",step:"lead error",type:tl?"embedded":"non-embedded"},page:{category:"lead-gen",name:"eqx:membership:membership | survey-influence",section:k.M.sections.membership,subSection:"membership",type:k.M.types.programmatic},user:em()}),v()}},tE=async e=>{S();let t={...eC,contactInput:{...e}};eE(t);let a=t?.leadTransactionId?await B.Z.updateAbandonedLead({...t,leadTransactionId:t.leadTransactionId}):await B.Z.createNewLead({acdlPageData:E(),isEmbedded:tl,leadFlowState:t,setNewDataLayer:ep});if(a){if("boolean"!=typeof e2?.isAcceptingAppointments&&(e2.isAcceptingAppointments=(0,W.isClubAcceptingAppointments)(e2,eC.config)),e2?.isAcceptingAppointments){t.selectedFacility=e2,t.showGuidedWorkouts=!0;let e=await B.Z.fetchWorkoutAppointments(e2?.facilityId);e.length>=0?(t.step=z.S.scheduleAppointment,eP(e)):ew("An error has occurred.")}else if(t.scheduledFacility=e2,t.step=z.S.appointmentConfirmation,!y){let e=await B.Z.updateAbandonedLead({...t,leadTransactionId:t?.leadTransactionId?t.leadTransactionId:a.leadTransactionId});e&&(t.leadTokenId=e)}a?.associationToken&&(t.leadTokenId=a?.associationToken),t.hasCreatedLead=!0,t.leadTransactionId=eC?.referrerDetails?a.associationToken:t.leadTransactionId||a.leadTransactionId}else ew("An error has occurred. If you've just shared your email address with us, please wait a bit before trying again, or use a different one.");e$&&t.step!==z.S.contactInformation&&A.clearContactInputFromSession("lead"),eE(t),v()},tA=async(e,t)=>{S(),await B.Z.updateLead({leadTokenId:eq,personalizeOptions:e,scheduledFacility:e2}),t<q.personalizeQuiz.length-1&&C((0,A.getAcdlPageLoadDataForStep)(t,em(),E())),eE({...eC,personalizeOptions:e,personalizeOptionsStep:t}),v()},tv=async(e,t)=>{let a=e.split("T")[1];if(S(),eQ||y||eC?.referringId)t||C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),category:L.X0.ENGAGE,date:e6,section:"survey-experience",step:"lead schedule initiated",timing:e3},page:E(),user:em()}),window.VWO?.event?.("submittedLeadForm",{clubName:e2?.webName}),await B.Z.updateLead({leadTokenId:eq,scheduledFacility:e2,scheduledVisitTime:e},ep)||alert("An error has occurred."),eE({...eC,previousStep:z.S.scheduleAppointment,scheduledFacility:e2,scheduledVisitHour:a,scheduledVisitTime:e,step:z.S.appointmentConfirmation,submittedAppointment:e});else{let t={};eK[0]===z.S.scheduleAppointment?t.step=eK[1]:(t.leadTokenId=await B.Z.updateAbandonedLead({...eC,meetingPurpose:D.N.TOUR,scheduledVisitTime:e}),t.step=z.S.appointmentConfirmation),eE({...eC,...t,meetingPurpose:D.N.TOUR,previousStep:z.S.scheduleAppointment,scheduledFacility:e2,scheduledVisitHour:a,scheduledVisitTime:e,submittedAppointment:e})}v()},tS=(0,p.useCallback)(async()=>{await tu()},[tu]),tT=async e=>{let t=e.split("T")[1];
1if(S(),eQ||y)await B.Z.updateLead({leadTokenId:eq,scheduledFacility:eY,scheduledVisitTime:e,selectedFacility:e2},ep)||alert("An error has occurred."),eE({...eC,previousStep:z.S.scheduleAppointment,scheduledFacility:e2,scheduledVisitHour:t,scheduledVisitTime:e,step:z.S.appointmentConfirmation,submittedAppointment:e});else{let a=await B.Z.updateAbandonedLead({...eC,meetingPurpose:D.N.WORKOUT,scheduledVisitTime:e});eE({...eC,leadTokenId:a,meetingPurpose:D.N.WORKOUT,previousStep:z.S.scheduleAppointment,scheduledFacility:e2,scheduledVisitHour:t,scheduledVisitTime:e,step:z.S.appointmentConfirmation,submittedAppointment:e})}v()},tF=async()=>{S();let e={...eC,scheduledFacility:e2,step:z.S.appointmentConfirmation};if(eQ||y)y&&await B.Z.updateLead(eC);else{let t=await B.Z.updateAbandonedLead(e);e.leadTokenId=t}eE(e),v()},tN=async()=>{S(),C({click:{destination:"NA",location:"Cancel confirmation| body",name:"Yes",section:"survey-experience"},club:(0,G.E)(e2),event:k.U.modClick,module:{name:"modalTapped",position:"1:1",type:"modal"},user:em()}),eE({...eC,cancelAppointmentStatus:null});let e=await B.Z.cancelAppointment({leadTokenId:eq,leadTransactionId:eC?.leadTransactionId});e?.status===200&&e?.data?.success?(ej(!1),eE({...eC,cancelAppointmentStatus:"success",scheduledVisitHour:null,scheduledVisitTime:null,submittedAppointment:null}),C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),category:L.X0.ENGAGE,date:e6,section:"survey-experience",step:"lead schedule cancelled",timing:e3},page:E(),user:em()})):eE({...eC,cancelAppointmentStatus:"An unexpected error has occurred. Please close out of the pop-up and try again."}),v()},tL=(0,p.useCallback)(async e=>{if(e)try{let t=await B.Z.fetchClassCountsByFacility(eC,e);if(!t){e_([]);return}let{classes:a}=t||{},{personalizeOptions:n}=eC||{};if(a&&n){let e=a.map(e=>{let t=n.find(t=>t.categoryId===e.categoryId);return t?{count:e.classCount,title:t.additionalInfo}:null}).filter(e=>null!==e);e_(e)}else console.warn("No classes or personalizeOptions available."),e_([])}catch(e){console.error("Error fetching class recommendations: ",e),e_([])}else e_([])},[eC]),tP=h()(t?.subNavLabel||"Lead Flow").toLowerCase(),tk=`${tl?"lead-flow-embedded":"lead-flow-button-overlay"}, ${s?"lead-flow-schedule":"lead-flow-contact"}`,tx=y&&eC?.referrerDetails?.firstName?(0,$.Z)(I?.fields.title,{"{{FIRST_NAME}}":eC?.referrerDetails?.firstName}):I?.fields.title,tD=eC?.contactInput?.first_name?`,
2${eC?.contactInput?.first_name}.`:"";w=eJ!==z.S.appointmentConfirmation||eQ?eQ?`${tx}${tD}`:tx:`${I?.fields.alternateTitle||tx}${tD}`,(0,p.useEffect)(()=>{ta&&!e1.current&&(e1.current=!0,(0,U.tU)("viewed_lead_form",{},{URL:window.location.href}))},[ta]),(0,p.useEffect)(()=>{!y&&eA&&(0,W.updateStoredState)(eC)},[eA,eC,y]),(0,p.useEffect)(()=>{eA&&!e$&&eJ!==z.S.contactInformation&&A.clearContactInputFromSession("lead")},[eA,e$,eJ]),(0,p.useEffect)(()=>{let e=async()=>{let e,n;if(eh.current)return;eh.current=!0,S();let i=(0,W.getStoredState)(),{config:o,joinMarketingCode:r,marketingCode:l}=t,c={...i||z.Y},d=new URLSearchParams(new URL(window.location.href).search);if(d.has("firstName"))c.isRedirectFromFormerMember=!0,c.contactInput={},c.contactInput["First Name"]=d.get("firstName"),c.contactInput["Last Name"]=d.get("lastName"),c.contactInput["Email Address"]=d.get("email");else{let t=new m.Z().get(x.PAYMENT_JOIN_PRODUCT_TOKEN.name);if(t){let a=await g.Z.getProductDetails(t),n=a?.productBase?.buyer;c.contactInput={},c.contactInput["First Name"]=n?.firstName,c.contactInput["Last Name"]=n?.lastName,c.contactInput["Email Address"]=n?.email,c.contactInput["Phone Number"]=n?.phone,c.leadTransactionId=a?.transactionNumber,c.step=z.S.scheduleAppointment,e=a?.selectedClubDetails?.facilityId}}if(c.config=o,c.contentfulData=t,c.isPromo=s,c.joinOutreachCode=r,c.outreachCode=l,y&&(c.referrerDetails=u,c.referringId=y),a?.facilityId||e){try{n=await (0,N.Ul)(a?.facilityId||e)}catch(e){console.error("Error fetching facility data:",e),n={}}c.suggestedFacility={...a,...n,isAcceptingAppointments:(0,W.isClubAcceptingAppointments)(n,o)}
2,A.syncSessionSelectedClub("lead",c.suggestedFacility)}c.selectedFacility?.facilityId&&(c.selectedFacility.isAcceptingAppointments=(0,W.isClubAcceptingAppointments)(c.selectedFacility,o)),["/inquiry/schedule-your-visit","/membership"].includes(eb.pathname)||tl||C(L.YY.leadView({...a,...n},E())),eE(c),ev(!0),v(),eh.current=!1};eA||e()},[C,t,v,a,E,eA,S,tl,s,u,y,eb.pathname]),(0,p.useEffect)(()=>{let e=async e=>{if(!ey.current){ey.current=!0,S();try{let a=await (0,N.Ul)(e?.facilityId);eE(n=>({...n,selectedFacility:null,suggestedFacility:{...e,...a,isAcceptingAppointments:(0,W.isClubAcceptingAppointments)(a,t.config)}})),A.syncSessionSelectedClub("lead",a)}catch(a){console.error("Error fetching facility data:",a),eE(a=>({...a,selectedFacility:null,suggestedFacility:{...e,isAcceptingAppointments:(0,W.isClubAcceptingAppointments)(e,t.config)}})),A.syncSessionSelectedClub("lead",e)}finally{v(),ey.current=!1}}};eA&&a?.facilityId&&a?.facilityId!==e0?.facilityId&&e(a)},[t.config,v,a,eA,S,e0?.facilityId]),(0,p.useEffect)(()=>{td?eb.push("/inquiry/schedule-your-visit"):eK[0]===eJ||tl||(document?.querySelector(`.${X().leadFlow}`)?.scrollIntoView(!0),document?.querySelector(`.${X().formContent}`)?.scroll(0,0))},[tl,ez,td,eb,eJ,eK]),(0,p.useEffect)(()=>{eA&&e2?.isAcceptingAppointments&&(eJ===z.S.scheduleAppointment||eJ===z.S.appointmentConfirmation)&&(eH?tm(e2?.facilityId):tp(e2?.facilityId))},[e2?.facilityId,e2?.isAcceptingAppointments,tp,eA,eH,eJ]),(0,p.useEffect)(()=>{eJ===z.S.appointmentConfirmation&&5===ez&&(tf(e2?.facilityId),tL(e2?.facilityId))},[e2?.facilityId,tL,eJ,ez]),(0,p.useEffect)(()=>{eA&&(e$?eE(e=>({...e,step:z.S.scheduleAppointment,stepOrder:[z.S.scheduleAppointment,z.S.contactInformation]})):eE(e=>e?.stepOrder?.[0]===z.S.scheduleAppointment?{...e,scheduledVisitHour:null,scheduledVisitTime:null,step:z.S.contactInformation,stepOrder:[z.S.contactInformation,z.S.scheduleAppointment],submittedAppointment:null}:e))},[eA,e$]);let t_=async(...e)=>{await (eH?tT(...e):tv(...e));let t=(0,i.WU)(...e,"EEE, MMMM d 'at' h:mma");C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{category:L.X0.ENGAGE,section:"book-visit",step:L.CL.SCHEDULE_A_VISIT_CONFIRMATION,visitTime:t},page:E(),user:em()})},tO=async(...e)=>{await (eH?tF(...e):tS(...e)),C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{category:L.X0.ENGAGE,section:"book-visit",step:L.CL.SCHEDULE_A_VISIT_CONFIRMATION,visitTime:""},page:E(),user:em()})},tZ=()=>{C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),category:L.X0.ENGAGE,date:e6,section:"survey-experience",step:"lead reschedule initiated",timing:e3},page:E(),user:em()}),eZ(!0)};if(!eA)return(0,n.jsx)("section",{children:(0,n.jsx)(J,{className:X().loader,color:"light"})});let tM=(e,t)=>{let a=tn?.config?.[e]?.reference;if(!a&&0!==a){tn?.config&&console.warn(`LeadFlow: Missing reference key "${e}" in contactInformationContentFields.config`);return}let n=tn?.references?.[a]?.fields;return!n&&tn?.references&&console.warn(`LeadFlow: Reference "${a}" not found in contactInformationContentFields.references for ${t}`),n?.text||n?.title},tj=tM("contactFormHeaderTitle","contact form header title")||"2 steps, and you're in.",tV=(e8||e5)&&t?.presaleSubheading||tj,tU=tM("ctaTextBookAVisit","cta button book a visit")||"Book Your Visit",tG=(e8||e5)&&t?.presaleCtaText||tU;return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("section",{className:X().leadFlow,"data-analytics":tk,"data-has-hydrated":eA,"data-is":"LeadFlow","data-is-embedded":tl,"data-testid":b.NB.testIds.leadFlow,id:tP,children:[(0,n.jsx)(K,{initialPostalCode:eG,isOpen:eS,onChangeClub:ty,onClose:()=>{eT(!1)},subTitle:tM("clubSelectionDescription","club selection description")}),I&&(0,n.jsx)(et,{...I?.fields,headingLevel:tl?2:1,title:w}),(0,n.jsxs)("div",{className:X().formContent,ref:tt,children:[(0,n.jsx)(ea,{className:X().selectionsStatus,currentSelectionIndex:eK.findIndex(e=>e===eJ),selections:(()=>{if(eJ===z.S.contactInformation){if(eK[0]===z.S.scheduleAppointment)return[{label:"01",placeholder:"Book Visit"},{label:"02",placeholder:"Personal Info"}];let e={label:e2?.webName?"YOUR CLUB":"01",placeholder:"Select Club",value:e2?.webName};return e9?[e]:[e,{label:"02",placeholder:"Book Visit"}]}if(eJ===z.S.scheduleAppointment){if(eK[0]===z.S.scheduleAppointment)return[{label:"01",placeholder:"Book Visit"},{label:"02",placeholder:"Personal Info"}];let e={label:e2?.webName?"YOUR CLUB":"01",placeholder:"YOUR CLUB",value:e2?.webName};return e9?[e]:[e,{label:eC.selectedAppointment?"DATE & TIME":"02",placeholder:"Book Visit",value:eC.selectedAppointment&&(0,i.WU)(eC.selectedAppointment,"d MMMM EEE, h:mma")}]}return[]})()}),eI&&(0,n.jsx)("p",{className:X().errorMessage,children:eI}
2),eJ===z.S.contactInformation&&(0,n.jsx)(Q,{canSelectClub:eK[0]===z.S.contactInformation&&null===eQ&&e2?.isAcceptingAppointments,ctaButtonText:eQ||eK[1]!==z.S.contactInformation?tG:"Submit",ctaEvent:e,currentFacility:e2,formTitle:eK[1]===z.S.contactInformation?"":tV,formValues:eC.contactInput,getDataLayerInfo:em,hasGuidedWorkoutCta:e4,hasJoinAction:!t?.hideJoinAction,hasLeadAction:!t?.hideLeadAction,hasNonEligibleBanner:eC.showNonEligibleBanner,isEmbedded:tl,isLoading:T,isRedirectFromFormerMember:eC.isRedirectFromFormerMember,isZipCodeRequired:tr,onChangeClub:ty,onGuidedWorkoutClick:tE,onInView:()=>{ef.current||(ef.current=!0,C({event:k.U.leadFlow,leadFlow:{category:L.X0.ENGAGE,section:"lead-view",step:"lead-view",type:tl?"embedded":"non-embedded"},page:E(),user:em()}))},onPostalCodeChange:e=>{eR(e)},onSelectClubClick:th,onSubmit:tC,referringId:y,selectClubCtaText:{text:tM("ctaTextSelectAClub","cta button select a club")||"Select a Club to Visit"},shouldPersistContactInput:!0,variant:Y,zipCodeLabel:to}),eJ===z.S.scheduleAppointment&&(ts||y)&&(0,n.jsx)(ed,{appointment:eQ,appointmentType:eH?"Workout":"Visit",appointments:eH?eL:eF,canSelectClub:eK[0]===z.S.scheduleAppointment||!(0,W.isClubAcceptingAppointments)(e2,eC.config),currentFacility:e2,isEditing:!eC?.referringId&&eB,isReferral:!!y||!!eC?.referringId,onClubEdit:th,onSchedule:t_,onSelect:e=>{eE({...eC,selectedAppointment:e})},onSkip:tO,showCorpLeadIneligibility:eC.showNonEligibleBanner,tourInfo:ti,variant:Y}),eJ===z.S.appointmentConfirmation&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(en,{appointment:eQ,facility:e2,onExportToCalendar:()=>{eU(!0)},onInView:()=>{(0,U.tU)("viewed_appointment_confirmation_screen",{})},onReschedule:()=>{tZ()}}),"2:2"===eu&&(0,n.jsx)(ei,{hasBookedVisit:null!==eQ}),5===ez&&(0,n.jsxs)(n.Fragment,{children:[eD?.length>0&&(0,n.jsx)(er,{currentFacility:e2,getDataLayerInfo:em,slides:eD}),(0,n.jsx)(el,{clubName:e2.webName,isLandscapeGallery:!0,slides:ek})]}),(0,n.jsx)(es,{currentFacility:e2,getDataLayerInfo:em,onCtaClick:tA,personalizeOptionsStep:eC.personalizeOptionsStep}),(0,n.jsx)(eo,{cancelStatus:eC.cancelAppointmentStatus,facility:e2,isLoading:T,isOpen:eM,onCancelAppointment:tN,onClose:()=>{ej(!1),C({click:{destination:"NA",location:"Cancel confirmation| body",name:"No",section:"survey-experience"},club:(0,G.E)(e2),event:k.U.modClick,module:{name:"modalTapped",position:"1:1",type:"modal"},user:em()}),eE({...eC,cancelAppointmentStatus:null})},onGoToHome:()=>{eE({...z.Y}),eb.push("/")},setFormState:eE}),eQ&&(0,n.jsx)(H,{facility:e2,flowType:"new-lead-flow",getDataLayerInfo:em,isOpen:eV,onClose:()=>{eU(!1)},submittedAppointment:eQ}),eQ&&(0,n.jsx)(ec,{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),appointments:eH?eL:eF,facility:{...e2,imageUrl:e2?.imageUrl||e2?.thumbnail?.fields?.file?.url},getDataLayerInfo:em,isOpen:eO,onCancelAppointment:()=>{C({club:(0,G.E)(e2),event:k.U.leadVisit,leadFlow:{activationCode:A.modifyOutreachCodeForOptimizelyCampaign(eC?.outreachCode),category:L.X0.ENGAGE,date:e6,section:"survey-experience",step:"lead schedule cancel initiated",timing:e3},page:E(),user:em()}),ej(!0)},onClose:()=>{eZ(!1)},setSelectedAppointment:eH?tT:e=>tv(e,"reschedule")})]}),T&&!eM&&(0,n.jsx)(J,{className:X().loader,color:"light"})]}),!eS&&!tl&&!s&&(0,n.jsx)(ee,{defaultExitPath:"/",description:"Your progress will not be saved.",skipConfirmation:!0})]})})};eu.propTypes={ctaEvent:u().string,data:u().object.isRequired,facility:u().object,isClubDetail:u().bool,isPromo:u().bool,page:u().string,referrerDetails:u().object,referringId:u().string};var ep=eu},802:function(e,t,a){"use strict";a.r(t),a.d(t,{parseConfigFromContentful:function(){return s},personalizeQuiz:function(){return r},textContent:function(){return o}});var n=a(85893);a(67294);var i=a(20034);let o={optInText:"Sign up to get texts from Equinox about exclusive invites, promotions, and news.",termsText:(0,n.jsxs)(n.Fragment,{children:["By checking this box, you agree to receive recurring automated promotional and personalized marketing text messages (e.g. promotions or cart reminders) from Equinox at the cell number used when signing up. Consent is not a condition of any purchase. Reply HELP for help and 
2STOP to cancel. Msg frequency varies. Msg & data rates may apply. View",(0,n.jsx)("a",{"aria-label":"Terms (Opens in a new window)",href:"/terms",rel:"noopener noreferrer",target:"_blank",children:"Terms"}),"\xa0and",(0,n.jsx)("a",{"aria-label":"Privacy (Opens in a new window)",href:"/privacy",rel:"noopener noreferrer",target:"_blank",children:"Privacy"}),"."]}),ukLegalSubText:"**Please note that, even if you elect not to receive marketing materials, by completing and submitting this form you are requesting that an Equinox Membership Advisor contact you regarding membership and are agreeing that a Membership Advisor may contact you for such purpose, including by providing with you with information on any current new member specials.",ukOptInCBText:"Want to receive exclusive invites, promotions, and news?",ukOptInText:(0,n.jsxs)(n.Fragment,{children:["We'd like to send you exclusive invites, promotions and the latest news from Equinox Fitness Holdings UK Limited. We will only send you marketing materials we think will be of interest to you and you can unsubscribe any time. If you want to receive marketing offers and materials from us, please tick the box.** Learn more about our practices, and your rights and choices, in our",(0,n.jsx)("a",{href:"/privacy",rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"}),"."]})},r=[{ctaText:"Personalize visit",heading:"You're almost done!",subText:"Tell us about yourself so we can personalize your visit for you.",trackingName:"survey-start"},{allowMultiple:!0,content:[{categoryId:"2, 4, 5, 105, 106, 212",context:"control",id:"83",name:"Cardio Conditioning"},{categoryId:"5",context:"control",id:"84",name:"Athletic Training"},{categoryId:"0",context:"control",id:"85",name:"Specialty Classes"},{categoryId:"104",context:"control",id:"86",name:"Yoga"},{categoryId:"105",context:"both",id:"87",name:"Pilates"},{categoryId:"6",context:"control",id:"88",name:"Cycling"},{categoryId:"4",context:"control",id:"89",name:"Barre"},{context:"control",id:"90",name:"Amenities"},{categoryId:"5",context:"both",id:"91",name:"Personal Training"},{context:"control",id:"92",name:"Equipment"},{context:"both",id:"93",name:"Spa"},{categoryId:"204",context:"control",id:"94",name:"Other"},{categoryId:"106",context:"control",id:"125",name:"Dance"},{categoryId:"2",context:"control",id:"124",name:"Boxing and Martial Arts"},{categoryId:"202",context:"control",id:"126",name:"Running"},{categoryId:"210",context:"control",id:"127",name:"Active Regeneration"},{categoryId:"203",context:"control",id:"128",name:"Pool/Swimming"},{context:"variant",id:"129",name:"Strength floor"},{context:"variant",id:"130",name:"Cardio equipment"},{context:"variant",id:"131",name:"Signature Classes"}
2,{context:"variant",id:"132",name:"EQX+ app"}],ctaText:"Next",heading:"Personalize your visit",subText:"I'm interested in... Please select all that apply.",trackingName:i.CL.SURVEY_INTEREST},{allowMultiple:!1,content:[{id:"98",name:"Newcomer - I have no/little experience or need help creating a new routine"},{id:"99",name:"Familiar/Comfortable - I have a routine, but sometimes could use new suggestions"},{id:"100",name:"Expert - I know what I’m doing"}],ctaText:"Next",heading:"Personalize your visit",subText:"How would you rate your fitness experience level today? Please select one.",trackingName:"survey-experience"},{allowMultiple:!0,content:[{id:"101",name:"Lose weight"},{id:"102",name:"Tone up"},{id:"103",name:"Get stronger"},{id:"104",name:"Gain muscle mass"}],ctaText:"Next",heading:"Personalize your visit",subText:"What are your fitness goals? Please select all that apply.",trackingName:"survey-goals"},{allowMultiple:!1,content:[{id:"119",name:"The location"},{id:"120",name:"Amenities"},{id:"121",name:"The equipment"},{id:"122",name:"Special events"},{id:"123",name:"Price"}],ctaText:"Submit",heading:"Personalize your visit",subText:"What will most impact your decision to join? Please select one.",trackingName:"survey-influence"},{ctaText:"Explore member benefits"}],l=e=>{let{fields:t}=e;return{...t}},s=e=>{let{config:t={}}=e,{fields:a={}}=t,{blackoutDates:n,clubsForAppointment:i,...o}=a;if(!i)return;let r=i.map(e=>l(e)),s=n.map(e=>l(e));return o.clubsForAppointment=r,o.blackoutDates=s,e.config=o,e}},29251:function(e,t,a){"use strict";a.d(t,{S:function(){return n},Y:function(){return i}});let n={appointmentConfirmation:2,contactInformation:0,scheduleAppointment:1},i={cancelAppointmentStatus:null,contactInput:null,createdDate:new Date().getTime(),hasCreatedLead:!1,isInEditMode:!1,isPromo:!1,leadFlowIsVisible:!0,personalizeOptions:[],personalizeOptionsStep:1,receiveTextAlerts:!1,scheduledFacility:null,selectedAppointment:"",selectedFacility:null,showGuidedWorkouts:!1,showNonEligibleBanner:!1,step:n.contactInformation,stepOrder:[n.contactInformation,n.scheduleAppointment],submittedAppointment:null,subscribeToNewsletter:!1,suggestedFacility:null}},8031:function(e,t,a){"use strict";a.r(t),a.d(t,{LEAD_FLOW_LS_DATA_KEY:function(){return s},WorkErrorMessage:function(){return c},clearStoredState:function(){return p},collateForAdobeDataLayer:function(){return h},deriveClassCountPayloadFromState:function(){return I},deriveCorpPayloadFromState:function(){return f},deriveEmailPayloadFromState:function(){return m},derivePayloadFromState:function(){return d},getStoredState:function(){return y},handleAdobeTracking:function(){return g},isClubAcceptingAppointments:function(){return b},updateStoredState:function(){return u}});var n=a(85752),i=a(20034),o=a(85680),r=a(17277),l=a(802);let s="leadFlowData",c="We don’t recognize that company email.",d=e=>{let t=e.scheduledFacility||e.selectedFacility||e.suggestedFacility,a=e?.referrerDetails,n=e?.contactInput?.["Company Email (optional)"]||"",i=e?.contactInput?.zip_code_optional||"";return{answers:e?.personalizeOptions||[],...n&&{companyEmail:n},...i&&{zipCode:i},email:e?.contactInput?.email_address||"",facilityId:t?.facilityId||"",firstName:e?.contactInput?.first_name||"",isAbandonedLead:!0,isCorpLead:e?.isCorpLead,joinOutreachCode:e?.joinOutreachCode||"",lastName:e?.contactInput?.last_name||"",leadTokenId:e?.leadTokenId||"",leadTransactionId:e?.leadTransactionId,meetingPurpose:e.meetingPurpose,...a?.memberId&&{memberId:a?.memberId},...e?.membershipPlanName&&{membershipPlanName:e.membershipPlanName},newsletter:t?.country!==o.UNITED_KINGDOM.abbreviation||e?.subscribeToNewsletter,outreachCode:e?.outreachCode||"",phone:(e?.contactInput?.phone_number||"").replace(/\D/g,""),receiveTextAlerts:e?.receiveTextAlerts,...a?.referringId&&{referringId:a?.referringId},scheduledVisitTime:e?.scheduledVisitTime||"",...a?.shareId&&{shareId:a?.shareId},zipCode:e?.contactInput?.postal_code}},u=e=>{n.default.isLocalStorageAvailable()&&(0,r.fC)(s,e)},p=()=>{n.default.isLocalStorageAvailable()&&(0,r.cl)(s)},m=e=>{let t=e.scheduledFacility||e.selectedFacility||e.suggestedFacility;return{corporateEmail:e.contactInput["Company Email"],facilityId:t.facilityId,firstName:e.contactInput["First Name"],lastName:e.contactInput["Last Name"],personalEmail:e.contactInput["Personal Email"],phoneNumber:e.contactInput["Phone Number"]}},f=e=>{let t=e.scheduledFacility||e.selectedFacility||e.suggestedFacility;return{CTALabel:e.ctaLabel,EmailAddress:e.contactInput["Personal Email"],FacilityId:t.facilityId,FirstName:e.contactInput["First Name"],IsAbandonedLead:!0,LastName:e.contactInput["Last Name"],PhoneNumber:e.contactInput["Phone Number"],SourceUrl:e.sourceUrl,UserLocation:t.facilityId,companyEmail:e.contactInput["Company Email"]}},y=()=>
2{if(n.default.isLocalStorageAvailable()){let e=(0,r.rV)(s);if(e){let{createdDate:t}=e;return Math.abs(t-new Date().getTime())>9e5?(p(),null):e}}},h=(e,t,a)=>{let n=[];return e.forEach((i,o)=>{let r=o===e.length-1;if((l.personalizeQuiz[t]?.content||[]).find(e=>e.name===i.additionalInfo&&(4!==t||r))){let e=i.additionalInfo?.split(" - ")[0]?.toLowerCase(),t=`${a?.split("-")[1]} | ${e}`;n.find(e=>e===t)||n.push(t)}}),n},g=async(e,t)=>{let{city:a,clubId:n,clubType:o,facilityId:r,name:l,status:s}=e;t(i.YY.leadFlowClubSelection(l.toLowerCase(),r,a.toLowerCase(),s,n,o))},b=(e,t)=>{if(!t||!e)return!1;let a=t.clubsForAppointment||t.fields.clubsForAppointment,{facilityId:n}=e;return!!a&&!!a.some(e=>n===(e.facilityId||e.fields.facilityId))},I=e=>({classNamesAndCategoryRequest:e?.personalizeOptions.filter(e=>e.categoryId).map(e=>({categoryId:e.categoryId,className:e.additionalInfo}))})},77387:function(e,t,a){"use strict";a.r(t),a.d(t,{clearContactInputFromSession:function(){return f},getAcdlClickDataForStep:function(){return s},getAcdlLeadSurveyDataForStep:function(){return l},getAcdlPageLoadDataForStep:function(){return r},getJoinFlowStepAcdlPageData:function(){return c},loadContactInputFromSession:function(){return m},modifyOutreachCodeForOptimizelyCampaign:function(){return d},saveContactInputToSession:function(){return p},syncSessionSelectedClub:function(){return y}});var n=a(20034),i=a(61957),o=a(10021);let r=(e,t,a)=>{switch(e){case 1:return{event:i.U.pageLoad,leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_INTEREST+" view",type:n.Im.NON_EMBEDDED},page:a,user:t};case 2:return{event:i.U.pageLoad,leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_EXPERIENCE+" view",type:n.Im.NON_EMBEDDED},page:a,user:t};case 3:return{event:i.U.pageLoad,leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_GOALS+" view",type:n.Im.NON_EMBEDDED},page:a,user:t};case 4:return{event:i.U.pageLoad,leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_INFLUENCE+" view",type:n.Im.NON_EMBEDDED},page:a,user:t};default:return null}},l=(e,t,a=[],i,r)=>{switch(e){case 1:return{club:(0,o.E)(t),event:"lead-survey",leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_INTEREST,surveyQA:a.map(e=>e),type:n.Im.NON_EMBEDDED},page:r,user:i};case 2:return{club:(0,o.E)(t),event:"lead-survey",leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_EXPERIENCE,surveyQA:a.map(e=>e),type:n.Im.NON_EMBEDDED},page:r,user:i};case 3:return{club:(0,o.E)(t),event:"lead-survey",leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_GOALS,surveyQA:a.map(e=>e),type:n.Im.NON_EMBEDDED},page:r,user:i};case 4:return{club:(0,o.E)(t),event:"lead-survey",leadFlow:{category:n.X0.ENGAGE,step:n.CL.SURVEY_INFLUENCE,surveyQA:a.map(e=>e),type:n.Im.NON_EMBEDDED},page:r,user:i};default:return}},s=(e=[],t,a,r)=>({click:{destination:"NA",location:r?`${e.webName} || Carousel`:"Cancel confirmation| body",name:t||"Explore Member Benefits",section:!r&&n.CL.SURVEY_EXPERIENCE},club:(0,o.E)(e),event:i.U.modClick,module:{name:"modalTapped",position:"1:1",type:"modal"},user:a}),c=(e,t)=>({category:`${t||"join"}-interest`,name:`eqx:join:step${e+1}`,section:i.M.sections.join,subSection:`step${e+1}`,title:"get started at equinox",type:i.M.types.programmatic}),d=e=>{let t=window.eqxOutreachCode||[];for(let e in document?.body?.dataset)if(e?.startsWith("opt")&&!e?.endsWith("Ignorecode")){let a=[e.slice(3).toUpperCase(),...document.body.dataset[e]?.split(":")||[]].join("-");t.includes(a)||t.push(a)}return t.length>0?`${e}_${t.join("_")}`:e},u=e=>`eqx${e}FlowContactInput`,p=(e,t,a=null)=>{try{let n={...e,...a&&{selectedClub:a}};sessionStorage.setItem(u(t),JSON.stringify(n))}catch{return null}},m=e=>{try{let t=sessionStorage.getItem(u(e));return t?JSON.parse(t):null}catch{return null}},f=e=>{try{sessionStorage.removeItem(u(e))}catch{return null}},y=(e,t)=>{t?.facilityId&&p(m(e)||{},e,t)}},75077:function(e,t,a){"use strict";var n=a(67294);t.Z=(e=0)=>{let[t,a]=(0,n.useState)(e);return{decrementActivityCount:(0,n.useCallback)(()=>{a(e=>e>0?e-1:0)},[]),incrementActivityCount:(0,n.useCallback)(()=>{a(e=>e<0?1:e+1)},[]),isActive:t>0,resetActivityCount:(0,n.useCallback)(()=>{a(0)},[])}}},22718:function(e,t,a){"use strict";a.d(t,{D:function(){return n},i:function(){return i}});let n=e=>document&&(document.cookie.split("; ").find(t=>t.split("=")[0]===e)||"").split("=")[1],i=e=>e?e(document.location.href):document.location.href},88258:function(e,t){"use strict";t.Z=(e,t)=>"string"==typeof e?e.replace(/{{([^}]*)}}/gi,e=>t[e]||e):(console.error("dynamicContentReplacer() expects content to be a string"),"")},90841:function(e){e.exports={"lead-flow":"LeadFlow_lead-flow__Eowwz",leadFlow:"LeadFlow_lead-flow__Eowwz","form-content":"LeadFlow_form-content__W20gj",formContent:"LeadFlow_form-content__W20gj",loader:"LeadFlow_loader__ff_Ta","error-message":"LeadFlow_error-message__8L8Fx",errorMessage:"LeadFlow_error-message__8L8Fx"}}}]);
3//# sourceMappingURL=3864-bbb50703cd7dec28.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.