PageSourceSearch

https://www.vietnamairlines.com/em-assets/trfx-static-1/_next/static/chunks/3479.83f190b55f686bf649ed.js

js vietnamairlines.com collected 2026-09-24 08:48:49 UTC 300,281 bytes, 15 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3479],{18446:function(e,t,n){var o=n(90939);e.exports=function(e,t){return o(e,t)}},44253:function(e,t,n){"use strict";var o=n(78138),i=n.n(o),l=n(94964),r=n(73088);const a=(e,t)=>{var n;const o=null===(n=i()(e))||void 0===n?void 0:n.isValid(),a="object"===typeof t&&t.start&&i()(null===t||void 0===t?void 0:t.start).isValid()&&t.end&&i()(null===t||void 0===t?void 0:t.end).isValid();if(!o||!a)return!1;const s=i()(e),d=(0,r.Z)(s),{start:u,end:c}=t,v=i()(u),p=(0,r.Z)(v),f=i()(c),g=(0,r.Z)(f);return((0,l.KZ)(d,p)||(0,l.cL)(d,p))&&((0,l.KZ)(d,g)||(0,l.my)(d,g))};t.Z=(e,t)=>{if(!e||"object"!==typeof t)return!1;const{minDate:n,maxDate:o,validDaysOfWeek:s,includedDates:d,excludedDates:u}=t,c=i()(e),v=(0,r.Z)(c);if(!c.isValid())return!0;const p=c.weekday(),f=null!=n?"number"===typeof n?i()().add(n,"d"):i()(n):null,g=null!==f&&void 0!==f&&f.isValid()?(0,r.Z)(f):null,y=null!=o?"number"===typeof o?i()().add(o,"d"):i()(o):null,b=null!==y&&void 0!==y&&y.isValid()?(0,r.Z)(y):null,m=(null===f||void 0===f?void 0:f.isValid())&&(0,l.my)(v,g),h=(null===y||void 0===y?void 0:y.isValid())&&(0,l.cL)(v,b),_=Array.isArray(s)&&s.every((e=>e!==p));return!!(m||h||_)||(Array.isArray(d)&&d.length>0?!d.some((e=>{if("object"===typeof e&&"string"===typeof e.start&&"string"===typeof e.end)return a(v,e);const t=i()(e),n=(0,r.Z)(t);return t.isValid()&&(0,l.KZ)(v,n)})):!!(Array.isArray(u)&&u.length>0)&&!!u.some((e=>{if("object"===typeof e&&"string"===typeof e.start&&"string"===typeof e.end)return a(v,e);const t=i()(e),n=(0,r.Z)(t);return t.isValid()&&(0,l.KZ)(v,n)})))}},61138:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var o=n(92809),i=n(10219),l=n(67294),r=n(93967),a=n.n(r),s=n(78138),d=n.n(s),u=n(94964),c=n(73088),v=n(44253),p=n(87877),f=n(53255),g=n(8981),y=n.n(g);y().oneOfType([y().element,y().func]),y().element,y().func,y().bool,y().shape({minDate:y().oneOfType([y().string,y().number]),maxDate:y().oneOfType([y().string,y().number]),validDaysOfWeek:y().arrayOf(y().oneOfType([y().string,y().number])),includedDates:y().arrayOf(y().string),excludedDates:y().arrayOf(y().string)}),y().shape({minDate:y().oneOfType([y().string,y().number]),maxDate:y().oneOfType([y().string,y().number]),validDaysOfWeek:y().arrayOf(y().oneOfType([y().string,y().number])),includedDates:y().arrayOf(y().string),excludedDates:y().arrayOf(y().string)}),y().number,y().string,y().string,y().func.isRequired,y().func.isRequired,y().string,y().string,y().string,y().func,y().func,y().bool,y().oneOf(["1","2","3","4"]),y().string,y().func.isRequired,y().shape({startDateLabel:y().string,startDatePlaceholder:y().string,startDateErrorMessage:y().string,endDateLabel:y().string,endDatePlaceholder:y().string,endDateErrorMessage:y().string,clear:y().string,done:y().string}).isRequired,y().object,y().objectOf(y().string);var b=n(70917);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=n(48078),O=n(99739),D=n(35944);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e){const{startDateRef:t,endDateRef:n,isOneWay:o,isReturnDateAlwaysVisible:i,startDateConfig:r,endDateConfig:s,monthsToRenderAtATime:g,startDate:y,endDate:m,onChangeStartDate:C,onChangeEndDate:k,displayDateFormat:w,editDateFormat:x,monthFormat:j,inputGroupVariant:E,inputGroupIcon:T,labels:P,isRTL:N,showFaresPerDay:R,legend:L,flexibleDatesSelector:Z,summaryPanel:A,renderDay:I,onDone:M,onClear:B,children:F,_style:G,onSelectingSignalUpdated:V,sendTrackingEventDataLayer:Y,customDayNames:$}=e,K=((e,t=!1)=>{var n,o,i,l,r,a,s,d,u,c,v,p,f,g,y,m,_,O,D,C,S,k,w,x,j,E,T,P,N,R,L,Z,A,I,M,B,F,G,V,Y,$,K,X,H,z,U,W,q,J,Q,ee,te,ne,oe,ie,le,re,ae;const se=null===e||void 0===e?void 0:e.eds,de=b.F4`
2    0% {
3      background-position: 0% 0%;
4    }
5    100% {
6      background-position: 200% 0%;
7    }
8  `;return{_selectingIndicator:{width:"100%",height:"2px",background:"transparent",__active:{background:null===se||void 0===se||null===(n=se.colors)||void 0===n?void 0:n.focusRing}},_priceNoteLabel:h({},null===se||void 0===se?void 0:se.typographies.fs5),_inputGroup:h(h({},null===se||void 0===se||null===(o=se.components)||void 0===o||null===(i=o.inputGroups)||void 0===i?void 0:i.primary),{},{_helpDescription:h({},null===se||void 0===se?void 0:se.typographies.fs7)}),_inputsContainer:{borderBottom:`1px solid ${null===se||void 0===se||null===(l=se.colors)||void 0===l?void 0:l.borders}`},_footer:{borderTop:`1px solid ${null===se||void 0===se||null===(r=se.colors)||void 0===r?void 0:r.borders}`,_clearButton:h(h(h({},null===se||void 0===se||null===(a=se.components)||void 0===a||null===(s=a.buttons)||void 0===s?void 0:s.ghostSecondary),null===se||void 0===se||null===(d=se.components)||void 0===d||null===(u=d.datepicker)||void 0===u?void 0:u._clearButton),t?{height:"56px",fontSize:null===se||void 0===se?void 0:se.typographies.fs4.fontSize,fontFamily:null===se||void 0===se?void 0:se.typographies.fs4.fontFamily,fontWeight:null===se||void 0===se?void 0:se.typographies.fs4.fontWeight,letterSpacing:null===se||void 0===se?void 0:se.typographies.fs4.letterSpacing}:{}),_doneButton:h(h(h({},null===se||void 0===se||null===(c=se.components)||void 0===c||null===(v=c.buttons)||void 0===v?void 0:v.ghostPrimary),null===se||void 0===se||null===(p=se.components)||void 0===p||null===(f=p.datepicker)||void 0===f?void 0:f._doneButton),t?{height:"56px",fontSize:null===se||void 0===se?void 0:se.typographies.fs4.fontSize,fontFamily:null===se||void 0===se?void 0:se.typographies.fs4.fontFamily,fontWeight:null===se||void 0===se?void 0:se.typographies.fs4.fontWeight,letterSpacing:null===se||void 0===se?void 0:se.typographies.fs4.letterSpacing}:{})},_calendar:{_navButton:h(h({},null===se||void 0===se||null===(g=se.components)||void 0===g||null===(y=g.buttons)||void 0===y?void 0:y.tertiaryIcon),{},{fontSize:"32px"}),_months:{_month:{maxWidth:t?"427px":"280px",minWidth:t?"427px":"280px",_title:h(h({},null===se||void 0===se?void 0:se.typographies.fs4),null===se||void 0===se||null===(m=se.components)||void 0===m||null===(_=m.datepicker)||void 0===_?void 0:_._monthTitle),_dayName:h(h(h({},null===se||void 0===se?void 0:se.typographies.fs5),null===se||void 0===se?void 0:se.typographies.fs5._bold),null===se||void 0===se||null===(O=se.components)||void 0===O||null===(D=O.datepicker)||void 0===D?void 0:D._weekDay),_daysGrid:{_day:h(h(h(h({},null===se||void 0===se?void 0:se.typographies.fs5),null===se||void 0===se||null===(C=se.components)||void 0===C||null===(S=C.datepicker)||void 0===S?void 0:S._cell),t?null===se||void 0===se?void 0:se.typographies.fs5._bold:{}),{},{width:t?"61px":"40px",height:t?"61px":"40px",_price:h(h({},null===se||void 0===se?void 0:se.typographies.fs6),{},{color:null===se||void 0===se||null===(k=se.colors)||void 0===k?void 0:k.text,__lowestFare:{color:(null===se||void 0===se||null===(w=se.colors)||void 0===w?void 0:w.success)||(null===se||void 0===se||null===(x=se.colors)||void 0===x?void 0:x.sucess)},__noFares:h(h({},null===se||void 0===se?void 0:se.typographies.fsIcon),{},{fontSize:"20px"}),__skeleton:{animation:`${de} 1.5s linear infinite`,width:"38px",height:"18px",background:"linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%)",backgroundSize:"200% 100%",borderRadius:null===se||void 0===se||null===(j=se.utilities)||void 0===j?void 0:j.borderRadius}}),"&:hover, &:focus":h({},null===se||void 0===se||null===(E=se.components)||void 0===E||null===(T=E.datepicker)||void 0===T||null===(P=T._cell)||void 0===P?void 0:P["&:hover, &:focus"]),_singleSelection:h({},null===se||void 0===se||null===(N=se.components)||void 0===N||null===(R=N.datepicker)||void 0===R||null===(L=R._cell)||void 0===L?void 0:L._singleSelection),_rangeStart:h({},null===se||void 0===se||null===(Z=se.components)||void 0===Z||null===(A=Z.datepicker)||void 0===A||null===(I=A._cell)||void 0===I?void 0:I._rangeStart),_rangeEnd:h({},null===se||void 0===se||null===(M=se.components)||void 0===M||null===(B=M.datepicker)||void 0===B||null===(F=B._cell)||void 0===F?void 0:F._rangeEnd),_inRange:h({},null===se||void 0===se||null===(G=se.components)||void 0===G||null===(V=G.datepicker)||void 0===V||null===(Y=V._cell)||void 0===Y?void 0:Y._withinRange),_disabled:h({},null===se||void 0===se||null===($=se.components)||void 0===$||null===(K=$.datepicker)||void 0===K||null===(X=K._cell)||void 0===X?void 0:X._disabled),_disabledStartOfRange:h({},null===se||void 0===se||null===(H=se.components)||void 0===H||null===(z=H.datepicker)||void 0===z||null===(U=z._cell)||void 0===U?void 0:U._disabledRangeStart),_disabledEndOfRange:h({},null===se||void 0===se||null===(W=se.components)||void 0===W||null===(q=W.datepicker)||void 0===q||null===(J=q._cell)||void 0===J?void 0:J._disabledRangeEnd),_today:h(h({},null===se||void 0===se?void 0:se.typographies.fs5._bold),null===se||void 0===se||null===(Q=se.components)||void 0===Q||null===(ee=Q.datepicker)||void 0===ee||null===(te=ee._cell)||void 0===te?void 0:te._today)})}}}},_popover:h(h({},null===se||void 0===se||null===(ne=se.components)||void 0===ne||null===(oe=ne.panels)||void 0===oe||null===(ie=oe.firstFloor)||void 0===ie?void 0:ie._container),{},{border:`1px solid ${null===se||void 0===se||null===(le=se.colors)||void 0===le?void 0:le.borders}`},null===se||void 0===se||null===(re=se.components)||void 0===re||null===(ae=re.datepicker)||void 0===ae?void 0:ae._popoverContainer)}})(G,R),{0:X,1:H}=(0,l.useState)(""),{0:z,1:U}=(0,l.useState)(""),{0:W,1:q}=(0,l.useState)("START");(0,l.useEffect)((()=>{"function"===typeof V&&V(W),U(`selecting ${"END"===W?"return":"departure"} date`);const e=setTimeout((()=>{U("")}),4e3);return()=>clearTimeout(e)}),[W]);const[J,Q]=(0,f.Me)(2,"popover-panel-"),[ee,te]=(0,f.Me)(2,"date-input-"),[ne]=(0,f.Me)(1,"months-grid-"),oe=d()(),ie=(0,c.Z)(oe),le=d()(y,"YYYY-MM-DD"),re=null===le||void 0===le?void 0:le.isValid(),ae=d()(m,"YYYY-MM-DD"),se=null===ae||void 0===ae?void 0:ae.isValid(),de=(()=>{var e;let t=null;const n=null===r||void 0===r?void 0:r.minDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t
8:oe})(),ue=(()=>{var e;let t=null;const n=null===r||void 0===r?void 0:r.maxDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:d()().add(2,"years")})(),ce=(()=>{var e;let t=null;const n=null===s||void 0===s?void 0:s.minDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:oe})(),ve=(()=>{var e;let t=null;const n=null===s||void 0===s?void 0:s.maxDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:d()().add(2,"years")})(),pe=de.startOf("month"),fe=ue.startOf("month"),ge=null!==le&&void 0!==le&&le.isValid()?le.startOf("month").diff(pe,"months"):0,ye=ce.startOf("month"),be=ve.startOf("month"),me=null!==ae&&void 0!==ae&&ae.isValid()?ae.startOf("month").diff(pe,"months"):ge,he=Array.from({length:Math.ceil(fe.diff(pe,"months"))},((e,t)=>d()(pe).add(t,"months"))),_e=he.length-1,Oe=Array.from({length:Math.ceil(be.diff(ye,"months"))},((e,t)=>d()(ye).add(t,"months"))),De=Oe.length-1,{0:Ce,1:Se}=(0,l.useState)(0),{0:ke,1:we}=(0,l.useState)(0),{0:xe,1:je}=(0,l.useState)(null),Ee=(0,l.useRef)({}),{0:Te,1:Pe}=(0,l.useState)(null),{0:Ne,1:Re}=(0,l.useState)(null);function Le(e){"number"!==typeof e||e<0||e>_e||Se(e)}function Ze(e){"number"!==typeof e||e<0||e>De||we(e)}const Ae=()=>"END"===W?Ze(ke+1):Le(Ce+1),Ie=()=>"END"===W?Ze(ke-1):Le(Ce-1);function Me(){Se(re?ge+g<=_e+1?ge:_e:se?me+g<=_e+1?me:_e:0),o||we(se?me+g<=De+1?me:De:re?ge+g<=De+1?ge:De:0)}(0,l.useEffect)((()=>{Me()}),[o,y,m,r,s]);const Be=e=>{var t;if("string"!==typeof e||!e||!(null!==(t=d()(e,"YYYY-MM-DD"))&&void 0!==t&&t.isValid()))return!1;return!(0,v.Z)(e,r)},Fe=e=>{var t;if("string"!==typeof e||!e||!(null!==(t=d()(e,"YYYY-MM-DD"))&&void 0!==t&&t.isValid()))return!1;return!(0,v.Z)(e,s)},Ge=e=>{e||C("");if(!Be(e))return;"function"===typeof C&&C(e);(0,u.cL)(e,m)},Ve=e=>{e||k("");if(!Fe(e))return;!!(0,u.my)(e,y)||k(e)},Ye=(0,O.Z)({id:ee,selectedDate:y,displayFormat:w,editFormat:x,onFocus:()=>{"START"!==W&&q("START")},onDateChange:Ge,isDateSelectable:Be}),$e=(0,O.Z)({id:te,selectedDate:m,displayFormat:w,editFormat:x,onFocus:()=>{"END"!==W&&q("END")},onDateChange:Ve,isDateSelectable:Fe}),Ke=()=>{q("START"),Me(),setTimeout((()=>{ze(),Ue()}))},Xe=()=>{q("END"),Me(),setTimeout((()=>{qe(),Je()}))},He=(0,l.useRef)(null),ze=()=>{var e;return null===He||void 0===He||null===(e=He.current)||void 0===e?void 0:e.focus()},Ue=()=>{var e;return null===He||void 0===He||null===(e=He.current)||void 0===e?void 0:e.select()},We=(0,l.useRef)(null),qe=()=>{var e;return null===We||void 0===We||null===(e=We.current)||void 0===e?void 0:e.focus()},Je=()=>{var e;return null===We||void 0===We||null===(e=We.current)||void 0===e?void 0:e.select()},Qe=(0,l.useRef)(),et=((0,l.useRef)(),(0,l.useRef)()),tt=()=>{var e;return null===et||void 0===et||null===(e=et.current)||void 0===e?void 0:e.focus()},nt=(0,l.useRef)(),ot=()=>{var e;return null===nt||void 0===nt||null===(e=nt.current)||void 0===e?void 0:e.focus()},it=(0,l.useRef)(),lt=()=>{var e;return null===it||void 0===it||null===(e=it.current)||void 0===e?void 0:e.focus()},rt=(0,l.useRef)(),at=y?d()(y).format(w):"",st=m?d()(m).format(w):"",dt=x.toLowerCase(),ut=x.toUpperCase(),ct={isRTL:N,variant:E,rightIcon:T,_style:null===K||void 0===K?void 0:K._inputGroup},vt={label:null===P||void 0===P?void 0:P.startDateLabel},pt={label:null===P||void 0===P?void 0:P.endDateLabel},ft=e=>{const t=(0,c.Z)(oe),n=(0,c.Z)(e),i=(0,u.KZ)(n,ie),l=(0,u.cL)(n,t),r="START"===W&&!Be(n)||"END"===W&&!Fe(n),a=o&&(0,u.KZ)(n,y||(0,u.KZ)(n,m));return{singleSelection:a,startOfRange:!a&&(0,u.KZ)(n,y),endOfRange:!a&&(0,u.KZ)(n,m),inRange:!a&&(0,u.cL)(n,y)&&(0,u.my)(n,m),disabled:r,upcomingDisabled:r&&(i||l),today:i}};const gt=()=>{var e;return null===it||void 0===it||!it.current||null!==it&&void 0!==it&&null!==(e=it.current)&&void 0!==e&&e.disabled?(()=>{var e;return null===rt||void 0===rt||null===(e=rt.current)||void 0===e?void 0:e.focus()})():lt()},yt=(e,t)=>{var n,i,l,r,s,v,f,g,m,h,_,O,C,k,x,j,E,T,P,R,L,Z,A,M,B,F,G,V,Y,$,X,H,z,U,J,Q,ee,te,ne,oe,ie,le,re,ae,se,de,ue,ce,ve;if(!e)return(0,D.tZ)("div",{className:"invisible",role:"presentation"},t);
8const pe=null===e||void 0===e?void 0:e.format("D"),fe=(0,c.Z)(e),ge=ft(e),{singleSelection:ye,startOfRange:be,endOfRange:me,inRange:he,disabled:_e,upcomingDisabled:Oe,today:De}=ge,Ce=ye||be||me||he,Se=(ye?"Single Selection":be&&"Start of Range")||me&&"End of Range"||he&&"Day in Range"||"",ke=xe===fe||!xe&&(y&&(0,u.KZ)(fe,y)||!y&&De),we=(e.day()-d().localeData().firstDayOfWeek()+7)%7,je=De?"Current Date":"",Te=a()("flex justify-center items-center my-0.5 focus:outline-none",{invisible:!e,"cursor-not-allowed":_e,"cursor-pointer":!_e}),Pe={"aria-selected":Ce,"aria-label":`${d()(e).format(w)}, ${je}, ${Se}`,"aria-disabled":_e,"aria-colindex":N?7-we:we+1,role:"gridcell","data-att":`day-${fe}`,className:Te,isDisabled:_e,onClick:()=>{var e;_e||(e=fe,{START:()=>{Ge(e),o?lt():(q("END"),qe())},END:()=>{(0,u.my)(e,y)?Ge(e):(Ve(e),q("START"),lt())}}[W]())},tabIndex:ke?0:-1,ref:e=>{Ee.current[fe]=e}};return"function"===typeof I?I(S({day:e,index:t,modifiers:ge,_style:K},Pe)):(0,b.az)(p.zx,S(S({},Pe),{},{key:t,_style:S(S(S(S(S(S(S(S(S(S({},null===K||void 0===K||null===(n=K._calendar)||void 0===n||null===(i=n._months)||void 0===i||null===(l=i._month)||void 0===l||null===(r=l._daysGrid)||void 0===r?void 0:r._day),ye||be&&me?null===K||void 0===K||null===(s=K._calendar)||void 0===s||null===(v=s._months)||void 0===v||null===(f=v._month)||void 0===f||null===(g=f._daysGrid)||void 0===g||null===(m=g._day)||void 0===m?void 0:m._singleSelection:{}),be&&!me?null===K||void 0===K||null===(h=K._calendar)||void 0===h||null===(_=h._months)||void 0===_||null===(O=_._month)||void 0===O||null===(C=O._daysGrid)||void 0===C||null===(k=C._day)||void 0===k?void 0:k._rangeStart:{}),me&&!be?null===K||void 0===K||null===(x=K._calendar)||void 0===x||null===(j=x._months)||void 0===j||null===(E=j._month)||void 0===E||null===(T=E._daysGrid)||void 0===T||null===(P=T._day)||void 0===P?void 0:P._rangeEnd:{}),he?null===K||void 0===K||null===(R=K._calendar)||void 0===R||null===(L=R._months)||void 0===L||null===(Z=L._month)||void 0===Z||null===(A=Z._daysGrid)||void 0===A||null===(M=A._day)||void 0===M?void 0:M._inRange:{}),_e?null===K||void 0===K||null===(B=K._calendar)||void 0===B||null===(F=B._months)||void 0===F||null===(G=F._month)||void 0===G||null===(V=G._daysGrid)||void 0===V||null===(Y=V._day)||void 0===Y?void 0:Y._disabled:{}),Oe?null===K||void 0===K||null===($=K._calendar)||void 0===$||null===(X=$._months)||void 0===X||null===(H=X._month)||void 0===H||null===(z=H._daysGrid)||void 0===z||null===(U=z._day)||void 0===U?void 0:U._upcomingDisabled:{}),be&&_e?null===K||void 0===K||null===(J=K._calendar)||void 0===J||null===(Q=J._months)||void 0===Q||null===(ee=Q._month)||void 0===ee||null===(te=ee._daysGrid)||void 0===te||null===(ne=te._day)||void 0===ne?void 0:ne._disabledStartOfRange:{}),me&&_e?null===K||void 0===K||null===(oe=K._calendar)||void 0===oe||null===(ie=oe._months)||void 0===ie||null===(le=ie._month)||void 0===le||null===(re=le._daysGrid)||void 0===re||null===(ae=re._day)||void 0===ae?void 0:ae._disabledEndOfRange:{}),De?null===K||void 0===K||null===(se=K._calendar)||void 0===se||null===(de=se._months)||void 0===de||null===(ue=de._month)||void 0===ue||null===(ce=ue._daysGrid)||void 0===ce||null===(ve=ce._day)||void 0===ve?void 0:ve._today:{})}),pe)},bt={START:Ce,END:ke}[W]>0,mt={START:Ce+g<he.length+1,END:ke+g<Oe.length+1}[W];function ht(){var e;const t=("END"===W?[m,y,ie]:[y,ie]).find((e=>e&&Ee.current[e]&&!Ee.current[e].disabled));if(t)return Ee.current[t];const n=null===(e=Qe.current)||void 0===e?void 0:e.querySelectorAll("[data-att^='day-']");return Array.from(n||[]).find((e=>!e.disabled))||null}const _t=!re&&!se,Ot=Array.from(Array(g)).map(((e,t)=>d()("END"===W?Oe[ke]:he[Ce]).add(t,"months")));(0,l.useEffect)((()=>{H(`displaying ${Ot.map((e=>e.format(j))).join(", ")}`);const e=setTimeout((()=>{H("")}),2e3);return()=>clearTimeout(e)}),[Ce,ke]),(0,f.N7)((()=>{Te&&setTimeout((()=>{!function(e,t){const n=(0,c.Z)(e);if(Ee.current[n]&&!ft(e).disabled)return je(n),void Ee.current[n].focus();const o=e.clone().startOf("month"),i=e.clone().endOf("month"),l=t?-1:1;for(let r=t?i:o;t?r.isSameOrAfter(o):r.isSameOrBefore(i);r.add(l,"days")){const e=(0,c.Z)(r);if(Ee.current[e]&&!ft(r).disabled){je(e),Ee.current[e].focus();break}}}(Te,Ne),Pe(null)}),100)}),[Ce,ke]),(0,f.N7)((()=>
8{if(!xe||!Ee.current[xe])return;const e=Ee.current[xe],t=e=>{if("Enter"===e.key||" "===e.key)return;e.preventDefault(),e.stopPropagation();if(ft(d()(xe)).disabled)return;const t=d()(xe);if("Tab"===e.key){var n;const t={shiftNext:()=>ot(),shiftPrev:()=>tt(),shiftDefault:()=>"END"===W?qe():ze(),forwardStart:()=>o?gt():qe(),forwardEnd:()=>gt()};return void(null===(n=t[e.shiftKey?mt?"shiftNext":bt?"shiftPrev":"shiftDefault":"START"===W?"forwardStart":"forwardEnd"])||void 0===n||n.call(t))}const i={ArrowRight:()=>({date:t.clone().add(1,"days"),forward:!0,atBoundary:t.date()===t.daysInMonth()}),ArrowLeft:()=>({date:t.clone().subtract(1,"days"),forward:!1,atBoundary:1===t.date()}),ArrowUp:()=>({date:t.clone().subtract(7,"days"),forward:!1,atBoundary:!1}),ArrowDown:()=>({date:t.clone().add(7,"days"),forward:!0,atBoundary:!1}),Home:()=>({date:t.clone().startOf("week"),forward:!1,atBoundary:!1}),End:()=>({date:t.clone().endOf("week"),forward:!0,atBoundary:!1}),PageUp:()=>({date:t.clone().subtract(1,"month"),forward:!1,atBoundary:!0}),PageDown:()=>({date:t.clone().add(1,"month"),forward:!0,atBoundary:!0})}[e.key];if(i){const{date:e,forward:t,atBoundary:n}=i();if(n&&function(e,t){const n=e.month(),o="START"===W?Ce:ke,i=t?o+g-1:o,l=d()("START"===W?he[i]:Oe[i]).month(),r=t?Ae:Ie;return!(n===l||!(t?mt:bt))&&(Pe(e.clone()),Re(t),"START"===W?ze():qe(),r(),!0)}(e,t))return;const o=(0,c.Z)(e),l=Ee.current[o];l&&!ft(e).disabled&&(je(o),l.focus())}};return e.addEventListener("keydown",t,!0),()=>{e.removeEventListener("keydown",t,!0)}}),[xe,W,o,mt,bt]);const Dt=i||!o,Ct=({close:e})=>{var t,n,i,r,s,d,u,c,v;return(0,D.BX)(p.kC,{"data-att":"popover-content",className:"w-full flex-col",children:[(0,D.BX)(p.kC,{className:"w-full py-5 px-6 md:px-7 flex-nowrap",_style:null===K||void 0===K?void 0:K._inputsContainer,children:[(0,D.tZ)(p.kC,{className:a()("mx-1 md:mx-2 relative",Dt?"w-1/2":"w-full"),children:(0,D.tZ)(p.BZ,S(S(S({},ct),vt),{},{hasValue:!!y,onClick:ze,"data-att":"start-date-input-group",helpDescriptionId:`${ee}-inner-help-description`,helpDescription:y||null!==He&&void 0!==He&&null!==(t=He.current)&&void 0!==t&&t.value?dt:"",children:(0,D.BX)(p.kC,{className:"w-full flex-col",children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${ee}-inner-label`,as:"label","aria-hidden":"true",children:null===P||void 0===P?void 0:P.startDateInputAriaLabel}),(0,D.tZ)("input",S(S({ref:He,"aria-labelledby":`${ee}-inner-label`,"aria-describedby":`${ee}-inner-help-description`,className:"text-inherit bg-transparent focus:outline-none placeholder-current",placeholder:ut},Ye),{},{onKeyDown:e=>{"function"===typeof(null===Ye||void 0===Ye?void 0:Ye.onKeyDown)&&Ye.onKeyDown(e),"Tab"!==e.key||e.shiftKey||(e.preventDefault(),bt?tt():ot())}})),(0,D.tZ)(p.kC,{"aria-hidden":"true",_style:S(S({},null===K||void 0===K?void 0:K._selectingIndicator),"START"===W?null===K||void 0===K?void 0:K._selectingIndicator.__active:{})})]})}))}),Dt&&(0,D.tZ)(p.kC,{className:"w-1/2 mx-1 md:mx-2",children:o?(0,D.tZ)(p.BZ,S(S(S({},ct),pt),{},{isDisabled:!0,"data-att":"end-date-toggler",children:(0,D.tZ)("span",{className:"flex-1","aria-label":null===P||void 0===P?void 0:P.endDateInputGroupDisabledAriaLabel})})):(0,D.tZ)(p.BZ,S(S(S({},ct),pt),{},{hasValue:!!m,onClick:qe,"data-att":"end-date-input-group",helpDescriptionId:`${te}-inner-help-description`,helpDescription:m||null!==We&&void 0!==We&&null!==(n=We.current)&&void 0!==n&&n.value?dt:"",children:(0,D.BX)(p.kC,{className:"flex-col w-full",children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${te}-inner-label`,as:"label","aria-hidden":"true",children:null===P||void 0===P?void 0:P.endDateInputAriaLabel}),(0,D.tZ)("input",S(S({ref:We,"aria-labelledby":`${te}-inner-label`,"aria-describedby":`${te}-inner-help-description`,className:"text-inherit bg-transparent focus:outline-none placeholder-current",placeholder:ut},$e),{},{onKeyDown:e=>{"function"===typeof(null===$e||void 0===$e?void 0:$e.onKeyDown)&&$e.onKeyDown(e),"Tab"!==e.key||e.shiftKey||(e.preventDefault(),bt?tt():ot())}})),(0,D.tZ)(p.kC,{"aria-hidden":"true",_style:S(S({},null===K||void 0===K?void 0:K._selectingIndicator),"END"===W?null===K||void 0===K?void 0:K._selectingIndicator.__active:{})})]})}))})]}),(0,D.BX)(p.kC,{ref:Qe,className:"flex-1 w-full py-5 px-6 md:px-8 relative",children:[(0,D.tZ)("div",{id:`${ne}-date-selection-description`,className:"sr-only","aria-live":"polite","aria-atomic":!0,children:z}),(0,D.tZ)("div",{id:`${ne}-months-description`,className:"sr-only","aria-live":"polite","aria-atomic":!0,children:X}),(0,D.tZ)(p.zx,{ref:et,"data-att":"prev-month","aria-disabled":!bt,"aria-label":null===P||void 0===P?void 0:P.previousMonth,className:a()("absolute top-4 ltr:left-6 rtl:right-6",{"focus:outline-none":!bt}),_style:S(S({},null===K||void 0===K||null===(i=K._calendar)||void 0===i?void 0:i._navButton),bt?{}:null===K||void 0===K||null===(r=K._calendar)||void 0===r?void 0:r._navButton.__disabled),onClick:()=>
8{Ie(),"function"===typeof Y&&Y("month_back")},onKeyDown:e=>{if("Tab"!==e.key)return;if(e.preventDefault(),e.shiftKey)return"END"===W?qe():ze();if(mt)return ot();const t=ht();t&&(je(t.getAttribute("data-att").replace("day-","")),t.focus())},children:(0,D.tZ)("span",{"aria-hidden":!0,children:N?"keyboard_arrow_right":"keyboard_arrow_left"})}),(0,D.tZ)(p.zx,{ref:nt,"data-att":"next-month","aria-disabled":!mt,"aria-label":null===P||void 0===P?void 0:P.nextMonth,className:a()("absolute top-4 ltr:right-6 rtl:left-6",{"focus:outline-none":!mt}),_style:S(S({},null===K||void 0===K||null===(s=K._calendar)||void 0===s?void 0:s._navButton),mt?{}:null===K||void 0===K||null===(d=K._calendar)||void 0===d?void 0:d._navButton.__disabled),onClick:()=>{Ae(),"function"===typeof Y&&Y("month_forward")},onKeyDown:e=>{if("Tab"!==e.key)return;if(e.preventDefault(),e.shiftKey)return bt?tt():"END"===W?qe():ze();const t=ht();t&&(je(t.getAttribute("data-att").replace("day-","")),t.focus())},children:(0,D.tZ)("span",{"aria-hidden":!0,children:N?"keyboard_arrow_left":"keyboard_arrow_right"})}),(0,D.tZ)(_.Z,{orientation:"HORIZONTAL",initialMonth:"END"===W?Oe[ke]:he[Ce],monthsToRender:g,monthFormat:j,renderDay:yt,_style:null===K||void 0===K?void 0:K._calendar,customDayNames:$}),l.isValidElement(L)?L:"function"===typeof L?L():null]}),(0,D.BX)(p.kC,{className:a()("w-full justify-between items-center px-4 space-x-2 rtl:space-x-reverse",{"py-2":!R}),_style:null===K||void 0===K?void 0:K._footer,children:[l.isValidElement(Z)&&Z,(0,D.BX)(p.kC,{className:"justify-end flex-grow space-x-2 rtl:space-x-reverse",children:[l.isValidElement(A)&&A,(0,D.tZ)(p.zx,{ref:it,isDisabled:_t,"data-att":"clear","aria-disabled":_t,"aria-label":null===P||void 0===P?void 0:P.clearAriaLabel,className:a()("px-4 py-2 flex justify-center items-center",{"focus:outline-none":_t}),_style:S(S({},null===K||void 0===K||null===(u=K._footer)||void 0===u?void 0:u._clearButton),_t?null===K||void 0===K||null===(c=K._footer)||void 0===c?void 0:c._clearButton.__disabled:{}),onClick:()=>{var e;_t||"function"!==typeof B||(B(),null===He||void 0===He||null===(e=He.current)||void 0===e||e.focus())},onKeyDown:e=>{if("Tab"===e.key&&e.shiftKey){e.preventDefault();const t=ht();t&&(je(t.getAttribute("data-att").replace("day-","")),t.focus())}},children:null===P||void 0===P?void 0:P.clear}),(0,D.tZ)(p.zx,{ref:rt,className:"px-4 py-2 flex justify-center items-center",_style:null===K||void 0===K||null===(v=K._footer)||void 0===v?void 0:v._doneButton,onClick:()=>{"function"===typeof e&&e(),"function"===typeof M&&M()},"data-att":"done",children:null===P||void 0===P?void 0:P.done})]})]})]})},St=(0,D.tZ)(p.J2,{title:null===P||void 0===P?void 0:P.title,"data-testid":"date-container",panelId:J,buttonAs:"div",role:"none",_style:K._popover,onOpen:Ke,Button:({isOpen:e})=>(0,D.BX)(p.BZ,S(S(S({},ct),vt),{},{"data-att":"start-date-toggler",ref:t,className:"cursor-pointer",hasValue:!!y,onClick:Ke,errorMessage:null===P||void 0===P?void 0:P.startDateErrorMessage,errorMessageId:`${ee}-error`,children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${ee}-label`,as:"label","aria-hidden":"true",children:null===P||void 0===P?void 0:P.startDateAriaLabel}),(0,D.tZ)(p.zx,{id:`${ee}-trigger`,"aria-haspopup":"dialog","aria-expanded":e,"aria-controls":J,"aria-invalid":null!==P&&void 0!==P&&P.startDateErrorMessage?"true":"false","aria-labelledby":`${ee}-label ${ee}-trigger`,"aria-describedby":`${ee}-error ${ee}-outer-help-description`,className:"text-inherit text-left rtl:text-right focus:outline-none truncate block",children:re?at:ut})]})),placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"flip",options:{fallbackPlacements:["top-start","bottom-end","top-end","right","left"],padding:0}}],children:({close:e})=>Ct({close:e})}),kt=o?(0,D.tZ)(p.BZ,S(S(S({},ct),pt),{},{isDisabled:!0,"data-att":"end-date-toggler",children:(0,D.tZ)("span",{className:"flex-1","aria-label":null===P||void 0===P?void 0:P.endDateInputGroupDisabledAriaLabel})})):(0,D.tZ)(p.J2,{title:null===P||void 0===P?void 0:P.title,"data-testid":"date-container",panelId:Q,buttonAs:"div",role:"none",_style:K._popover,onOpen:Xe,Button:({isOpen:e})=>(0,D.BX)(p.BZ,S(S(S({},ct),pt),{},{"data-att":"end-date-toggler",ref:n,className:"cursor-pointer",hasValue:!!m,onClick:Xe,errorMessage:null===P||void 0===P?void 0:P.endDateErrorMessage,errorMessageId:`${te}-error`,children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${te}-label`,as:"label","aria-hidden":"true",children:null===P||void 0===P?void 0:P.endDateAriaLabel}),(0,D.tZ)(p.zx,{id:`${te}-trigger`,"aria-haspopup":"dialog","aria-expanded":e,"aria-controls":Q,"aria-invalid":null!==P&&void 0!==P&&P.endDateErrorMessage?"true":"false","aria-labelledby":`${te}-label ${te}-trigger`,"aria-describedby":`${te}-error ${te}-outer-help-description`,className:"text-inherit text-left rtl:text-right focus:outline-none truncate",children:se?st:ut})]})),placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"flip",options:{fallbackPlacements:["top-start","bottom-end","top-end","right","left"],padding:0}}],children:({close:e})=>Ct({close:e})});return"function"===typeof F?F({startDate:St,endDate:kt}):{startDate:St,endDate:kt}}k.defaultProps={isOneWay:!1,monthsToRenderAtATime:2,startDate:"",endDate:"",displayDateFormat:"LL",editDateFormat:"MM/DD/YYYY",monthFormat:"MMMM YYYY",labels:{startDateLabel:"Start Date",startDatePlaceholder:"Please type your date",startDateErrorMessage:"",endDateLabel:"End Date",endDatePlaceholder:"Please type your date",endDateErrorMessage:"",clear:"Clear",done:"Done"},onDone:()=>null,onClear:()=>null,isRTL:!1,inputGroupVariant:"4",inputGroupIcon:"today",_style:{},customDayNames:null};var w=k;y().oneOfType([y().element,y().func]),y().element,y().func,y().bool,y().shape({minDate:y().oneOfType([y().string,y().number]),maxDate:y().oneOfType([y().string,y().number]),validDaysOfWeek:y().arrayOf(y().oneOfType([y().string,y().number])),includedDates:y().arrayOf(y().string),excludedDates:y().arrayOf(y().string)}),y().shape({minDate:y().oneOfType([y().string,y().number]),maxDate:y().oneOfType([y().string,y().number]),validDaysOfWeek:y().arrayOf(y().oneOfType([y().string,y().number])),includedDates:y().arrayOf(y().string),excludedDates:y().arrayOf(y().string)}),y().string,y().string,y().func.isRequired,y().func.isRequired,y().string,y().string,y().string,y().func,y().func,y().bool,y().oneOf(["1","2","3","4"]),y().string,y().func.isRequired,y().shape({title:y().string,description:y().string,
8startDateLabel:y().string,startDatePlaceholder:y().string,startDateErrorMessage:y().string,endDateLabel:y().string,endDatePlaceholder:y().string,endDateErrorMessage:y().string,clear:y().string,done:y().string}).isRequired,y().object,y().objectOf(y().string);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t,n,o,i,r,s,g;const{startDateRef:y,endDateRef:m,isOneWay:h,isReturnDateAlwaysVisible:C,startDateConfig:S,endDateConfig:k,startDate:w,endDate:x,onChangeStartDate:E,onChangeEndDate:P,displayDateFormat:N,editDateFormat:R,monthFormat:L,inputGroupVariant:Z,inputGroupIcon:A,labels:I,isRTL:M,showFaresPerDay:B,legend:F,summaryPanel:G,flexibleDatesSelector:V,renderDay:Y,onDone:$,onClear:K,children:X,_style:H,onSelectingSignalUpdated:z,customDayNames:U}=e,W=((e,t=!1)=>{var n,o,i,l,r,a,s,d,u,c,v,p,f,g,y,m,h,_,O,D,C,S,k,w,x,E,T,P,N,R,L,Z,A,I,M,B,F,G,V,Y,$,K,X,H,z,U,W,q,J,Q,ee,te,ne,oe,ie;const le=null===e||void 0===e?void 0:e.eds,re=b.F4`
9    0% {
10      background-position: 0% 0%;
11    }
12    100% {
13      background-position: 200% 0%;
14    }
15  `;return{_selectingIndicator:{width:"100%",height:"2px",background:"transparent",__active:{background:null===le||void 0===le||null===(n=le.colors)||void 0===n?void 0:n.focusRing}},_priceNoteLabel:j({},null===le||void 0===le?void 0:le.typographies.fs6),_inputGroup:j(j({},null===le||void 0===le||null===(o=le.components)||void 0===o||null===(i=o.inputGroups)||void 0===i?void 0:i.primary),{},{_helpDescription:j({},null===le||void 0===le?void 0:le.typographies.fs7)}),_inputsContainer:{borderBottom:`1px solid ${null===le||void 0===le||null===(l=le.colors)||void 0===l?void 0:l.borders}`,backgroundColor:null===le||void 0===le||null===(r=le.colors)||void 0===r?void 0:r.backgroundMain},_header:{backgroundColor:null===le||void 0===le||null===(a=le.colors)||void 0===a?void 0:a.backgroundSoft,_title:j(j({},null===le||void 0===le||null===(s=le.typographies)||void 0===s?void 0:s.fs5),null===le||void 0===le||null===(d=le.typographies)||void 0===d||null===(u=d.fs5)||void 0===u?void 0:u._bold),_backButton:j(j({},null===le||void 0===le||null===(c=le.components)||void 0===c||null===(v=c.buttons)||void 0===v?void 0:v.ghostPrimaryIcon),{},{height:"2.5rem"})},_footer:{backgroundColor:null===le||void 0===le||null===(p=le.colors)||void 0===p?void 0:p.backgroundMain,boxShadow:"0px -1px 2px rgba(0, 0, 0, 0.25)",_clearButton:j(j(j({},null===le||void 0===le||null===(f=le.components)||void 0===f||null===(g=f.buttons)||void 0===g?void 0:g.ghostSecondary),null===le||void 0===le||null===(y=le.components)||void 0===y||null===(m=y.datepicker)||void 0===m?void 0:m._clearButton),t?{fontSize:null===le||void 0===le?void 0:le.typographies.fs4.fontSize,fontFamily:null===le||void 0===le?void 0:le.typographies.fs4.fontFamily,fontWeight:null===le||void 0===le?void 0:le.typographies.fs4.fontWeight,letterSpacing:null===le||void 0===le?void 0:le.typographies.fs4.letterSpacing}:{}),_doneButton:j(j(j({},null===le||void 0===le||null===(h=le.components)||void 0===h||null===(_=h.buttons)||void 0===_?void 0:_.ghostPrimary),null===le||void 0===le||null===(O=le.components)||void 0===O||null===(D=O.datepicker)||void 0===D?void 0:D._doneButton),t?{fontSize:null===le||void 0===le?void 0:le.typographies.fs4.fontSize,fontFamily:null===le||void 0===le?void 0:le.typographies.fs4.fontFamily,fontWeight:null===le||void 0===le?void 0:le.typographies.fs4.fontWeight,letterSpacing:null===le||void 0===le?void 0:le.typographies.fs4.letterSpacing}:{})},_calendar:{backgroundColor:null===le||void 0===le||null===(C=le.colors)||void 0===C?void 0:C.backgroundMain,_months:{_month:{_title:j(j({},null===le||void 0===le?void 0:le.typographies.fs5),null===le||void 0===le||null===(S=le.components)||void 0===S||null===(k=S.datepicker)||void 0===k?void 0:k._monthTitle),_dayName:j(j(j({},null===le||void 0===le?void 0:le.typographies.fs5),null===le||void 0===le?void 0:le.typographies.fs5._bold),null===le||void 0===le||null===(w=le.components)||void 0===w||null===(x=w.datepicker)||void 0===x?void 0:x._weekDay),_daysGrid:{_day:j(j(j(j({aspectRatio:"1",minWidth:t?"53px":"40px",minHeight:t?"53px":"40px","@media (max-width: 376px)":j({minWidth:t?"43px":"40px",minHeight:t?"43px":"40px"},t?j({fontSize:null===le||void 0===le?void 0:le.typographies.fs7.fontSize,fontFamily:null===le||void 0===le?void 0:le.typographies.fs7.fontFamily,fontWeight:null===le||void 0===le?void 0:le.typographies.fs7.fontWeight,letterSpacing:null===le||void 0===le?void 0:le.typographies.fs7.letterSpacing,lineHeight:null===le||void 0===le?void 0:le.typographies.fs7.lineHeight},null===le||void 0===le?void 0:le.typographies.fs7._bold):{})},null===le||void 0===le?void 0:le.typographies.fs5),null===le||void 0===le||null===(E=le.components)||void 0===E||null===(T=E.datepicker)||void 0===T?void 0:T._cell),t?null===le||void 0===le?void 0:le.typographies.fs5._bold:{}),{},{_price:j(j({},null===le||void 0===le?void 0:le.typographies.fs6),{},{color:null===le||void 0===le||null===(P=le.colors)||void 0===P?void 0:P.text,"@media (max-width: 376px)":{fontSize:null===le||void 0===le?void 0:le.typographies.fs7.fontSize,fontFamily:null===le||void 0===le?void 0:le.typographies.fs7.fontFamily,fontWeight:null===le||void 0===le?void 0:le.typographies.fs7.fontWeight,letterSpacing:null===le||void 0===le?void 0:le.typographies.fs7.letterSpacing,lineHeight:null===le||void 0===le?void 0:le.typographies.fs7.lineHeight},__lowestFare:{color:(null===le||void 0===le||null===(N=le.colors)||void 0===N?void 0:N.success)||(null===le||void 0===le||null===(R=le.colors)||void 0===R?void 0:R.sucess)},__noFares:j(j({},null===le||void 0===le?void 0:le.typographies.fsIcon),{},{fontSize:"20px"}),__skeleton:{animation:`${re} 1.5s linear infinite`,width:"30px",height:"18px",background:"linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%)",backgroundSize:"200% 100%",borderRadius:null===le||void 0===le||null===(L=le.utilities)||void 0===L?void 0:L.borderRadius}}),"&:hover, &:focus":j({},null===le||void 0===le||null===(Z=le.components)||void 0===Z||null===(A=Z.datepicker)||void 0===A||null===(I=A._cell)||void 0===I?void 0:I["&:hover, &:focus"]),_rangeStart:j({},null===le||void 0===le||null===(M=le.components)||void 0===M||null===(B=M.datepicker)||void 0===B||null===(F=B._cell)||void 0===F?void 0:F._rangeStart),_rangeEnd:j({},null===le||void 0===le||null===(G=le.components)||void 0===G||null===(V=G.datepicker)||void 0===V||null===(Y=V._cell)||void 0===Y?void 0:Y._rangeEnd),_inRange:j({},null===le||void 0===le||null===($=le.components)||void 0===$||null===(K=$.datepicker)||void 0===K||null===(X=K._cell)||void 0===X?void 0:X._withinRange),_disabled:j({},null===le||void 0===le||null===(H=le.components)||void 0===H||null===(z=H.datepicker)||void 0===z||null===(U=z._cell)||void 0===U?void 0:U._disabled),_disabledStartOfRange:j({},null===le||void 0===le||null===(W=le.components)||void 0===W||null===(q=W.datepicker)||void 0===q||null===(J=q._cell)||void 0===J?void 0:J._disabledRangeStart),_disabledEndOfRange:j({},null===le||void 0===le||null===(Q=le.components)||void 0===Q||null===(ee=Q.datepicker)||void 0===ee||null===(te=ee._cell)||void 0===te?void 0:te._disabledRangeEnd),_today:j(j({},null===le||void 0===le?void 0:le.typographies.fs5._bold),null===le||void 0===le||null===(ne=le.components)||void 0===ne||null===(oe=ne.datepicker)||void 0===oe||null===(ie=oe._cell)||void 0===ie?void 0:ie._today)})}}}},_modal:{_overlay:{"@media (min-width: 576px)":{backdropFilter:"blur(5px)",background:"rgba(0,0,0,0.5)"}},_container:{background:"#FFF",top:"0",left:"0",height:"100%",width:"100%","@media (min-width: 576px)":{top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"90vh",maxHeight:"926px",width:"428px"}}}}})(H,B),{0:q,1:J}=(0,l.useState)("START");(0,l.useEffect)((()=>{"function"===typeof z&&z(q)}),[q]);const[Q,ee]=(0,f.Me)(2,"modal-panel-"),[te,ne]=(0,f.Me)(2,"date-input-"),[oe]=(0,f.Me)(1,"months-grid-"),ie=d()(),le=(0,c.Z)(ie),re=d()(w,"YYYY-MM-DD"),ae=null===re||void 0===re?void 0:re.isValid(),se=d()(x,"YYYY-MM-DD"),de=null===se||void 0===se?void 0:se.isValid(),ue=(()=>{var e;let t=null;const n=null===S||void 0===S?void 0:S.minDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t
15:ie})(),ce=(()=>{var e;let t=null;const n=null===S||void 0===S?void 0:S.maxDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:d()().add(2,"years")})(),ve=(()=>{var e;let t=null;const n=null===k||void 0===k?void 0:k.minDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:ie})(),pe=(()=>{var e;let t=null;const n=null===k||void 0===k?void 0:k.maxDate;return"string"===typeof n?t=d()(n):"number"===typeof n&&(t=d()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:d()().add(2,"years")})(),fe=ue.startOf("month"),ge=ce.startOf("month").diff(fe,"months")+1,ye=ae?re.startOf("month").diff(ue.startOf("month"),"months"):null,be=ve.startOf("month"),me=pe.startOf("month").diff(fe,"months")+1,he=de?se.startOf("month").diff(ue.startOf("month"),"months"):null,_e=(0,l.useRef)(),Oe=e=>{var t;if("string"!==typeof e||!e||!(null!==(t=d()(e,"YYYY-MM-DD"))&&void 0!==t&&t.isValid()))return!1;return!(0,v.Z)(e,S)},De=e=>{var t;if("string"!==typeof e||!e||!(null!==(t=d()(e,"YYYY-MM-DD"))&&void 0!==t&&t.isValid()))return!1;return!(0,v.Z)(e,k)},Ce=e=>{e||E("");if(!Oe(e))return;E(e);(0,u.cL)(e,x)},Se=e=>{e||P("");if(!De(e))return;!!(0,u.my)(e,w)||P(e)},ke=(0,O.Z)({id:te,selectedDate:w,displayFormat:N,editFormat:R,onFocus:()=>{"START"!==q&&J("START")},onDateChange:Ce,isDateSelectable:Oe}),we=(0,O.Z)({id:ne,selectedDate:x,displayFormat:N,editFormat:R,onFocus:()=>{"END"!==q&&J("END")},onDateChange:Se,isDateSelectable:De}),xe=(0,l.useRef)(null),je=()=>{var e;return null===xe||void 0===xe||null===(e=xe.current)||void 0===e?void 0:e.focus()},Ee=(0,l.useRef)(null),Te=()=>{var e;return null===Ee||void 0===Ee||null===(e=Ee.current)||void 0===e?void 0:e.focus()},{0:Pe,1:Ne}=(0,l.useState)(!1),Re=()=>Ne(!1);(0,l.useEffect)((()=>{var e;Pe&&(J("START"),je(),(()=>{var e;null===xe||void 0===xe||null===(e=xe.current)||void 0===e||e.select()})(),null===_e||void 0===_e||null===(e=_e.current)||void 0===e||e.focus())}),[Pe]);const{0:Le,1:Ze}=(0,l.useState)(!1),Ae=()=>Ze(!1);(0,l.useEffect)((()=>{var e;Le&&(J("END"),Te(),(()=>{var e;null===Ee||void 0===Ee||null===(e=Ee.current)||void 0===e||e.select()})(),null===_e||void 0===_e||null===(e=_e.current)||void 0===e||e.focus())}),[Le]);const Ie=(0,l.useRef)(),Me=(0,l.useRef)(),Be=(0,l.useRef)(),Fe=(0,l.useRef)();(0,l.useEffect)((()=>{var e;if(!Pe&&!Le)return;const t=null===Ie||void 0===Ie||null===(e=Ie.current)||void 0===e?void 0:e.querySelectorAll("[data-att^='day-']"),n=Array.from(t).filter((e=>!(null!==e&&void 0!==e&&e.disabled)));Be.current=n[0],Fe.current=n[n.length-1]}),[ye,he,Pe,Le]),(0,l.useEffect)((()=>{var e,t,n,o;(Pe||Le)&&("START"===q?(null===(e=Be.current)||void 0===e||e.addEventListener("keydown",(e=>{"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),je())})),null===(t=Fe.current)||void 0===t||t.addEventListener("keydown",(e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),Te())}))):(null===(n=Be.current)||void 0===n||n.addEventListener("keydown",(e=>{"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),Te())})),null===(o=Fe.current)||void 0===o||o.addEventListener("keydown",(e=>{var t;"Tab"!==e.key||e.shiftKey||(e.preventDefault(),null===Me||void 0===Me||null===(t=Me.current)||void 0===t||t.focus())}))))}),[Pe,Le,q]);const Ge=w?d()(w).format(N):"",Ve=x?d()(x).format(N):"",Ye=R.toLowerCase(),$e={isRTL:M,variant:Z,rightIcon:A,_style:null===W||void 0===W?void 0:W._inputGroup},Ke={label:null===I||void 0===I?void 0:I.startDateLabel},Xe={label:null===I||void 0===I?void 0:I.endDateLabel},He=(0,l.useRef)(null),ze=e=>{var t;"number"!==typeof e&&e>0&&"function"===typeof(null===He||void 0===He||null===(t=He.current)||void 0===t?void 0:t.scrollToIndex)||He.current.scrollToIndex(e,{align:"start"})};(0,l.useEffect)((()=>{Pe&&(ae?ze(ye):de&&ze(he))}),[Pe]),(0,l.useEffect)((()=>{Le&&(de?ze(he):ae&&ze(ye))}),[Le]);const Ue=e=>{const t=(0,c.Z)(ie),n=(0,c.Z)(e),o=(0,u.KZ)(n,le),i=(0,u.cL)(n,t),l="START"===q&&!Oe(n)||"END"===q&&!De(n),r=h&&(0,u.KZ)(n,w||(0,u.KZ)(n,x));return{singleSelection:r,startOfRange:!r&&(0,u.KZ)(n,w),endOfRange:!r&&(0,u.KZ)(n,x),inRange:!r&&(0,u.cL)(n,w)&&(0,u.my)(n,x),disabled:l,upcomingDisabled:l&&(o||i),today:o}},We=C||!h,qe=(0,D.BX)(D.HY,{children:[(0,D.BX)(p.kC,{className:"w-full h-10 px-8 justify-center items-center relative",_style:null===W||void 0===W?void 0:W._header,children:[(0,D.tZ)(p.kC,{className:"absolute left-0 rtl:right-0",children:(0,D.tZ)(p.zx,{ref:_e,onClick:()=>{Pe&&Re(),Le&&Ae()},className:"flex items-center justify-center",_style:null===W||void 0===W||null===(t=W._header)||void 0===t?void 0:t._backButton,"data-att":"back",children:M?"keyboard_arrow_right":"keyboard_arrow_left"})}),(0,D.tZ)(p.xv,{className:"truncate m-0",as:"h3",_style:null===W||void 0===W||null===(n=W._header)||void 0===n?void 0:n._title,children:null===I||void 0===I?void 0:I.title})]}),(0,D.BX)(p.kC,{className:"w-full py-3 sm:py-4 px-5 md:px-7 flex-col space-y-5",_style:null===W||void 0===W?void 0:W._inputsContainer,children:[(0,D.BX)(p.kC,{className:"w-full space-x-2 rtl:space-x-reverse flex-nowrap",children:[(0,D.tZ)(p.kC,{className:"w-5/12 flex-1",children:(0,D.tZ)(p.BZ,T(T(T({},$e),Ke),{},{hasValue:!!w,onClick:je,"data-att":"start-date-input-group",helpDescriptionId:`${te}-inner-help-description`,helpDescription:w||null!==xe&&void 0!==xe&&null!==(o=xe.current)&&void 0!==o&&o.value?Ye:"",children:(0,D.BX)(p.kC,{className:"flex-col w-full",children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${te}-inner-label`,as:"label","aria-hidden":"true",children:null===I||void 0===I?void 0:I.startDateInputAriaLabel}),(0,D.tZ)("input",T(T({id:te,ref:xe,"aria-labelledby":`${te}-inner-label`,"aria-describedby":`${te}-inner-help-description`,className:"text-inherit bg-transparent appearance-none focus:outline-none truncate text-ellipsis w-full placeholder-current",placeholder:R},ke),{},{onKeyDown:e=>{var t;("function"===typeof(null===ke||void 0===ke?void 0:ke.onKeyDown)&&ke.onKeyDown(e),"Tab"!==e.key||e.shiftKey)||(e.preventDefault(),null===Be||void 0===Be||null===(t=Be.current)||void 0===t||t.focus())}})),(0,D.tZ)(p.kC,{"aria-hidden":"true",_style:T(T({},null===W||void 0===W?void 0:W._selectingIndicator),"START"===q?null===W||void 0===W?void 0:W._selectingIndicator.__active:{})})]})}))}),We&&(0,D.tZ)(p.kC,{className:"w-5/12 flex-1",children:h?(0,D.tZ)(p.BZ,T(T(T({},$e),Xe),{},{isDisabled:!0,"data-att":"end-date-input-group",children:(0,D.tZ)("span",{className:"flex-1","aria-label":null===I||void 0===I?void 0:I.endDateInputGroupDisabledAriaLabel})})):(0,D.tZ)(p.BZ,T(T(T({},$e),Xe),{},{hasValue:!!x,onClick:Te,"data-att":"end-date-input-group",helpDescriptionId:`${ne}-inner-help-description`,helpDescription:x||null!==Ee&&void 0!==Ee&&null!==(i=Ee.current)&&void 0!==i&&i.value?Ye:"",children:(0,D.BX)(p.kC,{className:"flex-col w-full",children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${ne}-inner-label`,as:"label","aria-hidden":"true",children:null===I||void 0===I?void 0:I.endDateInputAriaLabel}),(0,D.tZ)("input",T(T({id:ne,ref:Ee,"aria-labelledby":`${ne}-inner-label`,"aria-describedby":`${ne}-inner-help-description`,className:"text-inherit bg-transparent appearance-none focus:outline-none truncate text-ellipsis w-full placeholder-current",placeholder:R},we),{},{onKeyDown:e=>{var t;("function"===typeof(null===we||void 0===we?void 0:we.onKeyDown)&&we.onKeyDown(e),"Tab"!==e.key||e.shiftKey)||(e.preventDefault(),null===Be||void 0===Be||null===(t=Be.current)||void 0===t||t.focus())}})),(0,D.tZ)(p.kC,{"aria-hidden":"true",_style:T(T({},null===W||void 0===W?void 0:W._selectingIndicator),"END"===q?null===W||void 0===W?void 0:W._selectingIndicator.__active:{})})]})}))})]}),B&&l.isValidElement(V)&&V,!B&&l.isValidElement(F)?F:"function"===typeof F?F():null]}),B&&l.isValidElement(F)&&(0,D.tZ)(p.kC,{className:"w-full px-5 pt-3 pb-2","aria-hidden":"true",children:(0,D.tZ)(p.xv,{_style:null===W||void 0===W?void 0:W._priceN
15oteLabel,children:null===I||void 0===I?void 0:I.priceNoteLabel})})]}),Je=!ae&&!de,Qe=(0,D.BX)(D.HY,{children:[B&&l.isValidElement(F)?F:"function"===typeof F?F():null,(0,D.BX)(p.kC,{className:"w-full justify-between items-center p-2 space-x-2 rtl:space-x-reverse",_style:null===W||void 0===W?void 0:W._footer,children:[!B&&l.isValidElement(V)&&V,l.isValidElement(G)&&G,(0,D.BX)(p.kC,{className:"justify-end flex-grow space-x-2 rtl:space-x-reverse",children:[(0,D.tZ)(p.zx,{ref:Me,"data-att":"clear","aria-disabled":Je,"aria-label":null===I||void 0===I?void 0:I.clearAriaLabel,className:a()("px-4 py-2 flex justify-center items-center",{"focus:outline-none":Je}),_style:T(T({},null===W||void 0===W||null===(r=W._footer)||void 0===r?void 0:r._clearButton),Je?null===W||void 0===W||null===(s=W._footer)||void 0===s?void 0:s._clearButton.__disabled:{}),onClick:Je?()=>null:()=>{"function"===typeof K&&K()},children:null===I||void 0===I?void 0:I.clear}),(0,D.tZ)(p.zx,{className:"px-4 py-2 flex justify-center items-center",_style:null===W||void 0===W||null===(g=W._footer)||void 0===g?void 0:g._doneButton,onClick:()=>{Pe&&Re(),Le&&Ae(),"function"===typeof $&&$()},"data-att":"done",children:null===I||void 0===I?void 0:I.done})]})]})]}),et=(0,D.BX)(p.kC,{ref:Ie,"data-att":"data-selector-modal-content",className:"w-full px-2 md:px-5",_style:T({}
15,null===W||void 0===W?void 0:W._calendar),children:[(0,D.tZ)("div",{id:`${oe}-date-selection-description`,className:"sr-only","aria-live":"polite","aria-atomic":!0,children:`selecting ${"END"===q?"end":"start"} date`}),(0,D.tZ)(_.Z,{virtualizerRef:He,orientation:"VERTICAL",initialMonth:"END"===q?be:fe,monthsToRender:"END"===q?me:ge,monthFormat:L,renderDay:(e,t)=>{var n,o,i,l,r,s,v,f,g,y,m,_,O,D,C,S,k,x,j,E,P,R,L,Z,A,I,M,B,F,G,V,$,K,X,H,z,U,Q,ee,te,ne,oe,ie,le,re,ae,se,de,ue;const ce=null===e||void 0===e?void 0:e.format("D"),ve=(0,c.Z)(e),pe=Ue(e),{singleSelection:fe,startOfRange:ge,endOfRange:ye,inRange:be,disabled:me,upcomingDisabled:he,today:_e}=pe,Oe=fe||ge||ye||be,De=(fe?"Single Selection":ge&&"Start of Range")||ye&&"End of Range"||be&&"Day in Range"||"",ke=_e?"Current Date":"",we=a()("flex justify-center items-center my-0.5 focus:outline-none",{invisible:null==e,"cursor-not-allowed":me,"cursor-pointer":!me}),xe={"aria-selected":Oe,"aria-label":`${d()(e).format(N)}, ${ke}, ${d()(e).format("dddd")}, ${De}`,role:"gridcell","data-att":`day-${ve}`,className:we,isDisabled:me,onClick:()=>{return me?()=>null:(e=ve,{START:()=>{Ce(e),h||J("END")},END:()=>{(0,u.my)(e,w)?Ce(e):(Se(e),J("START"))}}[q]());var e}};return"function"===typeof Y?Y(T({day:e,index:t,modifiers:pe,_style:W},xe)):(0,b.az)(p.zx,T(T({},xe),{},{key:t,_style:T(T(T(T(T(T(T(T(T(T({},null===W||void 0===W||null===(n=W._calendar)||void 0===n||null===(o=n._months)||void 0===o||null===(i=o._month)||void 0===i||null===(l=i._daysGrid)||void 0===l?void 0:l._day),fe||ge&&ye?null===W||void 0===W||null===(r=W._calendar)||void 0===r||null===(s=r._months)||void 0===s||null===(v=s._month)||void 0===v||null===(f=v._daysGrid)||void 0===f||null===(g=f._day)||void 0===g?void 0:g._singleSelection:{}),ge&&!ye?null===W||void 0===W||null===(y=W._calendar)||void 0===y||null===(m=y._months)||void 0===m||null===(_=m._month)||void 0===_||null===(O=_._daysGrid)||void 0===O||null===(D=O._day)||void 0===D?void 0:D._rangeStart:{}),ye&&!ge?null===W||void 0===W||null===(C=W._calendar)||void 0===C||null===(S=C._months)||void 0===S||null===(k=S._month)||void 0===k||null===(x=k._daysGrid)||void 0===x||null===(j=x._day)||void 0===j?void 0:j._rangeEnd:{}),be?null===W||void 0===W||null===(E=W._calendar)||void 0===E||null===(P=E._months)||void 0===P||null===(R=P._month)||void 0===R||null===(L=R._daysGrid)||void 0===L||null===(Z=L._day)||void 0===Z?void 0:Z._inRange:{}),me?null===W||void 0===W||null===(A=W._calendar)||void 0===A||null===(I=A._months)||void 0===I||null===(M=I._month)||void 0===M||null===(B=M._daysGrid)||void 0===B||null===(F=B._day)||void 0===F?void 0:F._disabled:{}),he?null===W||void 0===W||null===(G=W._calendar)||void 0===G||null===(V=G._months)||void 0===V||null===($=V._month)||void 0===$||null===(K=$._daysGrid)||void 0===K||null===(X=K._day)||void 0===X?void 0:X._upcomingDisabled:{}),ge&&me?null===W||void 0===W||null===(H=W._calendar)||void 0===H||null===(z=H._months)||void 0===z||null===(U=z._month)||void 0===U||null===(Q=U._daysGrid)||void 0===Q||null===(ee=Q._day)||void 0===ee?void 0:ee._disabledStartOfRange:{}),ye&&me?null===W||void 0===W||null===(te=W._calendar)||void 0===te||null===(ne=te._months)||void 0===ne||null===(oe=ne._month)||void 0===oe||null===(ie=oe._daysGrid)||void 0===ie||null===(le=ie._day)||void 0===le?void 0:le._disabledEndOfRange:{}),_e?null===W||void 0===W||null===(re=W._calendar)||void 0===re||null===(ae=re._months)||void 0===ae||null===(se=ae._month)||void 0===se||null===(de=se._daysGrid)||void 0===de||null===(ue=de._day)||void 0===ue?void 0:ue._today:{})}),ce)},_style:null===W||void 0===W?void 0:W._calendar,customDayNames:U})]}),tt=(0,D.BX)(D.HY,{children:[(0,D.BX)(p.BZ,T(T(T({},$e),Ke),{},{"data-att":"start-date-toggler",ref:y,className:"cursor-pointer",hasValue:!!w,onClick:()=>Pe?Re():Ne(!0),errorMessage:null===I||void 0===I?void 0:I.startDateErrorMessage,errorMessageId:`${te}-error`,children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${te}-label`,as:"label","aria-hidden":"true",children:null===I||void 0===I?void 0:I.startDateAriaLabel}),(0,D.tZ)(p.zx,{id:`${te}-trigger`,"aria-haspopup":"dialog","aria-expanded":Pe,"aria-controls":Q,"aria-invalid":null!==I&&void 0!==I&&I.startDateErrorMessage?"true":"false","aria-labelledby":`${te}-label ${te}-trigger`,"aria-describedby":`${te}-error`,className:"text-inherit text-left rtl:text-right focus:outline-none truncate",children:(0,D.tZ)(p.xv,{as:"span",className:"w-full truncate",children:ae?Ge:null===I||void 0===I?void 0:I.startDatePlaceholder})})]})),(0,D.tZ)(p.Bn,{id:Q,open:Pe,isRTL:M,title:null===I||void 0===I?void 0:I.title,de
15scription:null===I||void 0===I?void 0:I.description,onClose:Re,_style:W._modal,unmount:!0,header:qe,footer:Qe,children:et})]}),nt=(0,D.BX)(D.HY,{children:[h?(0,D.tZ)(p.BZ,T(T(T({},$e),Xe),{},{isDisabled:!0,"data-att":"end-date-toggler",children:(0,D.tZ)("span",{className:"flex-1","aria-label":null===I||void 0===I?void 0:I.endDateInputGroupDisabledAriaLabel})})):(0,D.BX)(p.BZ,T(T(T({},$e),Xe),{},{"data-att":"end-date-toggler",ref:m,className:"cursor-pointer",hasValue:!!x,onClick:()=>Le?Ae():Ze(!0),errorMessage:null===I||void 0===I?void 0:I.endDateErrorMessage,errorMessageId:`${ne}-error`,children:[(0,D.tZ)(p.xv,{className:"sr-only",id:`${ne}-label`,as:"label","aria-hidden":"true",children:null===I||void 0===I?void 0:I.endDateAriaLabel}),(0,D.tZ)(p.zx,{id:`${ne}-trigger`,"aria-haspopup":"dialog","aria-expanded":Le,"aria-controls":ee,"aria-invalid":null!==I&&void 0!==I&&I.endDateErrorMessage?"true":"false","aria-labelledby":`${ne}-label ${ne}-trigger`,"aria-describedby":`${ne}-error ${ne}-outer-help-description`,className:"text-inherit text-left rtl:text-right focus:outline-none truncate",children:(0,D.tZ)(p.xv,{as:"span",className:"w-full truncate",children:de?Ve:null===I||void 0===I?void 0:I.endDatePlaceholder})})]})),(0,D.tZ)(p.Bn,{id:ee,open:Le,isRTL:M,title:null===I||void 0===I?void 0:I.title,description:null===I||void 0===I?void 0:I.description,onClose:Ae,_style:W._modal,unmount:!0,header:qe,footer:Qe,children:et})]});return"function"===typeof X?X({startDate:tt,endDate:nt}):{startDate:tt,endDate:nt}}P.defaultProps={isOneWay:!1,startDate:"",endDate:"",displayDateFormat:"LL",editDateFormat:"MM/DD/YYYY",monthFormat:"MMMM YYYY",labels:{title:"Booking Dates",description:"",startDateLabel:"Start Date",startDatePlaceholder:"Please type your date",startDateErrorMessage:"",endDateLabel:"End Date",endDatePlaceholder:"Please type your date",endDateErrorMessage:"",clear:"Clear",done:"Done"},onDone:()=>null,onClear:()=>null,isRTL:!1,inputGroupVariant:"4",inputGroupIcon:"today",_style:{},customDayNames:null};var N=P;const R=["isFullScreen"];function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var Z=function(e){const{isFullScreen:t=!0}=e,n=(0,i.Z)(e,R),l=t?N:w;return(0,D.tZ)(l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n))}},54951:function(e,t,n){"use strict";n.d(t,{Z:function(){return o.Z}});var o=n(61138)},98230:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var o=n(92809),i=n(67294),l=n(87877),r=n(53255),a=n(35944);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t,n,o,s,u,c,v;const[p]=(0,r.Me)(1),{id:f=p,inputGroupVariant:g="2",isModal:y,isRTL:b,icon:m,labels:h,selectedTravelers:_,travelerOptions:O,onChangeTravelers:D,areTravelersValid:C,travelClassSelectorEnabled:S,TravelClassSelector:k,selectedTravelClassOption:w,maxPassengersMessageConfig:x,_style:j}=e,{singleTravelerType:E,multipleTravelerTypes:T,doneButton:P,clearButton:N,modalTitle:R,travelersSectionTitle:L,increaseButtonAriaLabel:Z,decreaseButtonAriaLabel:A,filterButtonAriaLabel:I,currentAmount:M,maxPassengersReachedMessage:B,maxPassengersReachedDescription:F,maxPassengersReachedLinkText:G}=h,{descriptionEnabled:V,link:Y,alertIcon:$,openInNewIcon:K}=x,{enabled:X,url:H}=Y,z=(0,i.useRef)(null),U=(0,i.useRef)(null),W=(0,i.useRef)(null),q=(0,r.pA)(e),{0:J,1:Q}=(0,i.useState)(!1),ee=Object.values(_).reduce(((e,t)=>e+t)),te=`${ee} ${ee>1?T:E}${"string"===typeof(null===w||void 0===w?void 0:w.label)&&w.label.length>0?`, ${w.label}`:""}`,ne=()=>J&&Q(!1),oe=S?(0,a.tZ)(l.kC,{className:"w-full flex-col px-4 py-5",_style:j._travelClassSelectorSection,children:(0,a.tZ)(k,{})}):null,ie=(0,a.tZ)(l.kC,{className:"w-full p-4",_style:j._travelerSelectorSection,children:(0,a.BX)(l.kC,{className:"w-full flex-col",children:[(0,a.tZ)(l.xv,{as:"h2",className:"pb-4 rtl:text-right",_style:j._travelerSelectorSection._title,children:L}),O.map((e=>{const{id:t,label:n,isDisabled:o,noteLabel:i}=e;if(o)return;const r=_[t],s=!C(Object.defineProperty(d({},_),t,{value:r-1,enumerable:!0})),u=!C(Object.defineProperty(d({},_),t,{value:r+1,enumerable:!0})),c=`${t}-label`,v=`${t}-note-label`;return(0,a.BX)(l.kC,{"data-att":`traveler-${t}`,className:"w-full py-2 justify-between",children:[(0,a.BX)(l.kC,{className:"w-7/12 items-center rtl:text-right",children:[(0,a.tZ)(l.xv,{id:c,className:"w-full",as:"p",_style:j._travelerSelectorSection._travelerType._name,children:n}),i&&(0,a.tZ)(l.xv,{as:"p",id:v,className:"w-full",_style:j._travelerSelectorSection._travelerType._note,children:i})]}),(0,a.tZ)(l.kC,{className:"w-4/12 justify-end",children:(0,a.tZ)(l.vF,{"aria-label":i?`${n} ${i}`:n,increaseButtonAriaLabel:Z,decreaseButtonAriaLabel:A,currentAmountLabel:M,additionIcon:"add",subtractionIcon:"remove",id:t,value:r,onChange:e=>{const n=d({},_);return Object.defineProperty(n,t,{value:e,enumerable:!0}),C(n)&&D(n)},_style:j._travelerSelectorSection._travelerType._stepper,isDecreaseDisabled:s,isIncreaseDisabled:u,isDisabled:s&&u})})]},t)})),(0,a.tZ)((()=>{var e,t,n,o,i;return O.every((e=>{if(e.isDisabled)return!0;
15const t=_[e.id];return!C(d(d({},_),{},{[e.id]:t+1}))}))?(0,a.tZ)(l.kC,{role:"alert","aria-live":"assertive",className:"w-full p-3 mt-2",_style:null===j||void 0===j?void 0:j._maxPassengersAlert,children:(0,a.BX)(l.kC,{className:"w-full flex-col",children:[(0,a.BX)(l.kC,{className:"flex-nowrap items-center",children:[(0,a.tZ)(l.xv,{as:"span",className:"mr-1","aria-hidden":"true",_style:null===j||void 0===j||null===(e=j._maxPassengersAlert)||void 0===e?void 0:e._icon,children:$}),(0,a.tZ)(l.xv,{as:"p",_style:null===j||void 0===j||null===(t=j._maxPassengersAlert)||void 0===t?void 0:t._message,children:B})]}),V&&(0,a.tZ)(l.xv,{as:"p",className:"mt-1",_style:null===j||void 0===j||null===(n=j._maxPassengersAlert)||void 0===n?void 0:n._description,children:F}),X&&(0,a.BX)(l.zx,{onClick:()=>window.open(H,"_blank"),className:"mt-1 flex items-center",_style:null===j||void 0===j||null===(o=j._maxPassengersAlert)||void 0===o?void 0:o._link,children:[(0,a.tZ)(l.xv,{as:"span",className:"underline",children:G}),(0,a.tZ)(l.xv,{as:"span",className:"mx-1","aria-hidden":"true",_style:null===j||void 0===j||null===(i=j._maxPassengersAlert)||void 0===i?void 0:i._icon,children:K})]})]})}):null}),{})]})});return y?(0,a.BX)(l.kC,{children:[(0,a.tZ)(l.BZ,d(d({tabIndex:"0",role:"button","aria-haspopup":"dialog","aria-expanded":J,"aria-controls":`${f}-modal`,"aria-label":`${I}, ${te}`},q),{},{hasValue:!0,ref:U,className:"cursor-pointer",variant:g,rightIcon:m,onClick:()=>!J&&Q(!0),_style:j._inputGroup,isRTL:b,children:te})),(0,a.BX)(l.Bn,{id:`${f}-modal`,title:R,open:J,isRTL:b,header:(0,a.BX)(l.kC,{className:"h-10 w-full justify-center items-center",_style:null===j||void 0===j||null===(t=j._modal)||void 0===t?void 0:t._header,children:[(0,a.tZ)(l.kC,{className:"absolute left-0",children:(0,a.tZ)(l.zx,{"data-att":"back",onClick:()=>ne(),className:"flex justify-center",_style:null===j||void 0===j||null===(n=j._modal)||void 0===n||null===(o=n._header)||void 0===o?void 0:o._backButton,children:"keyboard_arrow_left"})}),(0,a.tZ)(l.xv,{className:"truncate m-0",as:"h3",_style:null===j||void 0===j||null===(s=j._modal)||void 0===s||null===(u=s._header)||void 0===u?void 0:u._title,children:R})]}),footer:(0,a.tZ)(l.kC,{className:"w-full justify-end items-center p-2 space-x-2 rtl:space-x-reverse",_style:j._modal._footer,children:(0,a.tZ)(l.zx,{"data-att":"done",className:"px-4 py-2 items-center justify-center",_style:j._modal._footer._doneButton,onClick:()=>ne(),children:P})}),onClose:ne,_style:{_overlay:d(d({},null===j||void 0===j||null===(c=j._modal)||void 0===c?void 0:c._overlay),{},{"@media (min-width: 576px)":{backdropFilter:"blur(5px)",background:"rgba(0,0,0,0.5)"}}),_container:d(d({background:"#FFF"},null===j||void 0===j||null===(v=j._modal)||void 0===v?void 0:v._container),{},{top:"0",left:"0",height:"100%",width:"100%","@media (min-width: 576px)":{top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"90vh",maxHeight:"926px",width:"428px"}})},children:[oe,ie]})]}):(0,a.tZ)(l.BZ,d(d({ref:z},q),{},{hasValue:!0,className:"cursor-pointer",variant:g,rightIcon:m,_style:j._inputGroup,onClick:e=>{W.current.contains(e.target)||U&&U.current&&U.current.click()},isRTL:b,children:(0,a.tZ)(l.J2,{title:R,ref:W,referenceElement:z,"aria-label":`${I}, ${te}`,"aria-haspopup":"dialog",_style:j._popover._container,Button:()=>(0,a.tZ)(l.xv,{as:"span",ref:U,children:te}),children:({close:e})=>(0,a.BX)(l.kC,{className:"flex-col focus:outline-none",children:[oe,ie,(0,a.tZ)(l.kC,{className:"w-full px-2 py-2 justify-end",_style:j._popover._footer,children:(0,a.tZ)(l.zx,{"data-att":"done",className:"px-4 py-2 justify-center items-center",_style:j._popover._footer._doneButton,onClick:()=>e(),children:P})})]})})}))}},96759:function(e,t,n){"use strict";var o=n(67294),i=n(45974);t.Z=function(){const{0:e,1:t}=(0,o.useState)(null),n=(0,o.useCallback)((e=>t(e)),[]),[l]=(0,i.Z)(e);return[n,l]}},12841:function(e,t,n){"use strict";var o=n(67294),i=n(87877),l=n(35944);const r=e=>{const{useTheme:t,title:n,subtitle:r,disclaimer:a,ErrorSummary:s,Origin:d,Destination:u,DateSelector:c,SecondaryFilters:v,SearchButton:p,PaymentMethodSelector:f,CloseButton:g}=e,{enabled:y,label:b,htmlTag:m}=n,{enabled:h,label:_,htmlTag:O}=r,{enabled:D,label:C,htmlTag:S}=a,k=(0,l.tZ)(i.xv,{"data-att":"title",className:"w-full rtl:text-right",_style:t(["flights-booking-popup._title"]),as:m,children:b}),w=(0,l.tZ)(i.xv,{"data-att":"subtitle",className:"w-full rtl:text-right",_style:t(["flights-booking._header._subtitle"]),as:O,children:_}),x=(0,l.tZ)(i.xv,{"data-att":"disclaimer",className:"pt-6 px-0.5 rtl:text-right",_style:t(["flights-booking._form._disclaimer"]),as:S,hasRawHtml:!0,children:C});return(0,l.tZ)(i.kC,{className:"w-full flex-col justify-start",_style:t("flights-booking._container"),children:(0,l.BX)(i.kC,{className:"w-full h-full relative flex-col justify-start",_style:t("flights-booking-popup._form"),children:[s,g,(0,l.BX)(i.kC,{className:"w-full items-center space-y-2 pb-6 pt-2",_style:t(["flights-booking._header"]),children:[y&&k,h&&w]}),(0,l.tZ)(i.kC,{className:"pb-1 -mx-1 -my-1 w-full",children:v}),(0,l.BX)(i.kC,{className:"w-full flex-1 justify-between md:flex-auto",children:[(0,l.BX)(i.kC,{className:"w-full flex-col pt-2.5 items-start",children:[(0,l.BX)(i.kC,{className:"w-full flex-col items-start",children:[(0,l.tZ)(i.kC,{className:"w-full mb-2",children:d}),(0,l.tZ)(i.kC,{className:"w-full mb-2",children:u})]}),(0,l.tZ)(i.kC,{className:"w-full",children:c}),o.isValidElement(f)&&(0,l.tZ)(i.kC,{className:"w-full mt-2",children:f})]}),(0,l.BX)(i.kC,{className:"w-full flex flex-col justify-end md:justify-start",children:[(0,l.tZ)(i.kC,{className:"w-full mt-5",children:p}),D&&x]})]})]})})};r.defaultProps={SecondaryFilters:[]},t.Z=r},87314:function(e,t,n){"use strict";var o=n(92809),i=n(46036),l=n(77681),r=n(62957);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?a(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d={name:"flights-booking",alias:"flights-booking",moduleId:"@@MODULE_NAME",staticAssetsHost:"@@STATIC_ASSETS_HOST",version:"@@MODULE_VERSION",styles:"none",themeName:"default",settings:s(s({},l.Z),{},{cmpConfigTransform:{enabled:!1}}),hooks:{params:{},preloadCustomProps:r.Z},servicesConfig:{aladdinGenAiCounter:{config:{endpoint:"https://aladdin-api.everymundo.net/counter/%%tenantCode%%/DOUBLE2-004",options:{cache:!0},config:{headers:{}}}},aiPoweredSearch:{config:{endpoint:"https://em-ai-workers-dev.double2.workers.dev/api/flights-query-aladdin",query:{moduleId:"DOUBLE2-004"},options:{cache:!0},config:{headers:{}}}},theme:{source:"local",config:{endpoint:"https://em-dev-admin-worker.double2.io/theme",options:{cache:!0},axiosConfig:{headers:{}}}},discounts:{config:{endpoint:"https://airmodules-discount.everymundo.net/%%tenantCode%%",options:{cache:!0},axiosConfig:{}},query:{}},blackoutDates:{options:{cache:!0},axiosConfig:{}},deeplink:{trackingParameters:s({},i)},histogram:{config:{endpoint:"https://openair-dev.airtrfx.com/airfare-sputnik-service/v3/%%tenantCode%%/fares/histogram-distribution",options:{},axiosConfig:{headers:{"em-api-key":"jcIGKBKjQ9pLc5hxDAzNf4LkaNu1gpOEUfzkj98ALvv8xrEglCk/e3AreqlzHStg"}}},query:{priceBuckets:{active:!0,field:"TOTAL_PRICE"},outputFormat:{datePattern:"YYYY-MM-DD"}}},sputnikSearch:{config:{endpoint:"https://openair-dev.airtrfx.com/airfare-sputnik-service/v3/%%tenantCode%%/fares/search",options:{},axiosConfig:{headers:{"em-api-key":"jcIGKBKjQ9pLc5hxDAzNf4LkaNu1gpOEUfzkj98ALvv8xrEglCk/e3AreqlzHStg"}}},query:{routesLimit:20,faresLimit:50,faresPerRoute:2}},airports:{useCountryGeoId:!1,useMarket:!1,query:{outputFields:["name","iataCode","locationLabel"]},labelStructure:"{{locationLabel}}"},settings:{sourceConfig:{name:"integration-api",url:"<%- cmpConfig.envConfig.integrationApi.settingsService.endPoint %>"},query:{cmpNames:["flights-booking"],source:"tenants-mock"}},labels:{sourceConfig:{name:"integration-api",url:"<%- cmpConfig.envConfig.integrationApi.labelsService.endPoint %>"},query:{airlineCode:"<%- cmpConfig.context.airline.code %>",language:"<%- cmpConfig.context.geo.language.lang %>",source:"trfx-api"},settings:{useStaticLabels:!0},defaultLabels:null}}};t.Z=d},77681:function(e,t){"use strict";t.Z={componentsConfig:{template:"default",secondaryFiltersToRender:[],primaryFiltersInputGroupVariant:"4",showErrorsInline:!0,aiPoweredSearch:{enabled:!1,toggle:{leftIcon:!0,rightIcon:!1},searchInput:{characterLimit:120,clearIcon:"close"},carousel:{slides:{info:{showOrigin:!0,showDestination:!0,showDepartureDate:!0,showReturnDate:!0,showPriceFrom:!0,showPrice:!0,showPriceDisclaimer:!0},height:64,breakpoints:{768:2,1024:3,1280:4}}}},backgroundImage:{padding:null,enabled:!1,url:null},title:{enabled:!1,htmlTag:"h1"},subtitle:{enabled:!1,htmlTag:"h2"},stickyBooking:{minScrollThreshold:150,containerMaxWidth:{default:"100%",992:"72rem"},mobileControl:{searchIcon:"search",editIcon:"edit"}},journeyTypeSelector:{multicity:{enabled:!0,href:"/"},icon:"expand_more"},useMilesSelector:{icon:"expand_more"},directFlightsSelector:{icon:"expand_more"},discountSelector:{icon:"expand_more"},flexibleDatesSwitch:{icon:"check",isLabelPassive:!1},dateSelector:{isReturnDateAlwaysVisible:!0,fareInsightsMaxDate:365,isPremium:!1,isFareInsights:!1,showLowestPriceIndicator:!0,dateFormat:"LL",dateFormatOnEdit:"L",isFlexibleDatesSwitchEnabled:!0,monthsToRenderInPopover:2,customDayNames:{}},locationSelector:{menuHeightPopover:350,optionsToRenderPopover:5,optionHeightModal:70,minCharactersCountToOpen:0,originLeftIcon:"",destinationLeftIcon:"",rightIcon:"expand_more",originRightIcon:null,destinationRightIcon:null,clearIcon:"close",searchConfig:{ignoreLocation:!1,caseSensitive:!1,includeScore:!1,includeMatches:!1,shouldSort:!0,findAllMatches:!0,threshold:.2,location:0,distance:200,maxPatternLength:50,minMatchCharLength:1,keys:["iataCode","locationLabel"]},textTransform:"default"},travelClassSelector:{},travelersInfoSelector:{icon:"expand_more",isTravelClassSelectorEnabled:!1,maxPassengersMessageConfig:{descriptionEnabled:!1,link:{enabled:!1,url:"/"},alertIcon:"error",openInNewIcon:"open_in_new"}},redemptionTypeSelector:{},promoCodeSelector:{icon:"expand_more",urlParameter:""},paymentMethodSelector:{enabled:!1,icon:"expand_more"},disclaimer:{enabled:!0,htmlTag:"p"},errorsSummary:{isVisible:!1}},labelKeys:{title:{label:"fc-booking-title"},subtitle:{label:"fc-booking-subtitle"},aiPoweredSearch:{toggle:"fc-booking-ai-search-toggle",toggleA11y:"fc-booking-ai-search-toggle-a11y",buttonStandardSearch:"fc-booking-ai-search-standard-button",buttonStandardSearchA11y:"fc-booking-ai-search-standard-button-a11y",buttonInputClearA11y:"fc-booking-ai-search-input-clear-button-a11y",buttonSearch:"fc-booking-ai-search-button",buttonSearchA11y:"fc-booking-ai-search-button-a11y",buttonNewSearch:"fc-booking-ai-search-new-button",buttonNewSearchA11y:"fc-booking-ai-search-new-button-a11y",buttonThumbUpA11y:"fc-booking-ai-search-thumb-up-a11y",buttonThumbDownA11y:"fc-booking-ai-search-thumb-down-a11y",buttonTryAgain:"fc-booking-ai-search-try-again-button",buttonTryAgainA11y:"fc-booking-ai-search-try-again-button-a11y",buttonGoBackToSearch:"fc-booking-ai-search-go-back-button",buttonGoBackToSearchA11y:"fc-booking-ai-search-go-back-button-a11y",carouselButtonPreviousA11y:"fc-booking-ai-search-carousel-previous-a11y",carouselButtonNextA11y:"fc-booking-ai-search-carousel-next-a11y",listButtonViewMoreResults:"fc-booking-ai-search-view-more-button",listButtonViewMoreResultsA11y:"fc-booking-ai-search-view-more-button-a11y",loading:"fc-booking-ai-search-loading",loadingA11y:"fc-booking-ai-search-loading-a11y",inputLabel:"fc-booking-ai-search-input-label",inputPlaceholder:"fc-booking-ai-search-input-placeholder",inputHelpDescription:"fc-booking-ai-search-input-help-description",inputA11y:"fc-booking-ai-search-input-a11y",queryHeading:"fc-booking-ai-search-query-heading",queryHeadingFallbackFares:"fc-booking-ai-search-query-heading-fallback-fares",remainingAttemps:"fc-booking-ai-search-remaining-attempts",maxAttemps:"fc-booking-ai-search-max-attempts",resultsDisclaimer:"fc-booking-ai-search-results-disclaimer",noResults:"fc-booking-ai-search-no-results",errorEmptyPrompt:"fc-booking-ai-search-error-empty-prompt",errorInputCharacterLimit:"fc-booking-ai-search-error-input-character-limit",errorSystem:"fc-booking-ai-search-error-system",errorInvalidPrompt:"fc-booking-ai-search-error-invalid-prompt",farePriceFrom:"fc-booking-ai-search-fare-price-from",fareOriginDestinationSeparator:"fc-booking-ai-search-fare-origin-destination-separator",fareNoOtherResults:"fc-booking-ai-search-fare-no-other-results"},journeyType:{label:"fc-booking-journey-type-label",ariaLabel:"fc-booking-journey-type-aria-label",doneButton:"fc-booking-journey-type-modal-done-button"},useMiles:{label:"fc-booking-use-miles-label",ariaLabel:"fc-booking-use-miles-aria-label",doneButton:"fc-booking-use-miles-modal-done-button"},directFlights:{label:"fc-booking-direct-flights-label",ariaLabel:"fc-booking-direct-flights-aria-label",doneButton:"fc-booking-direct-flights-modal-done-button"},travelers:{singleTravelerType:"fc-booking-passenger-options-single-passenger-label",multipleTravelerTypes:"fc-booking-passenger-options-multiple-passengers-label",doneButton:"fc-booking-travelers-btn-done",clearButton:"fc-booking-travelers-btn-clear",modalTitle:"fc-booking-passengers-modal-title",travelersSectionTitle:"fc-booking-passengers-section-title",decreaseButtonAriaLabel:"fc-booking-passengers-section-decrease-button",increaseButtonAriaLabel:"fc-booking-passengers-section-increase-button",filterButtonAriaLabel:"fc-booking-passengers-button-description",currentAmount:"fc-booking-passengers-current-amount",maxPassengersReachedMessage:"fc-booking-passengers-max-passengers-reached-message",maxPassengersReachedDescription:"fc-booking-passengers-max-passengers-reached-description",maxPassengersReachedLinkText:"fc-booking-passengers-max-passengers-reached-link-text"},travelClass:{label:"fc-booking-travel-class-options-label",ariaLabel:"fc-booking-travel-class-aria-label",doneButton:"fc-booking-travel-class-modal-done-button"},promoCode:{label:"fc-booking-promo-code-label",placeholder:"fc-booking-promo-code-placeholder",errorMsg:"fc-booking-promo-code-error",title:"fc-booking-promo-code-title",doneButton:"fc-booking-promo-code-done-button",filterButtonAriaLabel:"fc-booking-promo-code-button-description"},discountSelector:{disclaimer:"fc-booking-discount-selector-disclaimer",doneButton:"fc-booking-discount-selector-done-button"},redemptionType:{label:"fc-booking-redemption-type-label",ariaLabel:"fc-booking-redemption-type-aria-label",doneButton:"fc-booking-redemption-type-modal-done-button"}
15,paymentMethod:{label:"fc-bookings-payment-method-label",placeholder:"fc-bookings-payment-method-placeholder",errorMsg:"fc-bookings-payment-method-error",ariaLabel:"fc-booking-payment-method-aria-label",doneButton:"fc-booking-payment-method-modal-done-button"},multicity:{label:"cmp-journey-type-options-mc",ariaLabel:"cmp-journey-type-options-mc-opens-new-page"},origin:{label:"fc-booking-origin-label",ariaLabel:"fc-booking-origin-aria-label",placeholder:"fc-booking-origin-placeholder",errorMsg:"fc-booking-origin-error",noOptions:"fc-booking-empty-location-selector",clearButtonLabel:"fc-booking-location-selector-clear-button",modalDescription:"fc-booking-location-selector-origin-modal-description",modalClearButton:"fc-booking-location-selector-modal-clear-button",modalDoneButton:"fc-booking-location-selector-modal-done-button"},destination:{label:"fc-booking-destination-label",ariaLabel:"fc-booking-destination-aria-label",placeholder:"fc-booking-destination-placeholder",errorMsg:"fc-booking-destination-error",noOptions:"fc-booking-empty-location-selector",clearButtonLabel:"fc-booking-location-selector-clear-button",modalDescription:"fc-booking-location-selector-destination-modal-description",modalClearButton:"fc-booking-location-selector-modal-clear-button",modalDoneButton:"fc-booking-location-selector-modal-done-button"},dateSelector:{startDateInputGroupLabel:"fc-booking-departure-date-label",startDateInputGroupAriaLabel:"fc-booking-departure-date-aria-label",startDateInputGroupPlaceholder:"fc-booking-departure-date-placeholder",startDateInputAriaLabel:"fc-booking-departure-date-input-aria-label",startDateInputGroupNoDateErrorMessage:"fc-booking-departure-date-error",endDateInputGroupLabel:"fc-booking-return-date-label",endDateInputGroupAriaLabel:"fc-booking-return-date-aria-label",endDateInputGroupPlaceholder:"fc-booking-return-date-placeholder",endDateInputAriaLabel:"fc-booking-return-date-input-aria-label",endDateInputGroupNoDateErrorMessage:"fc-booking-return-date-error",endDateInputGroupDisabledAriaLabel:"fc-booking-return-date-input-disabled-aria-label",modalTitle:"fc-booking-departure-date-modal-title",doneButtonAriaLabel:"fc-booking-date-selector-done-button-aria-label",doneButton:"fc-booking-date-selector-done-button",clearButton:"fc-booking-date-selector-clear-button",clearButtonAriaLabel:"fc-booking-date-selector-clear-button-aria-label",previousMonth:"fc-booking-date-selector-previous-month",nextMonth:"fc-booking-date-selector-next-month",legendDescription:"fc-booking-date-selector-buckets-legend-description",priceNoteLabel:"fc-booking-date-selector-price-note-label",lowestFaresLabel:"fc-booking-date-selector-lowest-fares-label",lowestFaresAriaLabel:"fc-booking-date-selector-lowest-fares-aria-label",noFaresAriaLabel:"fc-booking-date-selector-no-fares-aria-label",loadingFaresLabel:"fc-booking-date-selector-loading-fares-label",searchForFaresLabel:"fc-booking-date-selector-search-for-fares-label",from:"fc-booking-date-selector-from-label",anyDates:"fc-booking-date-selector-any"},flexibleDates:{label:"fc-bookings-flexible-dates-type-label"},searchButton:{label:"fc-booking-booking-cta-label"},disclaimer:{label:"fc-booking-disclaimer"},stickyBooking:{modalTitle:"fc-booking-popup-title",modalDescription:"fc-booking-popup-description",modalCloseButton:"fc-booking-popup-close-button"},route:{anyRoute:"fc-booking-route-any"}},businessRules:{msCombinable:!1,blackoutDatesIntegration:!1,useMiles:{options:[{value:!0,labelKey:"fc-booking-use-miles-true"},{value:!1,labelKey:"fc-booking-use-miles-false"}]},directFlights:{options:[{value:!0,labelKey:"fc-booking-direct-flights-true"},{value:!1,labelKey:"fc-booking-direct-flights-false"}]},journeyTypes:{options:[{value:"ow",labelKey:"fc-booking-journey-type-options-ow"},{value:"rt",labelKey:"fc-booking-journey-type-options-rt"}]},travelClasses:{options:[{value:"e",labelKey:"fc-booking-travel-class-options-1",isDisabled:!1},{value:"b",labelKey:"fc-booking-travel-class-options-2",isDisabled:!1}]},travelers:{options:[{id:"age1",labelKey:"fc-booking-passenger-options-age1",noteLabelKey:"fc-booking-passenger-options-age1-note",trackingCountLabel:"adultCount",isDisabled:!1},{id:"age2",labelKey:"fc-booking-passenger-options-age2",noteLabelKey:"fc-booking-passenger-options-age2-note",trackingCountLabel:"childCount",isDisabled:!1}]},paymentMethod:{options:[{value:"a",labelKey:"fc-booking-payment-method-options-1",descriptionLabelKey:"fc-booking-payment-method-options-1-description",isDisabled:!1},{value:"b",labelKey:"fc-booking-payment-method-options-2",descriptionLabelKey:"fc-booking-payment-method-options-2-description",isDisabled:!1}]}},initialState:{origin:"",destination:"",departure:7,return:14,datesConfig:{departure:{minDate:0,maxDate:365,validDaysOfWeek:[0,1,2,3,4,5,6],includedDates:[],excludedDates:[]},return:{minDate:0,maxDate:372,validDaysOfWeek:[0,1,2,3,4,5,6],includedDates:[],excludedDates:[]}},journeyType:"rt",useMiles:!1,directFlights:!1,travelers:{age1:1},travelClass:"ECONOMY",brandedTravelClass:null,promoCode:"",redemptionType:"",flexibleDates:!1,paymentMethod:null,discounts:{}},tracking:{events:{changeOrigin:{id:"select-origin"},changeDestination:{id:"select-destination"},selectDeparture:{id:"select-departure-date"},selectReturn:{id:"select-return-date"},changeDeparture:{id:"change-departure-date"},changeReturn:{id:"change-return-date"},changeTravelers:{id:"select-travelers"},changeTravelClass:{id:"select-travel-class"},changeJourneyType:{id:"select-journey-type"},changePromoCode:{id:"enter-promo-code"},changeUseMiles:{id:"select-redemption"},changeDirectFlights:{id:"select-stops"},changeRedemptionType:{id:"select-redemption"},changeFlexibleDates:{id:"select-flexible-dates"},searchFlights:{id:"fsi"},changePaymentMethod:{id:"select-payment-method"},changeDiscounts:{id:"select-discounts"},enterAiPoweredSearch:{id:"ai-mode-enter"},exitAiPoweredSearch:{id:"ai-mode-exit"},aiSearch:{id:"search-prompt"},thumbUp:{id:"like-prompt"},thumbDown:{id:"unlike-prompt"},newAiPoweredSearch:{id:"new-ai-search"},noMatch:{id:"no-match"}},actionLabels:{dateWithFare:"date_with_fare",dateWithoutFareInsights:"date_without_fare_insights",dateWithLowFare:"date_with_low_fare",dateWithMediumFare:"date_with_medium_fare",dateWithHighFare:"date_with_high_fare"}}}},17579:function(e,t,n){"use strict";var o=n(67294),i=n(87877),l=n(35800),r=n(35944);const a=e=>{const{error:t}=e;return(0,o.useEffect)((()=>{}),[t]),(0,r.BX)(i.kC,{className:"hidden",role:"alert",_style:{background:"#e70056",color:"#FFF",borderRadius:"5px"},children:[(0,r.tZ)(i.xv,{className:"font-bold",as:"p",_style:{fontSize:"14px"},children:"Something went wrong:"}),(0,r.tZ)(i.xv,{className:"flex items-center pl-1",as:"p",_style:{fontSize:"12px"},children:t.message})]})};t.Z=({children:e})=>(0,r.tZ)(l.ErrorBoundary,{FallbackComponent:a,children:e})},49578:function(e,t,n){"use strict";n.d(t,{Z:function(){return Do}});var o=n(92809),i=n(67294),l=n(40962),r=n.n(l),a=n(27361),s=n.n(a),d=n(18446),u=n.n(d),c=n(93967),v=n.n(c),p=n(78138),f=n.n(p),g=n(65964),y=n(11377),b=n(94964);const m=(e,t)=>
15{const n=f()(e).isValid(),o="object"===typeof t&&t.start&&f()(t.start).isValid()&&t.end&&f()(t.end).isValid();if(!n||!o)return!1;const i=f()(e).toISOString(!0),{start:l,end:r}=t,a=f()(l).toISOString(!0),s=f()(r).toISOString(!0);return((0,b.KZ)(i,a)||(0,b.cL)(i,a))&&((0,b.KZ)(i,s)||(0,b.my)(i,s))};var h=(e,t)=>{const{minDate:n,maxDate:o,validDaysOfWeek:i,includedDates:l,excludedDates:r}=t,a=f()(e),s=a.toISOString(!0);if(!a.isValid())return!0;const d=a.weekday(),u="number"===typeof n?f()().add(n,"d"):f()(n),c=u.toISOString(!0),v="number"===typeof o?f()().add(o,"d"):f()(o),p=v.toISOString(!0);return!!(u.isValid()&&(0,b.my)(s,c)||v.isValid()&&(0,b.cL)(s,p)||Array.isArray(i)&&!i.some((e=>e===d)))||(Array.isArray(l)&&l.length?!l.some((e=>{if("object"===typeof e&&"string"===typeof e.start&&"string"===typeof e.end)return m(s,e);const t=f()(e),n=t.toISOString(!0);return t.isValid()&&(0,b.KZ)(s,n)})):!!(Array.isArray(r)&&r.length&&r.some((e=>{if("object"===typeof e&&"string"===typeof e.start&&"string"===typeof e.end)return m(s,e);const t=f()(e),n=t.toISOString(!0);return t.isValid()&&(0,b.KZ)(s,n)}))))},_=n(10858),O=n(10219),D=n(87877),C=n(70917);function S(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function k(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every((n=>{const o=e[n],i=t[n];return"function"===typeof o?`${o}`===`${i}`:S(o)&&S(i)?k(o,i):o===i}))}function w(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function x(e){return"number"===typeof e}function j(e){return"string"===typeof e}function E(e){return"boolean"===typeof e}function T(e){return"[object Object]"===Object.prototype.toString.call(e)}function P(e){return Math.abs(e)}function N(e){return Math.sign(e)}function R(e,t){return P(e-t)}function L(e){return B(e).map(Number)}function Z(e){return e[A(e)]}function A(e){return Math.max(0,e.length-1)}function I(e,t){return t===A(e)}function M(e,t=0){return Array.from(Array(e),((e,n)=>t+n))}function B(e){return Object.keys(e)}function F(e,t){return[e,t].reduce(((e,t)=>(B(t).forEach((n=>{const o=e[n],i=t[n],l=T(o)&&T(i);e[n]=l?F(o,i):i})),e)),{})}function G(e,t){return"undefined"!==typeof t.MouseEvent&&e instanceof t.MouseEvent}function V(){let e=[];const t={add:function(n,o,i,l={passive:!0}){let r;if("addEventListener"in n)n.addEventListener(o,i,l),r=()=>n.removeEventListener(o,i,l);else{const e=n;e.addListener(i),r=()=>e.removeListener(i)}return e.push(r),t},clear:function(){e=e.filter((e=>e()))}};return t}function Y(e,t,n,o){const i=V(),l=1e3/60;let r=null,a=0,s=0;function d(e){if(!s)return;r||(r=e,n(),n());const i=e-r;for(r=e,a+=i;a>=l;)n(),a-=l;o(a/l),s&&(s=t.requestAnimationFrame(d))}function u(){t.cancelAnimationFrame(s),r=null,a=0,s=0}
vendor: 16,368 bytes, line 15
15return{init:function(){i.add(e,"visibilitychange",(()=>{e.hidden&&(r=null,a=0)}))},destroy:function(){u(),i.clear()},start:function(){s||(s=t.requestAnimationFrame(d))},stop:u,update:n,render:o}}function $(e=0,t=0){const n=P(e-t);function o(t){return t<e}function i(e){return e>t}function l(e){return o(e)||i(e)}return{length:n,max:t,min:e,constrain:function(n){return l(n)?o(n)?e:t:n},reachedAny:l,reachedMax:i,reachedMin:o,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function K(e,t,n){const{constrain:o}=$(0,e),i=e+1;let l=r(t);function r(e){return n?P((i+e)%i):o(e)}function a(){return l}function s(){return K(e,a(),n)}const d={get:a,set:function(e){return l=r(e),d},add:function(e){return s().set(a()+e)},clone:s};return d}function X(e,t,n,o,i,l,r,a,s,d,u,c,v,p,f,g,y,b,m){const{cross:h,direction:_}=e,O=["INPUT","SELECT","TEXTAREA"],D={passive:!1},C=V(),S=V(),k=$(50,225).constrain(p.measure(20)),w={mouse:300,touch:400},x={mouse:500,touch:600},j=f?43:25;let T=!1,L=0,Z=0,A=!1,I=!1,M=!1,B=!1;function F(e){if(!G(e,o)&&e.touches.length>=2)return Y(e);const t=l.readPoint(e),n=l.readPoint(e,h),r=R(t,L),s=R(n,Z);if(!I&&!B){if(!e.cancelable)return Y(e);if(I=r>s,!I)return Y(e)}const u=l.pointerMove(e);r>g&&(M=!0),d.useFriction(.3).useDuration(.75),a.start(),i.add(_(u)),e.preventDefault()}function Y(e){const t=u.byDistance(0,!1).index!==c.get(),n=l.pointerUp(e)*(f?x:w)[B?"mouse":"touch"],o=function(e,t){const n=c.add(-1*N(e)),o=u.byDistance(e,!f).distance;return f||P(e)<k?o:y&&t?.5*o:u.byIndex(n.get(),0).distance}(_(n),t),i=function(e,t){if(0===e||0===t)return 0;if(P(e)<=P(t))return 0;const n=R(P(e),P(t));return P(n/e)}(n,o),r=j-10*i,a=b+i/50;I=!1,A=!1,S.clear(),d.useDuration(r).useFriction(a),s.distance(o,!f),B=!1,v.emit("pointerUp")}function K(e){M&&(e.stopPropagation(),e.preventDefault(),M=!1)}return{init:function(e){if(!m)return;function a(a){(E(m)||m(e,a))&&function(e){const a=G(e,o);if(B=a,M=f&&a&&!e.buttons&&T,T=R(i.get(),r.get())>=2,a&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return O.includes(t)}(e.target))return;A=!0,l.pointerDown(e),d.useFriction(0).useDuration(0),i.set(r),function(){const e=B?n:t;S.add(e,"touchmove",F,D).add(e,"touchend",Y).add(e,"mousemove",F,D).add(e,"mouseup",Y)}(),L=l.readPoint(e),Z=l.readPoint(e,h),v.emit("pointerDown")}(a)}const s=t;C.add(s,"dragstart",(e=>e.preventDefault()),D).add(s,"touchmove",(()=>{}),D).add(s,"touchend",(()=>{})).add(s,"touchstart",a).add(s,"mousedown",a).add(s,"touchcancel",Y).add(s,"contextmenu",Y).add(s,"click",K,!0)},destroy:function(){C.clear(),S.clear()},pointerDown:function(){return A}}}function H(e,t){let n,o;function i(e){return e.timeStamp}function l(n,o){const i="client"+("x"===(o||e.scroll)?"X":"Y");return(G(n,t)?n:n.touches[0])[i]}return{pointerDown:function(e){return n=e,o=e,l(e)},pointerMove:function(e){const t=l(e)-l(o),r=i(e)-i(n)>170;return o=e,r&&(n=e),t},pointerUp:function(e){if(!n||!o)return 0;const t=l(o)-l(n),r=i(e)-i(n),a=i(e)-i(o)>170,s=t/r;return r&&!a&&P(s)>.1?s:0},readPoint:l}}function z(e,t,n,o,i,l,r){const a=[e].concat(o);let s,d,u=[],c=!1;function v(e){return i.measureSize(r.measure(e))}return{init:function(i){l&&(d=v(e),u=o.map(v),s=new ResizeObserver((n=>{(E(l)||l(i,n))&&function(n){for(const l of n){if(c)return;const n=l.target===e,r=o.indexOf(l.target),a=n?d:u[r];if(P(v(n?e:o[r])-a)>=.5){i.reInit(),t.emit("resize");break}}}(n)})),n.requestAnimationFrame((()=>{a.forEach((e=>s.observe(e)))})))},destroy:function(){c=!0,s&&s.disconnect()}}}function U(e,t,n,o,i){const l=i.measure(10),r=i.measure(50),a=$(.1,.99);let s=!1;function d(){return!s&&(!!e.reachedAny(n.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:d,constrain:function(i){if(!d())return;const s=e.reachedMin(t.get())?"min":"max",u=P(e[s]-t.get()),c=n.get()-t.get(),v=a.constrain(u/r);n.subtract(c*v),!i&&P(c)<l&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(e){s=!e}}}function W(e,t,n,o){const i=t.min+.1,l=t.max+.1,{reachedMin:r,reachedMax:a}=$(i,l);return{loop:function(t){if(!function(e){return 1===e?a(n.get()):-1===e&&r(n.get())}(t))return;const i=e*(-1*t);o.forEach((e=>e.add(i)))}}}function q(e,t,n,o,i){const{reachedAny:l,removeOffset:r,constrain:a}=o;function s(e){return e.concat().sort(((e,t)=>P(e)-P(t)))[0]}function d(t,o){const i=[t,t+n,t-n];if(!e)return t;if(!o)return s(i);const l=i.filter((e=>N(e)===o));return l.length?s(l):Z(i)-n}return{byDistance:function(n,o){const s=i.get()+n,{index:u,distance:c}=function(n){const o=e?r(n):a(n),i=t.map(((e,t)=>({diff:d(e-o,0),index:t}))).sort(((e,t)=>P(e.diff)-P(t.diff))),{index:l}=i[0];return{index:l,distance:o}}(s),v=!e&&l(s);return!o||v?{index:u,distance:n}:{index:u,distance:n+d(t[u]-c,0)}},byIndex:function(e,n){return{index:e,distance:d(t[e]-i.get(),n)}},shortcut:d}}function J(e,t,n,o,i,l,r,a){const s={passive:!0,capture:!0};let d=0;function u(e){"Tab"===e.code&&(d=(new Date).getTime())}return{init:function(c){a&&(l.add(document,"keydown",u,!1),t.forEach(((t,u)=>{l.add(t,"focus",(t=>{(E(a)||a(c,t))&&function(t){if((new Date).getTime()-d>10)return;r.emit("slideFocusStart"),e.scrollLeft=0;const l=n.findIndex((e=>e.includes(t)));x(l)&&(i.useDuration(0),o.index(l,0),r.emit("slideFocus"))}(u)}),s)})))}}}function Q(e){let t=e;function n(e){return x(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function ee(e,t){const n="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},o=t.style;let i=null,l=!1;return{clear:function(){l||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(l)return;const r=(a=e.direction(t),Math.round(100*a)/100);var a;r!==i&&(o.transform=n(r),i=r)},toggleActive:function(e){l=!e}}}function te(e,t,n,o,i,l,r,a,s){const d=L(i),u=L(i).reverse(),c=function(){const e=r[0];return f(p(u,e),n,!1)}().concat(function(){const e=t-r[0]-1;return f(p(d,e),-n,!0)}());function v(e,t){return e.reduce(((e,t)=>e-i[t]),t)}function p(e,t){return e.reduce(((e,n)=>v(e,t)>0?e.concat([n]):e),[])}function f(i,r,d){const u=function(e){return l.map(((n,i)=>({start:n-o[i]+.5+e,end:n+t-.5+e})))}(r);return i.map((t=>{const o=d?0:-n,i=d?n:0,l=d?"end":"start",r=u[t][l];return{index:t,loopPoint:r,slideLocation:Q(-1),translate:ee(e,s[t]),target:()=>a.get()>r?o:i}}))}return{canLoop:function(){return c.every((({index:e})=>v(d.filter((t=>t!==e)),t)<=.1))},clear:function(){c.forEach((e=>e.translate.clear()))},loop:function(){c.forEach((e=>{const{target:t,translate:n,slideLocation:o}=e,i=t();i!==o.get()&&(n.to(i),o.set(i))}))},loopPoints:c}}function ne(e,t,n){let o,i=!1;return{init:function(l){n&&(o=new MutationObserver((e=>{i||(E(n)||n(l,e))&&function(e){for(const n of e)if("childList"===n.type){l.reInit(),t.emit("slidesChanged");break}}(e)})),o.observe(e,{childList:!0}))},destroy:function(){o&&o.disconnect(),i=!0}}}function oe(e,t,n,o){const i={};let l,r=null,a=null,s=!1;return{init:function(){l=new IntersectionObserver((e=>{s||(e.forEach((e=>{const n=t.indexOf(e.target);i[n]=e})),r=null,a=null,n.emit("slidesInView"))}),{root:e.parentElement,threshold:o}),t.forEach((e=>l.observe(e)))},destroy:function(){l&&l.disconnect(),s=!0},get:function(e=!0){if(e&&r)return r;if(!e&&a)return a;const t=function(e){return B(i).reduce(((t,n)=>{const o=parseInt(n),{isIntersecting:l}=i[o];return(e&&l||!e&&!l)&&t.push(o),t}),[])}(e);return e&&(r=t),e||(a=t),t}}}function ie(e,t,n,o,i,l,r,a,s){const{startEdge:d,endEdge:u,direction:c}=e,v=x(n);return{groupSlides:function(e){return v?function(e,t){return L(e).filter((e=>e%t===0)).map((n=>e.slice(n,n+t)))}(e,n):function(e){return e.length?L(e).reduce(((n,v,p)=>{const f=Z(n)||0,g=0===f,y=v===A(e),b=i[d]-l[f][d],m=i[d]-l[v][u],h=!o&&g?c(r):0,_=P(m-(!o&&y?c(a):0)-(b+h));return p&&_>t+s&&n.push(v),y&&n.push(e.length),n}),[]).map(((t,n,o)=>{const i=Math.max(o[n-1]||0);return e.slice(i,t)})):[]}(e)}}}function le(e,t,n,o,i,l,r){const{align:a,axis:s,direction:d,startIndex:u,loop:c,duration:v,dragFree:p,dragThreshold:f,inViewThreshold:g,slidesToScroll:y,skipSnaps:b,containScroll:m,watchResize:h,watchSlides:_,watchDrag:O,watchFocus:D}=l,C={measure:function(e){const{offsetTop:t,offsetLeft:n,offsetWidth:o,offsetHeight:i}=e;return{top:t,right:n+o,bottom:t+i,left:n,width:o,height:i}}},S=C.measure(t),k=n.map(C.measure),w=function(e,t){const n="rtl"===t,o="y"===e,i=!o&&n?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":n?"right":"left",endEdge:o?"bottom":n?"left":"right",measureSize:function(e){const{height:t,width:n}=e;return o?t:n},direction:function(e){return e*i}}}(s,d),x=w.measureSize(S),E=function(e){return{measure:function(t){return e*(t/100)}}}(x),T=function(e,t){const n={start:function(){return 0},center:function(e){return o(e)/2},end:o};function o(e){return t-e}return{measure:function(o,i){return j(e)?n[e](o):e(t,o,i)}}}(a,x),B=!c&&!!m,F=c||!!m,{slideSizes:G,slideSizesWithGaps:le,startGap:re,endGap:ae}=function(e,t,n,o,i,l){const{measureSize:r,startEdge:a,endEdge:s}=e,d=n[0]&&i,u=function(){if(!d)return 0;const e=n[0];return P(t[a]-e[a])}(),c=function(){if(!d)return 0;const e=l.getComputedStyle(Z(o));return parseFloat(e.getPropertyValue(`margin-${s}`))}(),v=n.map(r),p=n.map(((e,t,n)=>{const o=!t,i=I(n,t);return o?v[t]+u:i?v[t]+c:n[t+1][a]-e[a]})).map(P);return{slideSizes:v,slideSizesWithGaps:p,startGap:u,endGap:c}}(w,S,k,n,F,i),se=ie(w,x,y,c,S,k,re,ae,2),{snaps:de,snapsAligned:ue}=function(e,t,n,o,i){const{startEdge:l,endEdge:r}=e,{groupSlides:a}=i,s=a(o).map((e=>Z(e)[r]-e[0][l])).map(P).map(t.measure),d=o.map((e=>n[l]-e[l])).map((e=>-P(e))),u=a(d).map((e=>e[0])).map(((e,t)=>e+s[t]));return{snaps:d,snapsAligned:u}}(w,T,S,k,se),ce=-Z(de)+Z(le),{snapsContained:ve,scrollContainLimit:pe}=function(e,t,n,o,i){const l=$(-t+e,0),r=n.map(((e,t)=>{const{min:o,max:i}=l,r=l.constrain(e),a=!t,d=I(n,t);return a?i:d||s(o,r)?o:s(i,r)?i:r})).map((e=>parseFloat(e.toFixed(3)))),a=function(){const e=r[0],t=Z(r);return $(r.lastIndexOf(e),r.indexOf(t)+1)}();function s(e,t){return R(e,t)<=1}return{snapsContained:function(){if(t<=e+i)return[l.max];if("keepSnaps"===o)return r;const{min:n,max:s}=a;return r.slice(n,s)}(),scrollContainLimit:a}}(x,ce,ue,m,2),fe=B?ve:ue,{limit:ge}=function(e,t,n){const o=t[0];return{limit:$(n?o-e:Z(t),o)}}(ce,fe,c),ye=K(A(fe),u,c),be=ye.clone(),me=L(n),he=Y(o,i,(()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:o}})=>{o||n.constrain(e.pointerDown()),t.seek()})(Re)),(e=>(({scrollBody:e,translate:t,location:n,offsetLocation:o,previousLocation:i,scrollLooper:l,slideLooper:r,dragHandler:a,animation:s,eventHandler:d,scrollBounds:u,options:{loop:c}},v)=>{const p=e.settled(),f=!u.shouldConstrain(),g=c?p:p&&f,y=g&&!a.pointerDown();y&&s.stop();const b=n.get()*v+i.get()*(1-v);o.set(b),c&&(l.loop(e.direction()),r.loop()),t.to(o.get()),y&&d.emit("settle"),g||d.emit("scroll")})(Re,e))),_e=fe[ye.get()],Oe=Q(_e),De=Q(_e),Ce=Q(_e),Se=Q(_e),ke=function(e,t,n,o,i,l){let r=0,a=0,s=i,d=l,u=e.get(),c=0;function v(e){return s=e,f}function p(e){return d=e,f}const f={direction:function(){return a},duration:function(){return s},velocity:function(){return r},seek:function(){const t=o.get()-e.get();let i=0;return s?(n.set(e),r+=t/s,r*=d,u+=r,e.add(r),i=u-c):(r=0,n.set(o),e.set(o),i=t),a=N(i),c=u,f},settled:function(){return P(o.get()-t.get())<.001},useBaseFriction:function(){return p(l)},useBaseDuration:function(){return v(i)},useFriction:p,useDuration:v};return f}(Oe,Ce,De,Se,v,.68),we=q(c,fe,ce,ge,Se),xe=function(e,t,n,o,i,l,r){function a(i){const a=i.distance,s=i.index!==t.get();l.add(a),a&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),s&&(n.set(t.get()),t.set(i.index),r.emit("select"))}return{distance:function(e,t){a(i.byDistance(e,t))},index:function(e,n){const o=t.clone().set(e);a(i.byIndex(o.get(),n))}}}(he,ye,be,ke,we,Se,r),je=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(ge),Ee=V(),Te=oe(t,n,r,g),{slideRegistry:Pe}=function(e,t,n,o,i,l){const{groupSlides:r}=i,{min:a,max:s}=o;return{slideRegistry:function(){const o=r(l),i=!e||"keepSnaps"===t;return 1===n.length?[l]:i?o:o.slice(a,s).map(((e,t,n)=>{const o=!t,i=I(n,t);return o?M(Z(n[0])+1):i?M(A(l)-Z(n)[0]+1,Z(n)[0]):e}))}()}}(B,m,fe,pe,se,me),Ne=J(e,n,Pe,xe,ke,Ee,r,D),Re={ownerDocument:o,ownerWindow:i,eventHandler:r,containerRect:S,slideRects:k,animation:he,axis:w,dragHandler:X(w,e,o,i,Se,H(w,i),Oe,he,xe,ke,we,ye,r,E,p,f,b,.68,O),eventStore:Ee,percentOfView:E,index:ye,indexPrevious:be,limit:ge,location:Oe,offsetLocation:Ce,previousLocation:De,options:l,resizeHandler:z(t,r,i,n,w,h,C),scrollBody:ke,scrollBounds:U(ge,Ce,Se,ke,E),scrollLooper:W(ce,ge,Ce,[Oe,Ce,De,Se]),scrollProgress:je,scrollSnapList:fe.map(je.get),scrollSnaps:fe,scrollTarget:we,scrollTo:xe,slideLooper:te(w,x,ce,G,le,de,fe,Ce,n),slideFocus:Ne,slidesHandler:ne(t,r,_),slidesInView:Te,slideIndexes:me,slideRegistry:Pe,slidesToScroll:se,target:Se,translate:ee(w,t)};return Re}const re={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ae(e){function t(e,t){return F(e,t||{})}return{mergeOptions:t,optionsAtMedia:function(n){const o=n.breakpoints||{},i=B(o).filter((t=>e.matchMedia(t).matches)).map((e=>o[e])).reduce(((e,n)=>t(e,n)),{});return t(n,i)},optionsMediaQueries:function(t){return t.map((e=>B(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}}}function se(e,t,n){const o=e.ownerDocument,i=o.defaultView,l=ae(i),r=function(e){let t=[];return{init:function(n,o){return t=o.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(n,e))),o.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}}}(l),a=V(),s=function(){let e,t={};function n(e){return t[e]||[]}const o={init:function(t){e=t},emit:function(t){return n(t).forEach((n=>n(e,t))),o},off:function(e,i){return t[e]=n(e).filter((e=>e!==i)),o},on:function(e,i){return t[e]=n(e).concat([i]),o},clear:function(){t={}}};return o}(),{mergeOptions:d,optionsAtMedia:u,optionsMediaQueries:c}=l,{on:v,off:p,emit:f}=s,g=w;let y,b,m,h,_=!1,O=d(re,se.globalOptions),D=d(O),C=[];function S(t){const n=le(e,m,h,o,i,t,s);if(t.loop&&!n.slideLooper.canLoop()){return S(Object.assign({},t,{loop:!1}))}return n}function k(t,n){_||(O=d(O,t),D=u(O),C=n||C,function(){const{container:t,slides:n}=D,o=j(t)?e.querySelector(t):t;m=o||e.children[0];const i=j(n)?m.querySelectorAll(n):n;h=[].slice.call(i||m.children)}(),y=S(D),c([O,...C.map((({options:e})=>e))]).forEach((e=>a.add(e,"change",w))),D.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(P),y.eventHandler.init(P),y.resizeHandler.init(P),y.slidesHandler.init(P),y.options.loop&&y.slideLooper.loop(),m.offsetParent&&h.length&&y.dragHandler.init(P),b=r.init(P,C)))}function w(e,t){const n=T();x(),k(d({startIndex:n},e),t),s.emit("reInit")}function x(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),r.destroy(),a.clear()}function E(e,t,n){D.active&&!_&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:D.duration),y.scrollTo.index(e,n||0))}function T(){return y.index.get()}const P={canScrollNext:function(){return y.index.add(1).get()!==T()},canScrollPrev:function(){return y.index.add(-1).get()!==T()},containerNode:function(){return m},internalEngine:function(){return y},destroy:function(){_||(_=!0,a.clear(),x(),s.emit("destroy"),s.clear())},off:p,on:v,emit:f,plugins:function(){return b},previousScrollSnap:function(){return y.indexPrevious.get()},reInit:g,rootNode:function(){return e},scrollNext:function(e){E(y.index.add(1).get(),e,-1)},scrollPrev:function(e){E(y.index.add(-1).get(),e,1)},scrollProgress:function(){return y.scrollProgress.get(y.offsetLocation.get())},scrollSnapList:function(){return y.scrollSnapList},scrollTo:E,selectedScrollSnap:T,slideNodes:function(){return h},slidesInView:function(){return y.slidesInView.get()},slidesNotInView:function(){return y.slidesInView.get(!1)}};
15return k(t,n),setTimeout((()=>s.emit("init")),0),P}function de(e={},t=[]){const n=(0,i.useRef)(e),o=(0,i.useRef)(t),[l,r]=(0,i.useState)(),[a,s]=(0,i.useState)(),d=(0,i.useCallback)((()=>{l&&l.reInit(n.current,o.current)}),[l]);return(0,i.useEffect)((()=>{k(n.current,e)||(n.current=e,d())}),[e,d]),(0,i.useEffect)((()=>{(function(e,t){if(e.length!==t.length)return!1;const n=w(e),o=w(t);return n.every(((e,t)=>k(e,o[t])))})(o.current,t)||(o.current=t,d())}),[t,d]),(0,i.useEffect)((()=>{if("undefined"!==typeof window&&window.document&&window.document.createElement&&a){se.globalOptions=de.globalOptions;const e=se(a,n.current,o.current);return r(e),()=>e.destroy()}r(void 0)}),[a,r]),[s,l]}se.globalOptions=void 0,de.globalOptions=void 0;var ue=n(49077);var ce=(...e)=>{const t=(0,i.useRef)();return(0,i.useEffect)((()=>{e.forEach((e=>{"function"===typeof e?e(t.current):e&&"object"===typeof e&&"current"in e&&(e.current=t.current)}))}),[t.current,...e]),t},ve=n(35944);const pe=["orientation","options","setApi","plugins","className","_style","children"],fe=["_style","className","children"],ge=["_style","className","children"],ye=["_style","className","children"],be=["_style","className","children","hideWhenDisabled"],me=["_style","className","children","hideWhenDisabled"],he=["_style","className","dotClassName","maxDots"];function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const De=i.createContext(null);function Ce(){const e=i.useContext(De);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Se=i.forwardRef(((e,t)=>{const{orientation:n="horizontal",options:o,setApi:l,plugins:r,className:a,_style:s,children:d}=e,u=(0,O.Z)(e,pe),[c,v]=de(Oe(Oe({},o),{},{axis:"horizontal"===n?"x":"y"}),r),{0:p,1:f}=(0,i.useState)(!1),{0:g,1:y}=(0,i.useState)(!1),b=i.useCallback((e=>{e&&(f(e.canScrollPrev()),y(e.canScrollNext()))}),[]),m=i.useCallback((()=>{null===v||void 0===v||v.scrollPrev()}),[v]),h=i.useCallback((()=>{null===v||void 0===v||v.scrollNext()}),[v]),_=i.useCallback((e=>{"ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),h())}),[m,h]);return(0,i.useEffect)((()=>{v&&l&&l(v)}),[v,l]),(0,i.useEffect)((()=>{if(v)return b(v),v.on("reInit",b),v.on("select",b),()=>{null===v||void 0===v||v.off("select",b)}}),[v,b]),(0,ve.tZ)(De.Provider,{value:{carouselRef:c,api:v,opts:o,orientation:n||("y"===(null===o||void 0===o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:m,scrollNext:h,canScrollPrev:p,canScrollNext:g},children:(0,ve.tZ)("div",Oe(Oe({},u),{},{ref:t,onKeyDownCapture:_,role:"region","aria-roledescription":"carousel",css:s,className:a,children:d}))})}));Se.displayName="Carousel";const ke=i.forwardRef(((e,t)=>{const{_style:n,className:o,children:i}=e,l=(0,O.Z)(e,fe),{carouselRef:r,orientation:a}=Ce(),s=ce(r,t);return(0,ve.tZ)("div",Oe(Oe({},l),{},{ref:s,className:v()(o,{"overflow-x-clip":"horizontal"===a,"overflow-y-clip":"vertical"===a}),css:n,children:i}))}));ke.displayName="Carousel.Viewport";const we=i.forwardRef(((e,t)=>{const{_style:n,className:o,children:i}=e,l=(0,O.Z)(e,ge),{orientation:r}=Ce();return(0,ve.tZ)("div",Oe(Oe({},l),{},{ref:t,className:v()("flex [backface-visibility:hidden]","horizontal"===r?"flex-row":"flex-col",o),css:n,children:i}))}));we.displayName="Carousel.Track";const xe=i.forwardRef(((e,t)=>{const{_style:n,className:o,children:i}=e,l=(0,O.Z)(e,ye),r=ce(t);return(0,ve.tZ)("div",Oe(Oe({},l),{},{ref:r,role:"group","aria-roledescription":"slide",className:v()("min-w-0 shrink-0",o),css:n,children:i}))}));xe.displayName="Carousel.Item";const je=i.forwardRef(((e,t)=>{const{_style:n,className:o,children:i,hideWhenDisabled:l=!1}=e,r=(0,O.Z)(e,be),{scrollPrev:a,canScrollPrev:s}=Ce(),d=ce(t),u=Oe(Oe({},r),{},{disabled:!s,onClick:a});return l&&!s?null:(0,ve.tZ)(ue.Z,Oe(Oe({},u),{},{ref:d,className:o,css:(0,C.iv)(Oe(Oe({},n),!s&&(null===n||void 0===n?void 0:n.__disabled)),"",""),children:i}))}));
15je.displayName="Carousel.Previous";const Ee=i.forwardRef(((e,t)=>{const{_style:n,className:o,children:i,hideWhenDisabled:l=!1}=e,r=(0,O.Z)(e,me),{scrollNext:a,canScrollNext:s}=Ce(),d=ce(t),u=Oe(Oe({},r),{},{disabled:!s,onClick:a});return l&&!s?null:(0,ve.tZ)(ue.Z,Oe(Oe({},u),{},{ref:d,className:o,css:(0,C.iv)(Oe(Oe({},n),!s&&(null===n||void 0===n?void 0:n.__disabled)),"",""),children:i}))}));Ee.displayName="Carousel.Next";const Te=i.forwardRef(((e,t)=>{let{_style:n,className:o,dotClassName:l,maxDots:r=5}=e,a=(0,O.Z)(e,he);const{api:s}=Ce(),{0:d,1:u}=(0,i.useState)(0),{0:c,1:p}=(0,i.useState)(0),{0:f,1:g}=(0,i.useState)(0);if((0,i.useEffect)((()=>{if(!s)return;const e=()=>u(s.selectedScrollSnap()),t=()=>{p(s.scrollSnapList().length),e()};return t(),s.on("select",e),s.on("reInit",t),()=>{s.off("select",e),s.off("reInit",t)}}),[s]),(0,i.useEffect)((()=>{d<f?g(Math.max(0,d)):d>=f+r&&g(Math.min(d-r+1,c-r))}),[d,c,r,f]),c<=1)return null;const y=Math.min(f+r,c),b=f>0,m=y<c,h=(e,t)=>(0,ve.tZ)("span",{"aria-hidden":"true","aria-label":`More slides ${t}`,className:v()("scale-[0.7] rounded-full transition-all duration-300",l,e?"opacity-100":"opacity-0"),css:null===n||void 0===n?void 0:n._dot});return(0,ve.BX)("div",Oe(Oe({},a),{},{ref:t,className:o,css:n,children:[h(b,"before"),Array.from({length:y-f},((e,t)=>(e=>{var t;const o=e===d;return(0,ve.tZ)("span",{"aria-hidden":"true","aria-label":`Slide ${e+1}`,className:v()("rounded-full",l),css:(0,C.iv)(Oe(Oe({},null===n||void 0===n?void 0:n._dot),o&&(null===n||void 0===n||null===(t=n._dot)||void 0===t?void 0:t.__selected)),"","")},e)})(f+t))),h(m,"after")]}))}));Te.displayName="Carousel.Dots";var Pe=Object.assign(Se,{Viewport:ke,Track:we,Item:xe,Previous:je,Next:Ee,Dots:Te}),Ne=n(8981),Re=n.n(Ne),Le=n(8867);function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ie=(0,i.createContext)();function Me({children:e}){const{startIndex:t,endIndex:n,totalItems:o,handleStartIndex:l,handleEndIndex:r}=(0,i.useContext)(Ie);return"function"===typeof e?e({totalItems:o,startIndex:t,endIndex:n,handleStartIndex:l,handleEndIndex:r}):null}Me.propTypes={children:Re().func.isRequired};var Be=Object.assign((function({children:e,className:t,totalItems:n=[],startIndex:o=0,endIndex:l=10,_style:r}){const a=n>0?n-1:0,s=o>=0&&o<=a?o:0,d=l>=s&&l<=a?l:s,{0:{start:u,end:c},1:p}=(0,i.useState)({start:s,end:d});function f(){p({start:s,end:d})}function g(e,{end:t=c}={}){return e>=0&&e<=t}function y(e,{start:t=u}={}){return e>=t&&e<=a}function b(e){g(e)&&p((t=>({start:e,end:y(t.end,{start:e})?t.end:d})))}function m(e){y(e)&&p((t=>({start:g(t.start,{end:e})?t.start:s,end:e})))}return(0,i.useEffect)((()=>{f()}),[n]),(0,i.useEffect)((()=>{b(o)}),[o]),(0,i.useEffect)((()=>{m(l)}),[l]),(0,ve.tZ)(Ie.Provider,{value:{totalItems:n,startIndex:u,endIndex:c,handleStartIndex:b,handleEndIndex:m,resetIndexState:f},children:(0,ve.tZ)(Le.Z,{className:v()(t),_style:Ae({},r),children:e})})}),{List:function({children:e,className:t,_style:n}){const{startIndex:o,endIndex:l,totalItems:r}=(0,i.useContext)(Ie);return(0,ve.tZ)(Le.Z,{className:v()(t),_style:Ae({},null===n||void 0===n?void 0:n._list),children:e})},Item:function({index:e,children:t,className:n,_style:o}){const{startIndex:l,endIndex:r,totalItems:a}=(0,i.useContext)(Ie);return e>=l&&e<=r&&(0,ve.tZ)(Le.Z,{className:v()(n),_style:Ae({},null===o||void 0===o?void 0:o._item),children:t})},PaginationControls:Me}),Fe=n(92353),Ge=n(53006),Ve=n(96759);function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Ye(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ke={path:"/",expires:void 0};function Xe(e){if((0,y.yF)())return null;const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}var He=function(e,t,n={}){const o=$e($e({},Ke),n),l=(0,i.useRef)(null),r=(e,n=t)=>{if(null===e||"undefined"===typeof e)return n;try{return JSON.parse(e)}catch{return e}},{0:a,1:s}=(0,i.useState)(t);(0,i.useEffect)((()=>{if("undefined"===typeof BroadcastChannel)return;const n=new BroadcastChannel("airmodules-components-cookie-change");return n.onmessage=n=>{var o;if((null===(o=n.data)||void 0===o?void 0:o.key)===e)try{const n=Xe(e);s(r(n,t))}catch(i){console.error(i)}},l.current=n,()=>{n.close(),l.current=null}}),[e]),(0,i.useEffect)((()=>{try{const n=Xe(e);null!==n&&"undefined"!==typeof n&&s(r(n,t))}catch(n){console.error(n)}}),[e]);const d=(t,n={})=>{var i;!function(e,t,n={}){if((0,y.yF)())return;let o=`${e}=${t}`;n.path&&(o+=`;path=${n.path}`),n.expires&&(o+=`;expires=${(n.expires instanceof Date?n.expires:new Date(Date.now()+n.expires)).toUTCString()}`);document.cookie=o}(e,function(e){return"string"===typeof e?e:JSON.stringify(e)}(t),$e($e({},o),n)),s(t),null===(i=l.current)||void 0===i||i.postMessage({key:e})};return[a,d,(e={})=>{d("",$e($e($e({},o),e),{},{expires:-1}))}]};const ze=e=>{const{className:t,_style:n,width:o="18px",height:i="20px",fill:l="none"}=e;return(0,ve.BX)("svg",{className:t,style:n,width:o,height:i,viewBox:"0 0 18 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,ve.tZ)("path",{d:"M2.71441 5.19905C2.63401 5.19905 2.55551 5.17475 2.48931 5.12925C2.42301 5.08375 2.37211 5.01925 2.34321 4.94425L1.88611 3.75575C1.87621 3.72975 1.86091 3.70615 1.84121 3.68645C1.82161 3.66675 1.79801 3.65155 1.77201 3.64165L0.583413 3.18455C0.508413 3.15565 0.443913 3.10475 0.398513 3.03845C0.353013 2.97225 0.328613 2.89375 0.328613 2.81335C0.328613 2.73305 0.353013 2.65455 0.398513 2.58825C0.443913 2.52205 0.508413 2.47115 0.583413 2.44225L1.77201 1.98515C1.79791 1.97525 1.82151 1.95985 1.84121 1.94025C1.86091 1.92055 1.87621 1.89695 1.88611 1.87105L2.33911 0.693047C2.36471 0.623728 2.40871 0.562648 2.46631 0.516408C2.52401 0.470178 2.59311 0.440517 2.66641 0.430637C2.75431 0.419957 2.84331 0.438928 2.91921 0.484548C2.99511 0.530178 3.05371 0.599838 3.08551 0.682498L3.54261 1.87105C3.55261 1.89695 3.56791 1.92055 3.58751 1.94025C3.60721 1.95985 3.63081 1.97525 3.65671 1.98515L4.84531 2.44225C4.92031 2.47115 4.98481 2.52205 5.03031 2.58825C5.07571 2.65455 5.10011 2.73305 5.10011 2.81335C5.10011 2.89375 5.07571 2.97225 5.03031 3.03845C4.98481 3.10475 4.92031 3.15565 4.84531 3.18455L3.65671 3.64165C3.63071 3.65155 3.60711 3.66675 3.58751 3.68645C3.56781 3.70615 3.55251 3.72975 3.54261 3.75575L3.08551 4.94425C3.05661 5.01925 3.00571 5.08375 2.93951 5.12925C2.87321 5.17475 2.79471 5.19905 2.71441 5.19905Z",fill:"currentColor"}),(0,ve.tZ)("path",{d:"M14.3856 6.99945C14.2907 6.99935 14.1981 6.97065 14.1199 6.91685C14.0417 6.86315 13.9816 6.78695 13.9476 6.69845L13.2775 4.95665C13.2657 4.92595 13.2476 4.89815 13.2243 4.87485C13.2011 4.85165 13.1732 4.83355 13.1425 4.82175L11.4007 4.15165C11.3123 4.11755 11.2362 4.05745 11.1825 3.97925C11.1288 3.90105 11.1001 3.80845 11.1001 3.71365C11.1001 3.61885 11.1288 3.52625 11.1825 3.44805C11.2362 3.36985 11.3123 3.30975 11.4007 3.27565L13.1425 2.60555C13.1732 2.59385 13.2011 2.57565 13.2243 2.55245C13.2476 2.52925 13.2657 2.50135 13.2775 2.47065L13.9426 0.741248C13.9729 0.659448 14.0249 0.587448 14.0929 0.532848C14.161 0.478248 14.2425 0.443048 14.329 0.431148C14.4328 0.418548 14.5379 0.441048 14.6275 0.494948C14.7171 0.548948 14.7861 0.631248 14.8236 0.728848L15.4937 2.47065C15.5055 2.50135 15.5236 2.52925 15.5468 2.55245C15.5701 2.57565 15.5979 2.59385 15.6286 2.60555L17.3704 3.27565C17.4589 3.30975 17.535 3.36985 17.5887 3.44805C17.6423 3.52625 17.671 3.61885 17.671 3.71365C17.671 3.80845 17.6423 3.90105 17.5887 3.97925C17.535 4.05745 17.4589 4.11755 17.3704 4.15165L15.6286 4.82175C15.5979 4.83355 15.5701 4.85165 15.5468 4.87485C15.5236 4.89815 15.5055 4.92595 15.4937 4.95665L14.8236 6.69845C14.7896 6.78695 14.7295 6.86315 14.6513 6.91685C14.5731 6.97065 14.4805 6.99935 14.3856 6.99945Z",fill:"currentColor"}),(0,ve.tZ)("path",{d:"M6.61601 19.5725C6.45041 19.5734 6.28861 19.5237 6.15201 19.4301C6.01551 19.3365 5.9
151071 19.2034 5.85181 19.0487L4.54751 15.657C4.52111 15.5886 4.48071 15.5266 4.42881 15.4748C4.37701 15.4229 4.31501 15.3825 4.24661 15.3561L0.853813 14.0508C0.699313 13.9915 0.566313 13.8867 0.472613 13.7503C0.378813 13.6139 0.328613 13.4522 0.328613 13.2867C0.328613 13.1212 0.378813 12.9595 0.472613 12.8231C0.566313 12.6867 0.699313 12.5819 0.853813 12.5226L4.24561 11.2183C4.31401 11.1918 4.37611 11.1514 4.42791 11.0996C4.47971 11.0478 4.52011 10.9857 4.54651 10.9174L5.85181 7.52471C5.91121 7.37011 6.01591 7.23721 6.15241 7.14341C6.28881 7.04971 6.45041 6.99951 6.61601 6.99951C6.78151 6.99951 6.94321 7.04971 7.07961 7.14341C7.21601 7.23721 7.32081 7.37011 7.38011 7.52471L8.68451 10.9164C8.71091 10.9848 8.75131 11.0468 8.80311 11.0986C8.85491 11.1504 8.91701 11.1909 8.98531 11.2173L12.3575 12.5147C12.5184 12.5743 12.6569 12.6821 12.7543 12.8232C12.8518 12.9644 12.9033 13.1322 12.902 13.3037C12.8995 13.4664 12.8482 13.6245 12.7548 13.7577C12.6614 13.8909 12.5302 13.993 12.3781 14.0508L8.98631 15.3551C8.91801 15.3816 8.85591 15.422 8.80411 15.4738C8.75231 15.5256 8.71191 15.5877 8.68541 15.656L7.38011 19.0487C7.32121 19.2034 7.21651 19.3365 7.07991 19.4301C6.94341 19.5237 6.78151 19.5734 6.61601 19.5725Z",fill:"currentColor"})]})},Ue=e=>{const{className:t,_style:n,width:o="18px",height:i="20px",fill:l="none"}=e;return(0,ve.BX)("svg",{className:t,style:n,width:o,height:i,viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ve.tZ)("style",{children:"\n          .path-1 {\n            transform-origin: 2.7px 5.2px;\n            animation: scaleUp 1.2s infinite alternate ease-in-out;\n          }\n\n          .path-2 {\n            transform-origin: 14.4px 7px;\n            animation: scaleUp 1.5s infinite alternate ease-in-out;\n          }\n\n          .path-3 {\n            transform-origin: 36% 64%;\n            animation: scaleUp 1.9s infinite alternate ease-in-out;\n          }\n\n          @keyframes scaleUp {\n            from {\n              transform: scale(1.05);\n              opacity: 0.4;\n            }\n            to {\n              transform: scale(0.8);\n              opacity: 0.2;\n            }\n          }\n        "}),(0,ve.tZ)("path",{className:"path-1",d:"M2.7149 5.19905C2.6345 5.19905 2.556 5.17475 2.4898 5.12925C2.4235 5.08375 2.3726 5.01925 2.3437 4.94425L1.8866 3.75575C1.8767 3.72975 1.8614 3.70615 1.8417 3.68645C1.8221 3.66675 1.7985 3.65155 1.7725 3.64165L0.583901 3.18455C0.508901 3.15565 0.444401 3.10475 0.399001 3.03845C0.353501 2.97225 0.329102 2.89375 0.329102 2.81335C0.329102 2.73305 0.353501 2.65455 0.399001 2.58825C0.444401 2.52205 0.508901 2.47115 0.583901 2.44225L1.7725 1.98515C1.7984 1.97525 1.822 1.95985 1.8417 1.94025C1.8614 1.92055 1.8767 1.89695 1.8866 1.87105L2.3396 0.693047C2.3652 0.623728 2.4092 0.562648 2.4668 0.516408C2.5245 0.470178 2.5936 0.440517 2.6669 0.430637C2.7548 0.419957 2.8438 0.438928 2.9197 0.484548C2.9956 0.530178 3.0542 0.599838 3.086 0.682498L3.5431 1.87105C3.5531 1.89695 3.5684 1.92055 3.588 1.94025C3.6077 1.95985 3.6313 1.97525 3.6572 1.98515L4.8458 2.44225C4.9208 2.47115 4.9853 2.52205 5.0308 2.58825C5.0762 2.65455 5.1006 2.73305 5.1006 2.81335C5.1006 2.89375 5.0762 2.97225 5.0308 3.03845C4.9853 3.10475 4.9208 3.15565 4.8458 3.18455L3.6572 3.64165C3.6312 3.65155 3.6076 3.66675 3.588 3.68645C3.5683 3.70615 3.553 3.72975 3.5431 3.75575L3.086 4.94425C3.0571 5.01925 3.0062 5.08375 2.94 5.12925C2.8737 5.17475 2.7952 5.19905 2.7149 5.19905Z",fill:"url(#paint0_linear_5844_1834)"}),(0,ve.tZ)("path",{className:"path-2",d:"M14.3861 6.99945C14.2912 6.99935 14.1986 6.97065 14.1204 6.91685C14.0422 6.86315 13.9821 6.78695 13.9481 6.69845L13.278 4.95665C13.2662 4.92595 13.2481 4.89815 13.2248 4.87485C13.2016 4.85165 13.1737 4.83355 13.143 4.82175L11.4012 4.15165C11.3128 4.11755 11.2367 4.05745 11.183 3.97925C11.1293 3.90105 11.1006 3.80845 11.1006 3.71365C11.1006 3.61885 11.1293 3.52625 11.183 3.44805C11.2367 3.36985 11.3128 3.30975 11.4012 3.27565L13.143 2.60555C13.1737 2.59385 13.2016 2.57565 13.2248 2.55245C13.2481 2.52925 13.2662 2.50135 13.278 2.47065L13.9431 0.741248C13.9734 0.659448 14.0254 0.587448 14.0934 0.532848C14.1615 0.478248 14.243 0.443048 14.3295 0.431148C14.4333 0.418548 14.5384 0.441048 14.628 0.494948C14.7176 0.548948 14.7866 0.631248 14.8241 0.728848L15.4942 2.47065C15.506 2.50135 15.5241 2.52925 15.5473 2.55245C15.5706 2.57565 15.5984 2.59385 15.6291 2.60555L17.3709 3.27565C17.4594 3.30975 17.5355 3.36985 17.5892 3.44805C17.6428 3.52625 17.6715 3.61885 17.6715 3.71365C17.6715 3.8
150845 17.6428 3.90105 17.5892 3.97925C17.5355 4.05745 17.4594 4.11755 17.3709 4.15165L15.6291 4.82175C15.5984 4.83355 15.5706 4.85165 15.5473 4.87485C15.5241 4.89815 15.506 4.92595 15.4942 4.95665L14.8241 6.69845C14.7901 6.78695 14.73 6.86315 14.6518 6.91685C14.5736 6.97065 14.481 6.99935 14.3861 6.99945Z",fill:"url(#paint1_linear_5844_1834)"}),(0,ve.tZ)("path",{className:"path-3",d:"M6.6165 19.5725C6.4509 19.5734 6.2891 19.5237 6.1525 19.4301C6.016 19.3365 5.9112 19.2034 5.8523 19.0487L4.548 15.657C4.5216 15.5886 4.4812 15.5266 4.4293 15.4748C4.3775 15.4229 4.3155 15.3825 4.2471 15.3561L0.854301 14.0508C0.699801 13.9915 0.566802 13.8867 0.473102 13.7503C0.379302 13.6139 0.329102 13.4522 0.329102 13.2867C0.329102 13.1212 0.379302 12.9595 0.473102 12.8231C0.566802 12.6867 0.699801 12.5819 0.854301 12.5226L4.2461 11.2183C4.3145 11.1918 4.3766 11.1514 4.4284 11.0996C4.4802 11.0478 4.5206 10.9857 4.547 10.9174L5.8523 7.52471C5.9117 7.37011 6.0164 7.23721 6.1529 7.14341C6.2893 7.04971 6.4509 6.99951 6.6165 6.99951C6.782 6.99951 6.9437 7.04971 7.0801 7.14341C7.2165 7.23721 7.3213 7.37011 7.3806 7.52471L8.685 10.9164C8.7114 10.9848 8.7518 11.0468 8.8036 11.0986C8.8554 11.1504 8.9175 11.1909 8.9858 11.2173L12.358 12.5147C12.5189 12.5743 12.6574 12.6821 12.7548 12.8232C12.8523 12.9644 12.9038 13.1322 12.9025 13.3037C12.9 13.4664 12.8487 13.6245 12.7553 13.7577C12.6619 13.8909 12.5307 13.993 12.3786 14.0508L8.9868 15.3551C8.9185 15.3816 8.8564 15.422 8.8046 15.4738C8.7528 15.5256 8.7124 15.5877 8.6859 15.656L7.3806 19.0487C7.3217 19.2034 7.217 19.3365 7.0804 19.4301C6.9439 19.5237 6.782 19.5734 6.6165 19.5725Z",fill:"url(#paint2_linear_5844_1834)"}),(0,ve.BX)("defs",{children:[(0,ve.BX)("linearGradient",{id:"paint0_linear_5844_1834",x1:"-0.146395",y1:"5.56898",x2:"5.75264",y2:"5.1513",gradientUnits:"userSpaceOnUse",children:[(0,ve.tZ)("stop",{offset:"0.045",stopColor:"#5CE1FF"}),(0,ve.tZ)("stop",{offset:"0.265",stopColor:"#1C32FF"}),(0,ve.tZ)("stop",{offset:"0.894116",stopColor:"#8633F6"}),(0,ve.tZ)("stop",{offset:"1",stopColor:"#FF0AE7"})]}),(0,ve.BX)("linearGradient",{id:"paint1_linear_5844_1834",x1:"10.4458",y1:"7.50896",x2:"18.5694",y2:"6.93388",gradientUnits:"userSpaceOnUse",children:[(0,ve.tZ)("stop",{offset:"0.045",stopColor:"#5CE1FF"}),(0,ve.tZ)("stop",{offset:"0.265",stopColor:"#1C32FF"}),(0,ve.tZ)("stop",{offset:"0.894116",stopColor:"#8633F6"}),(0,ve.tZ)("stop",{offset:"1",stopColor:"#FF0AE7"})]}),(0,ve.BX)("linearGradient",{id:"paint2_linear_5844_1834",x1:"-0.923883",y1:"20.5473",x2:"14.6207",y2:"19.4467",gradientUnits:"userSpaceOnUse",children:[(0,ve.tZ)("stop",{offset:"0.045",stopColor:"#5CE1FF"}),(0,ve.tZ)("stop",{offset:"0.265",stopColor:"#1C32FF"}),(0,ve.tZ)("stop",{offset:"0.894116",stopColor:"#8633F6"}),(0,ve.tZ)("stop",{offset:"1",stopColor:"#FF0AE7"})]})]})]})},We=["default"],qe=["result","counter"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var et=e=>{var t,n,o,l,r;const{idPrefix:a,context:s,isRTL:d=!1,serviceConfig:u,config:c,labels:p,useTheme:g,setStandardSearch:y,services:b,trackingEvents:m,sendTrackingEvent:h,reconcileSessionCookies:_,inputGroupVariant:C}=e,{config:{endpoint:S,options:k,config:w,query:x}}=u,j=null!==(t=null===s||void 0===s||null===(n=s.airline)||void 0===n?void 0:n.code)&&void 0!==t?t:"",E=null!==(o=null===s||void 0===s||null===(l=s.audience)||void 0===l?void 0:l.device_category)&&void 0!==o?o:"desktop",[T,P]=(0,Ve.Z)(),N=P>0?P<640:"desktop"!==E,{fareSearch:R,pubsub:L}=b,{buttonStandardSearch:Z,buttonStandardSearchA11y:A,buttonInputClearA11y:I,buttonSearch:M,buttonSearchA11y:B,buttonNewSearch:F,buttonNewSearchA11y:G,buttonThumbUpA11y:V,buttonThumbDownA11y:Y,buttonTryAgain:$,buttonTryAgainA11y:K,buttonGoBackToSearch:X,buttonGoBackToSearchA11y:H,carouselButtonPreviousA11y:z,carouselButtonNextA11y:U,listButtonViewMoreResults:W,listButtonViewMoreResultsA11y:q,loading:J,loadingA11y:Q,inputLabel:ee,inputPlaceholder:te,inputHelpDescription:ne,inputA11y:oe,queryHeading:ie,queryHeadingFallbackFares:le,remainingAttemps:re,maxAttemps:ae,resultsDisclaimer:se,noResults:de,errorInputCharacterLimit:ue,errorEmptyPrompt:ce,errorSystem:pe,errorInvalidPrompt:fe,farePriceFrom:ge,fareOriginDestinationSeparator:ye,fareNoOtherResults:be}=p,{searchInput:me,carousel:he}=c,{characterLimit:_e,clearIcon:Oe}=me,{slides:{info:{showOrigin:De,showDestination:Ce,showDepartureDate:Se,showReturnDate:ke,showPriceFrom:we,showPrice:xe,showPriceDisclaimer:je},height:Ee,breakpoints:Te}}=he,{width:Ne}=(0,Ge.Z)(),Re=(0,i.useMemo)((()=>{const{default:e=1}=Te,t=(0,O.Z)(Te,We),n=Object.keys(t).sort(((e,t)=>t-e)).find((e=>Ne>=e)),o=n?t[n]:e;return Math.max(o,1)}),[Ne,Te]),Le=(0,i.useRef)(),Ze=(0,i.useRef)(),Ae=(0,i.useRef)(),Ie=(0,i.useRef)(),[Me]=(0,Fe.Z)(1,a),{0:Ye,1:$e}=(0,i.useState)(""),{0:Ke,1:Je}=(0,i.useState)(""),[et]=He(mo,null,{expires:_o}),[tt,nt]=He(ho,null,{expires:_o}),{0:ot,1:it}=(0,i.useState)(null);(0,i.useEffect)((()=>{null===ot&&null!==tt&&it(tt)}),[tt]);const{0:lt,1:rt}=(0,i.useState)(!0),{0:at,1:st}=(0,i.useState)(!1),{0:dt,1:ut}=(0,i.useState)({invalidPrompt:!1,emptyPrompt:!1,system:!1,inputCharacterLimit:!1,noRemainingAttempts:!1,noResults:!1}),ct=Object.values(dt).some((e=>e)),{0:vt,1:pt}=(0,i.useState)([]),{0:ft,1:gt}=(0,i.useState)([]),{0:yt,1:bt}=(0,i.useState)(null);function mt(){var e;null===Ae||void 0===Ae||null===(e=Ae.current)||void 0===e||e.focus()}function ht(e){ut(Qe(Qe({},dt),{},{emptyPrompt:!1,inputCharacterLimit:e.length>_e})),$e(e)}function _t(e){var t,n;
15if(!["thumb-up","thumb-down"].includes(e))return;if(yt===e)return;bt(e);const o="thumb-up"===e?null===m||void 0===m||null===(t=m.thumbUp)||void 0===t?void 0:t.id:null===m||void 0===m||null===(n=m.thumbDown)||void 0===n?void 0:n.id;o&&"function"===typeof h&&h(o)}async function Ot(){st(!0);const e=Ye.trim();if(e.length>_e)return ut(Qe(Qe({},dt),{},{inputCharacterLimit:!0})),mt(),void st(!1);if(0===e.length)return $e(""),ut(Qe(Qe({},dt),{},{emptyPrompt:!0})),mt(),void st(!1);let t=function(){const e=Xe(ho);if(null===e||""===e)return null;const t=Number(e);return Number.isFinite(t)?t:null}();if(null===t){const e="function"===typeof _?await _():null;if(!e||"number"!==typeof e.value)return ut(Qe(Qe({},dt),{},{system:!0})),void st(!1);t=e.value}if(t<=0)return ut(Qe(Qe({},dt),{},{noRemainingAttempts:!0})),void st(!1);try{var n,o,i,l,r,a,d;h(null===m||void 0===m||null===(n=m.aiSearch)||void 0===n?void 0:n.id,{actionLabel:e,prompt:e});const c=await fetch(`${S}`,{method:"POST",body:JSON.stringify(Qe(Qe({},"object"===typeof x?x:{}),{},{prompt:e,sessionId:et,tenantCode:j})),headers:Qe({},w.headers)}),v=await c.json(),{result:p,counter:f}=v,g=(0,O.Z)(v,qe);if("function"===typeof _&&_(),!c.ok){if(400===c.status&&!1===(null===g||void 0===g?void 0:g.success)&&["INVALID_REQUEST","INVALID_TRAVEL_PROMPT"].includes(null===g||void 0===g?void 0:g.error)){ut(Qe(Qe({},dt),{},{invalidPrompt:!0})),pt(ft),rt(!1),st(!1);const e=Math.max("number"===typeof(null===f||void 0===f?void 0:f.value)?f.value:t-1,0);nt(e)}else ut(Qe(Qe({},dt),{},{system:!0}));return}ut(Qe(Qe({},dt),{},{invalidPrompt:!1})),Je("string"===typeof(null===p||void 0===p?void 0:p.explanation)?null===p||void 0===p?void 0:p.explanation:"");const y=Array.isArray(null===s||void 0===s||null===(o=s.extra_info)||void 0===o||null===(i=o.airports)||void 0===i?void 0:i.origin)?s.extra_info.airports.origin:[],b=Array.isArray(null===s||void 0===s||null===(l=s.extra_info)||void 0===l||null===(r=l.airports)||void 0===r?void 0:r.destination)?s.extra_info.airports.destination:[],D=Array.isArray(null===p||void 0===p?void 0:p.origins)&&(null===p||void 0===p||null===(a=p.origins)||void 0===a?void 0:a.length)>0?null===p||void 0===p?void 0:p.origins:y,C=Array.isArray(null===p||void 0===p?void 0:p.destinations)&&(null===p||void 0===p||null===(d=p.destinations)||void 0===d?void 0:d.length)>0?null===p||void 0===p?void 0:p.destinations:b,k=1===D.length,E=1===C.length,T=k&&E,P=Qe(Qe(Qe(Qe(Qe(Qe(Qe(Qe(Qe({origins:D,destinations:C},(null===p||void 0===p?void 0:p.departure)&&{departure:null===p||void 0===p?void 0:p.departure}),(null===p||void 0===p?void 0:p.return)&&{return:null===p||void 0===p?void 0:p.return}),(null===p||void 0===p?void 0:p.travelClasses)&&{travelClasses:null===p||void 0===p?void 0:p.travelClasses}),(null===p||void 0===p?void 0:p.journeyType)&&{journeyType:null===p||void 0===p?void 0:p.journeyType}),(null===p||void 0===p?void 0:p.blockedLocations)&&{blockedLocations:null===p||void 0===p?void 0:p.blockedLocations}),(null===p||void 0===p?void 0:p.redemptionUnit)&&{redemptionUnit:null===p||void 0===p?void 0:p.redemptionUnit}),(null===p||void 0===p?void 0:p.budget)&&{budget:null===p||void 0===p?void 0:p.budget}),(null===p||void 0===p?void 0:p.flightStopCount)&&{flightStopCount:null===p||void 0===p?void 0:p.flightStopCount}),T?{routesLimit:1,faresLimit:20,faresPerRoute:20}:{routesLimit:20,faresLimit:50,faresPerRoute:1}),N=await R.get(P,{}),L=Math.max("number"===typeof(null===f||void 0===f?void 0:f.value)?f.value:t-1,0);var u;if(nt(L),0===N.length)pt(ft),ut(Qe(Qe({},dt),{},{noResults:!0})),h(null===m||void 0===m||null===(u=m.noMatch)||void 0===u?void 0:u.id,{prompt:e});else pt(N);rt(!1)}catch(c){console.error(c),ut(Qe(Qe({},dt),{},{system:!0}))}finally{st(!1)}}function Dt(e){var t,n,o,i,l,r,a,s,d,u;const c={ow:"ow",oneway:"ow",one_way:"ow",ONE_WAY:"ow",ROUND_TRIP:"rt",round_trip:"rt",roundtrip:"rt",eachway:"rt",each_way:"rt",EACH_WAY:"rt",rt:"rt",ew:"rt"},v={fareClass:null!==(t=null===e||void 0===e||null===(n=e.outboundFlight)||void 0===n?void 0:n.fareClass)&&void 0!==t?t:"",journeyType:c[null===e||void 0===e?void 0:e.journeyType],origin:null!==(o=null===e||void 0===e||null===(i=e.outboundFlight)||void 0===i?void 0:i.departureAirportIataCode)&&void 0!==o?o:origin,destination:null!==(l=null===e||void 0===e||null===(r=e.outboundFlight)||void 0===r?void 0:r.arrivalAirportIataCode)&&void 0!==l?l:destination,departureDate:null!==(a=null===e||void 0===e?void 0:e.departureDate)&&void 0!==a?a:"",returnDate:"string"===typeof(null===e||void 0===e?void 0:e.returnDate)&&"rt"===c[null===e||void 0===e?void 0:e.journeyType]?null===e||void 0===e?void 0:e.returnDate:"",airlineCode:"string"===typeof(null===e||void 0===e||null===(s=e.airline)||void 0===s?void 0:s.iataCode)?null===e||void 0===e||null===(d=e.airline)||void 0===d?void 0:d.iataCode.toLowerCase():"",currencyCode:null===e||void 0===e||null===(u=e.priceSpecification)||void 0===u?void 0:u.currencyCode};var p;
15p=v,L.publish("em.booking.open",Qe(Qe({},p),{},{tagName:"aiPoweredSearch"}))}function Ct(){return(0,ve.tZ)(D.kC,{className:"w-full h-full items-center justify-center px-3 cursor-not-allowed",_style:Qe(Qe({},g("flights-booking._aiPoweredSearch._emptyFareCard")),{},{height:Ee}),children:(0,ve.tZ)(D.xv,{children:be})})}function St(e,t,n){var o,i;const{outboundFlight:l,formattedDepartureDate:r,formattedReturnDate:a,journeyType:s,priceSpecification:d}=e,{shortenedFormattedTotalPrice:u,formattedTotalPrice:c}=d,{origin:v,destination:p,departureAirportIataCode:f,returnAirportIataCode:y}=l,b="ONE_WAY"!==s&&a;return(0,ve.BX)(D.kC,{role:"button",tabIndex:0,className:"flex-nowrap w-full flex-row h-full items-center justify-center px-3 cursor-pointer",_style:Qe(Qe({},g(["flights-booking._aiPoweredSearch._fareCard"])),{},{height:Ee}),onKeyPress:t=>{"Enter"!==t.key&&" "!==t.key||Dt(e)},onClick:()=>{Dt(e)},children:[(0,ve.BX)(D.kC,{className:"flex-nowrap flex-col w-full justify-between items-start",children:[(0,ve.BX)(D.kC,{className:"flex-row items-center gap-1",children:[De&&(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._origin")),children:null===v||void 0===v||null===(o=v.city)||void 0===o?void 0:o.name}),De&&Ce&&(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._originDestinationSeparator")),as:"span",children:ye}),Ce&&(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._destination")),children:null===p||void 0===p||null===(i=p.city)||void 0===i?void 0:i.name})]}),(0,ve.BX)(D.kC,{className:"flex-row items-center gap-1",children:[Se&&(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._departureDate")),children:r}),Se&&ke&&b&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._datesSeparator")),as:"span",children:"-"}),(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._returnDate")),children:a})]})]})]}),(0,ve.BX)(D.kC,{className:"flex-nowrap flex-col justify-between items-end shrink-0",children:[we&&(0,ve.tZ)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._priceFrom")),children:ge}),xe&&(0,ve.BX)(D.xv,{_style:Qe({},g("flights-booking._aiPoweredSearch._fareCard._price")),children:[null!==u&&void 0!==u?u:c," ",je&&"*"]})]})]})}(0,i.useEffect)((()=>{(async()=>{var e,t;const n={origins:[...Array.isArray(null===s||void 0===s||null===(e=s.extra_info)||void 0===e||null===(t=e.airports)||void 0===t?void 0:t.origin)?s.extra_info.airports.origin:[]],departure:{start:f()().format("YYYY-MM-DD")},routesLimit:20,faresLimit:50,faresPerRoute:1};try{const e=await R.get(n,{});gt(e)}catch(o){console.error("Error getting fallback fares:",o)}})()}),[]),(0,i.useEffect)((()=>{Ie.current&&Ie.current.focus()}),[]);const kt=(0,ve.BX)(D.kC,{className:"flex flex-col gap-3 items-center justify-center w-full lg:pr-2 mb-2 lg:mb-0 rtl:pr-0",children:[(0,ve.tZ)(D.xv,{className:"text-sm text-gray-500",children:J}),(0,ve.tZ)(Ue,{_style:{width:"32px",height:"32px"}})]}),wt=(0,ve.tZ)(D.zx,{ref:Ie,"data-att":"standard-search",onClick:y,"aria-label":A,className:v()("flex w-full flex-nowrap justify-center items-center"),_style:Qe(Qe({},g(["eds.components.inputGroups.secondary"])),{},{color:g("eds.colors.primary"),borderRadius:"none",background:"transparent",border:"none","&:hover, &:focus, &:focus-within":{color:g("eds.colors.secondary"),textDecoration:"underline",border:"none",background:"transparent",boxShadow:"none"}}),children:Z}),xt=(0,ve.BX)(D.kC,{className:"group relative",children:[tt<=0&&(0,ve.tZ)(D.kC,{className:"transition-opacity duration-150 group-hover:opacity-100 opacity-0 absolute translate-y-[calc(-100%-5px)] top-0 left-0 px-4 py-3",_style:Qe({},g("flights-booking._aiPoweredSearch._maxAttempsTooltip")),children:(0,ve.tZ)(D.xv,{children:ae})}),(0,ve.BX)(D.zx,{"data-att":"new-search","aria-label":G,isDisabled:tt<=0,onClick:tt<=0?()=>{}:function(){var e;ht(""),rt(!0),pt([]),ut(Qe(Qe({},dt),{},{invalidPrompt:!1,noResults:!1})),h(null===m||void 0===m||null===(e=m.newAiPoweredSearch)||void 0===e?void 0:e.id)},className:v()("flex flex-nowrap justify-center items-center gap-[4px] p-[8px]"),_style:Qe(Qe({},g(["eds.components.inputGroups.secondary"])),{},{color:g("eds.colors.primary"),border:`1px solid ${g("eds.colors.primary")}`},tt<=0&&Qe(Qe({},g(["eds.components.inputGroups.secondary._disabled"])),{},{cursor:"not-allowed"})),children:[(0,ve.tZ)(D.xv,{"aria-hidden":!0,as:"i",className:"material-icons",_style:Qe({},g(["eds.components.inputGroups.secondary._leftIcon"])),children:"refresh"}),(0,ve.tZ)(D.xv,{"aria-hidden":!0,as:"span",children:F})]})]}),jt=(0,ve.tZ)(D.BZ,Qe(Qe(Qe({ref:Ze,variant:null!==C&&void 0!==C?C:"4",label:ee,labelId:`${Me}-label`,labelFor:Me,clearButtonLabel:I,_style:Qe({},g(["eds.components.inputGroups.primary"])),hasValue:!!Ye,onClear:()=>ht(""),clearIcon:Oe,isRTL:d},(null===dt||void 0===dt?void 0:dt.inputCharacterLimit)&&{errorMessage:ue,errorMessageId:`${Me}-error`}),(null===dt||void 0===dt?void 0:dt.emptyPrompt)&&{errorMessage:ce,errorMessageId:`${Me}-error`}),{},{children:(0,ve.tZ)("input",{id:Me,"aria-label":oe,placeholder:te,autoComplete:"off",value:Ye,ref:Ae,className:"w-full appearance-none focus:outline-none placeholder-current text-inherit bg-transparent text-ellipsis",type:"text",onCh
15ange:e=>{var t;ht(null===e||void 0===e||null===(t=e.target)||void 0===t?void 0:t.value)},onKeyDown:e=>{"Enter"===e.key&&Ot()},maxLength:_e})})),Et=(0,ve.tZ)(D.xv,{className:v()("flex flex-nowrap w-full justify-center items-center"),_style:Qe({},g(["flights-booking._form._disclaimer"])),children:ne}),Tt=(0,ve.tZ)(D.kC,{children:(0,ve.tZ)(D.xv,{className:v()("flex flex-nowrap w-full justify-center items-center"),_style:Qe({},g(["flights-booking._form._disclaimer"])),children:`${tt} ${re}`})}),Pt=g("flights-booking._aiPoweredSearch._feedbackButton"),Nt=null!==(r=null===Pt||void 0===Pt?void 0:Pt["&:hover, &:focus"])&&void 0!==r?r:{},Rt=(0,ve.BX)(D.kC,{className:"items-center justify-center gap-1",children:[(0,ve.tZ)(D.zx,{"data-att":"thumb-up","aria-label":V,"aria-pressed":"thumb-up"===yt,onClick:()=>_t("thumb-up"),className:"p-1",_style:Qe(Qe({},Pt),"thumb-up"===yt?Nt:{}),children:(0,ve.tZ)(D.xv,{as:"span","aria-hidden":!0,className:"material-icons",children:"thumb_up"})}),(0,ve.tZ)(D.zx,{"data-att":"thumb-down","aria-label":Y,"aria-pressed":"thumb-down"===yt,onClick:()=>_t("thumb-down"),className:"p-1",_style:Qe(Qe({},Pt),"thumb-down"===yt?Nt:{}),children:(0,ve.tZ)(D.xv,{as:"span","aria-hidden":!0,className:"material-icons",children:"thumb_down"})})]}),Lt=(0,ve.tZ)(D.zx,{"data-att":"ai-powered-search","aria-label":B,isDisabled:ct,onClick:Ot,leftIcon:(0,ve.tZ)(ze,{className:"",_style:{color:"white",width:"18px",height:"20px"}}),className:v()("flex flex-nowrap w-full justify-center items-center gap-[6px] py-[10px] px-[20px]"),_style:Qe({},g("flights-booking._aiPoweredSearch._searchButton")),children:M}),Zt=g(["eds.components.inputGroups.primary._label"]),At=["1","2"].includes(String(C))&&"absolute"!==(null===Zt||void 0===Zt?void 0:Zt.position)?(0,ve.BX)(D.kC,{className:"w-full flex-col",children:[(0,ve.tZ)(D.xv,{as:"span","aria-hidden":"true",className:"hidden lg:block",_style:Qe(Qe({},Zt),{},{visibility:"hidden"}),children:"\xa0"}),Lt]}):Lt,It=(0,i.useMemo)((()=>0===vt.length?[]:vt.length>1||["mobile","tablet"].includes(E)?vt.map(((e,t)=>St(e,0,vt.length))):[St(vt[0],0,vt.length),Ct()]),[vt,St,Ct,E]),Mt=Math.min(It.length,Re),Bt=(0,ve.BX)(ve.HY,{children:[!dt.noResults&&!dt.invalidPrompt&&(0,ve.BX)(D.kC,{className:"w-full flex-row items-center pb-1 -my-1 -mx-1",children:[!lt&&(0,ve.tZ)(D.kC,{className:"mx-1 my-1",children:xt}),(0,ve.tZ)(D.kC,{className:"mx-1 my-1",children:wt})]}),lt&&(0,ve.BX)(D.kC,{className:v()("w-full items-start",N?"flex-col":"flex-row"),children:[(0,ve.BX)(D.kC,{className:v()("flex-col items-start",N?"w-full":"w-10/12"),children:[(0,ve.tZ)(D.kC,{className:v()("w-full rtl:pr-0",N?"mb-2":"pr-2 mb-0"),children:jt}),(0,ve.BX)(D.kC,{className:v()("w-full justify-between items-start",N?"":"pr-2 flex-row flex-nowrap"),children:[(0,ve.tZ)(D.kC,{className:"pb-1 my-1",children:Et}),tt<ot&&(0,ve.tZ)(D.kC,{className:"pb-1 my-1 here",children:Tt})]})]}),(0,ve.tZ)(D.kC,{className:v()(N?"w-full mt-5":"w-2/12 mt-0"),children:At})]}),!lt&&(0,ve.BX)(D.kC,{className:"w-full",children:[(0,ve.BX)(D.kC,{className:"w-full justify-between items-center px-2 pb-2",children:[(0,ve.BX)(D.kC,{className:"flex-row items-center justify-center gap-1.5",children:[(0,ve.tZ)(ze,{className:"flex-shrink-0",_style:{color:g("eds.colors.primary"),width:"18px",height:"20px"}}),(0,ve.tZ)(D.xv,{className:"text-sm text-gray-500",children:dt.noResults||dt.invalidPrompt?le:Ke})]}),Rt]}),vt.length>0&&(0,ve.tZ)(D.kC,{className:v()("relative w-full flex-grow","mobile"===E||vt.length<=Mt?"px-0":"px-10"),children:(0,ve.BX)(Pe,{setApi:e=>{Le.current=e},options:{direction:"ltr",align:"start",loop:!1,slidesToScroll:Re},className:"w-full",children:[(0,ve.tZ)(Pe.Viewport,{children:(0,ve.tZ)(Pe.Track,{className:"",children:It.map(((e,t)=>(0,ve.tZ)(Pe.Item,{className:v()("transition-all flex-grow px-1",{"w-1/5":Mt>=5,"w-1/4":4===Mt,"w-1/3":3===Mt,"w-1/2":2===Mt,"w-full":1===Mt}),children:e},t)))})}),"mobile"!==E&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(Pe.Previous,{hideWhenDisabled:!0,"aria-label":z,className:"absolute top-[50%] translate-y-[-50%] ltr:left-0 rtl:right-0 p-0.5 transition-all",_style:Qe(Qe({},g("flights-booking._aiPoweredSearch._carousel._navButton")),{},{__disabled:Qe({},g("flights-booking._aiPoweredSearch._carousel._navButton.__disabled"))}
15),children:(0,ve.tZ)(D.xv,{as:"span","aria-hidden":!0,className:"material-icons rtl:rotate-180 !text-[32px]",children:"chevron_left"})}),(0,ve.tZ)(Pe.Next,{hideWhenDisabled:!0,"aria-label":U,className:"absolute top-[50%] translate-y-[-50%] ltr:right-0 rtl:left-0 p-0.5 transition-all",_style:Qe(Qe({},g("flights-booking._aiPoweredSearch._carousel._navButton")),{},{__disabled:Qe({},g("flights-booking._aiPoweredSearch._carousel._navButton.__disabled"))}),children:(0,ve.tZ)(D.xv,{as:"span","aria-hidden":!0,className:"material-icons rtl:rotate-180 !text-[32px]",children:"chevron_right"})})]}),(0,ve.tZ)(Pe.Dots,{className:"absolute left-[50%] translate-x-[-50%] flex items-center justify-center gap-1.5 mt-4 w-full",dotClassName:"rounded-full transition-all",_style:{_dot:Qe(Qe({},g("flights-booking._aiPoweredSearch._carousel._dot")),{},{__selected:Qe({},g("flights-booking._aiPoweredSearch._carousel._dot.__selected"))})}})]})}),(0,ve.tZ)(D.kC,{className:v()("w-full flex justify-center items-center",{"pt-10":"desktop"===E&&vt.length>Re,"pt-4":"desktop"===E&&vt.length<=Re}),children:(0,ve.tZ)(D.xv,{as:"span",_style:Qe({},g(["flights-booking._form._disclaimer"])),children:se})})]})]}),Ft=(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.kC,{className:"pb-2",children:wt}),lt&&(0,ve.BX)(D.kC,{className:v()("w-full items-start",N?"flex-col":"flex-row"),children:[(0,ve.BX)(D.kC,{className:v()("flex-col items-start",N?"w-full":"w-10/12"),children:[(0,ve.tZ)(D.kC,{className:v()("w-full rtl:pr-0",N?"mb-2":"pr-2 mb-0"),children:jt}),tt<ot&&(0,ve.tZ)(D.kC,{className:"pb-1 my-1 here",children:Tt}),(0,ve.tZ)(D.kC,{className:"pb-1 my-1",children:Et})]}),(0,ve.tZ)(D.kC,{className:v()(N?"w-full mt-5":"w-2/12 mt-0"),children:At})]}),!lt&&(0,ve.BX)(D.kC,{className:"w-full flex-col",children:[(0,ve.BX)(D.kC,{className:"flex-nowrap w-full items-center gap-1.5 pb-4",children:[(0,ve.tZ)(ze,{className:"flex-shrink-0",_style:{color:g("eds.colors.primary"),width:"18px",height:"20px"}}),(0,ve.tZ)(D.xv,{className:"text-sm text-gray-500",children:dt.noResults||dt.invalidPrompt?le:Ke})]}),vt.length>0&&(0,ve.tZ)(D.kC,{className:"w-full flex-grow px-0 pb-1",children:(0,ve.BX)(Be,{className:"w-full flex-col flex-nowrap",totalItems:It.length,endIndex:Math.min(It.length-1,9),children:[(0,ve.tZ)(Be.List,{className:"w-full flex-col flex-nowrap gap-y-2",children:It.map(((e,t)=>(0,ve.tZ)(Be.Item,{index:t,children:e},t)))}),(0,ve.tZ)(D.kC,{className:"w-full flex justify-center items-center pt-2",children:(0,ve.tZ)(D.xv,{as:"span",_style:Qe({},g(["flights-booking._form._disclaimer"])),children:se})}),(0,ve.tZ)(Be.PaginationControls,{children:({totalItems:e,endIndex:t,handleEndIndex:n})=>{const o=e-1;return t<o?(0,ve.tZ)(D.kC,{className:"w-full justify-center pt-4",children:(0,ve.tZ)(D.zx,{className:"px-8 py-3",_style:Qe({},g("flights-booking._aiPoweredSearch._list._viewMoreButton")),onClick:()=>n(t+10<o?t+10:t+(o-t)),children:W})}):null}})]})}),(0,ve.BX)(D.kC,{className:"w-full flex justify-between items-center pt-4",children:[!lt&&(0,ve.tZ)(D.kC,{className:"mx-1 my-1",children:xt}),Rt]})]})]}),Gt=[dt.invalidPrompt,dt.system,dt.noResults,dt.noRemainingAttempts].some(Boolean)&&(0,ve.BX)(D.kC,{className:"w-full gap-x-2 px-4 py-3 mb-2 justify-center items-center",_style:g("flights-booking._aiPoweredSearch._error"),children:[dt.invalidPrompt&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.xv,{as:"p",children:fe}),(0,ve.tZ)(D.zx,{"aria-label":H,_style:g("flights-booking._aiPoweredSearch._error._button"),onClick:()=>{ut(Qe(Qe({},dt),{},{invalidPrompt:!1})),$e(""),rt(!0)},children:X})]}),dt.system&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.xv,{as:"p",children:pe}),(0,ve.tZ)(D.zx,{"aria-label":A,_style:g("flights-booking._aiPoweredSearch._error._button"),onClick:()=>{ut(Qe(Qe({},dt),{},{system:!1})),y()},children:Z})]}),dt.noResults&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.xv,{as:"p",children:de}),(0,ve.tZ)(D.zx,{"aria-label":K,_style:g("flights-booking._aiPoweredSearch._error._button"),onClick:()=>{ut(Qe(Qe({},dt),{},{noResults:!1})),$e(""),rt(!0)},children:$}),(0,ve.tZ)(D.zx,{"aria-label":A,_style:g("flights-booking._aiPoweredSearch._error._button"),onClick:()=>{ut(Qe(Qe({},dt),{},{noResults:!1})),y()},children:Z})]}),dt.noRemainingAttempts&&(0,ve.BX)(ve.HY,{children:[(0,ve.tZ)(D.xv,{as:"p",children:ae}),(0,ve.tZ)(D.zx,{"aria-label":A,_style:g("flights-booking._aiPoweredSearch._error._button"),onClick:()=>{ut(Qe(Qe({},dt),{},{noRemainingAttempts:!1})),y()},children:Z})]})]});return(0,ve.tZ)(D.kC,{ref:T,className:"w-full flex-col justify-start",children:(0,ve.BX)(D.kC,{className:"w-full",_style:g("flights-booking._form"),children:[Gt,at&&kt,!dt.system&&!at&&("desktop"===E&&Ne>768?Bt:Ft)]})})},tt=n(49542);var nt=e=>{const{endpoint:t,headers:n={}}=e;return{get:async()=>{try{const e=await fetch(t,{headers:n});if(!e.ok){const t=await e.text();return console.error(`AI Counter request failed (${e.status}): ${t}`),null}return await e.json()}catch(e){return console.error("AI Counter error:",e),null}}}},ot=n(53255),it=n(88589),lt=n(66826),rt=n(98230),at=n(16148);function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?st(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut=function(e){var t,n,o,l,r,a,s,d,u,c,v,p;const{inputGroupVariant:f="2",isModal:g,isRTL:y,icon:b,discountTypes:m,selected:h,onChange:_,labels:O,_style:C}=e,S=(0,i.useRef)(null),k=(0,i.useRef)(null),w=(0,i.useRef)(null),x=(0,ot.pA)(e),{0:j,1:E}=(0,i.useState)(!1),T=Object.keys(h).reduce(((e,t)=>{const n=m[t].options.find((e=>(null===e||void 0===e?void 0:e.id)===h[t])),o=null===n||void 0===n?void 0:n.label;return e.push(o),e}),[]).join("/"),P=()=>j&&E(!1),N=(0,ve.BX)(D.kC,{className:"p-4 flex-col space-y-3",children:[(0,ve.BX)(D.kC,{className:"p-3 ltr:pl-9 rtl:pr-9 relative",_style:null===C||void 0===C?void 0:C._disclaimer,children:[(0,ve.tZ)(D.xv,{as:"span",className:"absolute left-3 top-3",_style:null===C||void 0===C||null===(t=C._disclaimer)||void 0===t?void 0:t._icon,children:"info"}),null===O||void 0===O?void 0:O.disclaimer]}),(0,ve.tZ)(D.kC,{children:Object.keys(m).map((e=>{const t=m[e],n=t.options.map((e=>({id:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.label})));return(0,ve.tZ)(D.Ee,{name:e,label:null===t||void 0===t?void 0:t.label,value:h[e],options:n,onChange:t=>_(e,t),_style:null===C||void 0===C?void 0:C._radioGroup},e)}))})]});return g?(0,ve.BX)(D.kC,{children:[(0,ve.tZ)(D.BZ,dt(dt({tabIndex:"0",role:"button","aria-label":""},x),{},{hasValue:!0,ref:k,className:"cursor-pointer",variant:f,rightIcon:b,onClick:()=>!j&&E(!0),_style:null===C||void 0===C?void 0:C._inputGroup,isRTL:y,children:T})),(0,ve.tZ)(D.Bn,{title:T,open:j,isRTL:y,_style:dt(dt({},null===C||void 0===C?void 0:C._modal),{},{_overlay:dt(dt({},null===C||void 0===C||null===(n=C._modal)||void 0===n?void 0:n._overlay),{},{"@media (min-width: 576px)":{backdropFilter:"blur(5px)",background:"rgba(0,0,0,0.5)"}}),_container:dt(dt({background:"#fff"},null===C||void 0===C||null===(o=C._modal)||void 0===o?void 0:o._container),{},{top:"0",left:"0",height:"100%",width:"100%","@media (min-width: 576px)":{top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"90vh",maxHeight:"926px",width:"428px"}})}),onClose:P,header:(0,ve.BX)(D.kC,{className:"h-10 w-full justify-center items-center",_style:null===C||void 0===C||null===(l=C._modal)||void 0===l?void 0:l._header,children:[(0,ve.tZ)(D.kC,{className:"absolute left-0",children:(0,ve.tZ)(D.zx,{"data-att":"back",onClick:()=>P(),className:"flex justify-center",_style:null===C||void 0===C||null===(r=C._modal)||void 0===r||null===(a=r._header)||void 0===a?void 0:a._backButton,children:"keyboard_arrow_left"})}),(0,ve.tZ)(D.xv,{className:"truncate m-0",as:"h3",_style:null===C||void 0===C||null===(s=C._modal)||void 0===s||null===(d=s._header)||void 0===d?void 0:d._title,children:T})]}),footer:(0,ve.tZ)(D.kC,{className:"left-0 bottom-0 w-full justify-end items-center p-2 space-x-2 rtl:space-x-reverse",_style:null===C||void 0===C||null===(u=C._modal)||void 0===u?void 0:u._footer,children:(0,ve.tZ)(D.zx,{"data-att":"done",className:"px-4 py-2 items-center justify-center",_style:null===C||void 0===C||null===(c=C._modal)||void 0===c||null===(v=c._footer)||void 0===v?void 0:v._doneButton,onClick:()=>P(),children:null===O||void 0===O?void 0:O.doneButton})}),children:N})]}):(0,ve.tZ)(D.BZ,dt(dt({ref:S},x),{},{hasValue:!0,className:"cursor-pointer",variant:f,rightIcon:b,_style:null===C||void 0===C?void 0:C._inputGroup,onClick:e=>{w.current.contains(e.target)||k&&k.current&&k.current.click()},isRTL:y,children:(0,ve.tZ)(D.J2,{title:T,ref:w,referenceElement:S,"aria-label":"","aria-haspopup":"dialog",_style:null===C||void 0===C||null===(p=C._popover)||void 0===p?void 0:p._container,Button:()=>(0,ve.tZ)(D.xv,{as:"span",ref:k,children:T}),children:({close:e})=>(0,ve.tZ)(D.kC,{className:"flex-col focus:outline-none pb-2",children:N})})}))},ct=n(54951),vt=n(73088);Re().string,Re().string,Re().bool,Re().oneOf(["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"]),Re().func;var pt=n(61138);
15const ft=["origin","destination","getHistogram"],gt=["day","index","modifiers","_style","className"];function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mt(e){var t,n,o,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I;const{origin:M,destination:B,getHistogram:F}=e,G=(0,O.Z)(e,ft),{fareInsightsMaxDate:V,travelClass:Y,isOneWay:$,startDate:K,endDate:X,startDateConfig:H,endDateConfig:z,labels:U,_style:W}=G,q=f()(),J=f()(K),Q=(()=>{var e;return"number"===typeof V?f()().add(V,"d"):"string"===typeof V&&null!==(e=f()(V))&&void 0!==e&&e.isValid()?f()(V):null})(),ee=null!==Q&&void 0!==Q&&Q.isValid()?(0,vt.Z)(Q):null,te=(()=>{var e;let t=null;const n=null===H||void 0===H?void 0:H.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),ne=(0,vt.Z)(te),oe=(()=>{var e;let t=null;const n=null===H||void 0===H?void 0:H.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),ie=(0,vt.Z)(oe),le=(()=>{var e;let t=null;const n=null===z||void 0===z?void 0:z.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),re=(0,vt.Z)(le),ae=(()=>{var e;let t=null;const n=null===z||void 0===z?void 0:z.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),se=(0,vt.Z)(ae),de={min:null,avg:null,max:null},{0:ue,1:ce}=(0,i.useState)(de),{0:pe,1:fe}=(0,i.useState)([]),ge=async()=>{var e,t;if(!M||!B||null!==J&&void 0!==J&&J.isValid()&&null!==Q&&void 0!==Q&&Q.isValid()&&null!==Q&&void 0!==Q&&Q.isBefore(J,"d"))return fe([]),void ce(de);const n=bt(bt(bt({origin:M,destination:B,departure:{start:ne,end:Q.isAfter(te,"d")&&Q.isBefore(oe,"d")?ee:ie}},Y?{travelClasses:[Y]}:{}),$?{}:{departure:K?{start:K,end:K}:{start:ne,end:Q.isBefore(oe,"d")?ee:ie},return:X?{start:X,end:X}:{start:K||re,end:Q.isBefore(ae,"d")?ee:se}}),{},{journeyType:$?"ONE_WAY":"ROUND_TRIP",histogramType:!$&&K?"INBOUND":"OUTBOUND",priceBuckets:bt({active:!0,field:"TOTAL_PRICE",departureRange:{start:te.diff(q,"d"),end:Q.isBefore(oe,"d")?Q.diff(q,"d"):oe.diff(q,"d")}},$?{}:{returnRange:{start:le.diff(q,"d"),end:Q.isBefore(ae,"d")?Q.diff(q,"d"):ae.diff(q,"d")}})}),o=await F(n),i=null!==(e=null===o||void 0===o?void 0:o.buckets)&&void 0!==e?e:de,l=null!==(t=null===o||void 0===o?void 0:o.histogram)&&void 0!==t?t:[];if(ce("object"===typeof i?i:de),Array.isArray(l)){const e=null===l||void 0===l?void 0:l.reduce(((e,t)=>("object"===typeof t&&"string"===typeof(null===t||void 0===t?void 0:t.date)&&Array.isArray(null===t||void 0===t?void 0:t.fares)&&t.fares.length>0&&(e[t.date]=t.fares[0]),e)),{});fe(e)}else fe([])};(0,i.useEffect)((()=>{ge()}),[M,B,Y,$,X,F]),(0,i.useEffect)((()=>{$||ge()}),[K]);const ye=({type:e,children:t})=>{var n,o,i,l,r,a,s;return(0,ve.tZ)(D.kC,{className:"p-1 text-xs justify-center items-center my-1 flex-grow md:grow-0",_style:bt(bt({},null===W||void 0===W||null===(n=W.eds)||void 0===n||null===(o=n.components)||void 0===o||null===(i=o.datepicker)||void 0===i?void 0:i._priceBucket),null===W||void 0===W||null===(l=W.eds)||void 0===l||null===(r=l.components)||void 0===r||null===(a=r.datepicker)||void 0===a||null===(s=a._priceBucket)||void 0===s?void 0:s[`_${e}`]),children:t})},be=({type:e,overrideStyles:t})=>{var n,o,i,l,r,a;return(0,ve.tZ)("span",{css:(0,C.iv)(bt(bt(bt({},null===W||void 0===W||null===(n=W.eds)||void 0===n||null===(o=n.components)||void 0===o||null===(i=o.datepicker)||void 0===i?void 0:i._priceBucketIndicator),null===W||void 0===W||null===(l=W.eds)||void 0===l||null===(r=l.components)||void 0===r||null===(a=r.datepicker)||void 0===a?void 0:a._priceBucketIndicator[`_${e}`]),t),"","")})},me=[!(null===ue||void 0===ue||null===(t=ue.min)||void 0===t||null===(n=t.priceRange)||void 0===n||!n.formattedMinimum),!(null===ue||void 0===ue||null===(o=ue.avg)||void 0===o||null===(l=o.priceRange)||void 0===l||!l.formattedMinimum),!(null===ue||void 0===ue||null===(r=ue.max)||void 0===r||null===(a=r.priceRange)||void 0===a||!a.formattedMinimum)].every((e=>!!e))?(0,ve.BX)(D.kC,{className:"w-full flex-col items-center justify-center space-y-2",children:[(0,ve.BX)(D.kC,{className:" w-full items-center justify-between space-x-3 -my-1 md:justify-center rtl:space-x-reverse",_style:bt({},null===W||void 0===W||null===(s=W.eds)||void 0===s||null===(d=s.typographies)||void 0===d?void 0:d.fs7),children:[(0,ve.BX)(ye,{type:"min",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:(0,ve.tZ)(be,{type:"min"})}),(null===ue||void 0===ue||null===(u=ue.min)||void 0===u||null===(c=u.priceRange)||void 0===c||null===(p=c.formattedMinimum)||void 0===p?void 0:p.length)>8?null===ue||void 0===ue||null===(g=ue.min)||void 0===g||null===(y=g.priceRange)||void 0===y?void 0:y.shortenedFormattedMinimum:null===ue||void 0===ue||null===(b=ue.min)||void 0===b||null===(m=b.priceRange)||void 0===m?void 0:m.formattedMinimum]}),(0,ve.BX)(ye,{type:"avg",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:[1,2].map(((e,t)=>(0,ve.tZ)(be,{type:"avg"},t)))}),(null===ue||void 0===ue||null===(h=ue.avg)||void 0===h||null===(_=h.priceRange)||void 0===_||null===(S=_.formattedMinimum)||void 0===S?void 0:S.length)>8?null===ue||void 0===ue||null===(k=ue.avg)||void 0===k||null===(w=k.priceRange)||void 0===w?void 0:w.shortenedFormattedMinimum:null===ue||void 0===ue||null===(x=ue.avg)||void 0===x||null===(j=x.priceRange)||void 0===j?void 0:j.formattedMinimum]}),(0,ve.BX)(ye,{type:"max",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:[1,2,3].map(((e,t)=>(0,ve.tZ)(be,{type:"max"},t)))}),(null===ue||void 0===ue||null===(E=ue.max)||void 0===E||null===(T=E.priceRange)||void 0===T||null===(P=T.formattedMinimum)||void 0===P?void 0:P.length)>8?null===ue||void 0===ue||null===(N=ue.max)||void 0===N||null===(R=N.priceRange)||void 0===R?void 0:R.shortenedFormattedMinimum:null===ue||void 0===ue||null===(L=ue.max)||void 0===L||null===(Z=L.priceRange)||void 0===Z?void 0:Z.formattedMinimum]})]}),(null===U||void 0===U?void 0:U.legendDescription)&&(0,ve.tZ)(D.xv,{className:"text-center",_style:bt({},null===W||void 0===W||null===(A=W.eds)||void 0===A||null===(I=A.typographies)||void 0===I?void 0:I.fs7),children:null===U||void 0===U?void 0:U.legendDescription})]}):null,he=e=>{var t,n,o,i,l,r,a,s,d,u;return{background:null===W||void 0===W||null===(t=W.eds)||void 0===t||null===(n=t.components)||void 0===n||null===(o=n.datepicker)||void 0===o||null===(i=o._priceBuckets)||void 0===i||null===(l=i[`_${e}`])||void 0===l?void 0:l.background,backgroundColor:null===W||void 0===W||null===(r=W.eds)||void 0===r||null===(a=r.components)||void 0===a||null===(s=a.datepicker)||void 0===s||null===(d=s._priceBucket)||void 0===d||null===(u=d[`_${e}`])||void 0===u?void 0:u.backgroundColor}},_e=e=>{var t,n;return null===(t=pe[(0,vt.Z)(f()(e))])||void 0===t||null===(n=t.priceSpecification)||void 0===n?void 0:n.bucket};return(0,ve.tZ)(pt.Z,bt(bt({},G),{},{legend:me,renderDay:e=>{var t,n,o,i,l,r,a,s,d,u,c,p,f,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I,M,B,F,G,V,Y,$,K,X;const{day:H,index:z,modifiers:U,_style:W,className:q}=e,J=(0,O.Z)(e,gt),Q=null===H||void 0===H?void 0:H.format("D"),ee=(0,vt.Z)(H),{singleSelection:te,startOfRange:ne,endOfRange:oe,inRange:ie,disabled:le,upcomingDisabled:re,today:ae}=U,se=pe[ee],de=null===se||void 0===se||null===(t=se.priceSpecification)||void 0===t?void 0:t.bucket,ue=!le&&de?Array.from(Array({max:3,avg:2,min:1}[de]).keys()).map(((e,t)=>(0,ve.tZ)(be,{type:de,overrideStyles:bt({},te||ne||oe?{backgroundColor:"white"}:{})},t))):null;return(0,C.az)(D.zx,bt(bt({},J),{},{key:z,className:v()(q,"group flex flex-col items-center justify-center space-y-1"),_style:bt(bt(bt(bt(bt(bt(bt(bt(bt(bt(bt({},null===W||void 0===W||null===(n=W._calendar)||void 0===n||null===(o=n._months)||void 0===o||null===(i=o._month)||void 0===i||null===(l=i._daysGrid)||void 0===l?void 0:l._day),le?{}:he(de)),te||ne&&oe?null===W||void 0===W||null===(r=W._calendar)||void 0===r||null===(a=r._months)||void 0===a||null===(s=a._month)||void 0===s||null===(d=s._daysGrid)||void 0===d?void 0:d._day._singleSelection:{}),ne&&!oe?null===W||void 0===W||null===(u=W._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(f=p._daysGrid)||void 0===f?void 0:f._day._rangeStart:{}),oe&&!ne?null===W||void 0===W||null===(g=W._calendar)||void 0===g||null===(y=g._months)||void 0===y||null===(b=y._month)||void 0===b||null===(m=b._daysGrid)||void 0===m?void 0:m._day._rangeEnd:{}),ie?null===W||void 0===W||null===(h=W._calendar)||void 0===h||null===(_=h._months)||void 0===_||null===(S=_._month)||void 0===S||null===(k=S._daysGrid)||void 0===k?void 0:k._day._inRange:{}),le?null===W||void 0===W||null===(w=W._calendar)||void 0===w||null===(x=w._months)||void 0===x||null===(j=x._month)||void 0===j||null===(E=j._daysGrid)||void 0===E?void 0:E._day._disabled:{}),re?null===W||void 0===W||null===(T=W._calendar)||void 0===T||null===(P=T._months)||void 0===P||null===(N=P._month)||void 0===N||null===(R=N._daysGrid)||void 0===R||null===(L=R._day)||void 0===L?void 0:L._upcomingDisabled:{}),ne&&le?null===W||void 0===W||null===(Z=W._calendar)||void 0===Z||null===(A=Z._months)||void 0===A||null===(I=A._month)||void 0===I||null===(M=I._daysGrid)||void 0===M?void 0:M._day._disabledStartOfRange:{}),oe&&le?null===W||void 0===W||null===(B=W._calendar)||void 0===B||null===(F=B._months)||void 0===F||null===(G=F._month)||void 0===G||null===(V=G._daysGrid)||void 0===V?void 0:V._day._disabledEndOfRange:{}),ae?null===W||void 0===W||null===(Y=W._calendar)||void 0===Y||null===($=Y._months)||void 0===$||null===(K=$._month)||void 0===K||null===(X=K._daysGrid)||void 0===X?void 0:X._day._today:{})}),Q,(0,ve.tZ)(D.xv,{as:"span",className:"flex space-x-0.5 rtl:space-x-reverse justify-center",children:ue}))},onChangeStartDate:e=>{var t;null===(t=G.onChangeStartDate)||void 0===t||t.call(G,e,{analyticsData:{bucket:_e(e)}})},onChangeEndDate:e=>{var t;null===(t=G.onChangeEndDate)||void 0===t||t.call(G,e,{analyticsData:{bucket:_e(e)}})}}))}mt.defaultProps={origin:"",destination:"",isOneWay:!1,travelClass:"ECONOMY",getHistogram:()=>null};var ht=mt;Re().string,Re().string,Re().bool,Re().oneOf(["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"]),Re().func;const _t=["origin","destination","getHistogram"],Ot=["day","index","modifiers","_style","className"];function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Dt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function St(e){var t,n,o,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I;const{origin:M,destination:B,getHistogram:F}=e,G=(0,O.Z)(e,_t),{fareInsightsMaxDate:V,travelClass:Y,isOneWay:$,startDate:K,endDate:X,startDateConfig:H,endDateConfig:z,labels:U,_style:W}=G,q=f()(),J=(f()(K),f()(X),(()=>{var e;return"number"===typeof V?f()().add(V,"d"):"string"===typeof V&&null!==(e=f()(V))&&void 0!==e&&e.isValid()?f()(V):null})()),Q=null!==J&&void 0!==J&&J.isValid()?(0,vt.Z)(J):null,ee=(()=>{var e;let t=null;const n=null===H||void 0===H?void 0:H.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),te=(0,vt.Z)(ee),ne=(()=>{var e;let t=null;const n=null===H||void 0===H?void 0:H.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),oe=(0,vt.Z)(ne),ie=(()=>{var e;let t=null;const n=null===z||void 0===z?void 0:z.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),le=(0,vt.Z)(ie),re=(()=>{var e;let t=null;const n=null===z||void 0===z?void 0:z.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),ae=(0,vt.Z)(re),{0:se,1:de}=(0,i.useState)("START"),ue={min:null,avg:null,max:null},{0:ce,1:pe}=(0,i.useState)(ue),{0:fe,1:ge}=(0,i.useState)([]);(0,i.useEffect)((()=>{K&&X?(ge([]),pe(ue)):(async()=>{var e,t;if(!M||!B)return ge([]),void pe(ue);const n=Ct(Ct(Ct({},"START"===se?{origin:M,destination:B,departure:{start:K||le,end:X||(J.isBefore(ne,"d")?Q:oe)},priceBuckets:{active:!0,field:"TOTAL_PRICE",departureRange:{start:ee.diff(q,"d"),end:J.isBefore(ne,"d")?J.diff(q,"d"):ne.diff(q,"d")}}}:{origin:B,destination:M,departure:{start:K||te,end:X||(J.isBefore(re,"d")?Q:ae)},priceBuckets:{active:!0,field:"TOTAL_PRICE",departureRange:{start:ie.diff(q,"d"),end:J.isBefore(re,"d")?J.diff(q,"d"):re.diff(q,"d")}}}),Y?{travelClasses:[Y]}:{}),{},{journeyType:"ONE_WAY",histogramType:"OUTBOUND"}),o=await F(n),i=null!==(e=null===o||void 0===o?void 0:o.buckets)&&void 0!==e?e:ue,l=null!==(t=null===o||void 0===o?void 0:o.histogram)&&void 0!==t?t:[];if(pe("object"===typeof i?i:ue),Array.isArray(l)){const e=null===l||void 0===l?void 0:l.reduce(((e,t)=>("object"===typeof t&&"string"===typeof(null===t||void 0===t?void 0:t.date)&&Array.isArray(null===t||void 0===t?void 0:t.fares)&&t.fares.length>0&&(e[t.date]=t.fares[0]),e)),{});ge(e)}else ge([])})()}),[M,B,Y,se,K,X,F]);const ye=({type:e,children:t})=>{var n,o,i,l,r,a,s;return(0,ve.tZ)(D.kC,{className:"p-1 text-xs justify-center items-center my-1 flex-grow md:grow-0",_style:Ct(Ct({},null===W||void 0===W||null===(n=W.eds)||void 0===n||null===(o=n.components)||void 0===o||null===(i=o.datepicker)||void 0===i?void 0:i._priceBucket),null===W||void 0===W||null===(l=W.eds)||void 0===l||null===(r=l.components)||void 0===r||null===(a=r.datepicker)||void 0===a||null===(s=a._priceBucket)||void 0===s?void 0:s[`_${e}`]),children:t})},be=({type:e,overrideStyles:t})=>{var n,o,i,l,r,a;return(0,ve.tZ)("span",{css:(0,C.iv)(Ct(Ct(Ct({},null===W||void 0===W||null===(n=W.eds)||void 0===n||null===(o=n.components)||void 0===o||null===(i=o.datepicker)||void 0===i?void 0:i._priceBucketIndicator),null===W||void 0===W||null===(l=W.eds)||void 0===l||null===(r=l.components)||void 0===r||null===(a=r.datepicker)||void 0===a?void 0:a._priceBucketIndicator[`_${e}`]),t),"","")})},me=[!(null===ce||void 0===ce||null===(t=ce.min)||void 0===t||null===(n=t.priceRange)||void 0===n||!n.formattedMinimum),!(null===ce||void 0===ce||null===(o=ce.avg)||void 0===o||null===(l=o.priceRange)||void 0===l||!l.formattedMinimum),!(null===ce||void 0===ce||null===(r=ce.max)||void 0===r||null===(a=r.priceRange)||void 0===a||!a.formattedMinimum)].every((e=>!!e))?(0,ve.BX)(D.kC,{className:"w-full flex-col items-center justify-center space-y-2",children:[(0,ve.BX)(D.kC,{className:" w-full items-center justify-between space-x-3 -my-1 md:justify-center rtl:space-x-reverse",_style:Ct({},null===W||void 0===W||null===(s=W.eds)||void 0===s||null===(d=s.typographies)||void 0===d?void 0:d.fs7),children:[(0,ve.BX)(ye,{type:"min",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:(0,ve.tZ)(be,{type:"min"})}),(null===ce||void 0===ce||null===(u=ce.min)||void 0===u||null===(c=u.priceRange)||void 0===c||null===(p=c.formattedMinimum)||void 0===p?void 0:p.length)>8?null===ce||void 0===ce||null===(g=ce.min)||void 0===g||null===(y=g.priceRange)||void 0===y?void 0:y.shortenedFormattedMinimum:null===ce||void 0===ce||null===(b=ce.min)||void 0===b||null===(m=b.priceRange)||void 0===m?void 0:m.formattedMinimum]}),(0,ve.BX)(ye,{type:"avg",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:[1,2].map(((e,t)=>(0,ve.tZ)(be,{type:"avg"},t)))}),(null===ce||void 0===ce||null===(h=ce.avg)||void 0===h||null===(_=h.priceRange)||void 0===_||null===(S=_.formattedMinimum)||void 0===S?void 0:S.length)>8?null===ce||void 0===ce||null===(k=ce.avg)||void 0===k||null===(w=k.priceRange)||void 0===w?void 0:w.shortenedFormattedMinimum:null===ce||void 0===ce||null===(x=ce.avg)||void 0===x||null===(j=x.priceRange)||void 0===j?void 0:j.formattedMinimum]}),(0,ve.BX)(ye,{type:"max",children:[(0,ve.tZ)(D.kC,{className:"items-center space-x-0.5 rtl:space-x-reverse pr-1 rtl:pl-1 rtl:pr-0",children:[1,2,3].map(((e,t)=>(0,ve.tZ)(be,{type:"max"},t)))}),(null===ce||void 0===ce||null===(E=ce.max)||void 0===E||null===(T=E.priceRange)||void 0===T||null===(P=T.formattedMinimum)||void 0===P?void 0:P.length)>8?null===ce||void 0===ce||null===(N=ce.max)||void 0===N||null===(R=N.priceRange)||void 0===R?void 0:R.shortenedFormattedMinimum:null===ce||void 0===ce||null===(L=ce.max)||void 0===L||null===(Z=L.priceRange)||void 0===Z?void 0:Z.formattedMinimum]})]}),(null===U||void 0===U?void 0:U.legendDescription)&&(0,ve.tZ)(D.xv,{className:"text-center",_style:Ct({},null===W||void 0===W||null===(A=W.eds)||void 0===A||null===(I=A.typographies)||void 0===I?void 0:I.fs7),children:null===U||void 0===U?void 0:U.legendDescription})]}):null,he=e=>{var t,n,o,i,l,r,a,s,d,u;return{background:null===W||void 0===W||null===(t=W.eds)||void 0===t||null===(n=t.components)||void 0===n||null===(o=n.datepicker)||void 0===o||null===(i=o._priceBuckets)||void 0===i||null===(l=i[`_${e}`])||void 0===l?void 0:l.background,backgroundColor:null===W||void 0===W||null===(r=W.eds)||void 0===r||null===(a=r.components)||void 0===a||null===(s=a.datepicker)||void 0===s||null===(d=s._priceBucket)||void 0===d||null===(u=d[`_${e}`])||void 0===u?void 0:u.backgroundColor}},_e=e=>{var t,n;return null===(t=fe[(0,vt.Z)(f()(e))])||void 0===t||null===(n=t.priceSpecification)||void 0===n?void 0:n.bucket};return(0,ve.tZ)(pt.Z,Ct(Ct({},G),{},{legend:me,renderDay:e=>{var t,n,o,i,l,r,a,s,d,u,c,p,f,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I,M,B,F,G,V,Y,$,K,X;const{day:H,index:z,modifiers:U,_style:W,className:q}=e,J=(0,O.Z)(e,Ot),Q=null===H||void 0===H?void 0:H.format("D"),ee=(0,vt.Z)(H),{singleSelection:te,startOfRange:ne,endOfRange:oe,inRange:ie,disabled:le,upcomingDisabled:re,today:ae}=U,se=fe[ee],de=null===se||void 0===se||null===(t=se.priceSpecification)||void 0===t?void 0:t.bucket,ue=!le&&de?Array.from(Array({max:3,avg:2,min:1}[de]).keys()).map(((e,t)=>(0,ve.tZ)(be,{type:de,overrideStyles:Ct({},te||ne||oe?{backgroundColor:"white"}:{})},t))):null;return(0,C.az)(D.zx,Ct(Ct({},J),{},{key:z,className:v()(q,"group flex-col items-center justify-center space-y-1"),_style:Ct(Ct(Ct(Ct(Ct(Ct(Ct(Ct(Ct(Ct(Ct({},null===W||void 0===W||null===(n=W._calendar)||void 0===n||null===(o=n._months)||void 0===o||null===(i=o._month)||void 0===i||null===(l=i._daysGrid)||void 0===l?void 0:l._day),le?{}:he(de)),te||ne&&oe?null===W||void 0===W||null===(r=W._calendar)||void 0===r||null===(a=r._months)||void 0===a||null===(s=a._month)||void 0===s||null===(d=s._daysGrid)||void 0===d?void 0:d._day._singleSelection:{}),ne&&!oe?null===W||void 0===W||null===(u=W._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(f=p._daysGrid)||void 0===f?void 0:f._day._rangeStart:{}),oe&&!ne?null===W||void 0===W||null===(g=W._calendar)||void 0===g||null===(y=g._months)||void 0===y||null===(b=y._month)||void 0===b||null===(m=b._daysGrid)||void 0===m?void 0:m._day._rangeEnd:{}),ie?null===W||void 0===W||null===(h=W._calendar)||void 0===h||null===(_=h._months)||void 0===_||null===(S=_._month)||void 0===S||null===(k=S._daysGrid)||void 0===k?void 0:k._day._inRange:{}),le?null===W||void 0===W||null===(w=W._calendar)||void 0===w||null===(x=w._months)||void 0===x||null===(j=x._month)||void 0===j||null===(E=j._daysGrid)||void 0===E?void 0:E._day._disabled:{}),re?null===W||void 0===W||null===(T=W._calendar)||void 0===T||null===(P=T._months)||void 0===P||null===(N=P._month)||void 0===N||null===(R=N._daysGrid)||void 0===R||null===(L=R._day)||void 0===L?void 0:L._upcomingDisabled:{}),ne&&le?null===W||void 0===W||null===(Z=W._calendar)||void 0===Z||null===(A=Z._months)||void 0===A||null===(I=A._month)||void 0===I||null===(M=I._daysGrid)||void 0===M?void 0:M._day._disabledStartOfRange:{}),oe&&le?null===W||void 0===W||null===(B=W._calendar)||void 0===B||null===(F=B._months)||void 0===F||null===(G=F._month)||void 0===G||null===(V=G._daysGrid)||void 0===V?void 0:V._day._disabledEndOfRange:{}),ae?null===W||void 0===W||null===(Y=W._calendar)||void 0===Y||null===($=Y._months)||void 0===$||null===(K=$._month)||void 0===K||null===(X=K._daysGrid)||void 0===X?void 0:X._day._today:{})}),Q,(0,ve.tZ)(D.xv,{as:"span",className:"flex space-x-0.5 rtl:space-x-reverse justify-center",children:ue}))},onSelectingSignalUpdated:e=>{"START"!==e&&"END"!==e||de(e)},onChangeStartDate:e=>{var t;null===(t=G.onChangeStartDate)||void 0===t||t.call(G,e,{analyticsData:{bucket:_e(e)}})},onChangeEndDate:e=>{var t;null===(t=G.onChangeEndDate)||void 0===t||t.call(G,e,{analyticsData:{bucket:_e(e)}})}}))}St.defaultProps={origin:"",destination:"",isOneWay:!1,travelClass:"ECONOMY",getHistogram:()=>null};var kt=St;Re().string,Re().string,Re().bool,Re().oneOf(["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"]),Re().func,Re().bool;const wt=["origin","destination","getHistogram"],xt=["day","index","modifiers","_style","className"];function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?jt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tt(e){var t,n,o,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z;const{origin:A,destination:I,getHistogram:M}=e,B=(0,O.Z)(e,wt),{fareInsightsMaxDate:F,travelClass:G,isOneWay:V,startDate:Y,endDate:$,startDateConfig:K,endDateConfig:X,labels:H,_style:z,showLowestPriceIndicator:U,isFullScreen:W}=B,q=f()(),J=f()(Y),Q=(()=>{var e;return"number"===typeof F?f()().add(F,"d"):"string"===typeof F&&null!==(e=f()(F))&&void 0!==e&&e.isValid()?f()(F):null})(),ee=null!==Q&&void 0!==Q&&Q.isValid()?(0,vt.Z)(Q):null,te=(()=>{var e;let t=null;const n=null===K||void 0===K?void 0:K.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),ne=(0,vt.Z)(te),oe=(()=>{var e;let t=null;const n=null===K||void 0===K?void 0:K.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),ie=(0,vt.Z)(oe),le=(()=>{var e;let t=null;const n=null===X||void 0===X?void 0:X.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),re=(0,vt.Z)(le),ae=(()=>{var e;let t=null;const n=null===X||void 0===X?void 0:X.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),se=(0,vt.Z)(ae),{0:de,1:ue}=(0,i.useState)("START"),{0:ce,1:pe}=(0,i.useState)(!1),{0:fe,1:ge}=(0,i.useState)([]),{0:ye,1:be}=(0,i.useState)(null),{0:me,1:he}=(0,i.useState)("-"),{0:_e,1:Oe}=(0,i.useState)(null),{0:De,1:Ce}=(0,i.useState)(null),Se=A&&I,ke=async()=>{var e,t;const n=(null===J||void 0===J?void 0:J.isValid())&&(null===Q||void 0===Q?void 0:Q.isValid())&&Q.isBefore(J,"d");if(!Se||n)return void ge([]);pe(!0);const o=(e,t,n)=>Q.isBefore(t,"d")?ee:n,i={start:ne,end:Q.isAfter(te,"d")&&Q.isBefore(oe,"d")?ee:ie},l=Y?{start:Y,end:Y}:{start:ne,end:o(0,oe,ie)},r=$?{start:$,end:$}:{start:Y||re,end:o(0,ae,se)},a=Et(Et(Et({origin:A,destination:I,departure:V?i:l},G&&{travelClasses:[G]}),!V&&{return:r}),{},{journeyType:V?"ONE_WAY":"ROUND_TRIP",histogramType:!V&&null!==J&&void 0!==J&&J.isValid()&&"END"===de?"INBOUND":"OUTBOUND",priceBuckets:Et({active:!0,field:"TOTAL_PRICE",departureRange:{start:te.diff(q,"d"),end:Q.isBefore(oe,"d")?Q.diff(q,"d"):oe.diff(q,"d")}},!V&&{returnRange:{start:le.diff(q,"d"),end:Q.isBefore(ae,"d")?Q.diff(q,"d"):ae.diff(q,"d")}})}),s=await M(a),d=null!==(e=null===s||void 0===s?void 0:s.histogram)&&void 0!==e?e:[],u=null===s||void 0===s?void 0:s.buckets;if(be("object"===typeof u&&null!=(null===u||void 0===u||null===(t=u.min)||void 0===t?void 0:t.lowestFare)?Math.round(u.min.lowestFare):null),Array.isArray(d)){var c,v;const e=d.reduce(((e,t)=>(null!==t&&void 0!==t&&t.date&&Array.isArray(null===t||void 0===t?void 0:t.fares)&&t.fares.length&&(e[t.date]=t.fares[0]),e)),{}),t=Object.values(e)[0];he(null!==(c=null===t||void 0===t||null===(v=t.priceSpecification)||void 0===v?void 0:v.currencySymbol)&&void 0!==c?c:"-"),ge(e)}else ge([]);setTimeout((()=>pe(!1)),400)};(0,i.useEffect)((()=>{ke()}),[A,I,G,V,M]),(0,i.useEffect)((()=>{V||"END"!==de&&(""!==Y||""!==$)||ke()}),[Y,$,de]),(0,i.useEffect)((()=>{if(Y&&fe){var e,t,n,o;const i=null!=(null===(e=fe[Y])||void 0===e||null===(t=e.priceSpecification)||void 0===t?void 0:t.totalPrice)?Math.round(null===(n=fe[Y])||void 0===n||null===(o=n.priceSpecification)||void 0===o?void 0:o.totalPrice):null;Oe(i)}else Oe(null)}),[Y,fe]),(0,i.useEffect)((()=>{if($&&fe){var e,t,n,o;const i=null!=(null===(e=fe[$])||void 0===e||null===(t=e.priceSpecification)||void 0===t?void 0:t.totalPrice)?Math.round(null===(n=fe[$])||void 0===n||null===(o=n.priceSpecification)||void 0===o?void 0:o.totalPrice):null;Ce(i)}else Ce(null)}),[$,fe]);const we=({type:e,overrideStyles:t,className:n})=>{var o,i,l,r,a,s;return(0,ve.tZ)("span",{className:n,css:(0,C.iv)(Et(Et(Et({},null===z||void 0===z||null===(o=z.eds)||void 0===o||null===(i=o.components)||void 0===i||null===(l=i.datepicker)||void 0===l?void 0:l._priceBucketIndicator),null===z||void 0===z||null===(r=z.eds)||void 0===r||null===(a=r.components)||void 0===a||null===(s=a.datepicker)||void 0===s?void 0:s._priceBucketIndicator[`_${e}`]),t),"","")})},xe=Object.keys(fe).length>0?(0,ve.BX)(D.kC,{className:v()("w-full items-center",W?"flex-col justify-center space-y-2 py-4":"flex-row justify-between"),"aria-hidden":"true",children:[!W&&(0,ve.tZ)(D.xv,{_style:Et({},null===z||void 0===z||null===(t=z.eds)||void 0===t||null===(n=t.typographies)||void 0===n?void 0:n.fs5),children:null===H||void 0===H?void 0:H.priceNoteLabel}),(0,ve.BX)(D.kC,{className:v()("items-center space-x-5 -my-1 rtl:space-x-reverse",W?"w-full justify-center":""),_style:Et({},W?null===z||void 0===z||null===(o=z.eds)||void 0===o||null===(l=o.typographies)||void 0===l?void 0:l.fs6:null===z||void 0===z||null===(r=z.eds)||void 0===r||null===(a=r.typographies)||void 0===a?void 0:a.fs5),children:[U&&(0,ve.BX)(D.kC,{className:"items-center space-x-3.5 rtl:space-x-reverse",children:[(0,ve.tZ)(we,{type:"min"}),(0,ve.tZ)(D.xv,{children:null===H||void 0===H?void 0:H.lowestFaresLabel})]}),(0,ve.BX)(D.kC,{className:"items-center space-x-3 rtl:space-x-reverse",children:[(0,ve.tZ)(D.JO,{label:"search",_style:Et(Et({},null===z||void 0===z||null===(s=z.eds)||void 0===s||null===(d=s.typographies)||void 0===d?void 0:d.fsIcon),{},{fontSize:"20px",color:null===z||void 0===z||null===(u=z._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(g=p._daysGrid)||void 0===g||null===(y=g._day)||void 0===y||null===(b=y._price)||void 0===b?void 0:b.color})}),(0,ve.tZ)(D.xv,{children:null===H||void 0===H?void 0:H.searchForFaresLabel})]})]})]}):null,je=(0,i.useMemo)((()=>{const e={value:null,formatted:`${me}--`};if(!V){if(!$)return e;const t=null!=De?Math.round(De):null;return t>0?{value:t,formatted:`${me} ${t}`}:e}return Y&&_e>0?{value:_e,formatted:`${me} ${_e}`}:e}),[V,Y,$,_e,De,me]),Ee=Object.keys(fe).length>0?(0,ve.BX)(D.kC,{className:v()("justify-center",W?"flex-col items-start px-2 space-y-1":"flex-row items-center justify-end px-6 space-x-2"),children:[(0,ve.BX)(D.kC,{className:"flex-row items-center space-x-1",children:[(0,ve.tZ)(D.xv,{_style:Et({},W?null===z||void 0===z||null===(m=z.eds)||void 0===m||null===(h=m.typographies)||void 0===h?void 0:h.fs6:null===z||void 0===z||null===(_=z.eds)||void 0===_||null===(S=_.typographies)||void 0===S?void 0:S.fs5),children:null===H||void 0===H?void 0:H.from}),(0,ve.tZ)(D.xv,{_style:Et(Et(Et({},null===z||void 0===z||null===(k=z.eds)||void 0===k||null===(w=k.typographies)||void 0===w?void 0:w.fs5),null===z||void 0===z||null===(x=z.eds)||void 0===x||null===(j=x.typographies)||void 0===j||null===(E=j.fs5)||void 0===E?void 0:E._bold),{},{color:null===z||void 0===z||null===(T=z.eds)||void 0===T||null===(P=T.colors)||void 0===P?void 0:P.primary}),children:je.formatted})]}),(0,ve.tZ)(D.xv,{className:v()(!W&&"whitespace-nowrap"),_style:Et({},W?null===z||void 0===z||null===(N=z.eds)||void 0===N||null===(R=N.typographies)||void 0===R?void 0:R.fs6:null===z||void 0===z||null===(L=z.eds)||void 0===L||null===(Z=L.typographies)||void 0===Z?void 0:Z.fs5),children:V?null===H||void 0===H?void 0:H.oneWay:null===H||void 0===H?void 0:H.roundTrip})]}):null,Te=e=>{var t;const n=fe[(0,vt.Z)(f()(e))];return null!=(null===n||void 0===n||null===(t=n.priceSpecification)||void 0===t?void 0:t.totalPrice)};return(0,ve.tZ)(pt.Z,Et(Et({},B),{},{legend:xe,renderDay:e=>{var t,n,o,i,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I,M,B,F,G,K,X,z,q,J,Q,ee,te,ne,oe,ie,le,re,ae,se,de,ue;const{day:pe,index:ge,modifiers:be,_style:me,className:he}=e,_e=(0,O.Z)(e,xt),Oe=null===pe||void 0===pe?void 0:pe.format("D"),De=(0,vt.Z)(pe),Ce=!V&&!!$,ke=Ce&&!(Ce&&De===$),xe=Et({},_e),je=Et({},be);!V&&Y&&!$&&f()(De).isBefore(f()(Y),"day")&&(Object.assign(xe,{isDisabled:!0}),Object.assign(je,{disabled:!0}));const{singleSelection:Ee,startOfRange:Te,endOfRange:Pe,inRange:Ne,disabled:Re,upcomingDisabled:Le,today:Ze}=je,Ae=fe[De],Ie=ce&&!Re&&!Ee,Me=v()("group flex flex-col items-center space-y-1 focus:outline-none mt-2",{invisible:!pe,"cursor-not-allowed":Re,"cursor-pointer":!Re},{"skeleton-cell":Ie});let Be=null,Fe=null;const Ge=null===Ae||void 0===Ae?void 0:Ae.priceSpecification,Ve=null===me||void 0===me||null===(t=me._calendar)||void 0===t||null===(n=t._months)||void 0===n||null===(o=n._month)||void 0===o||null===(i=o._daysGrid)||void 0===i||null===(l=i._day)||void 0===l?void 0:l._price;if(!ke)if(Ie)Be=(0,ve.tZ)(D.kC,{_style:null===Ve||void 0===Ve?void 0:Ve.__skeleton}),Fe=null===H||void 0===H?void 0:H.loadingFaresLabel;else if(!Re)if(Ge){const{shortenedFormattedTotalPrice:e,formattedTotalPrice:t,formattedMinimum:n,currencySymbol:o="",totalPrice:i}=Ge,l=e||t||n,r=(Ke=o,"string"!==typeof($e=l)||"string"!==typeof Ke?$e:$e.replace(Ke,"").trim()),a=r&&!/[kK]/.test(r)?Math.round(parseFloat(r)):r,s=null!=i?Math.round(i):null,d=null!==ye&&s===ye;if(null!=s&&(Fe=`${s} ${o}${d&&U?`, ${null===H||void 0===H?void 0:H.lowestFaresAriaLabel}`:""}`),l){var Ye;const e=Ee||Te||Pe,t=e?d&&U?"var(--hover-color, inherit)":"inherit":d&&U?null===Ve||void 0===Ve||null===(Ye=Ve.__lowestFare)||void 0===Ye?void 0:Ye.color:null===Ve||void 0===Ve?void 0:Ve.color;Be=(0,ve.BX)(D.kC,{className:"flex flex-col-reverse items-center justify-center xs:flex-col",children:[(0,ve.tZ)(D.xv,{as:"span",_style:Et(Et({},Ve),{},{color:t}),className:v()(d&&e&&"lowest-price-day"),children:a}),d&&U&&(0,ve.tZ)(we,{type:"min",className:"lowest-price-day",overrideStyles:e?{backgroundColor:"var(--hover-color, white)"}:{}})]})}}else Object.keys(fe).length>0&&(Be=(0,ve.tZ)(D.kC,{className:"flex flex-col items-center",children:(0,ve.tZ)(D.JO,{label:"search",_style:null===Ve||void 0===Ve?void 0:Ve.__noFares})}),Fe=null===H||void 0===H?void 0:H.noFaresAriaLabel);var $e,Ke;return Fe&&Se&&!Re&&(xe["aria-label"]=[xe["aria-label"],Fe].filter(
15Boolean).join(", ")),(0,C.az)(D.zx,Et(Et({},xe),{},{key:ge,className:Me,_style:Et(Et(Et(Et(Et(Et(Et(Et(Et(Et(Et({},null===me||void 0===me||null===(r=me._calendar)||void 0===r||null===(a=r._months)||void 0===a||null===(s=a._month)||void 0===s||null===(d=s._daysGrid)||void 0===d?void 0:d._day),Ee||Te&&Pe?null===me||void 0===me||null===(u=me._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(g=p._daysGrid)||void 0===g?void 0:g._day._singleSelection:{}),Te&&!Pe?null===me||void 0===me||null===(y=me._calendar)||void 0===y||null===(b=y._months)||void 0===b||null===(m=b._month)||void 0===m||null===(h=m._daysGrid)||void 0===h?void 0:h._day._rangeStart:{}),Pe&&!Te?null===me||void 0===me||null===(_=me._calendar)||void 0===_||null===(S=_._months)||void 0===S||null===(k=S._month)||void 0===k||null===(w=k._daysGrid)||void 0===w?void 0:w._day._rangeEnd:{}),Ne?null===me||void 0===me||null===(x=me._calendar)||void 0===x||null===(j=x._months)||void 0===j||null===(E=j._month)||void 0===E||null===(T=E._daysGrid)||void 0===T?void 0:T._day._inRange:{}),Re?null===me||void 0===me||null===(P=me._calendar)||void 0===P||null===(N=P._months)||void 0===N||null===(R=N._month)||void 0===R||null===(L=R._daysGrid)||void 0===L?void 0:L._day._disabled:{}),Le?null===me||void 0===me||null===(Z=me._calendar)||void 0===Z||null===(A=Z._months)||void 0===A||null===(I=A._month)||void 0===I||null===(M=I._daysGrid)||void 0===M||null===(B=M._day)||void 0===B?void 0:B._upcomingDisabled:{}),Te&&Re?null===me||void 0===me||null===(F=me._calendar)||void 0===F||null===(G=F._months)||void 0===G||null===(K=G._month)||void 0===K||null===(X=K._daysGrid)||void 0===X?void 0:X._day._disabledStartOfRange:{}),Pe&&Re?null===me||void 0===me||null===(z=me._calendar)||void 0===z||null===(q=z._months)||void 0===q||null===(J=q._month)||void 0===J||null===(Q=J._daysGrid)||void 0===Q?void 0:Q._day._disabledEndOfRange:{}),Ze?null===me||void 0===me||null===(ee=me._calendar)||void 0===ee||null===(te=ee._months)||void 0===te||null===(ne=te._month)||void 0===ne||null===(oe=ne._daysGrid)||void 0===oe?void 0:oe._day._today:{}),{},{"&:hover .lowest-price-day, &:focus .lowest-price-day":{"--hover-color":null===me||void 0===me||null===(ie=me._calendar)||void 0===ie||null===(le=ie._months)||void 0===le||null===(re=le._month)||void 0===re||null===(ae=re._daysGrid)||void 0===ae||null===(se=ae._day)||void 0===se||null===(de=se._price)||void 0===de||null===(ue=de.__lowestFare)||void 0===ue?void 0:ue.color}})}),(0,ve.BX)(D.kC,{className:"flex-col items-center w-full h-full",children:[(0,ve.tZ)(D.kC,{className:v()("flex justify-center pt-1 xs:pt-0",{"mt-1":!W}),children:Oe}),(0,ve.tZ)(D.kC,{className:"justify-center",children:(Be||Ie)&&Se&&(0,ve.tZ)(D.xv,{as:"span",className:"flex justify-center w-full",children:Be})})]}))},onSelectingSignalUpdated:e=>{"START"!==e&&"END"!==e||ue(e)},showFaresPerDay:!0,summaryPanel:Ee,onChangeStartDate:e=>{var t;var n;!V&&$&&e!==Y&&(null===(n=B.onChangeEndDate)||void 0===n||n.call(B,"",{autoCleared:!0}),Ce(null));null===(t=B.onChangeStartDate)||void 0===t||t.call(B,e,{analyticsData:{hasFare:Te(e)}})},onChangeEndDate:e=>{var t;null===(t=B.onChangeEndDate)||void 0===t||t.call(B,e,{analyticsData:{hasFare:Te(e)}})}}))}Tt.defaultProps={origin:"",destination:"",isOneWay:!1,travelClass:"ECONOMY",getHistogram:()=>null,showLowestPriceIndicator:!0};var Pt=Tt;Re().string,Re().string,Re().bool,Re().oneOf(["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"]),Re().func,Re().bool;const Nt=["origin","destination","getHistogram"],Rt=["day","index","modifiers","_style","className"];function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEac
15h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e){var t,n,o,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z;const{origin:A,destination:I,getHistogram:M}=e,B=(0,O.Z)(e,Nt),{fareInsightsMaxDate:F,travelClass:G,isOneWay:V,startDate:Y,endDate:$,startDateConfig:K,endDateConfig:X,labels:H,_style:z,showLowestPriceIndicator:U,isFullScreen:W}=B,q=f()(),J=f()(Y),Q=(()=>{var e;return"number"===typeof F?f()().add(F,"d"):"string"===typeof F&&null!==(e=f()(F))&&void 0!==e&&e.isValid()?f()(F):null})(),ee=null!==Q&&void 0!==Q&&Q.isValid()?(0,vt.Z)(Q):null,te=(()=>{var e;let t=null;const n=null===K||void 0===K?void 0:K.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})(),ne=(0,vt.Z)(te),oe=(()=>{var e;let t=null;const n=null===K||void 0===K?void 0:K.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),ie=((0,vt.Z)(oe),(()=>{var e;let t=null;const n=null===X||void 0===X?void 0:X.minDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:q})()),le=(0,vt.Z)(ie),re=(()=>{var e;let t=null;const n=null===X||void 0===X?void 0:X.maxDate;return"string"===typeof n?t=f()(n):"number"===typeof n&&(t=f()().add(n,"d")),null!==(e=t)&&void 0!==e&&e.isValid()?t:f()().add(2,"years")})(),{0:ae,1:se}=((0,vt.Z)(re),(0,i.useState)("START")),{0:de,1:ue}=(0,i.useState)(!1),{0:ce,1:pe}=(0,i.useState)([]),{0:fe,1:ge}=(0,i.useState)({}),{0:ye,1:be}=(0,i.useState)(null),{0:me,1:he}=(0,i.useState)("-"),{0:_e,1:Oe}=(0,i.useState)(null),{0:De,1:Ce}=(0,i.useState)(null),Se=A&&I,ke=async({silent:e=!1,signal:t}={})=>{var n;const o=t||ae,i=(null===J||void 0===J?void 0:J.isValid())&&(null===Q||void 0===Q?void 0:Q.isValid())&&Q.isBefore(J,"d");if(!Se||i)return void pe([]);e||ue(!0);const l=Y||("START"===o?le:ne),r="START"===o?oe:re,a=$||(Q.isBefore(r,"d")?ee:(0,vt.Z)(r)),s=Y&&J.isValid()?J.diff(q,"d"):("START"===o?te:ie).diff(q,"d"),d=Q.isBefore(r,"d")?Q.diff(q,"d"):r.diff(q,"d"),u=Zt(Zt({origin:"START"===o?A:I,destination:"START"===o?I:A,departure:{start:l,end:a},priceBuckets:{active:!0,field:"TOTAL_PRICE",departureRange:{start:s,end:d}}},G&&{travelClasses:[G]}),{},{journeyType:"ONE_WAY",histogramType:"OUTBOUND"}),c=await M(u),v=null===c||void 0===c?void 0:c.buckets,p=null!==(n=null===c||void 0===c?void 0:c.histogram)&&void 0!==n?n:[];if(!e){var f;const e="object"===typeof v?null===v||void 0===v||null===(f=v.min)||void 0===f?void 0:f.lowestFare:null;be(null!=e?Math.round(e):null)}const g=Array.isArray(p)?p.reduce(((e,t)=>(null!==t&&void 0!==t&&t.date&&Array.isArray(null===t||void 0===t?void 0:t.fares)&&t.fares.length>0&&(e[t.date]=t.fares[0]),e)),{}):null;if(g){if(!e){var y;const e=Object.values(g)[0];he((null===e||void 0===e||null===(y=e.priceSpecification)||void 0===y?void 0:y.currencySymbol)||"-")}if("START"===o&&(ge(g),Y)){var b,m;const e=null===(b=g[Y])||void 0===b||null===(m=b.priceSpecification)||void 0===m?void 0:m.totalPrice;Oe(null!=e?Math.round(e):null)}e&&"END"!==o||pe(g)}else e&&"END"!==o||pe([]);e||setTimeout((()=>ue(!1)),400)};(0,i.useEffect)((()=>{Se&&ke()}),[A,I,G,V,M,Se]),(0,ot.N7)((()=>{Se&&(!V&&"END"===ae||""===Y&&""===$)&&ke({signal:ae})}),[Y,$,ae,V,Se]),(0,i.useEffect)((()=>{if(Y&&fe){var e,t,n,o;const i=null!=(null===(e=fe[Y])||void 0===e||null===(t=e.priceSpecification)||void 0===t?void 0:t.totalPrice)?Math.round(null===(n=fe[Y])||void 0===n||null===(o=n.priceSpecification)||void 0===o?void 0:o.totalPrice):null;Oe(i)}else Oe(null)}),[Y,fe]),(0,i.useEffect)((()=>{if($&&ce){var e,t,n,o;const i=null!=(null===(e=ce[$])||void 0===e||null===(t=e.priceSpecification)||void 0===t?void 0:t.totalPrice)?Math.round(null===(n=ce[$])||void 0===n||null===(o=n.priceSpecification)||void 0===o?void 0:o.totalPrice):null;Ce(i)}else Ce(null)}),[$,ce]),(0,ot.N7)((()=>{Se&&!V&&Y&&$&&ke({silent:!0,signal:"START"})}),[Y,$,V,Se]);const we=({type:e,overrideStyles:t,className:n})=>{var o,i,l,r,a,s;return(0,ve.tZ)("span",{className:n,css:(0,C.iv)(Zt(Zt(Zt({},null===z||void 0===z||null===(o=z.eds)||void 0===o||null===(i=o.components)||void 0===i||null===(l=i.datepicker)||void 0===l?void 0:l._priceBucketIndicator),null===z||void 0===z||null===(r=z.eds)||void 0===r||null===(a=r.components)||void 0===a||null===(s=a.datepicker)||void 0===s?void 0:s._priceBucketIndicator[`_${e}`]),t),"","")})},xe=Object.keys(ce).length>0?(0,ve.BX)(D.kC,{className:v()("w-full items-center",W?"flex-col justify-center space-y-2 py-4":"flex-row justify-between"),"aria-hidden":"true",children:[!W&&(0,ve.tZ)(D.xv,{_style:Zt({},null===z||void 0===z||null===(t=z.eds)||void 0===t||null===(n=t.typographies)||void 0===n?void 0:n.fs5),children:null===H||void 0===H?void 0:H.priceNoteLabel}),(0,ve.BX)(D.kC,{className:v()("items-center space-x-5 -my-1 rtl:space-x-reverse",W?"w-full justify-center":""),_style:Zt({},W?null===z||void 0===z||null===(o=z.eds)||void 0===o||null===(l=o.typographies)||void 0===l?void 0:l.fs6:null===z||void 0===z||null===(r=z.eds)||void 0===r||null===(a=r.typographies)||void 0===a?void 0:a.fs5),children:[U&&(0,ve.BX)(D.kC,{className:"items-center space-x-3.5 rtl:space-x-reverse",children:[(0,ve.tZ)(we,{type:"min"}),(0,ve.tZ)(D.xv,{children:null===H||void 0===H?void 0:H.lowestFaresLabel})]}),(0,ve.BX)(D.kC,{className:"items-center space-x-3 rtl:space-x-reverse",children:[(0,ve.tZ)(D.JO,{label:"search",_style:Zt(Zt({},null===z||void 0===z||null===(s=z.eds)||void 0===s||null===(d=s.typographies)||void 0===d?void 0:d.fsIcon),{},{fontSize:"20px",color:null===z||void 0===z||null===(u=z._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(g=p._daysGrid)||void 0===g||null===(y=g._day)||void 0===y||null===(b=y._price)||void 0===b?void 0:b.color})}),(0,ve.tZ)(D.xv,{children:null===H||void 0===H?void 0:H.searchForFaresLabel})]})]})]}):null,je=(0,i.useMemo)((()=>{const e={value:null,formatted:`${me}--`};if(!V){if(!Y||!$)return e;const t=[_e,De].map((e=>null!=e?Math.round(e):0)).reduce(((e,t)=>e+t),0);return t>0?{value:t,formatted:`${me} ${t}`}:e}return Y&&_e>0?{value:_e,formatted:`${me} ${_e}`}:e}),[V,Y,$,_e,De,me]),Ee=Object.keys(ce).length>0?(0,ve.BX)(D.kC,{className:v()("justify-center",W?"flex-col items-start px-2 space-y-1":"flex-row items-center justify-end px-6 space-x-2"),children:[(0,ve.BX)(D.kC,{className:"flex-row items-center space-x-1",children:[(0,ve.tZ)(D.xv,{_style:Zt({},W?null===z||void 0===z||null===(m=z.eds)||void 0===m||null===(h=m.typographies)||void 0===h?void 0:h.fs6:null===z||void 0===z||null===(_=z.eds)||void 0===_||null===(S=_.typographies)||void 0===S?void 0:S.fs5),children:null===H||void 0===H?void 0:H.from}),(0,ve.tZ)(D.xv,{_style:Zt(Zt(Zt({},null===z||void 0===z||null===(k=z.eds)||void 0===k||null===(w=k.typographies)||void 0===w?void 0:w.fs5),null===z||void 0===z||null===(x=z.eds)||void 0===x||null===(j=x.typographies)||void 0===j||null===(E=j.fs5)||void 0===E?void 0:E._bold),{},{color:null===z||void 0===z||null===(T=z.eds)||void 0===T||null===(P=T.colors)||void 0===P?void 0:P.primary}),children:je.formatted})]}),(0,ve.tZ)(D.xv,{className:v()(!W&&"whitespace-nowrap"),_style:Zt({},W?null===z||void 0===z||null===(N=z.eds)||void 0===N||null===(R=N.typographies)||void 0===R?void 0:R.fs6:null===z||void 0===z||null===(L=z.eds)||void 0===L||null===(Z=L.typographies)||void 0===Z?void 0:Z.fs5),children:V?null===H||void 0===H?void 0:H.oneWay:null===H||void 0===H?void 0:H.roundTrip})]}):null,Te=e=>{var t;const n=ce[(0,vt.Z)(f()(e))];return null!=(null===n||void 0===n||null===(t=n.priceSpecification)||void 0===t?void 0:t.totalPrice)};return(0,ve.tZ)(pt.Z,Zt(Zt({},B),{},{legend:xe,renderDay:e=>{var t,n,o,i,l,r,a,s,d,u,c,p,g,y,b,m,h,_,S,k,w,x,j,E,T,P,N,R,L,Z,A,I,M,B,F,G,K,X,z,q,J,Q,ee,te,ne,oe,ie,le,re,ae,se,ue,pe;const{day:ge,index:be,modifiers:me,_style:he,className:_e}=e,Oe=(0,O.Z)(e,Rt),De=null===ge||void 0===ge?void 0:ge.format("D"),Ce=(0,vt.Z)(ge),ke=!V&&!!Y&&!!$,xe=ke&&!(ke&&(Ce===Y||Ce===$)),je=Zt({},Oe),Ee=Zt({},me);!V&&Y&&!$&&f()(Ce).isBefore(f()(Y),"day")&&(Object.assign(je,{isDisabled:!0}),Object.assign(Ee,{disabled:!0}));const{singleSelection:Te,startOfRange:Pe,endOfRange:Ne,inRange:Re,disabled:Le,upcomingDisabled:Ze,today:Ae}=Ee,Ie=ke&&Ce===Y?null===fe||void 0===fe?void 0:fe[Ce]:null===ce||void 0===ce?void 0:ce[Ce],Me=de&&!Le&&!Te,Be=v()("group flex flex-col items-center space-y-1 focus:outline-none mt-2",{invisible:!ge,"cursor-not-allowed":Le,"cursor-pointer":!Le},{"skeleton-cell":Me});let Fe=null,Ge=null;const Ve=null===Ie||void 0===Ie?void 0:Ie.priceSpecification,Ye=null===he||void 0===he||null===(t=he._calendar)||void 0===t||null===(n=t._months)||void 0===n||null===(o=n._month)||void 0===o||null===(i=o._daysGrid)||void 0===i||null===(l=i._day)||void 0===l?void 0:l._price;if(!xe)if(Me)Fe=(0,ve.tZ)(D.kC,{_style:null===Ye||void 0===Ye?void 0:Ye.__skeleton}),Ge=null===H||void 0===H?void 0:H.loadingFaresLabel;else if(!Le)if(Ve){const{shortenedFormattedTotalPrice:e,formattedTotalPrice:t,formattedMinimum:n,currencySymbol:o="",totalPrice:i}=Ve,l=e||t||n,r=(Xe=o,"string"!==typeof(Ke=l)||"string"!==typeof Xe?Ke:Ke.replace(Xe,"").trim()),a=r&&!/[kK]/.test(r)?Math.round(parseFloat(r)):r,s=null!=i?Math.round(i):null,d=null!==ye&&s===ye;if(null!=s&&(Ge=`${s} ${o}${d&&U?`, ${null===H||void 0===H?void 0:H.lowestFaresAriaLabel}`:""}`),l){var $e;const e=Te||Pe||Ne,t=e?d&&U?"var(--hover-color, inherit)":"inherit":d&&U?null===Ye||void 0===Ye||null===($e=Ye.__lowestFare)||void 0===$e?void 0:$e.color:null===Ye||void 0===Ye?void 0:Ye.color;Fe=(0,ve.BX)(D.kC,{className:"flex flex-col-reverse items-center justify-center xs:flex-col",children:[(0,ve.tZ)(D.xv,{as:"span",_style:Zt(Zt({},Ye),{},{color:t}),className:v()(d&&e&&"lowest-price-day"),children:a}),d&&U&&(0,ve.tZ)(we,{type:"min",className:"lowest-price-day",overrideStyles:e?{backgroundColor:"var(--hover-color, white)"}:{}})]})}}else Object.keys(ce).length>0&&(Fe=(0,ve.tZ)(D.kC,{className:"flex flex-col items-center",children:(0,ve.tZ)(D.JO,{label:"search",_style:null===Ye||void 0===Ye?void 0:Ye.__noFares})}),Ge=null===H||void 0===H?void 0:H.noFaresAriaLabel);var Ke,Xe;return Ge&&Se&&!Le&&(je["aria-label"]=[je["aria-label"],Ge].filter(
15Boolean).join(", ")),(0,C.az)(D.zx,Zt(Zt({},je),{},{key:be,className:Be,_style:Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt({},null===he||void 0===he||null===(r=he._calendar)||void 0===r||null===(a=r._months)||void 0===a||null===(s=a._month)||void 0===s||null===(d=s._daysGrid)||void 0===d?void 0:d._day),Te||Pe&&Ne?null===he||void 0===he||null===(u=he._calendar)||void 0===u||null===(c=u._months)||void 0===c||null===(p=c._month)||void 0===p||null===(g=p._daysGrid)||void 0===g?void 0:g._day._singleSelection:{}),Pe&&!Ne?null===he||void 0===he||null===(y=he._calendar)||void 0===y||null===(b=y._months)||void 0===b||null===(m=b._month)||void 0===m||null===(h=m._daysGrid)||void 0===h?void 0:h._day._rangeStart:{}),Ne&&!Pe?null===he||void 0===he||null===(_=he._calendar)||void 0===_||null===(S=_._months)||void 0===S||null===(k=S._month)||void 0===k||null===(w=k._daysGrid)||void 0===w?void 0:w._day._rangeEnd:{}),Re?null===he||void 0===he||null===(x=he._calendar)||void 0===x||null===(j=x._months)||void 0===j||null===(E=j._month)||void 0===E||null===(T=E._daysGrid)||void 0===T?void 0:T._day._inRange:{}),Le?null===he||void 0===he||null===(P=he._calendar)||void 0===P||null===(N=P._months)||void 0===N||null===(R=N._month)||void 0===R||null===(L=R._daysGrid)||void 0===L?void 0:L._day._disabled:{}),Ze?null===he||void 0===he||null===(Z=he._calendar)||void 0===Z||null===(A=Z._months)||void 0===A||null===(I=A._month)||void 0===I||null===(M=I._daysGrid)||void 0===M||null===(B=M._day)||void 0===B?void 0:B._upcomingDisabled:{}),Pe&&Le?null===he||void 0===he||null===(F=he._calendar)||void 0===F||null===(G=F._months)||void 0===G||null===(K=G._month)||void 0===K||null===(X=K._daysGrid)||void 0===X?void 0:X._day._disabledStartOfRange:{}),Ne&&Le?null===he||void 0===he||null===(z=he._calendar)||void 0===z||null===(q=z._months)||void 0===q||null===(J=q._month)||void 0===J||null===(Q=J._daysGrid)||void 0===Q?void 0:Q._day._disabledEndOfRange:{}),Ae?null===he||void 0===he||null===(ee=he._calendar)||void 0===ee||null===(te=ee._months)||void 0===te||null===(ne=te._month)||void 0===ne||null===(oe=ne._daysGrid)||void 0===oe?void 0:oe._day._today:{}),{},{"&:hover .lowest-price-day, &:focus .lowest-price-day":{"--hover-color":null===he||void 0===he||null===(ie=he._calendar)||void 0===ie||null===(le=ie._months)||void 0===le||null===(re=le._month)||void 0===re||null===(ae=re._daysGrid)||void 0===ae||null===(se=ae._day)||void 0===se||null===(ue=se._price)||void 0===ue||null===(pe=ue.__lowestFare)||void 0===pe?void 0:pe.color}})}),(0,ve.BX)(D.kC,{className:"flex-col items-center w-full h-full",children:[(0,ve.tZ)(D.kC,{className:v()("flex justify-center pt-1 xs:pt-0",{"mt-1":!W}),children:De}),(0,ve.tZ)(D.kC,{className:"justify-center",children:(Fe||Me)&&Se&&(0,ve.tZ)(D.xv,{as:"span",className:"flex justify-center w-full",children:Fe})})]}))},onSelectingSignalUpdated:e=>{"START"!==e&&"END"!==e||se(e)},showFaresPerDay:!0,summaryPanel:Ee,onChangeStartDate:e=>{var t;var n;!V&&$&&e!==Y&&(null===(n=B.onChangeEndDate)||void 0===n||n.call(B,"",{autoCleared:!0}),Ce(null));null===(t=B.onChangeStartDate)||void 0===t||t.call(B,e,{analyticsData:{hasFare:Te(e)}})},onChangeEndDate:e=>{var t;null===(t=B.onChangeEndDate)||void 0===t||t.call(B,e,{analyticsData:{hasFare:Te(e)}})}}))}At.defaultProps={origin:"",destination:"",isOneWay:!1,travelClass:"ECONOMY",getHistogram:()=>null,showLowestPriceIndicator:!0};var It=At,Mt=n(76194);const Bt=["brandedValue"];function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var Gt=e=>{var t,n,i,l,r,a,d,u,c,v,p,g;const{context:b,settings:{componentsConfig:m,businessRules:h,initialState:{isAiPoweredSearchActive:_,origin:D,destination:C,departure:S,return:k,travelers:w,travelClass:x,brandedTravelClass:j,journeyType:E,useMiles:T,directFlights:P,promoCode:N,redemptionType:R,flexibleDates:L,paymentMethod:Z,datesConfig:{departure:A,return:I},deeplinkSiteEdition:M,currencyCode:B}}}=e,{paymentMethodSelector:{enabled:F}}=m,{journeyTypes:{options:G},travelers:{options:V},travelClasses:{options:Y},paymentMethod:{options:$}}=h,K=null!==(t=null===b||void 0===b||null===(n=b.datasource)||void 0===n?void 0:n.step)&&void 0!==t?t:"home",X=null!==(i=null===b||void 0===b||null===(l=b.geo)||void 0===l||null===(r=l.language)||void 0===r?void 0:r.lang)&&void 0!==i?i:"en",H=null!==(a=null===b||void 0===b||null===(d=b.geo)||void 0===d||null===(u=d.location)||void 0===u?void 0:u.user_input_origin_airport_code)&&void 0!==a?a:"",z=null!==(c=null===b||void 0===b||null===(v=b.geo)||void 0===v||null===(p=v.location)||void 0===p?void 0:p.user_input_destination_airport_code)&&void 0!==c?c:"",U=["from-city","city-to-city","city-to-country"].includes(K),W=["to-city","city-to-city","country-to-city"].includes(K),q=X.match(/^es(-|$)/)?"es":X.match(/^ar(-|$)/)?"ar-ly":X.match("no$")?"
15nb":X.match("sr-cyrl$")?"sr-cyrl":X.match("sr-latn$")?"sr":X.match("zh-TW$")?"zh-tw":X.match("zh-HK$")?"zh-hk":X.match("zh-CN$")?"zh-cn":X;if(!(0,y.yF)()&&"undefined"!==typeof f()&&!f().locales().includes(q)){var J,Q,ee;if(s()(window,`EM.___fcRuntime.vendors.momentLocales.${q}`,!1))f().locale(q,null===(J=EM)||void 0===J||null===(Q=J.___fcRuntime)||void 0===Q||null===(ee=Q.vendors)||void 0===ee?void 0:ee.momentLocales[q]);else(0,Mt.Z)(q)}f().locale(q);const te=(()=>{if(null==S||""===S)return"";const e="number"===typeof S?f()().add(S,"d"):f()(S).isValid()?f()(S):f()().add(7,"d"),{minDate:t,maxDate:n}=A,o="number"===typeof t?f()().add(t,"d"):f()(t).isValid()?f()(t):f()().add(7,"d"),i="number"===typeof n?f()().add(n,"d"):f()(n).isValid()?f()(n):f()().add(365,"d");return e.isBefore(o,"d")||e.isAfter(i,"d")?o.format("YYYY-MM-DD"):e.format("YYYY-MM-DD")})(),ne=(()=>{if(null==k||""===k)return"";const e="number"===typeof k?f()().add(k,"d"):f()(k).isValid()?f()(k):f()().add(7,"d"),{minDate:t,maxDate:n}=I,o="number"===typeof t?f()().add(t,"d"):f()(t).isValid()?f()(t):f()().add(14,"d"),i="number"===typeof n?f()().add(n,"d"):f()(n).isValid()?f()(n):f()().add(372,"d");return e.isBefore(o,"d")||o.isAfter(i,"d")?o.format("YYYY-MM-DD"):e.format("YYYY-MM-DD")})(),[oe]=Array.isArray(G)?G.filter((e=>e.value===E)):[!1],ie=!D&&U&&H,le=!C&&W&&z,re=Array.isArray(Y)?Y.map((e=>{const{brandedValue:t}=e,n=(0,O.Z)(e,Bt);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({brandedValue:"string"===typeof t&&t.length>0?t:null},n)})):[],ae="string"===typeof j&&j.length>0&&re.some((e=>(null===e||void 0===e?void 0:e.brandedValue)===j)),se=ae?re.find((e=>(null===e||void 0===e?void 0:e.brandedValue)===j)):null,de=ae?se.standardValue:null;return{isAiPoweredSearchActive:null!==_&&void 0!==_&&_,origin:ie?H:D,destination:le?z:C,datesConfig:{departure:A,return:I},departureDate:te,returnDate:null!==(g=f()(ne))&&void 0!==g&&g.isValid()?f()(ne).isBefore(te,"d")?f()(te).add(7,"days").format("YYYY-MM-DD"):f()(ne).format("YYYY-MM-DD"):"",travelers:V.reduce(((e,t)=>{const{id:n}=t;return w[n]?(e[n]=Number(w[n]),e):(e[n]=0,e)}),{}),travelerOptions:V,travelClass:ae?de:"string"===typeof x&&x.length>0&&Y.some((e=>e.value===x))?x:"ECONOMY",travelClassOptions:re,brandedTravelClass:ae?j:null,journeyType:oe?E:"rt",useMiles:T,directFlights:P,promoCode:N,redemptionType:R,flexibleDates:L,paymentMethod:Z,paymentMethodOptions:$,isPaymentMethodSelectorEnabled:F,discountTypes:{},discounts:{},origins:[],originsLoading:!1,destinations:[],destinationsLoading:!1,errors:{general:!1,origin:!1,destination:!1,departureDate:!1,returnDate:!1,paymentMethod:!1},generalErrorLabelKey:"",isFormLoading:!1,deeplinkSiteEdition:M||s()(b,"geo.language.site_edition",null),currencyCode:B}};function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $t={"SET_IS-FORM-LOADING":([e,{isFormLoading:t}])=>Yt(Yt({},e),"boolean"===typeof t?{isFormLoading:t}:{}),SET_AIPOWER_SEARCH_ACTIVE:([e,{isAiPoweredSearchActive:t}])=>Yt(Yt({},e),"boolean"===typeof t?{isAiPoweredSearchActive:t}:{}),"SET_GENERAL-ERROR-LABEL-KEY":([e,{generalErrorLabelKey:t}])=>Yt(Yt({},e),t?{generalErrorLabelKey:t}:{}),"SET_JOURNEY-TYPE":([e,{journeyType:t}])=>Yt(Yt({},e),"string"===typeof t?{journeyType:t}:{}),"SET_USE-MILES":([e,{useMiles:t}])=>Yt(Yt({},e),"boolean"===typeof t?{useMiles:t}:{}),"SET_DIRECT-FLIGHTS":([e,{directFlights:t}])=>Yt(Yt({},e),"boolean"===typeof t?{directFlights:t}:{}),"SET_REDEMPTION-TYPE":([e,{redemptionType:t}])=>Yt(Yt({},e),t?{redemptionType:t}:{}),"SET_FLEXIBLE-DATES":([e,{flexibleDates:t}])=>Yt(Yt({},e),"boolean"===typeof t?{flexibleDates:t}:{}),SET_ORIGIN:([e,{origin:t}])=>Yt(Yt({},e),"string"===typeof t?{origin:t}:{}),SET_ORIGINS:([e,{origins:t}])=>Yt(Yt({},e),Array.isArray(t)?{origins:t}:{}),"SET_ORIGINS-LOADING":([e,{loading:t}])=>Yt(Yt({},e),"boolean"===typeof t?{originsLoading:t}:{}),SET_DESTINATION:([e,{destination:t}])=>Yt(Yt({},e),"string"===typeof t?{destination:t}:{}),SET_DESTINATIONS:([e,{destinations:t}])=>Yt(Yt({},e),Array.isArray(t)?{destinations:t}:{}),"SET_DESTINATIONS-LOADING":([e,{loading:t}])=>Yt(Yt({},e),"boolean"===typeof t?{destinationsLoading:t}:{}),"SET_DEPARTURE-DATE":([e,{departureDate:t}])=>Yt(Yt(Yt({},e),f()(t).isValid()?{departureDate:f()(t).format("YYYY-MM-DD")}:{departureDate:""}),f().utc(t).isAfter(f().utc(e.returnDate),"d")?{returnDate:""}:{}),"SET_RETURN-DATE":([e,{returnDate:t}])=>Yt(Yt({},e),f()(t).isValid()?{returnDate:f()(t).format("YYYY-MM-DD")}:{returnDate:""}),"SET_DATES-CONFIG":([e,{datesConfig:t}])=>{var n,o;const i=e=>"object"===typeof e&&["minDate","maxDate","validDaysOfWeek","includedDates","excludedDates"].some((t=>e.hasOwnProperty(t)));return Yt(Yt({},e),{},{datesConfig:{departure:Yt(Yt({},null===e||void 0===e||null===(n=e.datesConfig)||void 0===n?void 0:n.departure),i(null===t||void 0===t?void 0:t.departure)?null===t||void 0===t?void 0:t.departure:{}),return:Yt(Yt({},null===e||void 0===e||null===(o=e.datesConfig)||void 0===o?void 0:o.return),i(null===t||void 0===t?void 0:t.return)?null===t||void 0===t?void 0:t.return:{})}})}
15,"SET_BRANDED-TRAVEL-CLASS":([e,{brandedTravelClass:t}])=>Yt(Yt({},e),"string"===typeof t?{brandedTravelClass:t}:{}),"SET_TRAVEL-CLASS":([e,{travelClass:t}])=>Yt(Yt(Yt({},e),"string"===typeof t?{travelClass:t}:{}),{farenetTravelClass:null}),"SET_TRAVEL-CLASS-OPTIONS":([e,{travelClassOptions:t}])=>Yt(Yt({},e),Array.isArray(t)?{travelClassOptions:t}:{}),SET_TRAVELERS:([e,{travelers:t}])=>Yt(Yt({},e),{},{travelers:Yt(Yt({},e.travelers),t||{})}),"SET_TRAVELER-OPTIONS":([e,{travelerOptions:t}])=>Yt(Yt({},e),Array.isArray(t)?{travelerOptions:t}:{}),"SET_PROMO-CODE":([e,{promoCode:t}])=>Yt(Yt({},e),"string"===typeof t?{promoCode:t}:{}),"SET_PAYMENT-METHOD":([e,{paymentMethod:t}])=>Yt(Yt({},e),"undefined"!==typeof t?{paymentMethod:t}:{}),"SET_PAYMENT-METHOD-OPTIONS":([e,{paymentMethodOptions:t}])=>Yt(Yt({},e),(Array.isArray(t),{paymentMethodOptions:t})),"SET_PAYMENT-METHOD-SELECTOR-ENABLED":([e,{isPaymentMethodSelectorEnabled:t}])=>Yt(Yt({},e),"boolean"===typeof t?{isPaymentMethodSelectorEnabled:t}:{}),"SET_DISCOUNTS-TYPES":([e,{discountTypes:t}])=>Yt(Yt({},e),"object"===typeof t?{discountTypes:t}:{}),SET_DISCOUNTS:([e,{discounts:t}])=>Yt(Yt({},e),"object"===typeof t?{discounts:t}:{}),SET_ERRORS:([e,{errors:t}])=>Yt(Yt({},e),{},{errors:Yt(Yt({},e.errors),t||{})})};var Kt=(e,t)=>{const{type:n,payload:o}=t;return"function"===typeof $t[n]?$t[n]([e,o]):()=>{throw new Error(`Action: ${n} not found`)}};const Xt=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r}=e,a=n?o.find((e=>e.value===n)):null,d=i?l.find((e=>e.value===i)):null;if(!a||!d)return t({type:"SET_GENERAL-ERROR-LABEL-KEY",payload:{generalErrorLabelKey:""}}),void t({type:"SET_ERRORS",payload:{errors:{general:!1}}});const u=s()(a,"iataCode",null),c=s()(a,"country.isoCode",null),v=s()(a,"region.identifierCode",null),p=s()(d,"iataCode",null),f=s()(d,"country.isoCode",null),g=s()(d,"region.identifierCode",null);return c&&v&&u&&f&&g&&p&&"US"!==c&&"US"!==f&&"CA"!==c&&"CA"!==f&&c!==f&&v===g&&!("SCL"===u&&"EZE"===p||"EZE"===u&&"SCL"===p)?(t({type:"SET_GENERAL-ERROR-LABEL-KEY",payload:{generalErrorLabelKey:"cmp-acmatchgroupnotcountry-error-phrase"}}),void t({type:"SET_ERRORS",payload:{errors:{general:!0}}})):c&&f&&c===f&&"US"!==c&&"CA"!==c?(t({type:"SET_GENERAL-ERROR-LABEL-KEY",payload:{generalErrorLabelKey:"cmp-acmatchcountrynotus-error-phrase"}}),void t({type:"SET_ERRORS",payload:{errors:{general:!0}}})):c&&f&&c===f&&"US"===c?(t({type:"SET_GENERAL-ERROR-LABEL-KEY",payload:{generalErrorLabelKey:"cmp-acmatchcountryus-error-phrase"}}),void t({type:"SET_ERRORS",payload:{errors:{general:!0}}})):(t({type:"SET_GENERAL-ERROR-LABEL-KEY",payload:{generalErrorLabelKey:""}}),void t({type:"SET_ERRORS",payload:{errors:{general:!1}}}))};function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ut=["LON","LHR","MAN","EDI"],Wt=({state:e,dispatch:t})=>{var n,o;const{origin:i,origins:l,destination:r,destinations:a,travelers:s,travelerOptions:d}=e,u=i?l.find((e=>e.value===i)):null,c=r?a.find((e=>e.value===r)):null,v=Ut.includes(null!==(n=null===u||void 0===u?void 0:u.iataCode)&&void 0!==n?n:""),p=Ut.includes(null!==(o=null===c||void 0===c?void 0:c.iataCode)&&void 0!==o?o:""),f=zt({},s),g=d.map((e=>"age5"===e.id?v||p?zt(zt({},e),{},{isDisabled:!1}):(f.age5=0,0===f.age1&&(f.age1=1),zt(zt({},e),{},{isDisabled:!0})):zt({},e)));t({type:"SET_TRAVELERS",payload:{travelers:f}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:g}})};const qt=["en-cm","en-cv","en-gh","en-lr","en-ng"];function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Jt(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const en=["LON","LHR","MAN","EDI","LGW","GLA"],tn=({state:e,dispatch:t})=>{const{origin:n,destination:o,travelers:i,travelerOptions:l}=e,r=en.find((e=>e===n||"")),a=en.find((e=>e===o||"")),s=Qt({},i),d=l.map((e=>"age2"===e.id?r||a?Qt(Qt({},e),{},{isDisabled:!1}):(s.age2=0,Qt(Qt({},e),{},{isDisabled:!0})):"age1"===e.id?Qt(Qt({},e),{},r||a?{labelKey:e.labelKeyAlt}:{labelKey:e.labelKeyDef}):Qt({},e)));t({type:"SET_TRAVELERS",payload:{travelers:s}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:d}})};function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ln=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s=n?o.find((e=>e.value===n)):{},d=!(!s||!s.country)&&(!!s.country.isoCode&&"GB"===s.country.isoCode),u=i?l.find((e=>e.value===i)):{},c=!(!u||!u.country)&&(!!u.country.isoCode&&"GB"===u.country.isoCode),v=on({},r),p=a.map((e=>"age4"===e.id?d||c?on(on({},e),{},{isDisabled:!1}):(v.age4=0,on(on({},e),{},{isDisabled:!0})):"age1"===e.id?on(on({},e),{},d||c?{labelKey:e.labelKeyAlt}:{labelKey:e.labelKeyDef}):on({},e)));t({type:"SET_TRAVELERS",payload:{travelers:v}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:p}})};function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const sn=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s="MNL"===n?o.find((e=>e.value===n)):null,d="MNL"===i?l.find((e=>e.value===i)):null,u="LHR"===n?o.find((e=>e.value===n)):null,c="LHR"===i?l.find((e=>e.value===i)):null,v=an({},r),p=a.map((e=>"age4"===e.id?u||c?an(an({},e),{},{isDisabled:!1}):(v.age4=0,an(an({},e),{},{isDisabled:!0})):"age5"===e.id?s||d?an(an({},e),{},{isDisabled:!1}):(v.age5=0,v.age1=0===v.age1?1:v.age1,an(an({},e),{},{isDisabled:!0})):an({},e)));t({type:"SET_TRAVELERS",payload:{travelers:v}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:p}})};function dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const cn=["LON","LHR","MAN","EDI","LGW","GLA","STN"],vn=({state:e,dispatch:t})=>{const{origin:n,destination:o,travelers:i,travelerOptions:l}=e,r=cn.find((e=>e===n||"")),a=cn.find((e=>e===o||"")),s=un({},i),d=l.map((e=>"age2"===e.id?r||a?un(un({},e),{},{isDisabled:!1}):(s.age2=0,un(un({},e),{},{isDisabled:!0})):"age1"===e.id?un(un({},e),{},r||a?{labelKey:e.labelKeyAlt}:{labelKey:e.labelKeyDef}):un({},e)));t({type:"SET_TRAVELERS",payload:{travelers:s}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:d}})};function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?pn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const gn=({state:e,dispatch:t})=>{const{origin:n,origins:o,departureDate:i,returnDate:l,destination:r,destinations:a,travelers:s,travelerOptions:d,travelClass:u}=e,c=n?o.find((e=>e.value===n)):{},v=r?a.find((e=>e.value===r)):{},p=!(null===c||void 0===c||!c.country)&&"GB"===c.country.isoCode||!(null===v||void 0===v||!v.country)&&"GB"===v.country.isoCode,g=!(null===c||void 0===c||!c.country)&&"PH"===c.country.isoCode||!(null===v||void 0===v||!v.country)&&"PH"===v.country.isoCode,y=fn({},s),b=d.map((e=>{if(p){if("age1"===e.id)return fn(fn({},e),{},{labelKey:e.labelKeyAlt});if("age4"===e.id)return fn(fn({},e),{},{isDisabled:!1})}return g&&"age5"===e.id?fn(fn({},e),{},{isDisabled:!1}):"age1"===e.id?fn(fn({},e),{},{labelKey:e.labelKeyDef}):"age4"===e.id?(y.age4=0,fn(fn({},e),{},{isDisabled:!0})):"age3"===e.id?"first"!==u.toLowerCase()?fn(fn({},e),{},{isDisabled:!1}):(y.age3=0,fn(fn({},e),{},{isDisabled:!0})):"age5"===e.id?(y.age5=0,fn(fn({},e),{},{isDisabled:!0})):fn({},e)}));y.age1=y.age1+y.age4+y.age5?y.age1:1,t({type:"SET_TRAVELERS",payload:{travelers:y}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:b}});const m=["LHE","ISB"].includes(n)?f()().add(3,"days"):f()();t({type:"SET_DATES-CONFIG",payload:{datesConfig:{departure:{minDate:m.format("YYYY-MM-DD")},return:{minDate:m.format("YYYY-MM-DD")}}}})};function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const mn=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s=n?o.find((e=>e.value===n)):{},d=i?l.find((e=>e.value===i)):{},u=!(null===s||void 0===s||!s.country)&&"GB"===s.country.isoCode||!(null===d||void 0===d||!d.country)&&"GB"===d.country.isoCode,c=bn(bn({},r),u?{}:{age4:0}),v=a.map((e=>"age4"===e.id?bn(bn({},e),{},{isDisabled:!u}):bn({},e)));t({type:"SET_TRAVELERS",payload:{travelers:c}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:v}})};function hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const On=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s=n?o.find((e=>e.value===n)):{},d=!(!s||!s.country)&&(!!s.country.isoCode&&"GB"===s.country.isoCode),u=i?l.find((e=>e.value===i)):{},c=!(!u||!u.country)&&(!!u.country.isoCode&&"GB"===u.country.isoCode),v=_n({},r),p=a.map((e=>"age4"===e.id?d||c?_n(_n({},e),{},{isDisabled:!1}):(v.age4=0,_n(_n({},e),{},{isDisabled:!0})):"age1"===e.id?_n(_n({},e),{},d||c?{labelKey:e.labelKeyAlt}:{labelKey:e.labelKeyDef}):_n({},e)));t({type:"SET_TRAVELERS",payload:{travelers:v}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:p}})};function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Dn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Sn=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s=n?o.find((e=>e.value===n)):{},d=!(!s||!s.country)&&(!!s.country.isoCode&&"GB"===s.country.isoCode),u=i?l.find((e=>e.value===i)):{},c=!(!u||!u.country)&&(!!u.country.isoCode&&"GB"===u.country.isoCode),v=Cn({},r),p=a.map((e=>"age4"===e.id?d||c?Cn(Cn({},e),{},{isDisabled:!1}):(v.age4=0,Cn(Cn({},e),{},{isDisabled:!0})):"age1"===e.id?Cn(Cn({},e),{},d||c?{labelKey:e.labelKeyAlt}:{labelKey:e.labelKeyDef}):Cn({},e)));t({type:"SET_TRAVELERS",payload:{travelers:v}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:p}})};function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xn=({state:e,dispatch:t})=>{var n,o,i;const{origin:l,origins:r,destination:a,destinations:s,travelers:d,travelerOptions:u}=e,c=l?r.find((e=>e.value===l)):{},v=a?s.find((e=>e.value===a)):{},p="GBR"===(null===c||void 0===c||null===(n=c.country)||void 0===n?void 0:n.isoCode.toUpperCase()),f="GBR"===(null===v||void 0===v||null===(o=v.country)||void 0===o||null===(i=o.isoCode)||void 0===i?void 0:i.toUpperCase()),g=p||f,y="UKY"===a,b="QYG"===a,[m,h]=u.reduce((([e,t],n)=>{if("age2"===(null===n||void 0===n?void 0:n.id)){const o=t.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));if(y){!(null===n||void 0===n||!n.isDisabled)||(Object.assign(o,{isDisabled:!0}),Object.assign(e,{age2:0}))}else Object.assign(o,{isDisabled:!1})}if("age3"===(null===n||void 0===n?void 0:n.id)){const o=t.find((e=>"age3"===(null===e||void 0===e?void 0:e.id)));if(g){!(null===n||void 0===n||!n.isDisabled)&&(Object.assign(o,{isDisabled:!1}),Object.assign(e,{age3:0}))}else Object.assign(o,{isDisabled:!0}),Object.assign(e,{age3:0}),(null===e||void 0===e?void 0:e.age1)<1&&Object.assign(e,{age1:1})}if("age4"===(null===n||void 0===n?void 0:n.id)){const o=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));if(y||b){!(null===n||void 0===n||!n.isDisabled)||(Object.assign(o,{isDisabled:!0}),Object.assign(e,{age4:0}))}else Object.assign(o,{isDisabled:!1})}return[e,t]}),[wn({},d),[...u]]);t({type:"SET_TRAVELERS",payload:{travelers:m}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:h}})};function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function En(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Tn=({state:e,dispatch:t})=>{var n,o,i,l,r,a,s,d;const{origin:u,origins:c,destination:v,destinations:p,travelers:f,travelerOptions:g}=e,y=u?c.find((e=>e.value===u)):null,b=v?p.find((e=>e.value===v)):null,m="object"===typeof y&&null!==y&&("object"===typeof b&&null!==b),h="GB"===(null===y||void 0===y||null===(n=y.country)||void 0===n?void 0:n.isoCode)||"2635167"===(null===y||void 0===y||null===(o=y.country)||void 0===o?void 0:o.geoId),_="GB"===(null===b||void 0===b||null===(i=b.country)||void 0===i?void 0:i.isoCode)||"2635167"===(null===b||void 0===b||null===(l=b.country)||void 0===l?void 0:l.geoId),O=m&&(h||_),D="PH"===(null===y||void 0===y||null===(r=y.country)||void 0===r?void 0:r.isoCode)||"1694008"===(null===y||void 0===y||null===(a=y.country)||void 0===a?void 0:a.geoId),C="PH"===(null===b||void 0===b||null===(s=b.country)||void 0===s?void 0:s.isoCode)||"1694008"===(null===b||void 0===b||null===(d=b.country)||void 0===d?void 0:d.geoId),S=m&&(D||C);const[k,w]=function([e,t]){var n,o;const i=En({},e),l=Object.keys(e).reduce(((t,n)=>["age1","age6"].includes(n)?t+e[n]:t),0);return 0===l&&Object.assign(i,{age3:0,age4:0,age5:0}),(null!==(n=null===i||void 0===i?void 0:i.age4)&&void 0!==n?n:0)+(null!==(o=null===i||void 0===i?void 0:i.age5)&&void 0!==o?o:0)>l&&Object.assign(i,{age4:0,age5:0}),0===Object.keys(i).reduce(((e,t)=>e+i[t]),0)&&Object.assign(i,{age1:1}),[i,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age2"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));O?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age2:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));S?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}return[e,t]}),[En({},e),[...t]])}([f,g]));t({type:"SET_TRAVELERS",payload:{travelers:k}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:w}})};function Pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Pn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Rn=({state:e,dispatch:t})=>{var n,o;const{origin:i,origins:l,destination:r,destinations:a,travelClassOptions:s,travelClass:d}=e,u=i?l.find((e=>e.value===i)):{},c=r?a.find((e=>e.value===r)):{},v=[null===u||void 0===u||null===(n=u.country)||void 0===n?void 0:n.isoCode,null===c||void 0===c||null===(o=c.country)||void 0===o?void 0:o.isoCode].every((e=>"SA"===e));t({type:"SET_TRAVEL-CLASS-OPTIONS",payload:{travelClassOptions:s.reduce(((e,t)=>(e.push(Nn(Nn({},t),{},{isDisabled:v&&"BUSINESS"===(null===t||void 0===t?void 0:t.value)})),e)),[])}}),v&&"BUSINESS"===d&&t({type:"SET_TRAVEL-CLASS",payload:{travelClass:"ECONOMY"}})};function Ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const An=({state:e,dispatch:t})=>{var n,o;const{origin:i,origins:l,destination:r,destinations:a,travelers:s,travelerOptions:d,travelClass:u,travelClassOptions:c}=e,v=i?l.find((e=>e.value===i)):null,p=r?a.find((e=>e.value===r)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g="PH"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode),y="PH"===(null===p||void 0===p||null===(o=p.country)||void 0===o?void 0:o.isoCode),b=f&&g&&y,m=f&&!b;const[h,_]=function([e,t]){const n=Zn({},e),o=Object.keys(e).reduce(((t,n)=>["age1","age1"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0}),(null===n||void 0===n?void 0:n.age3)>o&&Object.assign(n,{age3:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age4"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age4:0}))}if("age5"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age5"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age5:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));m?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}if("age8"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age8"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age8:0}))}if("age9"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age9"===(null===e||void 0===e?void 0:e.id)));m?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age9:0}))}if("age10"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age10"===(null===e||void 0===e?void 0:e.id)));m?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age10:0}))}return[e,t]}),[Zn({},e),[...t]])}([s,d]));t({type:"SET_TRAVELERS",payload:{travelers:h}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:_}})};function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?In(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEac
15h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Bn=["ABZ","BFS","BHX","BRS","CWL","EDI","GLA","HUY","JER","LBA","LHR","MAN","NWI","MME","NCL"],Fn=({state:e,dispatch:t})=>{var n,o;const{origin:i,origins:l,destination:r,destinations:a,travelers:s,travelerOptions:d}=e,u=i?l.find((e=>e.value===i)):null,c=r?a.find((e=>e.value===r)):null,v=Bn.includes(null!==(n=null===u||void 0===u?void 0:u.iataCode)&&void 0!==n?n:""),p=Bn.includes(null!==(o=null===c||void 0===c?void 0:c.iataCode)&&void 0!==o?o:""),f=Mn({},s),g=d.map((e=>"age4"===e.id?v||p?Mn(Mn({},e),{},{isDisabled:!1}):(f.age4=0,0===f.age1&&(f.age1=1),Mn(Mn({},e),{},{isDisabled:!0})):Mn({},e)));JSON.stringify(s)!==JSON.stringify(f)&&t({type:"SET_TRAVELERS",payload:{travelers:f}});JSON.stringify(d)!==JSON.stringify(g)&&t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:g}})};function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Yn=({state:e,dispatch:t})=>{var n,o,i,l;const{origin:r,origins:a,destination:s,destinations:d,travelers:u,travelerOptions:c}=e,v=r?a.find((e=>e.value===r)):null,p=s?d.find((e=>e.value===s)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g="IN"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode)||"1269750"===(null===v||void 0===v||null===(o=v.country)||void 0===o?void 0:o.geoId),y="IN"===(null===p||void 0===p||null===(i=p.country)||void 0===i?void 0:i.isoCode)||"1269750"===(null===p||void 0===p||null===(l=p.country)||void 0===l?void 0:l.geoId),b=f&&g&&y,m=f&&(g||y);const[h,_]=function([e,t]){const n=Vn({},e),o=Object.keys(e).reduce(((t,n)=>["age1","age5","age6"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0}),(null===n||void 0===n?void 0:n.age3)>o&&Object.assign(n,{age3:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age4"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));b||m||f?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age4:0}))}if("age5"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age5"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age5:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}return[e,t]}),[Vn({},e),[...t]])}([u,c]));t({type:"SET_TRAVELERS",payload:{travelers:h}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:_}})};function $n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$n(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Xn=({state:e,dispatch:t})=>{var n,o,i,l;const{origin:r,origins:a,destination:s,destinations:d,travelers:u,travelerOptions:c}=e,v=r?a.find((e=>e.value===r)):null,p=s?d.find((e=>e.value===s)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g=["LCY","LHR","LGW","LTN","STN","SEN"],y=g.includes(null===v||void 0===v?void 0:v.iataCode),b=g.includes(null===p||void 0===p?void 0:p.iataCode),m="PH"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode)||"1694008"===(null===v||void 0===v||null===(o=v.country)||void 0===o?void 0:o.geoId),h="PH"===(null===p||void 0===p||null===(i=p.country)||void 0===i?void 0:i.isoCode)||"1694008"===(null===p||void 0===p||null===(l=p.country)||void 0===l?void 0:l.geoId),_=f&&(y||b),O=f&&(m||h);const[D,C]=function([e,t]){var n,o;const i=Kn({},e),l=Object.keys(e).reduce(((t,n)=>["age1","age2","age6"].includes(n)?t+e[n]:t),0);0===l&&Object.assign(i,{age3:0});const r=null!==(n=null===i||void 0===i?void 0:i.age4)&&void 0!==n?n:0,a=null!==(o=null===i||void 0===i?void 0:i.age5)&&void 0!==o?o:0,s=r+a;if(s>l&&(0===r||0===a))0===r?Object.assign(i,{age5:l}):Object.assign(i,{age4:l});else if(s>l){const e=l-r;e>=0?Object.assign(i,{age5:e}):(Object.assign(i,{age4:l}),Object.assign(i,{age5:0}))}return 0===Object.keys(i).reduce(((e,t)=>e+i[t]),0)&&Object.assign(i,{age1:1}),[i,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age2"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));_?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age2:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));O?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}return[e,t]}),[Kn({},e),[...t]])}([u,c]));t({type:"SET_TRAVELERS",payload:{travelers:D}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:C}})};function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?Hn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Un=({state:e,dispatch:t})=>{var n,o,i,l;const{origin:r,origins:a,destination:s,destinations:d,travelers:u,travelerOptions:c}=e,v=r?a.find((e=>e.value===r)):null,p=s?d.find((e=>e.value===s)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g="GB"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode)||"2635167"===(null===v||void 0===v||null===(o=v.country)||void 0===o?void 0:o.geoId),y="GB"===(null===p||void 0===p||null===(i=p.country)||void 0===i?void 0:i.isoCode)||"2635167"===(null===p||void 0===p||null===(l=p.country)||void 0===l?void 0:l.geoId),b=f&&(g||y);const[m,h]=function([e,t]){const n=zn({},e),o=Object.keys(e).reduce(((t,n)=>["age1"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0}),(null===n||void 0===n?void 0:n.age3)>o&&Object.assign(n,{age3:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age4"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age4:0}))}return[e,t]}),[zn({},e),[...t]])}([u,c]));JSON.stringify(u)!==JSON.stringify(m)&&t({type:"SET_TRAVELERS",payload:{travelers:m}});JSON.stringify(c)!==JSON.stringify(h)&&t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:h}})};const Wn=({state:e,dispatch:t})=>{var n,o;const{origin:i,origins:l,destination:r,destinations:a,travelers:s,travelerOptions:d}=e,u=i?l.find((e=>e.value===i)):null,c=r?a.find((e=>e.value===r)):null,v="object"===typeof u&&null!==u&&("object"===typeof c&&null!==c),p="KZ"===(null===u||void 0===u||null===(n=u.country)||void 0===n?void 0:n.isoCode),f="KZ"===(null===c||void 0===c||null===(o=c.country)||void 0===o?void 0:o.isoCode),g=v&&p&&f;var y;t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:(y=d).reduce(((e,t)=>{if("age1"===(null===t||void 0===t?void 0:t.id)){const n=e.find((e=>"age1"===(null===e||void 0===e?void 0:e.id)));g?Object.assign(n,{labelKey:t.labelKeyDomestic}):Object.assign(n,{labelKey:t.labelKeyInternational})}if("age2"===(null===t||void 0===t?void 0:t.id)){const n=e.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));g?Object.assign(n,{labelKey:t.labelKeyDomestic}):Object.assign(n,{labelKey:t.labelKeyInternational})}return e}),[...y])}})};function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Qn=({state:e,dispatch:t})=>{var n,o,i,l;const{origin:r,origins:a,destination:s,destinations:d,travelers:u,travelerOptions:c}=e,v=r?a.find((e=>e.value===r)):null,p=s?d.find((e=>e.value===s)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g="IN"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode)||"1269750"===(null===v||void 0===v||null===(o=v.country)||void 0===o?void 0:o.geoId),y="IN"===(null===p||void 0===p||null===(i=p.country)||void 0===i?void 0:i.isoCode)||"1269750"===(null===p||void 0===p||null===(l=p.country)||void 0===l?void 0:l.geoId),b=f&&g&&y;const[m,h]=function([e,t]){const n=Jn({},e),o=Object.keys(e).reduce(((t,n)=>["age1","age3","age5","age6","age8"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0}),(null===n||void 0===n?void 0:n.age3)>o&&Object.assign(n,{age3:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age5"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age5"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age5:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));b?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}return[e,t]}),[Jn({},e),[...t]])}([u,c]));t({type:"SET_TRAVELERS",payload:{travelers:m}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:h}})};function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function to(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?eo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const no=["fr-mu","en-mu"],oo=({state:e,metadata:t,dispatch:n})=>{const{origin:o,origins:i,destination:l,destinations:r,travelers:a,travelerOptions:s}=e,{siteEdition:d}=t,u=no.includes(d);o&&i.find((e=>e.value===o)),l&&r.find((e=>e.value===l));const[c,v]=function([e,t]){const n=to({},e),o=Object.keys(e).reduce(((t,n)=>["age1"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0,age3:0}),(null===n||void 0===n?void 0:n.age3)>o&&Object.assign(n,{age3:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age4"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));u?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age4:0}))}if("age5"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age5"===(null===e||void 0===e?void 0:e.id)));u?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age5:0}))}return[e,t]}),[to({},e),[...t]])}([a,s]));n({type:"SET_TRAVELERS",payload:{travelers:c}}),n({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:v}})};function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?io(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ro=({state:e,dispatch:t})=>{var n,o,i,l,r,a,s,d;const{origin:u,origins:c,destination:v,destinations:p,travelers:f,travelerOptions:g}=e,y=u?c.find((e=>e.value===u)):null,b=v?p.find((e=>e.value===v)):null,m="object"===typeof y&&null!==y&&("object"===typeof b&&null!==b),h="US"===(null===y||void 0===y||null===(n=y.country)||void 0===n?void 0:n.isoCode)||"6252001"===(null===y||void 0===y||null===(o=y.country)||void 0===o?void 0:o.geoId),_="US"===(null===b||void 0===b||null===(i=b.country)||void 0===i?void 0:i.isoCode)||"6252001"===(null===b||void 0===b||null===(l=b.country)||void 0===l?void 0:l.geoId),O="CA"===(null===y||void 0===y||null===(r=y.country)||void 0===r?void 0:r.isoCode)||"6251999"===(null===y||void 0===y||null===(a=y.country)||void 0===a?void 0:a.geoId),D="CA"===(null===b||void 0===b||null===(s=b.country)||void 0===s?void 0:s.isoCode)||"6251999"===(null===b||void 0===b||null===(d=b.country)||void 0===d?void 0:d.geoId),C=m&&(h||_||O||D);const[S,k]=function([e,t]){const n=lo({},e);return 0===Object.keys(e).reduce(((t,n)=>["age1"].includes(n)?t+e[n]:t),0)&&Object.assign(n,{age7:0}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age2"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));C?(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age2:0})):Object.assign(n,{isDisabled:!1})}if("age4"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age4"===(null===e||void 0===e?void 0:e.id)));C?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age4:0}))}if("age3"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age3"===(null===e||void 0===e?void 0:e.id)));C?(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age3:0})):Object.assign(n,{isDisabled:!1})}if("age5"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age5"===(null===e||void 0===e?void 0:e.id)));C?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age5:0}))}return[e,t]}),[lo({},e),[...t]])}([f,g]));t({type:"SET_TRAVELERS",payload:{travelers:S}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:k}})};function ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
15t%2?ao(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ao(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const uo=({state:e,dispatch:t})=>{const{origin:n,origins:o,destination:i,destinations:l,travelers:r,travelerOptions:a}=e,s=n?o.find((e=>e.value===n)):null,d=i?l.find((e=>e.value===i)):null,u="object"===typeof s&&null!==s&&("object"===typeof d&&null!==d),c="LHR"===(null===s||void 0===s?void 0:s.iataCode),v="LHR"===(null===d||void 0===d?void 0:d.iataCode),p=u&&(c||v);const[f,g]=function([e,t]){const n=so({},e),o=Object.keys(e).reduce(((t,n)=>["age1"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age2:0,age3:0}),(null===n||void 0===n?void 0:n.age4)>o&&Object.assign(n,{age4:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age1"===(null===n||void 0===n?void 0:n.id)){const e=t.find((e=>"age1"===(null===e||void 0===e?void 0:e.id)));p?Object.assign(e,{labelKey:n.labelKeyAlt,noteLabelKey:n.noteLabelKeyAlt}):Object.assign(e,{labelKey:n.labelKeyDef,noteLabelKey:n.noteLabelKeyDef})}if("age3"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age3"===(null===e||void 0===e?void 0:e.id)));p?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age3:0}))}return[e,t]}),[so({},e),[...t]])}([r,a]));t({type:"SET_TRAVELERS",payload:{travelers:f}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:g}})};function co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?co(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const po=({state:e,dispatch:t})=>{var n,o,i,l;const{origin:r,origins:a,destination:s,destinations:d,travelers:u,travelerOptions:c}=e,v=r?a.find((e=>e.value===r)):null,p=s?d.find((e=>e.value===s)):null,f="object"===typeof v&&null!==v&&("object"===typeof p&&null!==p),g=("LON"===(null===v||void 0===v?void 0:v.iataCode)||"LHR"===(null===v||void 0===v?void 0:v.iataCode))&&"GB"===(null===v||void 0===v||null===(n=v.country)||void 0===n?void 0:n.isoCode),y=("LON"===(null===p||void 0===p?void 0:p.iataCode)||"LHR"===(null===p||void 0===p?void 0:p.iataCode))&&"GB"===(null===p||void 0===p||null===(o=p.country)||void 0===o?void 0:o.isoCode),b="MNL"===(null===v||void 0===v?void 0:v.iataCode)&&"PH"===(null===v||void 0===v||null===(i=v.country)||void 0===i?void 0:i.isoCode),m="MNL"===(null===p||void 0===p?void 0:p.iataCode)&&"PH"===(null===p||void 0===p||null===(l=p.country)||void 0===l?void 0:l.isoCode),h=(g||y)&&f,_=(b||m)&&f;const[O,D]=function([e,t]){const n=vo({},e),o=Object.keys(e).reduce(((t,n)=>["age1","age6"].includes(n)?t+e[n]:t),0);return 0===o&&Object.assign(n,{age3:0}),(null===n||void 0===n?void 0:n.age5)>o&&Object.assign(n,{age5:o}),0===Object.keys(n).reduce(((e,t)=>e+n[t]),0)&&Object.assign(n,{age1:1}),[n,t]}(function([e,t]){return t.reduce((([e,t],n)=>{if("age2"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age2"===(null===e||void 0===e?void 0:e.id)));h?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age2:0}))}if("age6"===(null===n||void 0===n?void 0:n.id)){const n=t.find((e=>"age6"===(null===e||void 0===e?void 0:e.id)));_?Object.assign(n,{isDisabled:!1}):(Object.assign(n,{isDisabled:!0}),Object.assign(e,{age6:0}))}return[e,t]}),[vo({},e),[...t]])}([u,c]));t({type:"SET_TRAVELERS",payload:{travelers:O}}),t({type:"SET_TRAVELER-OPTIONS",payload:{travelerOptions:D}})};const fo={ac:{onChangeOrigin:Xt,onChangeDestination:Xt,onChangeTravelers:Xt,onLoad:Xt},a3:{onChangeOrigin:Wt,onChangeDestination:Wt,onChangeOrigins:Wt,onChangeDestinations:Wt},at:{onLoad:(...e)=>{(({state:e,metadata:t,dispatch:n})=>{const{departureDate:o}=e,{siteEdition:i}=t;qt.find((e=>e===i))&&n({type:"SET_DATES-CONFIG",payload:{datesConfig:{departure:{minDate:f()().add(1,"d").format("YYYY-MM-DD")},return:{minDate:f()().add(1,"d").format("YYYY-MM-DD")}}}})})(...e)}},fi:{onChangeOrigin:tn,onChangeDestination:tn,onLoad:tn},tg:{onChangeOrigin:ln,onChangeDestination:ln,onChangeOrigins:ln,onChangeDestinations:ln},bi:{onChangeOrigin:sn,onChangeDestination:sn,onChangeOrigins:sn,onChangeDestinations:sn},og:{onChangeOrigin:vn,onChangeDestination:vn,onLoad:vn},ku:{onChangeOrigin:gn,onChangeDestination:gn,onChangeOrigins:gn,onChangeDestinations:gn,onChangeTravelClass:gn},ju:{onChangeOrigin:mn,onChangeDestination:mn,onChangeOrigins:mn,onChangeDestinations:mn},n0:{onChangeOrigin:On,onChangeDestination:On,onChangeOrigins:On,onChangeDestinations:On},cx:{onChangeOrigin:Sn,onChangeDestination:Sn,onChangeOrigins:Sn,onChangeDestinations:Sn},jl:{onChangeOrigin:xn,onChangeDestination:xn,onChangeOrigins:xn,onChangeDestinations:xn},ey:{onChangeOrigin:Tn,onChangeDestination:Tn,onChangeOrigins:Tn,onChangeDestinations:Tn},xy:{onChangeOrigin:Rn,onChangeDestination:Rn,onChangeOrigins:Rn,onChangeDestinations:Rn},pr:{onChangeOrigin:An,onChangeDestination:An,onChangeOrigins:An,onChangeDestinations:An}
15,ci:{onChangeOrigin:Fn,onChangeDestination:Fn,onChangeOrigins:Fn,onChangeDestinations:Fn},ai:{onChangeOrigin:Yn,onChangeDestination:Yn,onChangeOrigins:Yn,onChangeDestinations:Yn},sv:{onChangeOrigin:Xn,onChangeDestination:Xn,onChangeOrigins:Xn,onChangeDestinations:Xn},tp:{onChangeOrigin:Un,onChangeDestination:Un,onChangeOrigins:Un,onChangeDestinations:Un},kc:{onChangeOrigin:Wn,onChangeDestination:Wn,onChangeOrigins:Wn,onChangeDestinations:Wn},qp:{onChangeOrigin:Qn,onChangeDestination:Qn,onChangeOrigins:Qn,onChangeDestinations:Qn},mk:{onChangeOrigin:oo,onChangeDestination:oo,onChangeOrigins:oo,onChangeDestinations:oo},zg:{onChangeOrigin:ro,onChangeDestination:ro,onChangeOrigins:ro,onChangeDestinations:ro},ul:{onChangeOrigin:uo,onChangeDestination:uo,onChangeOrigins:uo,onChangeDestinations:uo},rx:{onChangeOrigin:po,onChangeDestination:po,onChangeOrigins:po,onChangeDestinations:po}};var go=(e,t,n)=>e&&t&&n&&"undefined"!==typeof fo[e]&&"undefined"!==typeof fo[e][t]?fo[e][t](n):null;function yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function bo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const mo="aladdin_gen_ai_user_session",ho="aladdin_gen_ai_user_remaining_attempts",_o=18e5;function Oo(e){var t,n,o,l,a,d;const{isPopup:c=!1,invoker:p,cmpConfig:b,children:m}=e,{name:O,alias:C,context:S,settings:k,servicesConfig:w,services:x,theme:j}=b,{deeplink:E,airports:T,labels:P,histogram:N,sputnikSearch:R,blackoutDates:L,discounts:Z,aiPoweredSearch:A,aladdinGenAiCounter:I}=w,{componentsConfig:M,labelKeys:B,businessRules:F,tracking:G,initialState:{datesConfig:V}}=k,{events:Y,actionLabels:$}=G,K=bo(bo({},S),p?{popupInvokerName:p}:{}),X=s()(K,"airline.code",""),H=s()(K,"audience.device_category","desktop"),z="rtl"===s()(K,"geo.language.textDirection","LTR").toLowerCase(),U=s()(K,"geo.language.site_edition","en"),W=s()(K,"geo.language.site_edition_country_geo_id",null),q=s()(K,"geo.language.siteEditionLanguage","en"),J=s()(K,"geo.language.lang","en"),Q=s()(K,"geo.language.siteEditionMarket",""),ee=s()(K,"datasource.url",""),te=Boolean(null===b||void 0===b||null===(t=b.globalSettings)||void 0===t||null===(n=t.priceFormat)||void 0===n?void 0:n.currencyCode),ne=/^\d+$/.test(W),oe=!(null===T||void 0===T||!T.useCountryGeoId)&&ne,{template:ie,primaryFiltersInputGroupVariant:le,secondaryFiltersToRender:re,backgroundImage:{enabled:ae,url:se,padding:de},title:ue,subtitle:ce,stickyBooking:pe,journeyTypeSelector:fe,useMilesSelector:ge,directFlightsSelector:ye,flexibleDatesSwitch:be,travelClassSelector:me,travelersInfoSelector:he,redemptionTypeSelector:_e,discountSelector:Oe,promoCodeSelector:De,locationSelector:Ce,dateSelector:Se,disclaimer:ke,errorsSummary:we,paymentMethodSelector:xe,aiPoweredSearch:je}=M,{msCombinable:Ee,blackoutDatesIntegration:Te,useMiles:{options:Pe},directFlights:{options:Ne},journeyTypes:{options:Re},travelers:{rules:Le}}=F,{title:Ze,subtitle:Ae,journeyType:Ie,useMiles:Me,directFlights:Be,travelers:Fe,travelClass:Ge,promoCode:Ve,redemptionType:Ye,discountSelector:$e,paymentMethod:Ke,multicity:Xe,origin:Ue,destination:We,dateSelector:qe,flexibleDates:Je,searchButton:Qe,disclaimer:st,stickyBooking:dt,route:vt,aiPoweredSearch:pt}=B,{0:ft,1:gt}=(0,i.useReducer)(Kt,b,Gt),{isAiPoweredSearchActive:yt,origin:bt,destination:mt,departureDate:_t,returnDate:Ot,travelers:Dt,travelerOptions:Ct,travelClass:St,brandedTravelClass:wt,travelClassOptions:xt,discounts:jt,discountTypes:Et,journeyType:Tt,useMiles:Nt,directFlights:Rt,promoCode:Lt,redemptionType:Zt,flexibleDates:At,paymentMethod:Mt,paymentMethodOptions:Bt,isPaymentMethodSelectorEnabled:Ft,origins:Vt,originsLoading:Yt,destinations:$t,destinationsLoading:Xt,errors:Ht,generalErrorLabelKey:zt,isFormLoading:Ut,deeplinkSiteEdition:Wt,currencyCode:qt}=ft,[Jt,Qt,en]=He(mo,null,{expires:_o}),[tn,nn,on]=He(ho,null,{expires:_o});async function ln(){try{var e;const t=nt({endpoint:null===I||void 0===I||null===(e=I.config)||void 0===e?void 0:e.endpoint.replace("%%tenantCode%%",X),headers:{}}),n=await t.get();if(!n)return null;const{value:o,session:i}=n;return nn(o),Qt(i),n}catch(t){return console.error("Error reconciling gen ai cookies",t),null}}(0,i.useEffect)((()=>{c||(null!==je&&void 0!==je&&je.enabled?ln():(on(),en()))}),[]);const rn=f()(_t).isValid()?f()(_t).format(null!==(o=null===Se||void 0===Se?void 0:Se.dateFormat)&&void 0!==o?o:"dd"):null,an=f()(Ot).isValid()?f()(Ot).format(null!==(l=null===Se||void 0===Se?void 0:Se.dateFormat)&&void 0!==l?l:"dd"):null,[sn]=Array.isArray(Vt)&&Vt.length?Vt.filter((e=>e.iataCode===bt)):[null],[dn]=Array.isArray($t)&&$t.length?$t.filter((e=>e.iataCode===mt)):[null],un=Object.values(Dt).reduce(((e,t)=>e+Number(t)),0),cn=Ct.reduce(((e,t)=>(e[t.trackingCountLabel||t.id]=Dt[t.id],e)),{}),vn="string"===typeof wt&&wt.length>0,pn=xt.map((e=>bo(bo({},e),vn?{standardValue:null===e||void 0===e?void 0:e.value,value:null===e||void 0===e?void 0:e.brandedValue}:{}))),fn=vn?wt:St,gn=pn.find((e=>
15e.value===fn));function yn(e){if("string"===typeof e&&0!==e.length)if(vn){gt({type:"SET_BRANDED-TRAVEL-CLASS",payload:{brandedTravelClass:e}});const t=pn.find((t=>t.value===e));null!==t&&void 0!==t&&t.standardValue&&gt({type:"SET_TRAVEL-CLASS",payload:{travelClass:t.standardValue}})}else gt({type:"SET_TRAVEL-CLASS",payload:{travelClass:e}})}const{current:bn}=(0,i.useRef)(x||{}),{useTheme:mn}=(0,i.useContext)(_.Z),hn=(0,i.useRef)(!0),_n=(0,i.useRef)(!0),On=(0,i.useRef)(!0),Dn=(0,ot.e6)(),{width:Cn}=(0,ot.nP)(),Sn="desktop"===H&&Cn>=1024,{0:kn,1:wn}=(0,i.useState)(!1),{0:xn,1:jn}=(0,i.useState)(!1),En=(0,i.useRef)({}),[Tn,Pn,Nn,Rn,Ln,Zn]=(0,ot.Me)(6,`${O}-id-`),An=["errorSummary","origin","destination","departureDate","returnDate","travelers","travelClass","journeyType","promoCode","redemptionType","paymentMethod","submitButton"].reduce(((e,t)=>bo(bo({},e),{},{[t]:(0,i.useRef)(null)})),{}),In=e=>{go(X,e,{state:ft,dispatch:gt,metadata:{language:q,siteEdition:U,countryGeoId:W}})};(0,i.useEffect)((()=>{Fn(),(async()=>{gt({type:"SET_ORIGINS-LOADING",payload:{loading:!0}}),gt({type:"SET_DESTINATIONS-LOADING",payload:{loading:!0}});const[e,t]=await Promise.all([bn.airports.getOrigins({destination:mt,query:bo({},oe?{filterFields:[{name:"countryGeoId",values:[W]}]}:{})}),bn.airports.getDestinations({origin:bt})]);Array.isArray(e)&&e.length&&gt({type:"SET_ORIGINS",payload:{origins:e}}),gt({type:"SET_ORIGINS-LOADING",payload:{loading:!1}}),Array.isArray(t)&&t.length&&gt({type:"SET_DESTINATIONS",payload:{destinations:t}}),gt({type:"SET_DESTINATIONS-LOADING",payload:{loading:!1}}),In("onLoad")})()}),[]),(0,i.useEffect)((()=>{const{urlParameter:e=""}=De,t=(0,y.mn)(window.location.search,e);t&&gt({type:"SET_PROMO-CODE",payload:{promoCode:t}})}),[]),(0,i.useEffect)((()=>{Te&&async function(){if(bt&&mt)try{const e=await bn.blackoutDates.getDates({origin:bt,destination:mt,isRoundtrip:"rt"===Tt});gt({type:"SET_DATES-CONFIG",payload:{datesConfig:e}})}catch(e){}else gt({type:"SET_DATES-CONFIG",payload:{datesConfig:V}})}()}),[bt,mt,Tt]),(0,i.useEffect)((()=>{re.includes("discountSelector")&&async function(){if(!bt||!mt)return void gt({type:"SET_DISCOUNTS-TYPES",payload:{discountTypes:{}}});const e=await bn.discounts.getDiscountTypes({origin:bt,destination:mt,market:U}),t=Object.keys(e).reduce(((t,n)=>{const o=e[n],i=Bn(o.label),l=o.options.map((e=>bo(bo({},e),{},{label:Bn(e.label)})));return t[n]=bo(bo({},o),{},{label:i,options:l}),t}),{});gt({type:"SET_DISCOUNTS-TYPES",payload:{discountTypes:t}})}()}),[bt,mt]),(0,i.useEffect)((()=>{const e=Object.keys(Et).reduce(((e,t)=>{const n=Et[t],o=jt[t],i="string"===typeof o&&n.options.some((e=>e.id===o)),l=n.options.find((e=>!0===e.nullOp));return"object"===typeof n&&(e[t]=i?o:null===l||void 0===l?void 0:l.id),e}),{});!u()(e,jt)&&gt({type:"SET_DISCOUNTS",payload:{discounts:e}})}),[Et]);const Mn=e=>{if(null===Se||void 0===Se||!Se.isPremium)return;if(null!==Se&&void 0!==Se&&Se.isFareInsights)return null!==e&&void 0!==e&&e.hasFare?null===$||void 0===$?void 0:$.dateWithFare:null===$||void 0===$?void 0:$.dateWithoutFareInsights;return{min:null===$||void 0===$?void 0:$.dateWithLowFare,avg:null===$||void 0===$?void 0:$.dateWithMediumFare,max:null===$||void 0===$?void 0:$.dateWithHighFare}[null===e||void 0===e?void 0:e.bucket]||(null===$||void 0===$?void 0:$.dateWithoutFareInsights)};[{key:"origin",callback:async()=>{const{origin:e}=ft;Gn(Y.changeOrigin.id),gt({type:"SET_ERRORS",payload:{errors:{origin:!1}}}),gt({type:"SET_DESTINATIONS-LOADING",payload:{loading:!0}});const t=await bn.airports.getDestinations({origin:e});gt({type:"SET_DESTINATIONS",payload:{destinations:t}}),gt({type:"SET_DESTINATIONS-LOADING",payload:{loading:!1}}),In("onChangeOrigin")}},{key:"origins",callback:()=>{const[e]=Vt.filter((e=>e.value===bt));e||gt({type:"SET_ORIGIN",payload:{origin:""}}),In("onChangeOrigins")}},{key:"destination",callback:async()=>{const{destination:e}=ft;Gn(Y.changeDestination.id),gt({type:"SET_ERRORS",payload:{errors:{destination:!1}}}),gt({type:"SET_ORIGINS-LOADING",payload:{loading:!0}});const t=await bn.airports.getOrigins({destination:e,query:bo({},oe?{filterFields:[{name:"countryGeoId",values:[W]}]}:{})});gt({type:"SET_ORIGINS",payload:{origins:t}}),gt({type:"SET_ORIGINS-LOADING",payload:{loading:!1}}),In("onChangeDestination")}},{key:"destinations",callback:()=>{const[e]=$t.filter((e=>e.value===mt));e||gt({type:"SET_DESTINATION",payload:{destination:""}}),In("onChangeDestinations")}},{key:"departureDate",callback:()=>{var e,t;const n=!!_t,o=_n.current&&n?Y.selectDeparture.id:Y.changeDeparture.id;n&&(_n.current=!1);const i=null===En||void 0===En||null===(e=En.current)||void 0===e||null===(t=e.departure)||void 0===t?void 0:t.analyticsData,l=Mn(i);Gn(o,l?{actionLabel:l}:{}),gt({type:"SET_ERRORS",payload:{errors:{departureDate:!1}}}),In("onChangeDepartureDate")}},{key:"returnDate",callback:()=>
15{if(!xn){var e,t;const n=!!Ot,o=On.current&&n?Y.selectReturn.id:Y.changeReturn.id;n&&(On.current=!1);const i=null===En||void 0===En||null===(e=En.current)||void 0===e||null===(t=e.return)||void 0===t?void 0:t.analyticsData,l=Mn(i);Gn(o,l?{actionLabel:l}:{})}gt({type:"SET_ERRORS",payload:{errors:{returnDate:!1}}}),In("onChangeReturnDate")}},{key:"paymentMethod",callback:async()=>{Gn(Y.changePaymentMethod.id),gt({type:"SET_ERRORS",payload:{errors:{paymentMethod:!1}}}),In("onChangePaymentMethod")}},{key:"isPaymentMethodSelectorEnabled",callback:async()=>{const{isPaymentMethodSelectorEnabled:e}=ft;e||gt({type:"SET_ERRORS",payload:{errors:{paymentMethod:!1}}})}},{key:"journeyType",callback:()=>{Gn(Y.changeJourneyType.id),gt({type:"SET_ERRORS",payload:{errors:{returnDate:!1}}}),In("onChangeJourneyType")}},{key:"travelers",callback:()=>{Gn(Y.changeTravelers.id),In("onChangeTravelers")}},{key:"travelClass",callback:()=>{Gn(Y.changeTravelClass.id),In("onChangeTravelClass")}},{key:"promoCode",callback:()=>{Gn(Y.changePromoCode.id),In("onChangePromoCode")}},{key:"redemptionType",callback:()=>{Gn(Y.changeRedemptionType.id),In("onChangeRedemptionType")}},{key:"flexibleDates",callback:()=>{Gn(Y.changeFlexibleDates.id),In("onChangeFlexibleDates")}},{key:"directFlights",callback:()=>{Gn(Y.changeDirectFlights.id),In("changeDirectFlights")}},{key:"useMiles",callback:()=>{var e;const t=null===(e=Pe.find((e=>e.value===Nt)))||void 0===e?void 0:e.labelKey,n=Bn(t);Gn(Y.changeUseMiles.id,{actionLabel:n}),In("changeUseMiles")}},{key:"datesConfig",callback:()=>{var e,t;h(_t,null===ft||void 0===ft||null===(e=ft.datesConfig)||void 0===e?void 0:e.departure)&&gt({type:"SET_DEPARTURE-DATE",payload:{departureDate:""}}),h(Ot,null===ft||void 0===ft||null===(t=ft.datesConfig)||void 0===t?void 0:t.return)&&gt({type:"SET_RETURN-DATE",payload:{returnDate:""}})}},{key:"discounts",callback:()=>{var e;hn.current?hn.current=!1:Gn(null===Y||void 0===Y||null===(e=Y.changeDiscounts)||void 0===e?void 0:e.id,{actionLabel:Object.keys(jt).map((e=>{var t;const n=null===(t=Et[e])||void 0===t?void 0:t.options.find((t=>t.id===jt[e]));return Bn(null===n||void 0===n?void 0:n.label)})).join(", "),discounts:jt})}},{key:"isAiPoweredSearchActive",callback:()=>{var e,t;Gn(yt?null===Y||void 0===Y||null===(e=Y.enterAiPoweredSearch)||void 0===e?void 0:e.id:null===Y||void 0===Y||null===(t=Y.exitAiPoweredSearch)||void 0===t?void 0:t.id)}}].reduce(((e,{key:t,callback:n})=>{(0,ot.N7)((()=>{n()}),[ft[t]])}),[]),(0,ot.N7)((()=>{var e,t,n,o,i,l,r,a,s,d;Ht.origin?null===An||void 0===An||null===(e=An.origin)||void 0===e||null===(t=e.current)||void 0===t||t.focus():Ht.destination?null===An||void 0===An||null===(n=An.destination)||void 0===n||null===(o=n.current)||void 0===o||o.focus():Ht.departureDate?null===An||void 0===An||null===(i=An.departureDate)||void 0===i||null===(l=i.current)||void 0===l||l.focus():Ht.returnDate?null===An||void 0===An||null===(r=An.returnDate)||void 0===r||null===(a=r.current)||void 0===a||a.focus():Ht.paymentMethod&&(null===An||void 0===An||null===(s=An.paymentMethod)||void 0===s||null===(d=s.current)||void 0===d||d.focus())}),[Ht.general,Ht.origin,Ht.destination,Ht.departureDate,Ht.returnDate,Ht.paymentMethod]);const Bn=e=>{var t;return"undefined"===typeof e?"":"function"!==typeof(null===(t=bn.labels)||void 0===t?void 0:t.translate)?e:bn.labels.translate(e)},Fn=()=>{if("undefined"===typeof bn.labels&&(bn.labels=new tt.p8(P,K)),"undefined"===typeof bn.airports){var e,t,n,o;const i={endpoint:null===T||void 0===T||null===(e=T.sourceConfig)||void 0===e||null===(t=e.endPoints)||void 0===t?void 0:t.searchAirports.replace("%%airlineCode%%",X),headers:null===T||void 0===T||null===(n=T.sourceConfig)||void 0===n?void 0:n.headers,labelStructure:null===T||void 0===T?void 0:T.labelStructure,query:bo(bo({},null===T||void 0===T?void 0:T.query),{},{outputFields:[...new Set(["locationLabel","name",...null===T||void 0===T||null===(o=T.query)||void 0===o?void 0:o.outputFields])],language:J},!0===(null===T||void 0===T?void 0:T.useMarket)?{market:Q}:{})};bn.airports=(0,tt.$1)(i)}if("undefined"===typeof bn.deeplink&&(bn.deeplink=new tt.de(E,K)),"undefined"===typeof bn.histogram){const{config:{endpoint:e,axiosConfig:t,options:n},query:o}=N,i=e.replace("%%tenantCode%%",X);bn.histogram=(0,tt.KX)({config:{endpoint:i,axiosConfig:t,options:n},staticQuery:bo(bo({},o),{},{autoSettings:{language:q,market:Q}})})}if("undefined"===typeof bn.sputnikSearch){const{config:{endpoint:e,axiosConfig:t,options:n},query:o}=R,i=e.replace("%%tenantCode%%",X);bn.sputnikSearch=(0,tt.Ar)({endpoint:i,headers:bo({},null===t||void 0===t?void 0:t.headers),query:bo(bo({},o),{},{autoSettings:{language:q,market:Q}})})}if("undefined"===typeof bn.pubsub&&(bn.pubsub=new tt.mW),"undefined"===typeof bn.blackoutDates&&Te&&(bn.blackoutDates=(0,tt.xn)(L,X)),"undefined"===typeof bn.discounts){const{config:{endpoint:e,axiosConfig:t,options:n},query:o,_:i}=Z,l=e.replace("%%tenantCode%%",X);bn.discounts=(0,tt.$v)({config:{endpoint:l,axiosConfig:t,options:n},staticQuery:o})}return bn},Gn=(e,t={})=>{try{var n,o;g.zW.formatAirlines(bo(bo({},t),{},{event:e,eventAction:e,timestamp:(new Date).valueOf(),tenantCode:X,airlineIataCode:X,originAirportIataCode:bt,originCountryCode:null===sn||void 0===sn||null===(n=sn.country)||void 0===n?void 0:n.isoCode,destinationAirportIataCode:mt,destinationCountryCode:null===dn||void 0===dn||null===(o=dn.country)||void 0===o?void 0:o.isoCode,currencyCode:qt,discountCode:Lt,isFlexibleDates:At,departureDate:_t,returnDate:"ow"===Tt?"":Ot,url:ee,module:O,moduleId:C||O,journeyType:Tt,deeplinkSiteEdition:Wt,miles:Nt,fareClass:St,passenger:bo({count:un},cn)}))}catch(i){}},Vn=(0,i.useMemo)((()=>Ct.map((e=>{const{id:t}=e;return{">=":[{var:t},0]}}))),Ct),Yn=e=>{if("object"!==typeof e||!Object.keys(e).length)return!1;const t={and:[...Vn,...Le.and?Le.and:Le]};return null===r()||void 0===r()?void 0:r().apply(t,e)},$n=e=>{const t={journeyTypeSelector:()=>{var e,t,n,o,i,l,r,a,s,d,u,v,p,f;const g=Re.find((e=>(null===e||void 0===e?void 0:e.value)===Tt)),y=[];if(null!==fe&&void 0!==fe&&null!==(e=fe.multicity)&&void 0!==e&&e.enabled){var b,m,h,_;const e=Bn(Xe.label),t=Bn(Xe.ariaLabel),n="string"===typeof(null===fe||void 0===fe||null===(b=fe.multicity)||void 0===b?void 0:b.href)?null===(m=fe.multicity)||void 0===m?void 0:m.href:null===(h=fe.multicity)||void 0===h||null===(_=h.href)||void 0===_?void 0:_[null!==Wt&&void 0!==Wt?Wt:U];y.push({optionLabel:e,ariaLabel:t,onSelect:()=>window.open(n,"_top")})}return(0,ve.tZ)(it.Z,{"data-att":"f2_journey-type",inputGroupVariant:"2",isModal:Dn&&!c||!Sn,isRTL:z,value:Tt,options:null===Re||void 0===Re?void 0:Re.map((e=>bo(bo({},e),{},{label:Bn(null===e||void 0===e?void 0:e.labelKey)}))),nonSelectableOptions:y,onChange:e=>{"string"===typeof e&&e.startsWith("nonSelectable")?(e=>{const t=parseInt(e.match(/\d+$/),10);y[t].onSelect()})(e):gt({type:"SET_JOURNEY-TYPE",payload:{journeyType:e}})},labels:{innerLabel:Bn(null===g||void 0===g?void 0:g.labelKey),ariaLabel:`${Bn(null===Ie||void 0===Ie?void 0:Ie.ariaLabel)}, ${Bn(null===g||void 0===g?void 0:g.labelKey)}`,modalTitle:"",modalDescription:"",doneButton:Bn(null===Ie||void 0===Ie?void 0:Ie.doneButton)},icon:null===fe||void 0===fe?void 0:fe.icon,_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo({},null===j||void 0===j||null===(t=j.eds)||void 0===t||null===(n=t.components)||void 0===n||null===(o=n.inputGroups)||void 0===o?void 0:o.secondary),_menu:{_nonSelectableOption:bo({},null===j||void 0===j||null===(i=j["flights-booking"])||void 0===i||null===(l=i._filters)||void 0===l||null===(r=l._journeyTypeSelector)||void 0===r||null===(a=r._menu)||void 0===a||null===(s=a._multicity)||void 0===s?void 0:s._link)},_radioGroup:{_nonSelectableOption:bo({},null===j||void 0===j||null===(d=j["flights-booking"])||void 0===d||null===(u=d._filters)||void 0===u||null===(v=u._journeyTypeSelector)||void 0===v||null===(p=v._menu)||void 0===p||null===(f=p._multicity)||void 0===f?void 0:f._link)},_modal:{}}})},travelersInfoSelector:()=>{var e,t,n,o,i,l,r,a,s,d,u,v,p,f,g,y,b,m,h,_,O,D,C,S,k,w,x,E,T,P,N,R,L;return(0,ve.tZ)(rt.Z,bo({"data-att":"f2_traveler-info",inputGroupVariant:"2",isModal:Dn&&!c||!Sn,isRTL:z,labels:Object.keys(Fe).reduce(((e,t)=>(e[t]=Bn(Fe[t]),e)),{}),icon:he.icon,selectedTravelers:Dt,travelerOptions:Ct.map((e=>bo(bo({},e),{},{label:Bn(e.labelKey),noteLabel:Bn(e.noteLabelKey)}))),onChangeTravelers:e=>{gt({type:"SET_TRAVELERS",payload:{travelers:e}})},areTravelersValid:Yn,maxPassengersMessageConfig:bo(bo({},null===he||void 0===he?void 0:he.maxPassengersMessageConfig),{},{link:{enabled:null===he||void 0===he||null===(e=he.maxPassengersMessageConfig)||void 0===e||null===(t=e.link)||void 0===t?void 0:t.enabled,url:"string"===typeof(null===he||void 0===he||null===(n=he.maxPassengersMessageConfig)||void 0===n||null===(o=n.link)||void 0===o?void 0:o.url)?null===he||void 0===he||null===(i=he.maxPassengersMessageConfig)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.url:null===he||void 0===he||null===(r=he.maxPassengersMessageConfig)||void 0===r||null===(a=r.link)||void 0===a||null===(s=a.url)||void 0===s?void 0:s[null!==Wt&&void 0!==Wt?Wt:U]}}),_style:bo(bo({_inputGroup:mn(["eds.components.inputGroups.secondary"])},mn(["flights-booking._filters._travelersInfoSelector"])),{},{_maxPassengersAlert:bo(bo({color:null===j||void 0===j||null===(d=j.eds)||void 0===d||null===(u=d.colors)||void 0===u?void 0:u.primary,background:null===j||void 0===j||null===(v=j.eds)||void 0===v||null===(p=v.colors)||void 0===p?void 0:p.backgroundMain,border:`1px solid ${null===j||void 0===j||null===(f=j.eds)||void 0===f||null===(g=f.colors)||void 0===g?void 0:g.primary}`,borderRadius:null===j||void 0===j||null===(y=j.eds)||void 0===y||null===(b=y.utilities)||void 0===b?void 0:b.borderRadius},mn(["flights-booking._filters._travelersInfoSelector._maxPassengersAlert"])),{},{_message:bo(bo(bo({},null===j||void 0===j||null===(m=j.eds)||void 0===m||null===(h=m.typographies)||void 0===h?void 0:h.fs5),null===j||void 0===j||null===(_=j.eds)||void 0===_||null===(O=_.typographies)||void 0===O||null===(D=O.fs5)||void 0===D?void 0:D._bold),{},{color:null===j||void 0===j||null===(C=j.eds)||void 0===C||null===(S=C.colors)||void 0===S?void 0:S.primary},mn(["flights-booking._filters._travelersInfoSelector._maxPassengersAlert._message"])),_description:bo(bo({},null===j||void 0===j||null===(k=j.eds)||void 0===k||null===(w=k.typographies)||void 0===w?void 0:w.fs5),{},{color:null===j||void 0===j||null===(x=j.eds)||void 0===x||null===(E=x.colors)||void 0===E?void 0:E.primary},mn(["flights-booking._filters._travelersInfoSelector._maxPassengersAlert._description"])),_link:bo({color:null===j||void 0===j||null===(T=j.eds)||void 0===T||null===(P=T.colors)||void 0===P?void 0:P.primary},mn(["flights-booking._filters._travelersInfoSelector._maxPassengersAlert._link"])),_icon:bo({fontFamily:null===j||void 0===j||null===(N=j.eds)||void 0===N||null===(R=N.typographies)||void 0===R||null===(L=R.fsIcon)||void 0===L?void 0:L.fontFamily,fontSize:"20px"},mn(["flights-booking._filters._travelersInfoSelector._maxPassengersAlert._icon"]))})})},he.isTravelClassSelectorEnabled?{travelClassSelectorEnabled:!0,selectedTravelClassOption:bo(bo({},gn),{},{label:Bn(null===gn||void 0===gn?void 0:gn.labelKey)}),TravelClassSelector:()=>{var e,t,n,o,i,l,r,a,s,d,u;return(0,ve.tZ)(it.Z,{"data-att":"f2_travel-class",inputGroupVariant:"2",isModal:!1,icon:me.icon,isRTL:z,value:vn?wt:St,options:pn.filter((e=>!(null!==e&&void 0!==e&&e.isDisabled))).map((e=>bo({label:Bn(e.labelKey)},e))),onChange:e=>yn(e),labels:{inputGroupLabel:Bn(null===Ge||void 0===Ge?void 0:Ge.label),innerLabel:Bn(null===gn||void 0===gn?void 0:gn.labelKey),ariaLabel:`${Bn(null===Ge||void 0===Ge?void 0:Ge.ariaLabel)}, ${Bn(null===gn||void 0===gn?void 0:gn.labelKey)}`,doneButton:Bn(null===Ge||void 0===Ge?void 0:Ge.doneButton)},_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo(bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.primary),null===j||void 0===j||null===(o=j["flights-booking"])||void 0===o||null===(i=o._filters)||void 0===i||null===(l=i._travelersInfoSelector)||void 0===l||null===(r=l._travelClassSelectorSection)||void 0===r||null===(a=r._travelClassSelector)||void 0===a?void 0:a._inputGroup),_menu:{_nonSelectableOption:bo({},null===j||void 0===j||null===(s=j.eds)||void 0===s||null===(d=s.typographies)||void 0===d||null===(u=d.fs5)||void 0===u?void 0:u._link)}}})}}:{}))},travelClassSelector:()=>{var e,t,n,o,i,l,r,a,s;const d=xt.find((e=>(null===e||void 0===e?void 0:e.value)===St));return(0,ve.tZ)(it.Z,{"data-att":"f2_travel-class",inputGroupVariant:"2",isModal:Dn&&!c||!Sn,icon:me.icon,isRTL:z,value:vn?wt:St,options:pn.filter((e=>!(null!==e&&void 0!==e&&e.isDisabled))).map((e=>bo({label:Bn(e.labelKey)},e))),onChange:e=>yn(e),labels:{innerLabel:Bn(null===d||void 0===d?void 0:d.labelKey),ariaLabel:`${Bn(null===Ge||void 0===Ge?void 0:Ge.ariaLabel)}, ${Bn(null===d||void 0===d?void 0:d.labelKey)}`,modalTitle:"",modalDescription:"",doneButton:Bn(null===Ge||void 0===Ge?void 0:Ge.doneButton)},_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.secondary),_menu:{_nonSelectableOption:bo({},null===j||void 0===j||null===(o=j.eds)||void 0===o||null===(i=o.typographies)||void 0===i||null===(l=i.fs5)||void 0===l?void 0:l._link)},_radioGroup:{_nonSelectableOption:bo({},null===j||void 0===j||null===(r=j.eds)||void 0===r||null===(a=r.typographies)||void 0===a||null===(s=a.fs5)||void 0===s?void 0:s._link)},_modal:{}}})},useMilesSelector:()=>{var e,t,n,o,i,l,r,a,s;const d=Nt?"true":"false",u=Pe.find((e=>(null===e||void 0===e?void 0:e.value)===Nt));return(0,ve.tZ)(it.Z,{"data-att":"f2_use-miles",inputGroupVariant:"2",isRTL:z,isModal:Dn&&!c||!Sn,value:d,options:Pe.map((e=>bo(bo({label:Bn(e.labelKey)},e),{},{value:String(e.value)}))),icon:ge.icon,onChange:e=>{gt({type:"SET_USE-MILES",payload:{useMiles:"true"===e}})},labels:{innerLabel:Bn(null===u||void 0===u?void 0:u.labelKey),ariaLabel:`${Bn(null===Me||void 0===Me?void 0:Me.ariaLabel)}, ${Bn(null===u||void 0===u?void 0:u.labelKey)}`,modalTitle:"",modalDescription:"",doneButton:Bn(null===Me||void 0===Me?void 0:Me.doneButton)},_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.secondary),_menu:{_nonSelectableOption:bo({},null===j||void 0===j||null===(o=j.eds)||void 0===o||null===(i=o.typographies)||void 0===i||null===(l=i.fs5)||void 0===l?void 0:l._link)},_radioGroup:{_nonSelectableOption:bo({},null===j||void 0===j||null===(r=j.eds)||void 0===r||null===(a=r.typographies)||void 0===a||null===(s=a.fs5)||void 0===s?void 0:s._link)},_modal:{}}})},directFlightsSelector:()=>{var e,t,n,o,i,l,r,a,s;const d=Rt?"true":"false",u=Ne.find((e=>(null===e||void 0===e?void 0:e.value)===Rt));return(0,ve.tZ)(it.Z,{"data-att":"f2_direct-flights",inputGroupVariant:"2",isRTL:z,isModal:Dn&&!c||!Sn,value:d,options:Ne.map((e=>bo(bo({label:Bn(e.labelKey)},e),{},{value:String(e.value)}))),icon:null===ye||void 0===ye?void 0:ye.icon,onChange:e=>{gt({type:"SET_DIRECT-FLIGHTS",payload:{directFlights:"true"===e}})},labels:{innerLabel:Bn(null===u||void 0===u?void 0:u.labelKey),ariaLabel:`${Bn(null===Be||void 0===Be?void 0:Be.ariaLabel)}, ${Bn(null===u||void 0===u?void 0:u.labelKey)}`,modalTitle:"",modalDescription:"",doneButton:Bn(null===Be||void 0===Be?void 0:Be.doneButton)},_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.secondary),_menu:{_nonSelectableOption:bo({},null===j||void 0===j||null===(o=j.eds)||void 0===o||null===(i=o.typographies)||void 0===i||null===(l=i.fs5)||void 0===l?void 0:l._link)},_radioGroup:{_nonSelectableOption:bo({},null===j||void 0===j||null===(r=j.eds)||void 0===r||null===(a=r.typographies)||void 0===a||null===(s=a.fs5)||void 0===s?void 0:s._link)},_modal:{}}})},promoCodeSelector:()=>(0,ve.tZ)(at.Z,{"data-att":"f2_promo-code",id:Ln,inputGroup
15Variant:"2",isModal:Dn&&!c||!Sn,isRTL:z,value:Lt,labels:Object.keys(Ve).reduce(((e,t)=>(e[t]=Bn(Ve[t]),e)),{}),onChangeValue:e=>gt({type:"SET_PROMO-CODE",payload:{promoCode:e}}),icon:De.icon,_style:bo({_inputGroup:mn(["eds.components.inputGroups.secondary"])},mn(["flights-booking._filters._promoCodeSelector"]))}),discountSelector:()=>bt&&mt&&"object"===typeof Et&&Object.keys(Et).length>0?(0,ve.tZ)(ut,{"data-att":"f2_discount-selector",isModal:Dn&&!c||!Sn,isRTL:z,inputGroupVariant:"2",discountTypes:Et,selected:jt,onChange:(e,t)=>gt({type:"SET_DISCOUNTS",payload:{discounts:bo(bo({},jt),{},{[e]:t})}}),labels:Object.keys($e).reduce(((e,t)=>(e[t]=Bn($e[t]),e)),{}),icon:Oe.icon,_style:bo({_inputGroup:mn(["eds.components.inputGroups.secondary"])},mn(["flights-booking._filters._discountsSelector"]))}):null,aiPoweredSearch:()=>{var e,t,n;return c?null:(0,ve.tZ)(D.zx,{"data-att":"f2_ai-powered-search","aria-label":Bn(pt.toggleA11y),leftIcon:je.toggle.leftIcon&&(0,ve.tZ)(ze,{className:"",_style:{color:"white",width:"18px",height:"20px"}}),rightIcon:je.toggle.rightIcon&&(0,ve.tZ)(ze,{className:"",_style:{color:"white",width:"18px",height:"20px"}}),className:v()("flex flex-nowrap justify-center items-center gap-[4px] p-[8px]"),onClick:()=>{gt({type:"SET_AIPOWER_SEARCH_ACTIVE",payload:{isAiPoweredSearchActive:!0}})},_style:bo(bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.secondary),{},{color:mn("eds.colors.backgroundMain"),background:mn("eds.colors.primary"),textDecoration:"none",border:"none","&:hover, &:focus":{color:mn("eds.colors.backgroundMain"),background:`linear-gradient(to left, ${mn("eds.colors.primary")} 30%, #b277fb 50%, ${mn("eds.colors.primary")} 70%)`,animation:"backgroundAi 3s ease",backgroundSize:"200% 200%",border:"none"},"@keyframes backgroundAi":{"0%":{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0% 50%"}}}),children:Bn(pt.toggle)})}};return"string"!==typeof e||0===e.length||"function"!==typeof t[e]?null:t[e]()},Kn=e=>({origin:()=>{var e;return(0,ve.tZ)(lt.Z,{"data-att":"f1_origin",id:Tn,ref:An.origin,isLoading:Yt,inputGroupVariant:le,minCharactersCountToOpen:Ce.minCharactersCountToOpen,value:bt,options:Vt,menuHeightPopover:Ce.menuHeightPopover,optionsToRenderPopover:Ce.optionsToRenderPopover,optionHeightModal:Ce.optionHeightModal,labels:{label:Bn(Ue.label),ariaLabel:Bn(Ue.ariaLabel),placeholder:Bn(Ue.placeholder),noOptionsMessage:Bn(Ue.noOptions),clearButtonLabel:Bn(Ue.clearButtonLabel),errorMessage:Ht.origin?Bn(Ue.errorMsg):"",modalTitle:Bn(null===Ue||void 0===Ue?void 0:Ue.modalTitle),modalDescription:Bn(null===Ue||void 0===Ue?void 0:Ue.modalDescription),modalClearButton:Bn(null===Ue||void 0===Ue?void 0:Ue.modalClearButton),modalDoneButton:Bn(null===Ue||void 0===Ue?void 0:Ue.modalDoneButton)},leftIcon:Ce.originLeftIcon,rightIcon:null!==(e=Ce.originRightIcon)&&void 0!==e?e:Ce.rightIcon,clearIcon:Ce.clearIcon,onChange:e=>{gt({type:"SET_ORIGIN",payload:{origin:e}})},onClear:()=>{gt({type:"SET_ORIGIN",payload:{origin:""}})},isModal:Dn&&!c||!Sn,isRTL:z,searchConfig:Ce.searchConfig,textTransform:Ce.textTransform,_style:bo({_inputGroup:mn(["eds.components.inputGroups.primary"])},mn(["flights-booking._filters._locationSelector"]))})},destination:()=>{var e;return(0,ve.tZ)(lt.Z,{"data-att":"f1_destination",id:Pn,ref:An.destination,isLoading:Xt,inputGroupVariant:le,minCharactersCountToOpen:Ce.minCharactersCountToOpen,value:mt,options:$t,menuHeightPopover:Ce.menuHeightPopover,optionsToRenderPopover:Ce.optionsToRenderPopover,optionHeightModal:Ce.optionHeightModal,labels:{label:Bn(We.label),ariaLabel:Bn(We.ariaLabel),placeholder:Bn(We.placeholder),noOptionsMessage:Bn(We.noOptions),clearButtonLabel:Bn(We.clearButtonLabel),errorMessage:Ht.destination?Bn(We.errorMsg):"",modalTitle:Bn(null===We||void 0===We?void 0:We.modalTitle),modalDescription:Bn(null===We||void 0===We?void 0:We.modalDescription),modalClearButton:Bn(null===We||void 0===We?void 0:We.modalClearButton),modalDoneButton:Bn(null===We||void 0===We?void 0:We.modalDoneButton)},leftIcon:Ce.destinationLeftIcon,rightIcon:null!==(e=Ce.destinationRightIcon)&&void 0!==e?e:Ce.rightIcon,clearIcon:Ce.clearIcon,onChange:e=>{gt({type:"SET_DESTINATION",payload:{destination:e}})},onClear:()=>{gt({type:"SET_DESTINATION",payload:{destination:""}})},isModal:Dn&&!c||!Sn,isRTL:z,searchConfig:Ce.searchConfig,textTransform:Ce.textTransform,_style:bo({_inputGroup:mn(["eds.components.inputGroups.primary"])},mn(["flights-booking._filters._locationSelector"]))})},dateSelector:()=>{const e=null!==Se&&void 0!==Se&&Se.isFlexibleDatesSwitchEnabled?(0,ve.tZ)(D.rs,{"data-att":"flex-dates",isDisabled:!1,content:be.icon,isLabelPassive:be.isLabelPassive,label:Bn(Je.label),checked:At,onChange:e=>gt({type:"SET_FLEXIBLE-DATES",payload:{flexibleDates:e}}),_style:mn(["eds.components.switch"])}):null;return(()=>{var t,n,o,i,l,r,a,s,d;const u=bo(bo({isCombinable:Ee,startDateRef:An.departureDate,endD
15ateRef:An.returnDate,startDate:_t,endDate:"rt"===Tt?Ot:"",isOneWay:"ow"===Tt,isReturnDateAlwaysVisible:null===Se||void 0===Se?void 0:Se.isReturnDateAlwaysVisible,startDateConfig:null===ft||void 0===ft||null===(t=ft.datesConfig)||void 0===t?void 0:t.departure,endDateConfig:null===ft||void 0===ft||null===(n=ft.datesConfig)||void 0===n?void 0:n.return,isFullScreen:Dn&&!c||!Sn,inputGroupVariant:le,inputGroupIcon:"today",isRTL:z,displayDateFormat:Se.dateFormat,editDateFormat:Se.dateFormatOnEdit,monthFormat:{default:"MMMM YYYY",ko:"YYYY\ub144 MMMM",ja:"YYYY\u5e74 MMMM",zh:"YYYY\u5e74 M\u6708","zh-HK":"YYYY\u5e74 M\u6708","zh-TW":"YYYY\u5e74 M\u6708","zh-CN":"YYYY\u5e74 M\u6708"}[q]},Sn?{monthsToRenderAtATime:null!==(o=null===Se||void 0===Se?void 0:Se.monthsToRenderInPopover)&&void 0!==o?o:2}:{}),{},{customDayNames:null!==(i=null===(l=null!==(r=null===Se||void 0===Se?void 0:Se.customDayNames)&&void 0!==r?r:{})||void 0===l?void 0:l[q])&&void 0!==i?i:null,flexibleDatesSelector:e,onChangeStartDate:(e,t={})=>{e&&Ot&&f()(e).isAfter(f()(Ot),"day")&&jn(!0),En.current=bo(bo({},En.current),{},{departure:t}),gt({type:"SET_DEPARTURE-DATE",payload:{departureDate:e}})},onChangeEndDate:(e,t)=>{const n=t&&"object"===typeof t?t:{},{analyticsData:o,autoCleared:i}=n;jn(Boolean(i)),En.current=bo(bo({},En.current),{},{return:{analyticsData:o}}),gt({type:"SET_RETURN-DATE",payload:{returnDate:e}})},onClear:()=>{jn(!1),En.current={},gt({type:"SET_DEPARTURE-DATE",payload:{departureDate:""}}),gt({type:"SET_RETURN-DATE",payload:{returnDate:""}})},labels:{title:Bn(null===qe||void 0===qe?void 0:qe.modalTitle),description:"",startDateLabel:Bn(null===qe||void 0===qe?void 0:qe.startDateInputGroupLabel),startDateAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.startDateInputGroupAriaLabel),startDatePlaceholder:Bn(null===qe||void 0===qe?void 0:qe.startDateInputGroupPlaceholder),startDateInputAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.startDateInputAriaLabel),startDateErrorMessage:null!==Ht&&void 0!==Ht&&Ht.departureDate?Bn(null===qe||void 0===qe?void 0:qe.startDateInputGroupNoDateErrorMessage):"",endDateLabel:Bn(null===qe||void 0===qe?void 0:qe.endDateInputGroupLabel),endDateAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.endDateInputGroupAriaLabel),endDatePlaceholder:Bn(null===qe||void 0===qe?void 0:qe.endDateInputGroupPlaceholder),endDateInputAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.endDateInputAriaLabel),endDateInputGroupDisabledAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.endDateInputGroupDisabledAriaLabel),endDateErrorMessage:null!==Ht&&void 0!==Ht&&Ht.returnDate?Bn(null===qe||void 0===qe?void 0:qe.endDateInputGroupNoDateErrorMessage):"",previousMonth:Bn(null===qe||void 0===qe?void 0:qe.previousMonth),nextMonth:Bn(null===qe||void 0===qe?void 0:qe.nextMonth),doneAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.doneButtonAriaLabel),done:Bn(null===qe||void 0===qe?void 0:qe.doneButton),clearAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.clearButtonAriaLabel),clear:Bn(null===qe||void 0===qe?void 0:qe.clearButton),legendDescription:Bn(null===qe||void 0===qe?void 0:qe.legendDescription),priceNoteLabel:Bn(null===qe||void 0===qe?void 0:qe.priceNoteLabel),lowestFaresLabel:Bn(null===qe||void 0===qe?void 0:qe.lowestFaresLabel),searchForFaresLabel:Bn(null===qe||void 0===qe?void 0:qe.searchForFaresLabel),oneWay:Bn(null===(a=Re.find((e=>"ow"===e.value)))||void 0===a?void 0:a.labelKey)||"One way",roundTrip:Bn(null===(s=Re.find((e=>"rt"===e.value)))||void 0===s?void 0:s.labelKey)||"Round trip",from:Bn(null===qe||void 0===qe?void 0:qe.from),loadingFaresLabel:Bn(null===qe||void 0===qe?void 0:qe.loadingFaresLabel),lowestFaresAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.lowestFaresAriaLabel),noFaresAriaLabel:Bn(null===qe||void 0===qe?void 0:qe.noFaresAriaLabel)},_style:bo(bo({},j),{},{eds:bo(bo({},j.eds),{},{components:bo(bo({},j.eds.components),{},{inputGroups:bo(bo({},j.eds.components.inputGroups),{},{primary:bo(bo({},j.eds.components.inputGroups.primary),j["flights-booking"]._filters._dateSelector._inputGroup)})})})})}),p=null!==Se&&void 0!==Se&&Se.isPremium&&te?null!==Se&&void 0!==Se&&Se.isFareInsights?Ee?It:Pt:Ee?kt:ht:ct.Z,g="ow"===Tt&&!(null!==Se&&void 0!==Se&&Se.isReturnDateAlwaysVisible)&&"progressive-disclosure"===ie;return(0,ve.tZ)(p,bo(bo(bo({},u),null!==Se&&void 0!==Se&&Se.isPremium?bo({fareInsightsMaxDate:null===Se||void 0===Se?void 0:Se.fareInsightsMaxDate,getHistogram:null===bn||void 0===bn||null===(d=bn.histogram)||void 0===d?void 0:d.getData,origin:bt,destination:mt,travelClass:St,showLowestPriceIndicator:null===Se||void 0===Se?void 0:Se.showLowestPriceIndicator},(null===Se||void 0===Se?void 0:Se.isFareInsights)&&{sendTrackingEventDataLayer:Gn}):{}),{},{children:({startDate:e,endDate:t})=>(0,ve.BX)(D.kC,{className:"w-full flex flex-nowrap gap-2",children:[(0,ve.tZ)(D.kC,{className:v()({"w-3/5":g,"w-5/12 flex-grow":!g||!Sn}),children:e}),("rt"===Tt||(null===Se||void 0===Se?void 0:Se.isReturnDateAlwaysVisible))&&(0,ve.tZ)(D.kC,{className:"w-5/12 flex-grow",children:t})]})}))})()},paymentMethodSelector:()=>{var e,t,n,o,i,l,r,a,s,d,u,v,p,f,g,y,b,m,h;const _=Bt.find((e=>(null===e||void 0===e?void 0:e.value)===Mt));return Ft?(0,ve.tZ)(it.Z,{"data-att":"f1_payment-method-selector",ref:An.paymentMethod,inputGroupVariant:le,isRTL:z,isModal:Dn&&!c||!Sn,value:Mt,options:Bt.map((e=>bo({label:Bn(e.labelKey),description:Bn(e.descriptionLabelKey)},e))),icon:xe.icon,onChange:e=>gt({type:"SET_PAYMENT-METHOD",payload:{paymentMethod:e}}),labels:{inputGroupLabel:Bn(null===Ke||void 0===Ke?void 0:Ke.label),innerLabel:Bn(null!=_?null===_||void 0===_?void 0:_.labelKey:null===Ke||void 0===Ke?void 0:Ke.placeholder),ariaLabel:`${Bn(null===Ke||void 0===Ke?void 0:Ke.ariaLabel)}${_?`, ${Bn(null===_||void 0===_?void 0:_.labelKey)}`:""}`,error:Ht.paymentMethod?Bn(Ke.errorMsg):"",modalTitle:"",modalDescription:"",doneButton:Bn(null===Ke||void 0===Ke?void 0:Ke.doneButton)},_style:{eds:null===j||void 0===j?void 0:j.eds,_inputGroup:bo({},null===j||void 0===j||null===(e=j.eds)||void 0===e||null===(t=e.components)||void 0===t||null===(n=t.inputGroups)||void 0===n?void 0:n.primary),_menu:{_option:{padding:"0.5rem",_description:bo({},null===j||void 0===j||null===(o=j["flights-booking"])||void 0===o||null===(i=o._filters)||void 0===i||null===(l=i._paymentMethodSelector)||void 0===l||null===(r=l._menu)||void 0===r||null===(a=r._option)||void 0===a?void 0:a._description)},_nonSelectableOption:bo({},null===j||void 0===j||null===(s=j.eds)||void 0===s||null===(d=s.typographies)||void 0===d||null===(u=d.fs5)||void 0===u?void 0:u._link)},_radioGroup:{_option:{_description:bo({},null===j||void 0===j||null===(v=j["flights-booking"])||void 0===v||null===(p=v._filters)||void 0===p||null===(f=p._paymentMethodSelector)||void 0===f||null===(g=f._menu)||void 0===g||null===(y=g._option)||void 0===y?void 0:y._description)},_nonSelectableOption:bo({},null===j||void 0===j||null===(b=j.eds)||void 0===b||null===(m=b.typographies)||void 0===m||null===(h=m.fs5)||void 0===h?void 0:h._link)},_modal:{}}}):null}}[e]()),Xn=Object.values(Ht).some(Boolean),Hn=Ht.general?Bn(zt):null,z
15n=[...Ht.origin?[Bn(B.origin.errorMsg)]:[],...Ht.destination?[Bn(B.destination.errorMsg)]:[],...Ht.departureDate?[Bn(B.dateSelector.startDateInputGroupNoDateErrorMessage)]:[],...Ht.returnDate?[Bn(B.dateSelector.endDateInputGroupNoDateErrorMessage)]:[],...Ht.paymentMethod?[Bn(B.paymentMethod.errorMsg)]:[]];function Un({id:e,error:t}){return(0,ve.tZ)(D.xv,{className:"py-3 px-4 w-full",as:"p",_style:mn(["flights-booking._form._errorSummary._error"]),hasRawHtml:!0,children:t},`error-${e}`)}const Wn=Xn?(0,ve.BX)(D.kC,{tabIndex:"-1",className:v()("focus:outline-none",Hn||null!==we&&void 0!==we&&we.isVisible?"w-full flex-col justify-center space-y-2 pb-4":"sr-only"),ref:null===An||void 0===An?void 0:An.errorSummary,id:Zn,_style:mn(["flights-booking._form._errorSummary"]),"aria-hidden":"true",children:[Hn&&(0,ve.tZ)(Un,{id:Hn,error:Hn}),(0,ve.tZ)(D.kC,{className:"w-full flex-col space-y-2 justify-center",children:zn.map((e=>(0,ve.tZ)(Un,{id:e,error:e},e)))})]}):null,qn=(0,ve.tZ)(D.zx,{"data-att":"search","aria-busy":Ut,"aria-disabled":Xn,onClick:Xn?()=>null:async()=>{if((Object.values(Ht).some(Boolean)||!bt||!mt||!_t||"ow"!==Tt&&!Ot||Ft&&!Mt)&&(gt({type:"SET_ERRORS",payload:{errors:{origin:!bt,destination:!mt,departureDate:!_t,returnDate:"ow"!==Tt&&!Ot,paymentMethod:Ft&&!Mt}}}),1))return;gt({type:"SET_IS-FORM-LOADING",payload:{isFormLoading:!0}});const{extraInfo:e,trackingParameters:t}=E,n=Object.keys(t).reduce(((e,n)=>{if(!!t[n])return e[n]=t[n],e;const o=(0,y.ej)(document.cookie,n);o&&(e[n]=o);const i=(0,y.mn)(window.location.search,n);return i&&(e[n]=i),e}),{}),o={origin:bt,originInfo:sn,destination:mt,destinationInfo:dn,departure:_t,return:"ow"===Tt?"":Ot,flightType:Tt,travelClass:St,promoCode:Lt,flexibleDates:At,passengers:bo({},Dt),extraInfo:bo(bo(bo(bo(bo({},"string"===typeof wt&&wt.length>0?{brandedTravelClass:wt}:{}),{},{directFlights:Rt,useMiles:Nt},Ft?{paymentMethod:Mt}:{}),n),e),re.includes("discountSelector")?bo({},Object.keys(jt).reduce(((e,t)=>{const n=jt[t],o=Et[t],i=null===o||void 0===o?void 0:o.options.find((e=>!0===(null===e||void 0===e?void 0:e.nullOp)));return(null===i||void 0===i?void 0:i.id)===n||(e[t]=n),e}),{})):{}),siteEdition:Wt,trackingParameters:bo({},n),currencyCode:qt};Gn(Y.searchFlights.id,bo(bo({},c?{modulePrevious:"string"===typeof p&&p.length>0?p:null}:{}),{},{origin:bt,destination:mt,departure:_t,return:Ot,journeyType:Tt,travelers:Dt,travelClass:St,fareClass:St,brandedTravelClass:wt,promoCode:Lt,redemptionType:Zt,flexibleDates:At,useMiles:Nt,siteEdition:Wt,callToActionLabel:Bn(Qe.label),actionLabel:yt?"ai-mode":kn?"sticky":Bn(Qe.label)})),await bn.deeplink.getDeeplink(o).catch((e=>{throw new Un(e)})),gt({type:"SET_IS-FORM-LOADING",payload:{isFormLoading:!1}})},className:v()("flex w-full flex-nowrap justify-center items-center fc-booking-search-button",{"cursor-wait":Ut}),_style:{"&.fc-booking-search-button":bo(bo({},mn(["flights-booking._form._searchButton"])),Xn?mn(["flights-booking._form._searchButton.__disabled"]):{})},children:Ut?(0,ve.tZ)(D.$j,{}):Bn(Qe.label)}),Jn=mn(["eds.components.inputGroups.primary._label"]),Qn=!c&&["1","2"].includes(String(le))&&"absolute"!==(null===Jn||void 0===Jn?void 0:Jn.position)?(0,ve.BX)(D.kC,{className:"w-full flex-col",children:[(0,ve.tZ)(D.xv,{as:"span","aria-hidden":"true",className:"hidden lg:block",_style:bo(bo({},Jn),{},{visibility:"hidden"}),children:"\xa0"}),qn]}):qn;return!c&&yt?(0,ve.tZ)(et,{idPrefix:`${O}-id-`,context:K,isRTL:z,serviceConfig:A,config:je,labels:bo({},Object.keys(pt).reduce(((e,t)=>(e[t]=Bn(pt[t]),e)),{})),useTheme:mn,services:{fareSearch:bn.sputnikSearch,pubsub:bn.pubsub},setStandardSearch:()=>{gt({type:"SET_AIPOWER_SEARCH_ACTIVE",payload:{isAiPoweredSearchActive:!1}})},reconcileSessionCookies:ln,sendTrackingEvent:Gn,trackingEvents:Y,inputGroupVariant:le}):m(bo(bo({deviceType:H,isRTL:z,useTheme:mn,state:ft,backgroundImage:{enabled:ae,url:se,padding:"object"===typeof de&&null!==de?de[H]:de},title:{enabled:null===ue||void 0===ue?void 0:ue.enabled,htmlTag:null===ue||void 0===ue?void 0:ue.htmlTag,label:Bn(null===Ze||void 0===Ze?void 0:Ze.label)},subtitle:{enabled:null===ce||void 0===ce?void 0:ce.enabled,htmlTag:null===ce||void 0===ce?void 0:ce.htmlTag,label:Bn(null===Ae||void 0===Ae?void 0:Ae.label)},disclaimer:{enabled:null===ke||void 0===ke?void 0:ke.enabled,htmlTag:null===ke||void 0===ke?void 0:ke.htmlTag,label:Bn(null===st||void 0===st?void 0:st.label)},labels:bo({route:bt&&mt?`${null===sn||void 0===sn?void 0:sn.label} to ${null===dn||void 0===dn?void 0:dn.label}`:Bn(null===vt||void 0===vt?void 0:vt.anyRoute),dates:_t||Ot?"rt"===Tt?`${rn||Bn(null===qe||void 0===qe?void 0:qe.anyDates)} - ${an||Bn(null===qe||void 0===qe?void 0:qe.anyDates)}`:`${rn||Bn(null===qe||void 0===qe?void 0:qe.anyDates)}`:Bn(null===qe||void 0===qe?void 0:qe.anyDates),travelers:`${un} ${Bn(un>1?null===Fe||void 0===Fe?void 0:Fe.multipleTravelerTypes:null===Fe||void 0===Fe?void 0:Fe.singleTravelerType)}`},"sticky"===ie?{modalTitle:Bn(null===dt||void 0===dt?void 0:dt.modalTitle),modalDe
15scription:Bn(null===dt||void 0===dt?void 0:dt.modalDescription),modalCloseButton:Bn(null===dt||void 0===dt?void 0:dt.modalCloseButton)}:{}),stickyConfiguration:bo(bo({},pe),{},{mobileControl:bo(bo({},null===pe||void 0===pe?void 0:pe.mobileControl),{},{icon:bt||mt||_t||Ot?null===pe||void 0===pe||null===(a=pe.mobileControl)||void 0===a?void 0:a.editIcon:null===pe||void 0===pe||null===(d=pe.mobileControl)||void 0===d?void 0:d.searchIcon})})},"sticky"===ie?{onStickyStateChange:wn}:{}),{},{ErrorSummary:Wn,SecondaryFilters:[...re.filter((e=>"aiPoweredSearch"!==e)),...null!==je&&void 0!==je&&je.enabled&&tn>0?["aiPoweredSearch"]:[]].map((e=>{const t=$n(e);return null!=t?(0,ve.tZ)(D.kC,{className:"mx-1 my-1 w-full max-w-fit",children:t},e):null})),Origin:Kn("origin"),Destination:Kn("destination"),DateSelector:Kn("dateSelector"),PaymentMethodSelector:Kn("paymentMethodSelector"),SearchButton:Qn}))}Oo.defaultProps={};var Do=Oo},62957:function(e,t,n){"use strict";var o=n(92809),i=n(27361),l=n.n(i),r=n(96990),a=n(14431),s=n(55291);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=async e=>{var t,n,o;const i=(0,s.Z)(e),{name:d,themeName:c,settings:v}=i,p=null===i||void 0===i||null===(t=i.context)||void 0===t||null===(n=t.geo)||void 0===n||null===(o=n.language)||void 0===o?void 0:o.lang,f="string"===typeof c&&c.length>0?c:"default",g=null!==v&&void 0!==v&&v.themeNameCustomizations&&"object"===typeof v.themeNameCustomizations?v.themeNameCustomizations:{},y=null!==g&&void 0!==g&&g[p]&&"string"===typeof g[p]?g[p]:f,b={};try{b.labels=new r.Z(Object.assign({preloadLabels:l()(i,["preloadData","labels"])},l()(i,"servicesConfig.labels"))),await b.labels.populate()}catch(D){throw new Error(D)}let m={};try{var h,_,O;b.theme=(0,a.Z)(null===i||void 0===i||null===(h=i.servicesConfig)||void 0===h?void 0:h.theme);const e=!0?null===(_=window)||void 0===_||null===(O=_.EM_SERVER_DATA)||void 0===O?void 0:O[`${i.name}`]:null,t=null===e||void 0===e?void 0:e.theme;if(t)m=t;else{const e=await b.theme.getTheme(y);m={eds:null===e||void 0===e?void 0:e.eds,"flights-booking":e["flights-booking"],"flights-booking-popup":e["flights-booking-popup"]}}}catch(D){console.error(D)}return u(u({},i),{},{theme:m,services:u(u({},i.services),b)})}},46036:function(e){"use strict";e.exports=JSON.parse('{"asset_type":"","utm_source":"","utm_medium":"","utm_campaign":"","utm_term":"","utm_content":"","mi_u":"","SID":"","ADID":"","sid":"","adid":"","icid":"","adobe_":"","adobe_mc_sdid":"","adobe_mc_ref":"","ef_id":"","eml":"","ola":"","sem":"","seo":"","soc":"","cid":"","meta":"","afl":"","int":"","lid":"","gclid":"","dclid":"","launch_date":"","campaignId":"","shopperid":"","cellNumber":"","referrerid":"","cmpid":"","icmpid":"","channel":"","networkName":"","darksite":""}')}}]);

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.