!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="17a18ef2-c52c-4a21-90ad-c02b4aad047d",e._sentryDebugIdIdentifier="sentry-dbid-17a18ef2-c52c-4a21-90ad-c02b4aad047d")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9729],{29729:function(e,t,i){"use strict";i.r(t),i.d(t,{Footer:function(){return b}});var s=i(31549),a=i(26815),r=i(94),n=i(21491),o=i(91867),l=i(71612),c=i(78946),d=i(94732),u=i(92626),p=i.n(u),_=i(27190),x=i(23085),h=i(6170);let f=new Date().getFullYear(),g={instagram:a.mr,twitter:a.d8,facebook:a.s1,tiktok:a.yA},m=()=>{let e=(0,x.$Y)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:p().container,children:[(0,s.jsx)("div",{className:p().pageLinks,children:e?.footerLinks?.map((e,t)=>s.jsxs(l.K,{space:"--by-spacing-4x",children:[s.jsx("h2",{id:e.title,className:p().listTitle,children:e.title}),s.jsx(l.K,{space:"--by-spacing-2x",children:s.jsx("ul",{"aria-labelledby":e.title,children:e.items?.map(e=>s.jsx("li",{children:s.jsx(v,{href:e.url??"#",isExternal:e.isExternal,target:"_self",children:e.title})},e.id))})})]},`${e.title}-${t}`))}),(0,s.jsx)("div",{className:p().sidebar,children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:p().newsletterHeader,children:e?.footerSubtitle??"Planet-friendly holidays and sustainable travel inspiration, fortnightly to your inbox"}),(0,s.jsx)(o.zk,{source:"footer",onSubscribe:_.i})]})}),(0,s.jsxs)("div",{className:p().footnote,children:[(0,s.jsx)("div",{className:p().logos,children:e?.certificationLogos?.map((e,t)=>s.jsx("div",{children:s.jsx("img",{src:e.responsiveImage?.src,alt:e.responsiveImage?.alt??"Certification Logo",className:p().logo})},e.id??t))}),(0,s.jsxs)("div",{className:p().footnoteContent,children:[(0,s.jsx)("div",{className:p().socialMediaLinks,children:e?.socialMediaLinks?.length&&(0,s.jsx)(l.K,{variant:"horizontal",space:"--by-spacing-4x",children:e.socialMediaLinks.map(e=>{let t=g[e.name.toLowerCase()];return(0,s.jsx)(n.r,{href:e.url,isExternal:!0,children:(0,s.jsx)(t,{ariaLabel:e.name,title:e.name,size:"large"})},e.id)})})}),(0,s.jsxs)("p",{className:p().copyright,children:["Site content \xa9 Byway ",f]})]})]})]})})},b=()=>(0,s.jsx)("footer",{className:"px-3 pt-16 pb-40 text-sm bg-neutral-100 md:text-base print:hidden",children:(0,s.jsx)("div",{className:"container mx-auto md:px-8",children:(0,s.jsx)(m,{})})}),v=e=>{let{children:t,...i}=e,a=(0,h.useRouter)().pathname.includes("checkout/details");return(0,s.jsx)(n.r,{...i,onClick:e=>{a&&((0,r.getCookie)("hasHadAbortSurvey")||(e.preventDefault(),window.abortSurvey=window.abortSurvey||[],(0,c.O)({event:"surveyTriggered",surveyData:"example data"}),(0,d.SX)({event:"abort_survey_triggered"}),(0,r.setCookie)("hasHadAbortSurvey",!0)))},href:i.href,children:t})}},42516:function(e,t,i){"use strict";i.d(t,{x:function(){return o}});var s=i(31549),a=i(14517),r=i(48600),n=i.n(r);let o=e=>{let{children:t,space:i,spaceHorizontal:r,spaceVertical:o,spaceTop:l,spaceRight:c,spaceBottom:d,spaceLeft:u,mdSpace:p,mdSpaceHorizontal:_,mdSpaceVertical:x,mdSpaceTop:h,mdSpaceRight:f,mdSpaceBottom:g,mdSpaceLeft:m,isContainer:b,isFlex:v,fullHeight:y}=e,j={space:i,spaceHorizontal:r,spaceVertical:o,spaceTop:l,spaceRight:c,spaceBottom:d,spaceLeft:u,mdSpace:p,mdSpaceHorizontal:_,mdSpaceVertical:x,mdSpaceTop:h,mdSpaceRight:f,mdSpaceBottom:g,mdSpaceLeft:m},N={};for(let e in j){let t=j[e];t&&(N[`--box-${e}`]=`var(${t})`)}let k=(0,a.W)({[n().container]:b,[n().flex]:v,[n().padding]:i||p,[n().paddingHorizontal]:r||_,[n().paddingVertical]:o||x,[n().paddingTop]:l||h,[n().paddingRight]:c||f,[n().paddingBottom]:d||g,[n().paddingLeft]:u||m,[n().fullHeight]:y});return(0,s.jsx)("div",{className:k,style:N,"data-test-id":"box",children:t})}},2316:function(e,t,i){"use strict";i.d(t,{P:function(){return d}});var s=i(31549),a=i(26815),r=i(44194),n=i(63934),o=i(14517),l=i(28436),c=i.n(l);let d=e=>{let{state:t,message:i}=e,[l,d]=(0,r.useState)({status:void 0,statusMessage:void 0});(0,r.useEffect)(()=>{d({status:t,statusMessage:i})},[t,i]);let u=()=>{d({status:void 0,statusMessage:void 0})},p=(0,o.W)({[c().error]:"error"===l.status,[c().info]:"info"===l.status,[c().success]:"success"===l.status});return(0,s.jsx)("div",{"data-test-id":"Notification",role:"status","aria-live":"polite","aria-atomic":"true",children:l.statusMessage&&(0,s.jsxs)("div",{className:(0,o.W)(c().container,p),"data-test-id":"Notification-content",children:[(0,s.jsx)("span",{className:(0,o.W)(c().icon,p),children:(()=>{switch(l.status){case"error":return(0,s.jsx)(a.d9,{decorative:!0,size:"scale",color:"currentColor",dataTestId:"icon-error"});case"info":return(0,s.jsx)(a.Ty,{decorative:!0,size:"scale",color:"currentColor",dataTestId:"icon-info"});case"success":return(0,s.jsx)(a.X3,{decorative:!0,size:"scale",color:"currentColor",dataTestId:"icon-success"});default:return null}})()}),l.statusMessage,(0,s.jsx)("span",{className:"ml-auto",children:(0,s.jsx)(n.z,{variant:"icon",isTransparent:!0,ariaLabel:"dismiss",onPress:()=>u(),children:(0,s.jsx)(a.WN,{decorative:!0,size:"large"})})})]})})}},91867:function(e,t,i){"use strict";i.d(t,{zk:function(){return F}});var s=i(31549),a=i(41305),r=i(42516),n=i(63934),o=i(42689),l=i(21491),c=i(2316),d=i(71612),u=i(70621),p=i(27854),_=i(41076),x=i(97187),h=i(76450),f=i(14517),g=i(94499),m=i.n(g);let b=e=>{let{isDisabled:t=!1,isRequired:i=!1,...a}=e,r=(0,f.W)(m().label,{[m().disabled]:t});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h._,{...a,"data-test-id":"Label",className:r}),i&&(0,s.jsx)("span",{className:m().required,"aria-hidden":"true",children:" *"})]})};var v=i(26815),y=i(44194),j=i(96061),N=i.n(j);let k=(0,y.forwardRef)((e,t)=>{let{errorMessage:i,hintText:a,isDisabled:r,isRequired:n,label:o,...l}=e;return(0,s.jsx)(u.n,{...l,"data-test-id":"TextField",isRequired:n,isDisabled:r,ref:t,children:(0,s.jsxs)(d.K,{space:"--by-spacing-2x",children:[(0,s.jsx)(b,{isRequired:n,isDisabled:r,children:o}),(0,s.jsxs)(p.c,{className:N().error,children:[(0,s.jsx)("span",{className:N().icon,children:(0,s.jsx)(v.B0,{decorative:!0,size:"small"})}),i]}),(0,s.jsx)(_.I,{className:N().input}),a&&(0,s.jsx)(x.x,{slot:"description",className:N().hintText,children:a})]})})});k.displayName="TextField";var w=i(5394),T=i(14782);let F=e=>{let{onSubscribe:t,source:i}=e,[u,p]=(0,y.useState)(null),[_,x]=(0,y.useState)(null),h=(0,y.useId)(),f=(0,y.useId)(),g=w.z.object({subscriptionEmail:w.z.string().email("Oops! The email you’ve entered isn’t valid, please make sure it follows the format: user@domain.com").min(5,"Email is too short"),source:w.z.string(),acceptPolicy:w.z.boolean().refine(e=>!0===e,"You must accept the privacy policy.")}),{control:m,handleSubmit:b,register:v}=(0,a.cI)({resolver:(0,T.F)(g),mode:"onBlur",defaultValues:{subscriptionEmail:"",source:i||"",acceptPolicy:!1}}),j=async e=>{try{await t(e.subscriptionEmail,e.source),p("Thank you! We've sent a verification link to your email, please head over and click it to confirm you'd like to receive our updates.")}catch(e){x("Something went wrong. Please try again later.")}};return(0,s.jsx)("form",{noValidate:!0,onSubmit:b(j),children:u?(0,s.jsx)(r.x,{spaceTop:"--by-spacing-4x",children:(0,s.jsx)(c.P,{state:"success",message:u})}):(0,s.jsx)(r.x,{spaceTop:"--by-spacing-4x",children:(0,s.jsxs)(d.K,{space:"--by-spacing-4x",children:[(0,s.jsxs)("p",{className:"text-neutral-700",children:["Read our"," ",(0,s.jsx)(l.r,{isExternal:!0,hasUnderline:!0,href:"https://www.byway.travel/privacy-policy",children:"Privacy Policy"})," ","before signing up."]}),(0,s.jsx)(a.Qr,{control:m,name:"subscriptionEmail",render:e=>{let{field:{name:t,value:i,onChange:a,ref:r},fieldState:{invalid:n,error:o}}=e;return(0,s.jsx)(k,{name:t,type:"email",value:i,onChange:a,validationBehavior:"aria",isInvalid:n,label:"Email",ref:r,errorMessage:o?.message,isRequired:!0})}}),(0,s.jsxs)("p",{className:"block text-black",children:["Privacy Policy (required)",(0,s.jsx)("span",{className:"text-primary-600",children:" *"})]}),(0,s.jsx)(a.Qr,{control:m,name:"acceptPolicy",render:e=>{let{field:{name:t,onChange:i,value:a,ref:r},fieldState:{invalid:n,error:l}}=e;return(0,s.jsx)(o.X,{checked:a,id:h,name:t,onChange:e=>i(e.target.checked),label:"I have read and accepted the Privacy Policy.",error:n,errorText:l?.message,ref:r,required:!0})}}),(0,s.jsx)("input",{type:"hidden",id:f,...v("source"),value:i}),(0,s.jsx)(n.z,{type:"submit",size:"small","data-ua-click":"newsletter-signup",children:"Submit"}),_&&(0,s.jsx)(c.P,{state:"error",message:_})]})})})}},27190:function(e,t,i){"use strict";i.d(t,{i:function(){return r}});var s=i(94732),a=i(73656);let r=async(e,t)=>{let i=a.env.ZAPIER_WEBHOOK_URL??"https://hooks.zapier.com/hooks/catch/8025134/3azbg8y/";try{let a=await fetch(i,{method:"POST",body:JSON.stringify({emailAddress:e,sourcePage:t})});if(a.ok)console.log("Successfully sent data to Zapier");else{let e=`Failed to send data to Zapier: ${a.status}`;throw(0,s.H)(e),Error(e)}}catch(e){throw(0,s.H)(e),e}}},92626:function(e){e.exports={topLevelGrid:"Footer_topLevelGrid__r_13V",container:"Footer_container__fgJrv",pageLinks:"Footer_pageLinks__Gtjfb",listTitle:"Footer_listTitle__85NVx",sidebar:"Footer_sidebar__ja_Km",newsletterHeader:"Footer_newsletterHeader__qw_lj",logos:"Footer_logos__G_hOP",logo:"Footer_logo__nkwiU",footnote:"Footer_footnote__s0mhn",footnoteContent:"Footer_footnoteContent__MOX_m",socialMediaLinks:"Footer_socialMediaLinks__71IFp",copyright:"Footer_copyright__7_pzb"}},94499:function(e){e.exports={label:"Label_label__hODfU",disabled:"Label_disabled__1fGs0",required:"Label_required__f5kPp"}},96061:function(e){e.exports={input:"TextField_input__0Zei3",hintText:"TextField_hintText__WrFwZ",error:"TextField_error__EVnVY",icon:"TextField_icon__dW7iy"}},48600:function(e){e.exports={container:"Box_container__KZT8B",fullHeight:"Box_fullHeight__v9EpG",flex:"Box_flex__zEXwL",padding:"Box_padding__4_7Z4",paddingHorizontal:"Box_paddingHorizontal__VN8iy",paddingVertical:"Box_paddingVertical__bupQM",paddingTop:"Box_paddingTop__cjMPI",paddingRight:"Box_paddingRight__MYvNO",paddingBottom:"Box_paddingBottom__pcMPV",paddingLeft:"Box_paddingLeft___D74I"}},28436:function(e){e.exports={container:"Notification_container__mAThS",error:"Notification_error__BwvC9",info:"Notification_info__CXI7q",success:"Notification_success__sSnEC",icon:"Notification_icon__H6u2L"}}}]);