1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4957],{2999:function(e,t,i){"use strict";i.r(t);var s=i(30266),r=i(809),n=i.n(r),a=i(67294),l=i(96831),c=i(53854),d=i(77922),o=i.n(d),u=i(89583),x=i(55078),f=(i(39704),i(96486)),m=i.n(f),h=i(11163),p=i(30248),y=i(97852),b=i(60913),g=i(59744),j=i(77150),N=i(28739),v=i(43921),w=i(28777),I=i(36338),S=i(91118),C=i(85893),E=function(e){var t=e.response,i=(e.sessionId,e.store),r=(0,a.useState)(0),d=r[0],f=r[1],E=(0,a.useState)(!1),k=E[0],P=E[1],L=(0,a.useState)(!1),O=L[0],D=L[1],_=(0,a.useState)(!1),F=_[0],T=_[1],K=(0,a.useState)(!1),A=K[0],z=K[1],B=(0,a.useState)([]),q=B[0],R=B[1],M=(0,a.useState)([]),V=M[0],H=M[1],J=(0,a.useState)([]),W=J[0],Z=J[1],X=(0,a.useState)(!1),$=X[0],G=X[1],Q=(0,a.useState)(!1),U=Q[0],Y=Q[1],ee=(0,a.useState)(void 0),te=ee[0],ie=ee[1],se=(0,a.useState)((0,C.jsx)(C.Fragment,{})),re=se[0],ne=se[1],ae=(0,h.useRouter)(),le=ae.query,ce=(le.id,le.affiliateId),de=(0,a.useState)({width:void 0,height:void 0}),oe=de[0],ue=de[1],xe=function(e){f(e),ye(e),P(!1)},fe=function(e){null!=e?(z(e),T(!0)):T(!1)},me=function(e){return Object.values(m().groupBy(e,(function(e){return e.airlineCode})))},he=function(e){return m().groupBy(e,(function(e){return e.minimumNumberOfStops}))},pe=function(e,t,i,s){var r=m().filter(e,{amountInKobo:t,airlineName:i,minimumNumberOfStops:s});H(me(r))},ye=function(e){var t;switch(e){case 0:t=m().sortBy(q.airPricedIternaryList,(function(e){return e.amountInKobo}));break;case 1:t=m().sortBy(q.airPricedIternaryList,(function(e){return e.airOriginDestinationList[0].totalFlightTimeInMs}));break;case 2:t=m().sortBy(q.airPricedIternaryList,(function(e){return e.amountInKobo}))}H(me(t))};return(0,a.useEffect)((function(){var e=ae.query;try{e.tripDetails=JSON.parse(e.tripDetails),e.prefferedAirlineCodes=JSON.parse(e.prefferedAirlineCodes)}catch(l){}e.numberOfAdult=m().parseInt(e.numberOfAdult),e.numberOfChildren=m().parseInt(e.numberOfChildren),e.numberOfInfant=m().parseInt(e.numberOfInfant),e.directFlight="true"==e.directFlight,e.isDayFlight="true"==e.isDayFlight,e.refundable="true"==e.refundable,localStorage.setItem("tb_search_payload",JSON.stringify(e)),ie(e);var r=function(){var t=(0,s.Z)(n().mark((function t(){var s,r,a,l;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!m().isEmpty(i)){t.next=10;break}if(ne((0,C.jsx)(y.g,{tripType:e.tripType,adult:e.numberOfAdult,departureCity:e.departureCity,cabin:e.tripDetails[0].cabinType,arrivalCity:e.arrivalCity,child:e.numberOfChildren,infant:e.numberOfInfant,arrivalCode:e.tripDetails[0].destinationAirportCode,arrivalDate:(null===(s=e.tripDetails[0])||void 0===s?void 0:s.returnDate)||void 0,departureC
1ode:null===(r=e.tripDetails[0])||void 0===r?void 0:r.originAirportCode,departureDate:null===(a=e.tripDetails[0])||void 0===a?void 0:a.departureDate,visible:!0})),delete e.departureCity,delete e.arrivalCity,m().isEmpty(e)){t.next=10;break}return t.next=7,(0,b.$f)("post",e,"".concat(p.NV,"flight"));case 7:l=t.sent,!m().isEmpty(l)&&l.success&&(H(me(l.data.airPricedIternaryList)),Z(me(l.data.airPricedIternaryList)),R(l.data),Y(!1)),ne((0,C.jsx)(C.Fragment,{}));case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();!m().isEmpty(t)&&t.success?(H(me(t.data.airPricedIternaryList)),Z(me(t.data.airPricedIternaryList)),R(t.data),Y(!1)):(H([]),Z([]),R([]),Y(!1),S.h4.show(t.message,"error")),$||(r(),G(!0));var a=function(){ue({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",a),a(),function(){return window.removeEventListener("resize",a)}}),[t]),(0,C.jsxs)("div",{className:"metropolis",children:[(0,C.jsxs)("div",{className:"px-0 mt-0 pb-12 lg:pt-0 lg:pb-0",children:[(0,C.jsx)(j.E,{searchPayload:te,_affiliate:ce,setShowFilter:D,showFilter:O,viewClicked:F,showSearch:U,setShowSearch:Y}),void 0==q.airPricedIternaryList||m().isEmpty(q.airPricedIternaryList)||m().isEmpty(q.airPricedIternaryList)?(0,C.jsx)("div",{className:"min-h-screen pt-12 font-semibold text-base text-center",children:"No Result Found for that request"}):(0,C.jsxs)("div",{className:"flex flex-col lg:px-24 lg:mt-24 lg:flex-row lg:space-x-8",children:[(0,C.jsx)("div",{className:"w-full px-0 lg:w-1/4 ".concat(F?"lg:hidden":"lg:flex"," ").concat(O?"block":"hidden"),children:(0,C.jsx)(l.a,{id:q.id,list:q.airPricedIternaryList,stopSet:q.stopsSet,cabinSet:q.cabinSet,priceSet:q.priceSet,handleFiltering:function(e){H(me(e.airPricedIternaryList))}})}),(0,C.jsxs)("div",{className:"w-full lg:w-3/4 flex-col ".concat(O?"hidden lg:flex":"flex"),children:[W&&!m().isEmpty(W)?(0,C.jsxs)("div",{className:"bg-white flex relative border border-line-100",children:[(0,C.jsx)("div",{className:"w-1/3 lg:w-2/12 self-end border border-line-100",children:(0,C.jsx)("div",{className:"self-end bg-light-blue",children:(0,C.jsxs)("ul",{className:"divide-y divide-line-100",children:[(0,C.jsx)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:" Nonstop "}),(0,C.jsx)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:" 1 Stop "}),(0,C.jsx)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:" 1+ Stops "})]})})}),W&&!m().isEmpty(W)?(0,C.jsx)("div",{className:"w-2/3 lg:w-10/12 border-l border-line-100",children:(0,C.jsxs)(w.sj,{naturalSlideWidth:100,naturalSlideHeight:0,totalSlides:W.length,isIntrinsicHeight:!0,className:"h-full",visibleSlides:oe.width<640?1:W.length>6?6:W.length,children:[(0,C.jsxs)(w.iR,{classNameTray:"flex w-full divide-x divide-line-100 h-full",className:"overflow-x-hidden h-full",children:[(0,C.jsx)(w.Mi,{index:0,className:"w-1/3 lg:w-2/12",style:{height:"fit-content"},children:(0,C.jsxs)("div",{className:"border border-line-100",children:[(0,C.jsxs)("div",{className:"h-20 flex flex-col justify-center items-center text-center space-y-2 border-b border-line-100",children:[(0,C.jsx)("div",{className:"w-7 h-7 mx-auto object-scale-down"}),(0,C.jsx)("p",{className:"text-xs",children:"All Airlines"})]}),(0,C.jsx)("div",{className:"self-end",children:(0,C.jsxs)("ul",{className:"divide-y divide-line-100",children:[(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:[" ",m().isEmpty(he(q.airPricedIternaryList)[0])?"-":(0,I.T4)(he(q.airPricedIternaryList)[0][0].amountInKobo)," "]}),(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:[" ",m().isEmpty(he(q.airPricedIternaryList)[1])?"-":(0,I.T4)(he(q.airPricedIternaryList)[1][0].amountInKobo)," "]}),(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",children:[" ",m().isEmpty(he(q.airPricedIternaryList)[2])?"-":(0,I.T4)(he(q.airPricedIternaryList)[2][0].amountInKobo)," "]})]})})]})}),W.map((function(e,t){var i=he(e);return(0,C.jsx)(w.Mi,{index:t+1,className:"w-2/12",children:(0,C.jsxs)("div",{className:"cursor-pointer border border-line-100",children:[(0,C.jsxs)("div",{className:"h-20 flex flex-col justify-center items-center text-center space-y-2 border-b border-line-100",children:[(0,C.jsx)("img",{src:"https://res.cloudinary.com/diapyzzws/image/upload/v1651478157/new-airline-logos/".concat(e[0].airlineCode,".","png"),className:"w-20 h-7 mx-auto object-fill object-center"}),(0,C.jsx)("p",{className:"text-xs",children:e[0].airlineName})]}),(0,C.jsx)("div",{className:"self-end",children:(0,C.jsxs)("ul",{className:"divide-y divide-line-100",children:[(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",onClick:function(){!m().isEmpty(i[0])&&pe(q.airPricedIternaryList,i[0][0].amountInKobo,i[0][0].airlineName,i[0][0].minimumNumberOfStops)},children:[" ",m().isEmpty(i[0])?"-":(0,I.T4)(i[0][0].amountInKobo)," "]}),(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",onClick:function(){!m().isEmpty(i[1])&&pe(q.airPricedIternaryList,i[1][0].amountInKobo,i[1][0].airlineName,i[1][0].minimumNumberOfStops)},children:[" ",m().isEmpty(i[1])?"-":(0,I.T4)(i[1][0].amountInKobo)," "]}),(0,C.jsxs)("li",{className:"text-xs text-neutral-100 px-5 py-4",onClick:function(){!m().isEmpty(i[2])&&pe(q.airPricedIternaryList,i[2][0].amountInKobo,i[2][0].airlineName,i[2][0].minimumNumberOfStops)},children:[" ",m().isEmpty(i[2])?"-":(0,I.T4)(i[2][0].amountInKobo)]})]})})]})},t)}))]}),(0,C.jsx)("div",{className:"absolute top-0 left-0 lg:-left-5 h-full w-10 flex items-center",children:(0,C.jsx)(w.jp,{className:"w-full h-10 rounded-full text-white text-center flex justify-center items-center",style:{background:"rgba(26, 18, 0, 0.4)"},children:(0,C.jsx)(c.DEl,{size:30})})}),(0,C.jsx)("div",{className:"absolute top-0 right-0 lg:-right-5 h-full w-10 flex items-center",children:(0,C.jsx)(w.P1,{className:"w-full h-10 rounded-full text-white text-center flex justify-center items-center",style:{background:"rgba(26, 18, 0, 0.4)"},children:(0,C.jsx)(c.MOd,{size:30})})})]})}):""]}):"",(0,C.jsxs)("div",{className:"px-6 lg:px-0 py-8 justify-between items-center ".concat(O?"hidden lg:flex":"flex"),children:[(0,C.jsxs)("ul",{className:"flex h-12 lg:h-auto w-fit-content items-center space-x-4 lg:space-x-10",children:[(0,C.jsx)("li",{className:"h-full flex items-center ".concat(F?"lg:flex":"lg:hidden"),children:(0,C.jsxs)("button",{className:"text-base leading-none text-prim-default flex items-center",onClick:function(){D(!0),T(!1)},children:[(0,C.jsx)(u.ulB,{size:14,className:"mr-2"})," Filter"]})}),(0,C.jsx)(x.Z,{onClickAway:function(){return P(!1)},children:(0,C.jsxs)("li",{className:"h-full flex items-center relative",children:[(0,C.jsxs)("button",{className:"text-xs lg:text-base lg:leading-6 leading-none text-neutral-100 flex items-center",onClick:function(){return P(!k)},children:[(0,C.jsx)(v.t,{size:12,className:"mr-2"})," Sort by:"]}),(0,C.jsx)("ul",{className:"flex"}),(0,C.jsxs)("ul",{className:"absolute bg-white lg:bg-transparent top-10 shadow-md lg:shadow-none lg:-top-1.5 lg:left-full w-fit-content px-6 rounded-lg z-20 ".concat(k?"flex":"hidden lg:flex"," flex-col lg:flex-row lg:space-x-4 lg:justify-center"),children:[(0,C.jsx)("li",{className:"py-2",children:(0,C.jsx)("button",{className:"text-xs leading-none ".concat(0==d?"font-bold text-prim-default":"text-neutral-100"),onClick:function(){return xe(0)},children:"Cheapest"})}),(0,C.jsx)("li",{className:"py-2",children:(0,C.jsx)("button",{className:"text-xs leading-none ".concat(1==d?"font-bold text-prim-default":"text-neutral-100"),onClick:function(){return xe(1)},children:"Fastest"})}),(0,C.jsx)("li",{className:"py-2",children:(0,C.jsx)("button",{className:"text-xs leading-none ".concat(2==d?"font-bold text-prim-default":"text-neutral-100"),onClick:function(){return xe(2)},children:"Recommended"})})]})]})})]}),(0,C.jsx)("ul",{children:(0,C.jsx)("li",{children:(0,C.jsxs)("button",{className:"text-xs lg:text-base leading-none lg:leading-6 text-prim-default h-full flex items-center",children:[(0,C.jsx)("span",{className:"hidden lg:inline",children:"Show \xa0"}),"Fare Calender"]})})})]}),(0,C.jsx)("div",{className:"flex flex-col space-y-6 pb-10",children:V&&!m().isEmpty(V)?V.map((function(e,t){return(0,C.jsx)(g.c,{styles:o(),id:q.id,groupedData:e,setViewClicked:fe,selected:A},t)})):""}),(0,C.jsx)(N.W,{flightData:A,_affiliate:ce,show:F,id:q.id,setVie
1wClicked:T,styles:o()})]})]})]}),re||""]})};E.getInitialProps=function(){var e=(0,s.Z)(n().mark((function e(t){var i,s,r,a,l,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.req,i=t.store,s=t.query,r=s.id,a=i.getState().flightReducer.flightSearchObject,l="".concat(p.NV,"flight"),m().isEmpty(a)){e.next=9;break}return e.next=7,(0,b.$f)("post",a,l);case 7:return c=e.sent,e.abrupt("return",{response:c,sessionId:r,store:i});case 9:return e.abrupt("return",{response:{data:{},sucess:!1},sessionId:r,store:i});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=E},14028:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search/affiliate/[affiliateId]/[id]",function(){return i(2999)}])}},function(e){e.O(0,[3874,9546,1880,286,8777,3264,8466,6797,913,3503,754,9774,2888,179],(function(){return t=14028,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.