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O,EAAQP,KAAOX,EAG1B,OAGF,GAEDpH,KAAK9I,MAAMkB,UAAY4H,KAAK9I,MAAMkB,SAASO,OAAS,GACnD0I,EAAAA,EAAAA,MAAA,OAAKF,UAAW,cAAcC,SAAA,EAC5BF,EAAAA,EAAAA,KAAA,MAAAE,SAAKpB,KAAK9I,MAAMuR,wBACfzI,KAAK9I,MAAMkB,SAAS0B,KAAI,SAAC4O,EAAStB,GACjC,KAAIA,GAASlH,EAAKhJ,MAAMyR,eACxB,OACEzH,EAAAA,EAAAA,KAAA,KACEV,KAAI,GAAAC,OAA8B,MAAzBP,EAAKhJ,MAAMgC,UAAoBgH,EAAKhJ,MAAMwJ,eAAiBR,EAAKhJ,MAAMyJ,aAAY,OAAAF,OACzFiI,EAAQ1N,KAAI,UAAAyF,OACLiF,EAAa,UAAAjF,OAASkF,GAAgBvE,SAAA,GAAAX,OAE5C5E,EAAAA,IAAY6M,EAAQtN,WAAasN,EAAQtN,WAAasN,EAAQzN,KAAI,MAAAwF,OAAKiI,EAAQ1N,KAAI,MADjF0N,EAAQ1N,KAAOoM,EAG1B,OAGF,MAIJ,SAOd,IAAC,CA1R+B,CAAShE,EAAAA,U","sources":["shared/flight-search-hero-simple/flight-search-hero-simple-component.jsx","shared/flight-search-hero-simple/flight-search-hero-simple-module.js","shared/flight-search-hero/search-overlay.jsx"],"sourcesContent":["import React, { Component } from \"react\"\nimport * as dateHelper from \"../../booking/helpers/date\"\nimport * as endpoints from \"../../api/endpoints\"\nimport ReactHtmlParser from \"react-html-parser\"\nimport { isMobile } from \"react-device-detect\"\nimport da from \"date-fns/locale/da\"\nimport enGB from \"date-fns/locale/en-GB\"\nimport Svg from \"../_svgs/svg\"\nimport SearchOverlay from \"../flight-search-hero/search-overlay\"\nimport OutsideClickTrigger from \"../../booking/components/common/OutsideClickTrigger\"\nimport * as SelectionFactoryHelper from \"../helpers/SelectionFactoryHelper\"\nimport * as cookieHelper from \"../../helpers/cookie\"\nimport { DateTime } from \"luxon\"\n\nexport default class FlightSearchHeroSimple extends Component {\n constructor(props) {\n super(props)\n\n const dtLocale = dateHelper.luxonLocale(props.locale)\n const zone = \"Europe/Copenhagen\"\n const cphTimeConvert = DateTime.local().setLocale(dtLocale).setZone(zone) // gets local time and changes timezone to copenhagen to get correct time\n const cphTime = cphTimeConvert.setZone(\"local\", { keepLocalTime: true }) // locks in copenhagen time and switches back to local timezone. This ensures the time will stay CPH time when we later converts the DateTime to a JS Date object.\n let startDate = cphTime.set({ milliseconds: 0, seconds: 0, minutes: 60 }).minus({ hours: 1 })\n let minDate = startDate.minus({ days: 1 })\n let minTime = cphTime.set({ hours: 0, minutes: 0, seconds: 0, milliseconds: 0 })\n let maxTime = cphTime.set({ hours: 23, minutes: 0, seconds: 0, milliseconds: 0 })\n\n this.state = {\n flights: [],\n direction: \"D\",\n q: \"\",\n showOverlay: false,\n searchDate: startDate,\n minDate: minDate,\n datepickerOpen: false,\n minTime: minTime,\n maxTime: maxTime,\n otherDaysMinTime: minTime,\n airports: [],\n airlines: [],\n mobileInputFocus: false,\n startDate: startDate,\n }\n }\n\n componentDidMount() {\n this.addEventListeners()\n }\n\n addEventListeners() {\n document.body.addEventListener(\"keydown\", (e) => {\n if (e.key === \"Escape\") {\n this.setState({ showOverlay: false })\n if (isMobile) {\n const elements = document.getElementsByClassName(\"site-header\")\n const siteHeader = elements[0]\n if (siteHeader) {\n siteHeader.style.display = null\n let siteHeaderWrapper = document.getElementsByClassName(\"site-header-wrapper\")[0]\n if (siteHeaderWrapper) {\n siteHeaderWrapper.style.height = siteHeader.clientHeight + \"px\"\n }\n }\n this.setZIndexOfNotificationBanner(null)\n }\n const input = document.querySelector(\"#flight-search-hero-input\")\n if (input) {\n input.blur()\n }\n }\n if (e.key === \"Enter\") {\n window.location.href = `${this.state.direction === \"D\" ? this.props.departuresPage : this.props.arrivalsPage}?q=${\n this.state.q\n }&date=${this.state.searchDate.toFormat(\"dd / MM / yyyy\")}&time=${this.state.searchDate.toFormat(\"HH\")}`\n }\n })\n }\n\n search = async () => {\n if (this.state.q.length >= (this.props.minCharsBeforeSearch ?? 2)) {\n const dt = this.state.searchDate\n const zone = \"Europe/Copenhagen\"\n const cphTime = dt.setZone(zone, { keepLocalTime: true }) // set zone to copenhagen and keep local time, which is already cph time\n const start = cphTime.toUTC() // convert to UTC which is what Solr expects\n const end = cphTime.endOf(\"day\").toUTC() // convert to UTC which is what Solr expects\n const flightsData = {\n direction: this.state.direction,\n query: this.state.q,\n startDateTime: start,\n endDateTime: end,\n language: this.props.locale,\n }\n\n // use this data and call GetAirports endpoint to get airports from solr core instead of flightinfo\n // const airportsData = { language: this.props.locale, query: this.state.q, limit: this.props.allFlightsLimit }\n const returns = await Promise.all([this.getFlights(flightsData), this.getAirports(flightsData)])\n .then((responses) => {\n return Promise.all(\n responses.map((response) => {\n return response\n }),\n )\n })\n .then((data) => {\n return data\n })\n .catch((err) => {\n console.log(err)\n })\n const flights = returns[0]\n const airports = returns[1]\n const airlines = this.getAirlines(flights)\n this.setState({ flights: flights, airports: airports, airlines: airlines })\n }\n }\n\n getFlights = (data) => {\n return endpoints\n .getFlightInfoTable(data)\n .then((res) => {\n return res.data\n })\n .then((data) => {\n let flights = []\n if (data) {\n flights = data\n }\n return flights\n })\n .catch((err) => {\n console.log(err)\n })\n }\n\n getAirports = (data) => {\n // return endpoints.getAirports(data)\n return endpoints\n .getAirportsFromFlights(data)\n .then((res) => {\n return res.data\n })\n .then((data) => {\n let airports = []\n if (data) {\n airports = data\n }\n return airports\n })\n .catch((err) => {\n console.log(err)\n })\n }\n\n getAirlines = (flights) => {\n let airlines = []\n if (flights && flights.length > 0) {\n const result = Array.from(new Set(flights.map((f) => f.IataAirline))).map((iata) => {\n return {\n iata: iata,\n name: flights.find((f) => f.IataAirline === iata).Airline,\n nameMobile: flights.find((f) => f.IataAirline === iata).AirlineMobile,\n }\n })\n airlines = result\n }\n return airlines\n }\n\n handleInput = (event, search = true) => {\n this.setState(\n {\n [event.target.name]: event.target.value,\n },\n () => {\n if (this.state.q.length >= 1) {\n if (isMobile && !this.state.showOverlay) {\n // scroll to top to fix the input field in the overlay being out of view on iphone\n window.scrollTo(0, 0)\n this.setZIndexOfNotificationBanner(0)\n }\n this.setState({ showOverlay: true }, () => {\n if (search) this.search()\n if (isMobile) {\n const elements = document.getElementsByClassName(\"site-header\")\n const siteHeader = elements[0]\n if (siteHeader) {\n siteHeader.style.display = \"none\"\n }\n }\n })\n } else {\n if (!isMobile) {\n this.handleCloseOverlay()\n }\n }\n },\n )\n }\n\n handleDirectionChange = (direction, wasFocused) => {\n if (isMobile) {\n const input = document.getElementById(\"flight-search-hero-input\")\n if (input && wasFocused) {\n input.focus()\n setTimeout(() => {\n this.setState({ mobileInputFocus: true })\n }, 20)\n }\n }\n this.setState({ direction: direction }, () => {\n this.search()\n })\n }\n\n handleCloseOverlay = () => {\n this.setState({ showOverlay: false, searchDate: this.state.startDate, q: \"\", flights: [], airports: [] }, () => {\n if (isMobile) {\n const elements = document.getElementsByClassName(\"site-header\")\n const siteHeader = elements[0]\n if (siteHeader) {\n siteHeader.style.display = null\n let siteHeaderWrapper = document.getElementsByClassName(\"site-header-wrapper\")[0]\n if (siteHeaderWrapper) {\n siteHeaderWrapper.style.height = siteHeader.clientHeight + \"px\"\n }\n }\n this.setZIndexOfNotificationBanner(null)\n }\n })\n }\n\n handleDateChange = (dateInput) => {\n this.setState(\n (prevState) => {\n let dateTime = DateTime.fromJSDate(dateInput)\n const startOfPrevDate = prevState.searchDate.startOf(\"day\")\n const startOfMinDate = prevState.minDate.startOf(\"day\")\n const startOfNewDate = dateTime.startOf(\"day\")\n if (startOfMinDate.toMillis() === startOfNewDate.toMillis()) {\n // if the times are the same, meaning only the date was changed, set date to minDate\n const time = dateTime.toFormat(\"HH:mm\")\n const prevTime = prevState.searchDate.toFormat(\"HH:mm\")\n if (dateTime <= prevState.minDate || time === prevTime) {\n return { searchDate: prevState.minDate, minTime: prevState.minDate }\n }\n return { searchDate: dateTime, minTime: prevState.minDate }\n } else {\n // if the dates have changed, set time to 0\n if (startOfPrevDate.toMillis() !== startOfNewDate.toMillis()) dateTime = dateTime.set({ hours: 0, minutes: 0, seconds: 0, milliseconds: 0 })\n return { searchDate: dateTime, minTime: prevState.otherDaysMinTime }\n }\n },\n () => this.search(),\n )\n }\n\n handleDatepicker = () => {\n this.setState({ datepickerOpen: !this.state.datepickerOpen })\n }\n\n closeDatepicker = () => {\n this.setState({ datepickerOpen: false })\n }\n\n handleOutsideClick = () => {\n if (!this.state.overInput) {\n this.setState({ showOverlay: false, datepickerOpen: false })\n }\n }\n\n handleInputFocus = () => {\n if (this.state.q.length > 0) {\n if (isMobile && !this.state.showOverlay) {\n // scroll to top to fix the input field in the overlay being out of view on iphone\n window.scrollTo(0, 0)\n this.setZIndexOfNotificationBanner(0)\n }\n this.setState({ showOverlay: true }, () => {\n if (isMobile) {\n const elements = document.getElementsByClassName(\"site-header\")\n const siteHeader = elements[0]\n if (siteHeader) {\n siteHeader.style.display = \"none\"\n }\n }\n })\n }\n }\n\n setZIndexOfNotificationBanner = (zindex) => {\n const notificationBanner = document.querySelector(\".notification\")\n if (notificationBanner) {\n const notificationVersion = notificationBanner.dataset.notificationVersion\n const notificationCookie = cookieHelper.getCookie(notificationVersion)\n if (notificationCookie !== \"closed\") {\n notificationBanner.style.zIndex = zindex\n }\n }\n }\n\n render() {\n let heroStyle = {}\n if (isMobile && this.props.backgroundImageMobile) {\n heroStyle = { backgroundImage: `url(${this.props.backgroundImageMobile})` }\n } else if (this.props.backgroundImage) {\n heroStyle = { backgroundImage: `url(${this.props.backgroundImage})` }\n }\n\n const icon = SelectionFactoryHelper.getFromSelectionFactory(this.props.icon)\n\n return (\n <section className={`deck deck--front`} style={heroStyle}>\n <header className=\"section-header section-header-search\">\n <div className=\"section-header__inner\">\n <div className=\"w--normal\">\n <div className=\"leftside\">\n <div className=\"infohead\">{this.props.title}</div>\n {ReactHtmlParser(this.props.heading)}\n <div className=\"maintext\">{this.props.mainText}</div>\n </div>\n <div className=\"flight-searchbox\">\n <div className=\"headline\">\n {this.props.iconUpload ? <img src={this.props.iconUpload} alt={\"icon\"} /> : icon ? <Svg iconName={icon} /> : \"\"}\n <span>{this.props.searchBoxTitle}</span>\n </div>\n <div className=\"form\">\n <div className=\"form__section form__section--light form__section--fat\">\n <div className={`form__section__inner ${isMobile && this.state.showOverlay ? \"is-active\" : \"\"}`}>\n <div className=\"form__field form__field--text form__field--text-search form__field--text--no-label is-bound is-filled\">\n <span className=\"form__valid\"></span>\n <input\n className=\"form__item\"\n id=\"flight-search-hero-input\"\n autoComplete=\"off\"\n autoCapitalize=\"none\"\n name=\"q\"\n type=\"text\"\n placeholder={isMobile ? this.props.searchBoxPlaceholderMobile : this.props.searchBoxPlaceholder}\n value={this.state.q}\n onChange={(e) => this.handleInput(e)}\n onMouseEnter={() => this.setState({ overInput: true })}\n onMouseLeave={() => this.setState({ overInput: false })}\n onFocus={() => this.handleInputFocus()}\n />\n {!isMobile ? (\n <button\n className={`search-button ${this.state.showOverlay ? \"active\" : \"\"}`}\n onClick={this.state.showOverlay ? this.handleCloseOverlay : undefined}\n >\n <div className={`search-icon`}></div>\n </button>\n ) : (\n \"\"\n )}\n {isMobile && this.state.showOverlay ? (\n <button onClick={this.handleCloseOverlay}>\n <Svg iconName={\"close\"} fillColor={\"#071143\"} />\n </button>\n ) : (\n \"\"\n )}\n </div>\n <OutsideClickTrigger onOutsideClick={() => (isMobile ? undefined : this.handleOutsideClick())}>\n <SearchOverlay\n {...this.props}\n {...this.state}\n handleDirectionChange={this.handleDirectionChange}\n handleDateChange={this.handleDateChange}\n locale={this.props.locale === \"da\" ? da : enGB}\n handleDatepicker={this.handleDatepicker}\n closeDatepicker={this.closeDatepicker}\n showTime={isMobile ? false : true}\n />\n </OutsideClickTrigger>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div className=\"clear\"></div>\n </div>\n </header>\n </section>\n )\n }\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport FlightSearchHeroSimple from \"./flight-search-hero-simple-component\"\n\nexport default class FlightSearchHeroSimpleModule {\n constructor(elem) {\n const self = this\n self.elem = elem\n self.modelJson = elem.dataset.modelJson && JSON.parse(elem.dataset.modelJson)\n self.locale = (document.body && document.body.dataset.language) || \"da\"\n self.tabIcons = elem.dataset.tabIcons && JSON.parse(elem.dataset.tabIcons)\n self.init()\n return self\n }\n\n init() {\n const self = this\n ReactDOM.unmountComponentAtNode(self.elem)\n ReactDOM.render(<FlightSearchHeroSimple {...self.modelJson} {...self.tabIcons} locale={self.locale} />, self.elem)\n }\n}\n","import React, { Component, forwardRef } from \"react\"\nimport DatePicker from \"react-datepicker\"\nimport Svg from \"../_svgs/svg\"\nimport { isMobile } from \"react-device-detect\"\n\nexport default class SearchOverlay extends Component {\n constructor(props) {\n super(props)\n\n this.calendar = React.createRef()\n }\n\n componentDidMount() {\n let vh = window.innerHeight * 0.01\n document.documentElement.style.setProperty(\"--vh\", `${vh}px`)\n window.addEventListener(\"resize\", () => {\n let vh = window.innerHeight * 0.01\n document.documentElement.style.setProperty(\"--vh\", `${vh}px`)\n })\n }\n\n handleDatepicker = () => {\n const openState = this.calendar.state.open\n this.calendar.setOpen(!openState)\n this.props.handleDatepicker()\n }\n\n handleOutsideClick = () => {\n this.calendar.setOpen(false)\n this.props.closeDatepicker()\n }\n\n render() {\n const CustomInput = forwardRef(({ value }, ref) => (\n <div className={\"react-datepicker-ignore-onclickoutside\"} onClick={this.handleDatepicker} ref={ref}>\n {value}\n </div>\n ))\n CustomInput.displayName = \"CustomInput\"\n\n const shortDateOptions = {\n month: \"short\",\n day: \"2-digit\",\n }\n\n const shortSearchDate = new Date(this.props.searchDate).toLocaleDateString(this.props.locale.code, shortDateOptions)\n const noResultsLabel =\n this.props.noResultsLabel?.replace(\"{input}\", this.props.q).replace(\"{date}\", shortSearchDate) ??\n `Ingen resultater matchede din søgning på \"${this.props.q}\"`\n const renderSearchResults = this.props.q && this.props.q.length >= (this.props.minCharsBeforeSearch ?? 2)\n const isOpen = this.props.q && this.props.q.length > 0\n\n const formattedDate = this.props.searchDate.toFormat(\"dd / MM / yyyy\")\n const formattedTime = this.props.searchDate.toFormat(\"HH\")\n\n const departuresTabIconColor = this.props.direction === \"D\" ? \"#064FC2\" : \"#071143\"\n const departuresTabIcon = (\n <Svg\n iconName={this.props.departuresTabIcon ? this.props.departuresTabIcon : \"planetakeoff\"}\n fillColor={\"none\"}\n stroke={departuresTabIconColor}\n />\n )\n const arrivalsTabIconColor = this.props.direction === \"A\" ? \"#064FC2\" : \"#071143\"\n const arrivalsTabIcon = (\n <Svg iconName={this.props.arrivalsTabIcon ? this.props.arrivalsTabIcon : \"planelanding\"} fillColor={\"none\"} stroke={arrivalsTabIconColor} />\n )\n\n return (\n <div className=\"form__section__inner\">\n <div\n className={`search-overlay ${!isMobile && isOpen && !renderSearchResults ? \"is-open\" : \"\"} ${\n !isMobile && renderSearchResults ? \"has-results\" : !isMobile && !renderSearchResults ? \"is-closed\" : \"\"\n } ${this.props.showOverlay ? \"\" : \"hide-overlay\"} ${isMobile && this.props.showOverlay ? \"mobile-open\" : \"\"}`}\n >\n {!isMobile && this.props.q.length < (this.props.minCharsBeforeSearch ?? 2) ? (\n <div className=\"form__section__inner\">\n <div className=\"search-results helper-text\">\n <div className=\"flights__table stylish-table\">\n <div className=\"stylish-table__row stylish-table__row--body\">\n <p>\n {this.props.searchHelperText ||\n `Du skal minimum skrive ${this.props.minCharsBeforeSearch ?? 2} karakterer for at få resultater.`}\n </p>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <React.Fragment>\n <div className={`tabs ${isOpen && !renderSearchResults ? \"is-round\" : \"\"} `}>\n <a\n className={`button button--medium has-icon no-shadow ${this.props.direction === \"D\" ? \"is-active\" : \"\"}`}\n tabIndex=\"1\"\n onClick={() => this.props.handleDirectionChange(\"D\")}\n onTouchStart={() => this.props.handleDirectionChange(\"D\")}\n >\n {departuresTabIcon}\n <span className=\"text\">{this.props.departuresTabLabel || \"Afgange\"}</span>\n </a>\n <a\n className={`button button--medium has-icon no-shadow ${this.props.direction === \"A\" ? \"is-active\" : \"\"}`}\n tabIndex=\"2\"\n onClick={() => this.props.handleDirectionChange(\"A\")}\n onTouchStart={() => this.props.handleDirectionChange(\"A\")}\n >\n {arrivalsTabIcon}\n <span className=\"text\">{this.props.arrivalsTabLabel || \"Ankomster\"}</span>\n </a>\n <div className={`dateselect ${this.props.datepickerOpen ? \"datepicker-open\" : \"\"} ${!isMobile ? \"is-desktop\" : \"\"}`}>\n <DatePicker\n ref={(r) => (this.calendar = r)}\n selected={this.props.searchDate.toJSDate()}\n onChange={(date) => this.props.handleDateChange(date)}\n showTimeSelect={this.props.showTime || false}\n dateFormat=\"dd. MMM yyyy\"\n minDate={this.props.minDate.toJSDate()}\n minTime={this.props.minTime.toJSDate()}\n maxTime={this.props.maxTime.toJSDate()}\n locale={this.props.locale}\n customInput={<CustomInput calendar={this.calendar} />}\n timeCaption={this.props.timeLabel || \"Tidspunkt\"}\n timeIntervals={60}\n onClickOutside={this.handleOutsideClick}\n onCalendarClose={this.props.closeDatepicker}\n />\n </div>\n <div className=\"clear\"></div>\n </div>\n {(isMobile && renderSearchResults) || !isMobile ? (\n <div\n className={`search-results ${isMobile && this.props.datepickerOpen ? \"datepicker-open\" : \"\"} ${\n isMobile && this.props.showOverlay ? \"make-sticky\" : \"\"\n }`}\n >\n <div className=\"flights__table stylish-table\">\n {this.props.flights && this.props.flights.length > 0 ? (\n this.props.flights.map((flight, index) => {\n const currentUrl = this.props.direction === \"D\" ? this.props.departuresPage : this.props.arrivalsPage\n if (\n (isMobile && index < (this.props.numberOfFlightsMobile || 10)) ||\n (!isMobile && index < (this.props.numberOfFlights || 5))\n ) {\n const innerFlight = (\n <>\n <div className=\"stylish-table__cell flights__table__col--time\">\n <div>\n {flight.Delayed ? (\n <React.Fragment>\n <span className=\"t--strike\">{`${flight.Time}`}</span>\n <span>\n <em>{`${flight.ExpectedTime}`}</em>\n </span>\n </React.Fragment>\n ) : (\n <span>\n <em>{`${flight.Time}`}</em>\n </span>\n )}\n </div>\n </div>\n <div className=\"stylish-table__cell flights__table__col--destination\">\n <div>\n <span className=\"v--desktop-only\">\n <strong>\n <span>{flight.Destination}</span>\n </strong>\n </span>\n <span className=\"v--mobile-only\">\n <strong>{flight.Destination}</strong> ({flight.IataDestination})\n </span>\n <span className=\"v--mobile-only\">{flight.AirlineMobile ? flight.AirlineMobile : flight.Airline}</span>\n </div>\n </div>\n <div className=\"stylish-table__cell flights__table__col--iataDestination v--desktop-only\">\n <div>\n <span>{flight.IataDestination}</span>\n </div>\n </div>\n <div className=\"stylish-table__cell flights__table__col--carrier v--desktop-only\">\n <div>\n <span>\n <span>{flight.Airline}</span>\n </span>\n </div>\n </div>\n <div className=\"stylish-table__cell flights__table__col--gate\">\n <div>\n <span>{flight.Iata}</span>\n </div>\n </div>\n </>\n )\n if (this.props.flightClickHandler) {\n return (\n <a\n key={index}\n className=\"stylish-table__row stylish-table__row--body pointer\"\n onClick={(e) => this.props.flightClickHandler(e, flight)}\n >\n {innerFlight}\n </a>\n )\n } else {\n return (\n <a\n key={index}\n className=\"stylish-table__row stylish-table__row--body pointer\"\n href={`${currentUrl}/${flight.Iata}?id=${flight.FlightId}`}\n >\n {innerFlight}\n </a>\n )\n }\n }\n return\n })\n ) : (\n <div className=\"stylish-table__row stylish-table__row--body no-results\">{noResultsLabel}</div>\n )}\n </div>\n {this.props.flights && this.props.flights.length > 0 ? (\n <div className=\"see-more-link\">\n {(this.props.direction === \"D\" && this.props.seeMoreFlightsDepartures) ||\n (this.props.direction === \"A\" && this.props.seeMoreFlightsArrivals) ? (\n <a\n href={`${this.props.direction === \"D\" ? this.props.departuresPage : this.props.arrivalsPage}?q=${\n this.props.q\n }&date=${formattedDate}&time=${formattedTime}`}\n >\n <Svg iconName={\"arrowright-slim\"} fillColor={\"none\"} />\n {this.props.direction === \"D\"\n ? this.props.seeMoreFlightsDepartures.replace(\"{input}\", this.props.q)\n : this.props.seeMoreFlightsArrivals.replace(\"{input}\", this.props.q)}\n </a>\n ) : (\n \"\"\n )}\n </div>\n ) : (\n \"\"\n )}\n {this.props.airports && this.props.airports.length > 0 ? (\n <div className={\"all-flights\"}>\n <h3>{this.props.direction === \"D\" ? this.props.allFlightsTo : this.props.allFlightsFrom}</h3>\n {this.props.airports.map((airport, index) => {\n if (index >= this.props.allFlightsLimit) return\n return (\n <a\n href={`${this.props.direction === \"D\" ? this.props.departuresPage : this.props.arrivalsPage}?q=${\n airport.Iata\n }&date=${formattedDate}&time=${formattedTime}`}\n key={airport.Iata + index}\n >{`${airport.Name} (${airport.Iata})`}</a>\n )\n })}\n </div>\n ) : (\n \"\"\n )}\n {this.props.airlines && this.props.airlines.length > 0 ? (\n <div className={\"all-flights\"}>\n <h3>{this.props.allFlightsWithCarrier}</h3>\n {this.props.airlines.map((airline, index) => {\n if (index >= this.props.carriersLimit) return\n return (\n <a\n href={`${this.props.direction === \"D\" ? this.props.departuresPage : this.props.arrivalsPage}?q=${\n airline.iata\n }&date=${formattedDate}&time=${formattedTime}`}\n key={airline.iata + index}\n >{`${isMobile && airline.nameMobile ? airline.nameMobile : airline.name} (${airline.iata})`}</a>\n )\n })}\n </div>\n ) : (\n \"\"\n )}\n </div>\n ) : (\n \"\"\n )}\n </React.Fragment>\n )}\n </div>\n </div>\n )\n }\n}\n"],"names":["FlightSearchHeroSimple","_Component","props","_this","_classCallCheck","_callSuper","search","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_this$props$minCharsB","dt","cphTime","start","end","flightsData","returns","flights","airports","airlines","wrap","_context","prev","next","state","q","length","minCharsBeforeSearch","searchDate","setZone","keepLocalTime","toUTC","endOf","direction","query","startDateTime","endDateTime","language","locale","Promise","all","getFlights","getAirports","then","responses","map","response","data","catch","err","console","log","sent","getAirlines","setState","stop","endpoints","res","Array","from","Set","f","IataAirline","iata","name","find","Airline","nameMobile","AirlineMobile","handleInput","event","arguments","undefined","_defineProperty","target","value","isMobile","showOverlay","window","scrollTo","setZIndexOfNotificationBanner","siteHeader","document","getElementsByClassName","style","display","handleCloseOverlay","handleDirectionChange","wasFocused","input","getElementById","focus","setTimeout","mobileInputFocus","startDate","siteHeaderWrapper","height","clientHeight","handleDateChange","dateInput","prevState","dateTime","DateTime","fromJSDate","startOfPrevDate","startOf","startOfMinDate","minDate","startOfNewDate","toMillis","time","toFormat","prevTime","minTime","set","hours","minutes","seconds","milliseconds","otherDaysMinTime","handleDatepicker","datepickerOpen","closeDatepicker","handleOutsideClick","overInput","handleInputFocus","zindex","notificationBanner","querySelector","notificationVersion","dataset","cookieHelper","zIndex","dtLocale","dateHelper","local","setLocale","minus","days","maxTime","_inherits","_createClass","key","this","addEventListeners","_this2","body","addEventListener","e","blur","location","href","concat","departuresPage","arrivalsPage","_this3","heroStyle","backgroundImageMobile","backgroundImage","icon","SelectionFactoryHelper","_jsx","className","children","_jsxs","title","ReactHtmlParser","heading","mainText","iconUpload","src","alt","Svg","iconName","searchBoxTitle","id","autoComplete","autoCapitalize","type","placeholder","searchBoxPlaceholderMobile","searchBoxPlaceholder","onChange","onMouseEnter","onMouseLeave","onFocus","onClick","fillColor","OutsideClickTrigger","onOutsideClick","SearchOverlay","_objectSpread","da","enGB","showTime","Component","FlightSearchHeroSimpleModule","elem","self","modelJson","JSON","parse","tabIcons","init","ReactDOM","openState","calendar","open","setOpen","React","vh","innerHeight","documentElement","setProperty","_this$props$noResults","_this$props$noResults2","_this$props$minCharsB2","_this$props$minCharsB3","CustomInput","forwardRef","_ref","ref","displayName","shortSearchDate","Date","toLocaleDateString","code","month","day","noResultsLabel","replace","renderSearchResults","isOpen","formattedDate","formattedTime","departuresTabIconColor","departuresTabIcon","stroke","arrivalsTabIconColor","arrivalsTabIcon","searchHelperText","tabIndex","onTouchStart","departuresTabLabel","arrivalsTabLabel","DatePicker","r","selected","toJSDate","date","showTimeSelect","dateFormat","customInput","timeCaption","timeLabel","timeIntervals","onClickOutside","onCalendarClose","flight","index","currentUrl","numberOfFlightsMobile","numberOfFlights","innerFlight","_Fragment","Delayed","Time","ExpectedTime","Destination","IataDestination","Iata","flightClickHandler","FlightId","seeMoreFlightsDepartures","seeMoreFlightsArrivals","allFlightsTo","allFlightsFrom","airport","allFlightsLimit","Name","allFlightsWithCarrier","airline","carriersLimit"],"sourceRoot":""}