{"version":3,"sources":["webpack:///./src/js/components/Menu.js","webpack:///./src/js/modules/home/GlobalFleet.js","webpack:///./src/js/modules/home/Services.js"],"names":["_core","__webpack_require__","Menu","Component","this","dom","$document","$","document","$button","$el","find","$chevron","on","handleClick","bind","handleClickOutside","e","toggleClass","target","closest","length","removeClass","addClass","GlobalFleetItem","$menu","_constants","Services","$window","window","$slider","$list","$items","$globalFleet","$searchFlights","$searchFlightsForm","$findLounges","$findLoungesForm","width","body","clientWidth","findFlightUrl","attr","loungeAccessUrl","GlobalFleet","SearchFlights","onSearch","handleSearchFlights","FindLounges","onFind","handleFindLounges","_debounce2","default","handleResize","initSwiper","BREAKPOINT","desktop","swiper","destroy","removeStructure","update","createStructure","Swiper","slidesPerView","loop","_ref","departureDateObj","returnDateObj","data","_objectWithoutProperties","qsString","param","url","location","href"],"mappings":"wZAAAA,EAAAC,EAAA,QAEMC,grBAAaC,wDAEfC,KAAKC,KACHC,UAAWC,EAAEC,UACbC,QAASL,KAAKM,IAAIC,KAAK,iBACvBC,SAAUR,KAAKM,IAAIC,KAAK,oDAK1BP,KAAKC,IAAII,QAAQI,GAAG,QAAWT,KAAKU,YAApCC,KAA+BX,OAC/BA,KAAKC,IAAIC,UAAUO,GAAG,QAAWT,KAAKY,mBAAtCD,KAAiCX,2CAGvBa,GACVb,KAAKM,IAAIQ,YAAY,cACrBd,KAAKC,IAAIO,SAASM,YAAY,qDAGbD,GACZV,EAAEU,EAAEE,QAAQC,QAAQhB,KAAKM,KAAKW,SACjCjB,KAAKM,IAAIY,YAAY,cACrBlB,KAAKC,IAAIO,SAASW,SAAS,8BAKlBrB,iWC7BfF,EAAAC,EAAA,wDACAA,EAAA,UAEMuB,grBAAwBrB,wDAE1BC,KAAKC,KACHoB,MAAOrB,KAAKM,IAAIC,KAAK,mBAEvB,IAAIT,UAAKE,KAAKC,IAAIoB,0BAIPD,2VCZfxB,EAAAC,EAAA,QACAA,EAAA,UACAA,EAAA,UACAA,EAAA,UACAA,EAAA,U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AQP,SAAS,oBAC1BnB,KAAKC,IAAI0B,MAAMR,SAAS,kBACxBnB,KAAKC,IAAI2B,OAAOT,SAAS,0DAIzBnB,KAAKC,IAAIyB,QAAQR,YAAY,oBAC7BlB,KAAKC,IAAI0B,MAAMT,YAAY,kBAC3BlB,KAAKC,IAAI2B,OAAOV,YAAY,+DAGoC2C,EAA5CC,iBAA4CD,EAA1BE,cAA0B,IAARC,yHAAQC,CAAAJ,GAAA,qCAC1DK,EAAW/D,EAAEgE,MAAMH,GACrBI,EAAMpE,KAAKqC,cACX6B,IACFE,EAASA,EAAT,IAAgBF,GAElBG,SAASC,KAAOF,4CAGAJ,GAChB,IAAME,EAAW/D,EAAEgE,MAAMH,GACrBI,EAAMpE,KAAKuC,gBACX2B,IACFE,EAASA,EAAT,IAAgBF,GAElBG,SAASC,KAAOF,qBAIL7C","file":"50.95c78737b4e20eaa70e9.bundle.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass Menu extends Component {\n setupDefaults() {\n this.dom = {\n $document: $(document),\n $button: this.$el.find('.menu__button'),\n $chevron: this.$el.find('.chevron')\n };\n }\n\n addListeners() {\n this.dom.$button.on('click', ::this.handleClick);\n this.dom.$document.on('click', ::this.handleClickOutside);\n }\n\n handleClick(e) {\n this.$el.toggleClass('menu--open');\n this.dom.$chevron.toggleClass('bottom');\n }\n\n handleClickOutside(e) {\n if (!$(e.target).closest(this.$el).length) {\n this.$el.removeClass('menu--open');\n this.dom.$chevron.addClass('bottom');\n }\n }\n}\n\nexport default Menu;\n","import { Component } from '@verndale/core';\nimport Menu from '../../components/Menu';\n\nclass GlobalFleetItem extends Component {\n setupDefaults() {\n this.dom = {\n $menu: this.$el.find('.service__menu')\n };\n new Menu(this.dom.$menu);\n }\n}\n\nexport default GlobalFleetItem;\n","import { Component } from '@verndale/core';\nimport Swiper from 'swiper';\nimport debounce from 'lodash/debounce';\nimport GlobalFleet from './GlobalFleet';\nimport FindLounges from '../FindLounges';\nimport SearchFlights from '../SearchFlights';\nimport { BREAKPOINT } from '../../constants';\n\nclass Services extends Component {\n setupDefaults() {\n this.dom = {\n $window: $(window),\n $slider: this.$el.find('.services__slider'),\n $list: this.$el.find('.services__list'),\n $items: this.$el.find('.services__item'),\n $globalFleet: this.$el.find('.service--global-fleet'),\n $searchFlights: this.$el.find('.service--search-flights'),\n $searchFlightsForm: this.$el.find('.service--search-flights .service__form'),\n $findLounges: this.$el.find('.service--find-lounges'),\n $findLoungesForm: this.$el.find('.service--find-lounges .service__form')\n };\n\n this.width = document.body.clientWidth;\n this.findFlightUrl = this.dom.$searchFlightsForm.attr('action');\n this.loungeAccessUrl = this.dom.$findLoungesForm.attr('action');\n\n new GlobalFleet(this.dom.$globalFleet);\n new SearchFlights(this.dom.$searchFlights, {\n onSearch: ::this.handleSearchFlights\n });\n new FindLounges(this.dom.$findLounges, {\n onFind: ::this.handleFindLounges\n });\n\n //this.initSwiper();\n }\n\n addListeners() {\n this.dom.$window.on('resize', debounce(::this.handleResize, 300));\n }\n\n handleResize() {\n if (this.width !== document.body.clientWidth) {\n this.width = document.body.clientWidth;\n this.initSwiper();\n }\n }\n\n initSwiper() {\n if (document.body.clientWidth >= BREAKPOINT.desktop) {\n if (this.swiper) {\n this.swiper.destroy();\n this.removeStructure();\n this.swiper = null;\n }\n return;\n }\n if (this.swiper) {\n this.swiper.update();\n return;\n }\n this.createStructure();\n this.swiper = new Swiper('.services__slider', {\n slidesPerView: 'auto',\n loop: false\n });\n }\n\n createStructure() {\n this.dom.$slider.addClass('swiper-container');\n this.dom.$list.addClass('swiper-wrapper');\n this.dom.$items.addClass('swiper-slide');\n }\n\n removeStructure() {\n this.dom.$slider.removeClass('swiper-container');\n this.dom.$list.removeClass('swiper-wrapper');\n this.dom.$items.removeClass('swiper-slide');\n }\n\n handleSearchFlights({ departureDateObj, returnDateObj, ...data }) {\n const qsString = $.param(data);\n let url = this.findFlightUrl;\n if (qsString) {\n url = `${url}?${qsString}`;\n }\n location.href = url;\n }\n\n handleFindLounges(data) {\n const qsString = $.param(data);\n let url = this.loungeAccessUrl;\n if (qsString) {\n url = `${url}?${qsString}`;\n }\n location.href = url;\n }\n}\n\nexport default Services;\n"],"sourceRoot":""}