(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7631],{87631:function(e,n,t){"use strict";t.d(n,{Z:function(){return he}});var r=t(85893),a=t(11163),i=t(15313),s=t(73912),o=t(41664),l=t.n(o),c=t(25675),u=t.n(c),h=t(67294),d=t(33299),x=t(22680),p=function(e){var n=e.href,t=e.children;return n?(0,r.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:t}):(0,r.jsx)("div",{children:t})},g=t(37094),f=t(87102),m=t.n(f),j=function(e){var n=e.backgroundColor,t=e.icon,a=e.title,i=e.children,s=e.arrow,o=void 0!==s&&s,l=e.className,c=void 0===l?"":l,h=e.onClick,d=e.href,f=e.active;return(0,r.jsx)(p,{href:d,children:(0,r.jsx)(x.Box,{backgroundColor:n,opacity:10,padding:{sm:[4,8]},borderRadius:{sm:[8]},className:"".concat(m().infoBox," ").concat(c),role:"button",onClick:h,children:(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:8},children:[(0,r.jsx)(u(),{src:"/images/navigation/".concat(t,".svg"),width:24,height:24,alt:"icon"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(x.Text,{variant:"body-3",textColor:"grey-60",fontFamily:"poppins",style:{marginBottom:"-6px"},children:a}),i]}),o&&(0,r.jsx)(g.OId,{color:"black",className:"".concat(m().arrow," ").concat(f?m().active:"")})]})})})},v=t(12774),_=t.n(v),k=function(e){var n=e.href,t=e.icon,a=e.children,i=e.textColor,s=void 0===i?"black-00":i;return(0,r.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:_().link,children:(0,r.jsx)(x.Box,{padding:{sm:[14,24]},children:(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:16},children:[(0,r.jsx)(u(),{src:"/images/navigation/".concat(t,".svg"),width:24,height:24,alt:"icon"}),(0,r.jsx)(x.Text,{variant:"body-2",textColor:s,fontFamily:"poppins",children:a})]})})})},b=function(e){var n=e.active;return(0,r.jsx)(x.Box,{borderRadius:{sm:[0,0,8,8],lg:[8]},overflow:"hidden",className:"".concat(_().box," ").concat(n?_().active:""),children:(0,r.jsxs)(x.Box,{padding:{sm:[8,0,0],lg:[8,0]},children:[(0,r.jsx)(k,{href:"https://app.ratepunk.com/profile",icon:"user",children:"Profile"}),(0,r.jsx)(k,{href:"https://app.ratepunk.com/bookings",icon:"bookings",children:"Bookings"}),(0,r.jsx)(k,{href:"https://app.ratepunk.com/vouchers",icon:"vouchers",children:"Vouchers"}),(0,r.jsx)(k,{href:"https://app.ratepunk.com/auth/sign-out",icon:"log-out",textColor:"red",children:"Log Out"})]})})},w=t(54043),y=t.n(w),N=function(e){var n=e.href,t=e.external,a=e.label,i=e.highlighted;return i?(0,r.jsx)(x.Box,{padding:{sm:[12,8],lg:[8,16]},className:"".concat(y().link," ").concat(y().disabled),children:(0,r.jsx)(x.Text,{tagName:"p",variant:"body-1",textColor:i?"skyBlue":"black-00",className:y().text,fontFamily:"poppins",children:a})}):(0,r.jsx)("a",{href:n,target:t?"_blank":"_self",rel:"noreferrer",children:(0,r.jsx)(x.Box,{padding:{sm:[12,8],lg:[8,16]},className:"".concat(y().link," ").concat(y().active),children:(0,r.jsx)(x.Text,{tagName:"p",variant:"body-1",textColor:i?"skyBlue":"black-00",className:y().text,fontFamily:"poppins",children:a})})})},D=t(80466),F=t.n(D),B=function(e){var n=e.flightDealsURL,t=void 0===n?"https://www.ratepunk.com/?utm_source=homepage&utm_medium=header&utm_content=white-header&tag=organic":n,a=(0,i.v9)((function(e){return e.user})).details,o=(0,s.useMediaQuery)(1168);return(0,r.jsxs)(x.Flex,{alignItems:o?"center":"stretch",stackMobile:!0,children:[(0,r.jsx)("div",{className:"".concat(F().flightDealsLink," ").concat(a.activeProducts.some((function(e){return e.tag.includes("flights-v25")}))?"":F().active),children:(0,r.jsx)(N,{href:t,label:"Flight Deals",highlighted:!0})}),(0,r.jsx)(N,{href:"https://www.ratepunk.com/hotels",label:"Hotels"}),(0,r.jsx)(N,{href:"/extension",label:"Browser Extension"}),(0,r.jsx)(N,{href:"/press",label:"Press"}),(0,r.jsx)(N,{href:"/blog",label:"Blog"})]})},C=function(){return(0,r.jsxs)(x.Flex,{alignItems:"center",stackMobile:!0,columnGap:{sm:16},rowGap:{sm:16},children:[(0,r.jsx)(x.Button,{as:l(),href:"/auth/sign-up",variant:"sign-up",children:"Sign up"}),(0,r.jsx)(x.Button,{as:l(),href:"/auth/sign-in",variant:"log-in",children:"Log In"})]})},L=function(e){var n=e.flightDealsURL,t=void 0===n?"https://www.ratepunk.com/?utm_source=extensionpage&utm_medium=header&utm_content=white-header&tag=organic":n,a=(0,i.v9)((function(e){return e.user})).details,o=(0,s.useMediaQuery)(1168);return(0,r.jsxs)(x.Flex,{alignItems:o?"center":"stretch",stackMobile:!0,children:[(0,r.jsx)("div",{className:"".concat(F().flightDealsLink," ").concat(a.activeProducts.some((function(e){return e.tag.includes("flights-v25")}))?"":F().active),children:(0,r.jsx)(N,{href:t,label:"Flight Deals"})}),(0,r.jsx)(N,{href:"https://www.ratepunk.com/hotels",label:"Hotels"}),(0,r.jsx)(N,{href:"/extension",label:"Browser Extension",highlighted:!0}),(0,r.jsx)(N,{href:"/press",label:"Press"}),(0,r.jsx)(N,{href:"/blog",label:"Blog"})]})},R=function(e){var n=e.flightDealsURL,t=void 0===n?"https://www.ratepunk.com/?utm_source=homepage&utm_medium=header&utm_content=white-header&tag=organic":n,a=(0,i.v9)((function(e){return e.user})).details,o=(0,s.useMediaQuery)(1168);return(0,r.jsxs)(x.Flex,{alignItems:o?"center":"stretch",stackMobile:!0,children:[(0,r.jsx)("div",{className:"".concat(F().flightDealsLink," ").concat(a.activeProducts.some((function(e){return e.tag.includes("flights-v25")}))?"":F().active),children:(0,r.jsx)(N,{href:t,label:"Flight Deals"})}),(0,r.jsx)(N,{href:"https://www.ratepunk.com/hotels",label:"Hotels"}),(0,r.jsx)(N,{href:"/extension",label:"Browser Extension"}),(0,r.jsx)(N,{href:"/press",label:"Press"}),(0,r.jsx)(N,{href:"/blog",label:"Blog",highlighted:!0})]})},I=t(15636),U=t.n(I),T=function(){var e=(0,i.v9)((function(e){return e.user})).details,n=(0,h.useState)(!1),t=n[0],a=n[1];return(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:16},children:[(0,r.jsx)(j,{backgroundColor:"yellow",icon:"wallet",title:"Balance:",className:U().balance,href:"https://app.ratepunk.com/cashback",children:(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:6},children:[(0,r.jsx)(u(),{src:"/images/icons/rp-coin.svg",width:10,height:12,alt:"RatePunk coin"}),(0,r.jsx)(x.Text,{variant:"body-2",textColor:"black-00",fontFamily:"poppins",fontWeight:600,children:e.confirmedBalance.toFixed(2)})]})}),(0,r.jsx)(j,{backgroundColor:"purple",icon:"user-active",title:"Hello,",className:U().user,arrow:!0,onClick:function(){return a((function(e){return!e}))},active:t,children:(0,r.jsx)(x.Text,{variant:"body-2",fontWeight:600,textColor:"black-00",fontFamily:"poppins",children:e.firstName||"User"})}),(0,r.jsx)(b,{active:t})]})},H=function(e){var n=e.page,t=e.flightDealsURL,a=e.smaller,i=void 0!==a&&a,s=(0,d.useSession)().data;return(0,r.jsx)("header",{className:"".concat(U().header," ").concat(i?U().smaller:""),children:(0,r.jsx)(x.Container,{children:(0,r.jsx)(x.Box,{backgroundColor:"white",borderRadius:{sm:[8]},padding:{sm:[12,24]},className:U().wrapper,shadow:"shadowGrey",children:(0,r.jsxs)(x.Flex,{alignItems:"center",justifyContent:"space-between",children:[(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:32},children:[(0,r.jsx)(l(),{href:"/",passHref:!0,children:(0,r.jsx)("a",{className:U().logo,children:(0,r.jsx)(u(),{src:"/images/icons/ratepunk-logo.svg",width:125,height:32,alt:"Ratepunk Logo"})})}),"blog"==n?(0,r.jsx)(R,{flightDealsURL:t}):"extension"==n?(0,r.jsx)(L,{flightDealsURL:t}):(0,r.jsx)(B,{flightDealsURL:t})]}),s?(0,r.jsx)(T,{}):(0,r.jsx)(C,{})]})})})})},S=t(84979),W=t.n(S),G=function(e){var n=e.spacing,t=void 0===n?"sm":n;return(0,r.jsx)("div",{className:"".concat(W().line," ").concat(W()[t])})},P=t(31100),M=t.n(P),E=function(e){var n=e.title,t=e.children,a=e.icon,i=e.arrow,s=void 0!==i&&i,o=e.active,l=e.onClick,c=e.href,h=e.backgroundColor,d=void 0===h?"white":h;return(0,r.jsx)(p,{href:c,children:(0,r.jsx)(x.Box,{backgroundColor:d,padding:{sm:[8]},onClick:l,role:"button",children:(0,r.jsxs)(x.Flex,{alignItems:"center",fullWidth:!0,justifyContent:"space-between",children:[(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:8},children:[(0,r.jsx)(u(),{src:"/images/navigation/".concat(a,".svg"),width:24,height:24,alt:"icon"}),(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:4},children:[(0,r.jsx)(x.Text,{variant:"body-1",textColor:"black-60",fontFamily:"poppins",children:n}),t]})]}),s&&(0,r.jsx)(g.OId,{color:"black",className:"".concat(M().arrow," ").concat(o?M().active:"")})]})})})},Q=function(){var e=(0,i.v9)((function(e){return e.user})).details,n=(0,h.useState)(!1),t=n[0],a=n[1];return(0,r.jsxs)(x.Flex,{flexDirection:"column",rowGap:{sm:8},children:[(0,r.jsx)(E,{title:"Balance:",icon:"wallet",href:"https://app.ratepunk.com/cashback",children:(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:6},children:[(0,r.jsx)(u(),{src:"/images/icons/rp-coin.svg",width:10,height:12,alt:"RatePunk coin"}),(0,r.jsx)(x.Text,{variant:"body-1",textColor:"black-00",fontWeight:600,fontFamily:"poppins",children:e.confirmedBalance.toFixed(2)})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(E,{title:"Hello,",icon:"user-active",arrow:!0,active:t,onClick:function(){a((function(e){return!e}))},backgroundColor:"purple-10",children:(0,r.jsx)(x.Text,{variant:"body-1",textColor:"black-00",fontWeight:600,fontFamily:"poppins",children:e.firstName||"User"})}),(0,r.jsx)(b,{active:t})]})]})},A=t(22204),O=t.n(A),Z=function(e){var n=e.href,t=e.icon,a=e.children,i=e.newProperty;return(0,r.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:O().link,children:(0,r.jsx)(x.Box,{padding:{sm:[12,8]},children:(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:16},children:[(0,r.jsx)(u(),{src:"/images/navigation/".concat(t,".svg"),width:24,height:24,alt:"icon"}),(0,r.jsxs)(x.Flex,{alignItems:"center",columnGap:{sm:8},children:[(0,r.jsx)(x.Text,{variant:"body-1",textColor:"black-00",fontWeight:600,fontFamily:"poppins",children:a}),i&&(0,r.jsx)(x.Box,{borderRadius:{sm:[8]},padding:{sm:[0,4]},backgroundColor:"red",children:(0,r.jsx)(x.Text,{tagName:"p",variant:"body-4",textColor:"white",fontWeight:600,fontFamily:"poppins",children:"new!"})})]})]})})})},z=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)(Z,{href:"https://app.ratepunk.com/",icon:"flight-deals",children:"Flight deals"}),(0,r.jsx)(Z,{href:"https://app.ratepunk.com/price-tracking",icon:"bell",children:"Price tracking"}),(0,r.jsx)(Z,{href:"https://app.ratepunk.com/rebooking",icon:"reception-bell",children:"Rebooking"}),(0,r.jsx)(Z,{href:"https://app.ratepunk.com/departure",icon:"airplane",children:"Departure airports"}),(0,r.jsx)(Z,{href:"https://app.ratepunk.com/billing",icon:"billing",children:"Billing"})]})},V=t(63546),q=t.n(V),J=function(e){var n=e.onClick,t=e.icon;return(0,r.jsxs)(x.Flex,{alignItems:"center",justifyContent:"space-between",className:q().wrapper,children:[(0,r.jsx)(l(),{href:"/hotel",passHref:!0,children:(0,r.jsx)("a",{className:q().logo,children:(0,r.jsx)(u(),{src:"/images/icons/ratepunk-logo.svg",width:125,height:32,alt:"Ratepunk Logo"})})}),(0,r.jsx)(x.Flex,{onClick:n,role:"button",children:(0,r.jsx)(u(),{src:"/images/navigation/".concat(t,".svg"),width:32,height:32,alt:"icon"})})]})},Y=t(81754),K=t.n(Y),X=function(e){var n=e.active,t=e.hideNavigation,a=e.page,i=e.flightDealsURL,s=(0,d.useSession)().data;return(0,r.jsxs)(x.Box,{backgroundColor:"white",className:"".concat(K().navigation," ").concat(n?K().active:""),children:[(0,r.jsx)(x.Container,{children:(0,r.jsx)(J,{onClick:t,icon:"close"})}),(0,r.jsxs)(x.Box,{padding:{sm:[16]},className:K().wrapper,overflow:"scroll",children:[s&&(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{}),(0,r.jsx)(G,{}),(0,r.jsx)(z,{}),(0,r.jsx)(G,{})]}),(0,r.jsxs)(x.Flex,{flexDirection:"column",rowGap:{sm:16},children:["blog"==a?(0,r.jsx)(R,{flightDealsURL:i}):"extension"==a?(0,r.jsx)(L,{flightDealsURL:i}):(0,r.jsx)(B,{flightDealsURL:i}),!s&&(0,r.jsx)(C,{})]})]})]})},$=t(45747),ee=t.n($),ne=function(e){var n=e.page,t=e.flightDealsURL,a=e.smaller,i=void 0!==a&&a,s=(0,h.useState)(!1),o=s[0],l=s[1];return(0,r.jsx)("header",{className:"".concat(ee().header," ").concat(i?ee().smaller:""),children:(0,r.jsxs)("div",{className:ee().wrapper,children:[(0,r.jsx)(x.Container,{children:(0,r.jsx)(J,{onClick:function(){l(!0)},icon:"burger-menu"})}),(0,r.jsx)(X,{active:o,page:n,flightDealsURL:t,hideNavigation:function(){l(!1)}})]})})},te=t(47568),re=t(70655),ae=t(83923),ie=t(39021),se=function(e){var n=e.children,t=(0,d.useSession)().data,a=(0,i.I0)(),s=function(){var e=(0,te.Z)((function(){var e;return(0,re.__generator)(this,(function(n){switch(n.label){case 0:if(!(null===t||void 0===t?void 0:t.jwt))return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,ie.SH)({url:"/api/users/me",params:{populate:["activeProducts"]},token:t.jwt})];case 2:return e=n.sent(),a((0,ae.II)({jwt:t.jwt,details:e})),[3,4];case 3:return n.sent(),(0,d.signOut)(),[3,4];case 4:return[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){s()}),[t]),(0,r.jsx)("div",{children:n})},oe=t(79959),le=t.n(oe),ce=function(e){var n=e.mirrored;return(0,s.useMediaQuery)(1168)?(0,r.jsx)(u(),{src:"/images/icons/tag/discount".concat(n?"-mirrored":"",".svg"),alt:"Discount tag image",width:24,height:24,className:"".concat(le().image," ").concat(n?le().mirror:"")}):null},ue=function(e){var n=e.redirectURL,t=(0,i.v9)((function(e){return e.user})).details,o=(0,s.useMediaQuery)(1168),c=(0,a.useRouter)();return t.activeProducts.some((function(e){return e.tag.includes("flights-v25")}))?null:(0,r.jsx)(x.Box,{backgroundColor:"yellow",className:"".concat(le().container," ").concat("/hotel/[...slug]"==c.pathname?le().hidden:""),children:(0,r.jsx)(x.Box,{backgroundColor:"yellow",className:le().banner,padding:{sm:[8,16],lg:[8,16]},children:(0,r.jsxs)(x.Flex,{center:!0,columnGap:{sm:8,lg:16},children:[(0,r.jsx)(ce,{}),(0,r.jsx)(ce,{mirrored:!0}),(0,r.jsx)(ce,{}),(0,r.jsxs)(x.Text,{variant:"body-5",align:"center",fontWeight:700,fontFamily:"poppins",className:le().text,children:["Unlock Exclusive Flight Deals and Save Up to"," ",(0,r.jsx)("span",{className:le().redText,children:"90%"}),"!",o&&(0,r.jsx)("span",{className:le().desktopText,children:"\xa0\xa0Average savings of $250 per ticket"})]}),(0,r.jsx)(x.Button,{as:l(),href:n,className:le().button,children:"Learn More"}),(0,r.jsx)(ce,{mirrored:!0}),(0,r.jsx)(ce,{}),(0,r.jsx)(ce,{mirrored:!0})]})})})},he=function(e){var n=e.page,t=e.bannerURL,o=void 0===t?"https://flights.ratepunk.com":t,l=e.flightDealsURL,c=(0,i.v9)((function(e){return e.user})).details,u=(0,s.useMediaQuery)(1168),h=(0,a.useRouter)();return(0,r.jsxs)(se,{children:["/"!=h.pathname&&(0,r.jsx)(ue,{redirectURL:o}),u?(0,r.jsx)(H,{page:n,flightDealsURL:l,smaller:"/"==h.pathname||c.activeProducts.some((function(e){return e.tag.includes("flights-v25")}))}):(0,r.jsx)(ne,{page:n,flightDealsURL:l,smaller:"/"==h.pathname})]})}},83923:function(e,n,t){"use strict";t.d(n,{II:function(){return a},JY:function(){return c},Pw:function(){return s},Vt:function(){return h},XT:function(){return l},bR:function(){return i},cQ:function(){return o},iA:function(){return u}});var r=t(39021),a=function(e){return{type:"LOAD_USER",user:e}},i=function(e){return{type:"UPDATE_DETAILS",details:e}},s=function(e){var n=e.token;return function(e){return(0,r.SH)({url:"/users/me",token:n}).then((function(t){return e(a({jwt:n,details:t}))}))}},o=function(e){var n=e.token;return function(e){return(0,r.SH)({url:"/users/me/transactions",token:n}).then((function(t){return e(a({jwt:n,transactions:t}))}))}},l=function(e){var n=e.token;return function(e){return(0,r.SH)({url:"/users/me/payouts",token:n}).then((function(t){return e(a({jwt:n,payouts:t}))}))}},c=function(e){var n=e.token;return function(e){return(0,r.SH)({url:"/users/me/hotel-price-trackers",token:n,params:{priceTracker_null:!0}}).then((function(t){return e(a({jwt:n,hotelTrackers:t}))}))}},u=function(e){var n=e.token;return function(e){return(0,r.SH)({url:"/users/me/hotel-price-trackers",token:n,params:{priceTracker:!0}}).then((function(t){return e(a({jwt:n,hotelTrackers:t}))}))}},h=function(e){var n=e.details,t=e.token;return function(e){return(0,r.gy)({url:"/users/me",body:n,token:t}).then((function(t){return e(i(n))}))}}},79959:function(e){e.exports={container:"FlightDealsBanner_container__RlaSZ",hidden:"FlightDealsBanner_hidden__6xqFE",banner:"FlightDealsBanner_banner__DnTiP",redText:"FlightDealsBanner_redText__GwBJz",desktopText:"FlightDealsBanner_desktopText__IA9Oi",button:"FlightDealsBanner_button__SjrPU"}},15636:function(e){e.exports={header:"HeaderDesktop_header__NV9sC",smaller:"HeaderDesktop_smaller__gRpeJ",wrapper:"HeaderDesktop_wrapper__y8QrS",balance:"HeaderDesktop_balance__WKqzz",user:"HeaderDesktop_user__rAAIi",logo:"HeaderDesktop_logo__6rZin"}},87102:function(e){e.exports={infoBox:"InfoBox_infoBox__rLA0j",arrow:"InfoBox_arrow__Lp0qj",active:"InfoBox_active___taRF"}},63546:function(e){e.exports={wrapper:"HeaderWrapper_wrapper__HxG8i",logo:"HeaderWrapper_logo__ydoeE"}},81754:function(e){e.exports={navigation:"NavigationWindow_navigation__bAiIv",active:"NavigationWindow_active__xEKl8",wrapper:"NavigationWindow_wrapper__qR2Wx"}},54043:function(e){e.exports={link:"NavLink_link__DlGnQ",active:"NavLink_active__0O1W7",text:"NavLink_text__smZNR",disabled:"NavLink_disabled__3i9O7"}},80466:function(e){e.exports={flightDealsLink:"Navigation_flightDealsLink__9_xoa",active:"Navigation_active__YRr2n"}},12774:function(e){e.exports={box:"UserLinksWindow_box___6VIv",active:"UserLinksWindow_active__Rv8QX",link:"UserLinksWindow_link__pvnye"}},45747:function(e){e.exports={header:"HeaderMobile_header__cCQsf",smaller:"HeaderMobile_smaller__o3Iz7",wrapper:"HeaderMobile_wrapper__IDEYc"}},22204:function(e){e.exports={link:"DashboardLinks_link__lguoj"}},31100:function(e){e.exports={arrow:"UserInfo_arrow__aNRc_",active:"UserInfo_active__vM8MT"}},84979:function(e){e.exports={line:"Separation_line__IzSI8",sm:"Separation_sm__1jZrW",md:"Separation_md__VPk0M",lg:"Separation_lg__O5vTm"}}}]);