{"version":3,"sources":["webpack:///D:/a/1/s/frontend/src/views/blocks/simpleLocationSearchContainer/js/simpleLocationSearchContainer.js","webpack:///./api.js","webpack:///./query-string.js","webpack:///./dataLayer.js","webpack:///D:/a/1/s/frontend/node_modules/strict-uri-encode/index.js","webpack:///D:/a/1/s/frontend/node_modules/decode-uri-component/index.js","webpack:///../helpers/getGoogleApiKey.js","webpack:///D:/a/1/s/frontend/src/views/blocks/addressSearchBar/js/AddressSearchBar.jsx","webpack:///../helpers/getDistanceFomGeoPoints.js","webpack:///D:/a/1/s/frontend/node_modules/babel-runtime/regenerator/index.js","webpack:///D:/a/1/s/frontend/node_modules/babel-runtime/helpers/asyncToGenerator.js","webpack:///D:/a/1/s/frontend/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime-module.js","webpack:///D:/a/1/s/frontend/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js","webpack:///D:/a/1/s/frontend/src/views/blocks/mapViewBlock/js/WeatherInfo.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/mapViewBlock/js/MapViewBlock.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/mapViewBlock/js/PinMarker.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/mapViewBlock/js/InfoWindow.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/bookOnlineBlock/js/BookOnlineBlock.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/bookOnlineBlock/js/OutsideAlerter.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/simpleLocationSearchContainer/js/SimpleLocationSearchContainer.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/MonthlyRecommendedParking/js/MonthlyRecommendedParking.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/simpleLocationSearchContainer/js/SimpleLocationSearchBar.jsx","webpack:///D:/a/1/s/frontend/src/views/blocks/simpleLocationSearchContainer/js/SimpleLocationSearchResult.jsx"],"names":["__webpack_require__","_utils","SimpleLocationSearchContainer","$el","_classCallCheck3","default","this","parkinglocationApi","$","data","ctaText","zoom","type","pageid","lat","lng","address","stayLongerText","stayLongerUrl","carparkfeature","ctatarget","country","states","JSON","parse","dataset","bookonlineTitle","autocompleteApi","bookonlineDesc","mainTitle","bookonlinePlaceholder","bookonlineWheretofind","recommendedParkingFeature","recommendedParkingApi","recommendedParkingCtaText","recommendedParkingBgColor","iconBookOnline","iconMonthlyParking","iconParkingCard","iconEvCharger","iconLabelBookOnline","iconLabelMonthlyParking","iconLabelParkingCard","iconLabelEvCharger","cpms","submitButtonLabel","bookABayUrl","parsedQuery","utils","getLocationFromStorage","destination","Number","distance","updateQueryBinding","setSimpleLocationSearchContainer","_this","defaultProps","userLocationPos","api","ReactDOM","render","React","createElement","rSimpleLocationSearchContainer","navigator","geolocation","getCurrentPosition","pos","coords","latitude","longitude","_location","queryString","localStorage","getItem","setItem","param","location","getApi","url","fetch","headers","Content-Type","then","response","json","_promise2","resolve","catch","error","reject","callApi","arguments","length","undefined","method","body","_stringify2","Headers","credentials","isSuccessful","status","successful","strictUriEncode","require","objectAssign","decodeComponent","encode","value","opts","strict","encodeURIComponent","extract","str","queryStart","indexOf","slice","formatter","result","arrayFormat","key","accumulator","exec","replace","concat","parserForArrayFormat","ret","_create2","trim","split","forEach","parts","shift","val","join","_keys2","sort","reduce","Boolean","_typeof3","Array","isArray","keysSorter","input","a","b","map","exports","stringify","obj","index","encoderForArrayFormat","val2","push","filter","x","parseUrl","query","pushPageView","dataGroup","window","dataLayer","event","ecommerce","pushFormSubmit","formID","category","action","label","eventCallback","pushCarparkSearch","arrivalDate","departureDate","module","c","charCodeAt","toString","toUpperCase","singleMatcher","RegExp","multiMatcher","decodeComponents","components","decodeURIComponent","err","left","right","prototype","call","decode","tokens","match","i","encodedURI","TypeError","replaceMap","%FE%FF","%FF%FE","entries","Object","keys","customDecodeURIComponent","document","getElementById","_react","_reactPlacesAutocomplete","props","_useState","useState","_useState2","_slicedToArray3","searchTerm","setSearchTerm","_useState3","_useState4","setActiveInput","_useState5","_useState6","_queryStr","queryToUpdate","_useState7","_useState8","prevSuggestions","setPrevSuggestions","_useState9","_useState10","canClear","setCanClear","useEffect","useCurrentLocation","getAddress","currentLocation","geocoder","google","maps","Geocoder","position","_position$coords","geocodeLatLng","latlng","geocode","results","formatted_address","onSelect","handleSelect","shouldNotUpdateAddress","_latLng","geocodeByAddress","getLatLng","latLng","setUserLocation","fetchParkings","fetchRecommendedParkings","finally","removeItem","searchOptions","types","componentRestrictions","handleActiveInput","clearInput","_react2","_reactPlacesAutocomplete2","onChange","includes","search","entry","exit","highlightFirstSuggestion","shouldFetchSuggestions","_ref","getInputProps","getSuggestionItemProps","suggestions","className","onClick","placeholder","suggestion","_extends3","formattedSuggestion","mainText","secondaryText","degreesToRadians","degrees","Math","PI","lat1","lon1","lat2","lon2","dLat","dLon","sin","cos","atan2","sqrt","__esModule","_promise","fn","gen","apply","step","arg","info","done","g","Function","hadRuntime","regeneratorRuntime","getOwnPropertyNames","oldRuntime","e","global","Op","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","inModule","runtime","wrap","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","GeneratorFunctionPrototype","Generator","create","GeneratorFunction","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","__await","defineIteratorMethods","AsyncIterator","async","innerFn","outerFn","self","tryLocsList","iter","next","object","reverse","pop","Context","reset","skipTempReset","prev","sent","_sent","delegate","tryEntries","resetTryEntry","charAt","isNaN","stop","rootRecord","completion","rval","dispatchException","exception","context","handle","loc","caught","record","tryLoc","hasCatch","hasFinally","catchLoc","finallyLoc","Error","abrupt","finallyEntry","complete","afterLoc","finish","thrown","delegateYield","iterable","resultName","nextLoc","protoGenerator","generator","_invoke","state","doneResult","delegateResult","maybeInvokeDelegate","tryCatch","makeInvokeMethod","previousPromise","callInvokeWithMethodAndArg","Promise","invoke","unwrapped","return","pushTryEntry","locs","iteratorMethod","_api","weatherData","setWeatherData","_asyncToGenerator3","_regenerator2","_callee","_context","weatherGeo","hostname","weather","renderResults","t0","temp","main","imgCode","icon","today","Date","day","getDay","month","formatMonth","getMonth","place","src","toFixed","getDate","apiKey","_getGoogleApiKey2","rmap","setMap","rmaps","setMaps","setDirectionsService","setWalkingDirectionsDisplay","setDrivingDirectionsDisplay","_useState11","_useState12","walkingTime","_useState13","_useState14","setWeatherGeo","_useState15","_useState16","errorState","_useState17","_useState18","carParkShowingDirections","setCarParkShowingDirections","_useState19","_useState20","markerHeight","setMarkerHeight","_useState21","_useState22","markers","setMarkers","OnFilterList","carParks","renderMarkers","renderOptions","polylineOptions","strokeOpacity","icons","path","scale","strokeColor","offset","repeat","preserveViewport","_markers","setMapOnAll","el","_icon","externalCarParkInfo","pinUrl","marker","Marker","LatLng","scaledSize","Size","optimized","addListener","setTimeout","onPriceMarkerClick","handleApiLoaded","_directionsService","DirectionsService","_walkingDirectionsDisplay","DirectionsRenderer","_drivingDirectionsDisplay","handleCurrentAddress","alert","activeCarPark","$target","domEvent","target","offsetHeight","handleClickMarker","panTo","mapData","center","style","height","width","_googleMapReact2","bootstrapURLKeys","yesIWantToUseGoogleMapApiInternals","onGoogleApiLoaded","_ref3","params","bounds","marginBounds","onMapChange","minZoom","options","gestureHandling","clickableIcons","_PinMarker2","infoWindowData","_InfoWindow2","setBookOnlinePark","setBookOnlineState","setCarParkCode","mapLatLng","projection","getProjection","getBounds","topRight","fromLatLngToPoint","getNorthEast","bottomLeft","getSouthWest","pow","getZoom","worldPoint","y","latLngToPixel","ne","sw","newLatlng","fromPointToLatLng","Point","pixelToLatLng","clearInfo","services","formatBookUrl","highlightClass","featuredIndex","_WeatherInfo2","stopPropagation","color","_getDistanceFomGeoPoints2","fromPrice","backgroundImage","href","hasClass","monthlyParkingServiceIsAvailable","cpmsCarparkCode","region","abbreviation","carParkNumber","carParkFeature","entryDate","setEntryDate","exitDate","setExitDate","entryTime","setEntryTime","exitTime","setExitTime","activeIndex","setActiveIndex","setResults","openResult","setOpenResult","setCallApi","canBookState","setCanBookState","showPromoCode","setShowPromoCode","promoCode","setPromoCode","bookOnlinePark","timer","fetchSearch","clearTimeout","canBook","bookOnlineState","carParkCode","keyword","apiUrL","res","hits","dangerouslySetInnerHTML","__html","htmlFor","id","onKeyDown","handleKey","required","_OutsideAlerter2","delta","deltaAttr","attr","offsetHeader","top","animate","scrollTop","_DayPickerInput2","inputProps","autoComplete","formatDate","MomentLocaleUtils","parseDate","dayPickerProps","locale","localeUtils","firstDayOfWeek","disabledDays","before","onDayChange","_rcTimePicker2","showSecond","format","use12Hours","minuteStep","inputReadOnly","disabled","entryMMYY","_moment2","entryDD","getUTCDate","entryHHMM","exitMMYY","exitDD","exitHHMM","carParkCodeValue","urlObj","URL","searchParams","has","set","append","updateCarParkCode","open","OutsideAlerter","ref","wrapperRef","useRef","handleClickOutside","current","contains","addEventListener","removeEventListener","children","propTypes","PropTypes","element","isRequired","setCarParks","setActiveCarPark","loadingHook","setLoadingHook","setSort","setCurrentSort","userLocation","parkingLocation","setParkingLocation","filters","setFilters","_useState23","_useState24","currentAddress","setCurrentAddress","_useState25","_useState26","setDestination","_useState27","_useState28","setMapData","_useState29","_useState30","setZoom","_useState31","_useState32","viewBtnText","setViewBtnText","_useState33","_useState34","mapViewClass","setMapViewClass","getSearchQuery","inputDest","updateDestination","apiUrl","tempDest","updateFiltersQuery","filtered","history","replaceState","updateURLParameter","selectCarPark","carPark","_BookOnlineBlock2","_MonthlyRecommendedParking2","title","hasPills","_SimpleLocationSearchBar2","applyFilters","updateFilters","_SimpleLocationSearchResult2","handleActiveCarPark","applySort","sortkey","_MapViewBlock2","newBtnText","MonthlyRecommendedParking","setPlace","fetchData","blockid","getParkingUrl","imgUrl","price","renderPropsCard","renderCard","setAddress","showMoreFiltersDialogue","setShowMoreFiltersDialogue","urlQueryAddress","handleFilterChange","oneFilter","checked","_AddressSearchBar2","data-key","SearchResultCell","activeClass","$container","querySelector","$element","$sort","offsetY","elem","siblings","previousElementSibling","previousSiblings","previousValue","currentValue","scroll","callbackClick","fromText","bookabayUrl","toggleSort","setToggleSort","data-field","selected","augmentedParkingItem","parkingItem","recenter"],"mappings":"qPAQAA,EAAA,UACAA,EAAA,UACAA,EAAA,MACAC,EAAAD,EAAA,QACAA,EAAA,iEAEaE,yCACX,SAAAA,EAAYC,IAAK,EAAAC,EAAAC,SAAAC,KAAAJ,GAEfI,KAAKH,IAAMA,EACXG,KAAKC,mBAAqBC,EAAEF,KAAKH,KAAKM,KAAK,OAC3CH,KAAKI,QAAUF,EAAEF,KAAKH,KAAKM,KAAK,WAChCH,KAAKK,KAAOH,EAAEF,KAAKH,KAAKM,KAAK,QAC7BH,KAAKM,KAAOJ,EAAEF,KAAKH,KAAKM,KAAK,QAC7BH,KAAKO,OAASL,EAAEF,KAAKH,KAAKM,KAAK,UAE/BH,KAAKQ,IAAMN,EAAEF,KAAKH,KAAKM,KAAK,OAC5BH,KAAKS,IAAMP,EAAEF,KAAKH,KAAKM,KAAK,OAC5BH,KAAKU,QAAUR,EAAEF,KAAKH,KAAKM,KAAK,WAGhCH,KAAKW,eAAiBT,EAAEF,KAAKH,KAAKM,KAAK,kBACvCH,KAAKY,cAAgBV,EAAEF,KAAKH,KAAKM,KAAK,iBACtCH,KAAKa,eAAiBX,EAAEF,KAAKH,KAAKM,KAAK,kBACvCH,KAAKc,UAAYZ,EAAEF,KAAKH,KAAKM,KAAK,aAClCH,KAAKe,QAAUb,EAAEF,KAAKH,KAAKM,KAAK,WAIhCH,KAAKgB,OAASC,KAAKC,MAAMlB,KAAKH,IAAIsB,QAAQH,QAC1ChB,KAAKoB,gBAAkBpB,KAAKH,IAAIsB,QAAQC,gBACxCpB,KAAKqB,gBAAkBrB,KAAKH,IAAIsB,QAAQE,gBACxCrB,KAAKsB,eAAiBtB,KAA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N,EAAqBrD,QAAQ3J,cAAgB,EAAG,kBAAkB,GAChI4L,YAAaoB,EAAqBrD,UAAYrgB,EAAMmT,cAAgB,aAAe,GACnFkQ,YAAarjB,EAAMwW,cAAckN,EAAqBrD,QAAQ9I,eAC9DnhB,YAAa4J,EAAM5J,YACnBE,SAAUotB,EAAqBptB,SAC/B1C,QAASoM,EAAMpM,QACfU,UAAW0L,EAAM1L,UACjBR,KAAMkM,EAAMlM,KACZ8vB,SAAU5jB,EAAM8e,WAChBhpB,KAAMkK,EAAMlK,KAGZif,kBAAmB/U,EAAM+U,kBACzBC,mBAAoBhV,EAAMgV,mBAC1BC,eAAgBjV,EAAMiV","file":"block-88.b9f88d4cffa17521b332.js","sourcesContent":["// CONSTANTS are all caps.\nconst NS = 'SimpleLocationSearchContainer';\nconst CLS = 'simpleLocationSearchContainer';\nconst BLK = '.' + CLS + '-';\n\n// Import stuff here if you need to or even better to import them dynamically\n// for ex. of dynamic import check out ./loadBlk.js using Webpack dynamic imports as chunks.\n// import $ from 'jquery'\nimport queryString from 'global/js/query-string.js';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { utils } from '../../../../global/js/utils.js';\nimport rSimpleLocationSearchContainer from './SimpleLocationSearchContainer.jsx';\n\nexport class SimpleLocationSearchContainer {\n constructor($el) {\n // $el is the blk node return by the loadSimpleLocationSearchContainer function\n this.$el = $el;\n this.parkinglocationApi = $(this.$el).data('api');\n this.ctaText = $(this.$el).data('ctatext');\n this.zoom = $(this.$el).data('zoom');\n this.type = $(this.$el).data('type');\n this.pageid = $(this.$el).data('pageid');\n\n this.lat = $(this.$el).data('lat');\n this.lng = $(this.$el).data('lng');\n this.address = $(this.$el).data('address');\n // this is google pos from navigator\n // this.userLocationPos = {};\n this.stayLongerText = $(this.$el).data('staylongertext');\n this.stayLongerUrl = $(this.$el).data('staylongerurl');\n this.carparkfeature = $(this.$el).data('carparkfeature');\n this.ctatarget = $(this.$el).data('ctatarget');\n this.country = $(this.$el).data('country');\n\n // book online\n console.log(this.$el.dataset);\n this.states = JSON.parse(this.$el.dataset.states);\n this.bookonlineTitle = this.$el.dataset.bookonlineTitle;\n this.autocompleteApi = this.$el.dataset.autocompleteApi;\n this.bookonlineDesc = this.$el.dataset.bookonlineDesc;\n this.mainTitle = this.$el.dataset.mainTitle;\n this.bookonlinePlaceholder = this.$el.dataset.bookonlinePlaceholder;\n this.bookonlineWheretofind = this.$el.dataset.bookonlineWheretofind;\n // recommended parking feature\n this.recommendedParkingFeature = $(this.$el).data(\n 'recommendedparkingfeature'\n );\n this.recommendedParkingApi = $(this.$el).data('recommendedparkingapi');\n this.recommendedParkingCtaText = $(this.$el).data(\n 'recommendedparkingctatext'\n );\n this.recommendedParkingBgColor = $(this.$el).data(\n 'recommendedparkingbgcolor'\n );\n this.iconBookOnline = this.$el.dataset.iconBookOnline;\n this.iconMonthlyParking = this.$el.dataset.iconMonthlyParking;\n this.iconParkingCard = this.$el.dataset.iconParkingCard;\n this.iconEvCharger = this.$el.dataset.iconEvCharger;\n this.iconLabelBookOnline = this.$el.dataset.iconLabelBookOnline;\n this.iconLabelMonthlyParking = this.$el.dataset.iconLabelMonthlyParking;\n this.iconLabelParkingCard = this.$el.dataset.iconLabelParkingCard;\n this.iconLabelEvCharger = this.$el.dataset.iconLabelEvCharger;\n this.cpms = this.$el.dataset.cpms;\n this.submitButtonLabel = this.$el.dataset.submitButtonLabel;\n this.bookABayUrl = this.$el.dataset.bookABayUrl;\n }\n\n init() {\n // const parsedQuery = queryString.parse(location.search);\n\n // if(!parsedQuery.address) {\n // \twindow.history.replaceState('', '', utils.updateURLParameter(window.location.href, 'address', this.address));\n // }\n\n const parsedQuery = utils.getLocationFromStorage();\n\n if (parsedQuery.lat && parsedQuery.lng) {\n // if it has defined the destination in home page\n // use this destination\n let destination = {\n lat: Number(parsedQuery.lat),\n lng: Number(parsedQuery.lng),\n distance: 20,\n };\n\n // Add Some logic here\n this.updateQueryBinding(destination);\n this.setSimpleLocationSearchContainer(destination);\n return;\n } else if (this.lat && this.lng) {\n let destination = {\n lat: Number(this.lat),\n lng: Number(this.lng),\n distance: 20,\n };\n // Add Some logic here\n this.updateQueryBinding(destination);\n this.setSimpleLocationSearchContainer(destination);\n return;\n }\n\n this.setSimpleLocationSearchContainer();\n }\n\n setSimpleLocationSearchContainer(destination) {\n console.log(destination);\n if (destination && destination.lat && destination.lng) {\n const defaultProps = {\n destination: {\n lat: destination.lat,\n lng: destination.lng,\n distance: 20,\n },\n userLocationPos: {},\n api: this.parkinglocationApi,\n ctaText: this.ctaText,\n type: this.type,\n zoom: this.zoom,\n country: this.country,\n\n pageid: this.pageid,\n stayLongerText: this.stayLongerText,\n stayLongerUrl: this.stayLongerUrl,\n carparkfeature: this.carparkfeature,\n\n states: this.states,\n mainTitle: this.mainTitle,\n ctatarget: this.ctatarget,\n\n bookonlineTitle: this.bookonlineTitle,\n bookonlinePlaceholder: this.bookonlinePlaceholder,\n bookonlineWheretofind: this.bookonlineWheretofind,\n bookonlineDesc: this.bookonlineDesc,\n autocompleteApi: this.autocompleteApi,\n\n recommendedParkingFeature: this.recommendedParkingFeature,\n recommendedParkingApi: this.recommendedParkingApi,\n recommendedParkingCtaText: this.recommendedParkingCtaText,\n recommendedParkingBgColor: this.recommendedParkingBgColor,\n iconBookOnline: this.iconBookOnline,\n iconMonthlyParking: this.iconMonthlyParking,\n iconParkingCard: this.iconParkingCard,\n iconEvCharger: this.iconEvCharger,\n iconLabelBookOnline: this.iconLabelBookOnline,\n iconLabelMonthlyParking: this.iconLabelMonthlyParking,\n iconLabelParkingCard: this.iconLabelParkingCard,\n iconLabelEvCharger: this.iconLabelEvCharger,\n cpms: this.cpms,\n submitButtonLabel: this.submitButtonLabel,\n bookABayUrl: this.bookABayUrl,\n };\n\n this.updateQueryBinding(defaultProps.destination);\n ReactDOM.render(\n React.createElement(rSimpleLocationSearchContainer, defaultProps),\n this.$el\n );\n return;\n }\n\n // if destination undefined, use current location\n if (navigator.geolocation) {\n console.log(navigator.geolocation);\n\n navigator.geolocation.getCurrentPosition(\n // successful callback\n (pos) => {\n const defaultProps = {\n destination: {\n lat: destination ? destination.lat : pos.coords.latitude,\n lng: destination ? destination.lng : pos.coords.longitude,\n distance: 20,\n },\n userLocationPos: pos,\n api: this.parkinglocationApi,\n ctaText: this.ctaText,\n country: this.country,\n\n zoom: this.zoom,\n pageid: this.pageid,\n type: this.type,\n stayLongerText: this.stayLongerText,\n stayLongerUrl: this.stayLongerUrl,\n carparkfeature: this.carparkfeature,\n mainTitle: this.mainTitle,\n ctatarget: this.ctatarget,\n\n states: this.states,\n bookonlineTitle: this.bookonlineTitle,\n bookonlineDesc: this.bookonlineDesc,\n autocompleteApi: this.autocompleteApi,\n bookonlinePlaceholder: this.bookonlinePlaceholder,\n bookonlineWheretofind: this.bookonlineWheretofind,\n\n recommendedParkingFeature: this.recommendedParkingFeature,\n recommendedParkingApi: this.recommendedParkingApi,\n recommendedParkingCtaText: this.recommendedParkingCtaText,\n recommendedParkingBgColor: this.recommendedParkingBgColor,\n iconBookOnline: this.iconBookOnline,\n iconMonthlyParking: this.iconMonthlyParking,\n iconParkingCard: this.iconParkingCard,\n iconEvCharger: this.iconEvCharger,\n iconLabelBookOnline: this.iconLabelBookOnline,\n iconLabelMonthlyParking: this.iconLabelMonthlyParking,\n iconLabelParkingCard: this.iconLabelParkingCard,\n iconLabelEvCharger: this.iconLabelEvCharger,\n cpms: this.cpms,\n submitButtonLabel: this.submitButtonLabel,\n bookABayUrl: this.bookABayUrl,\n };\n\n const _location =\n queryString.parse(localStorage.getItem('userLocation')) || {};\n _location['lat'] = defaultProps.destination.lat;\n _location['lng'] = defaultProps.destination.lat;\n localStorage.setItem('userLocation', $.param(_location));\n\n this.updateQueryBinding(defaultProps.destination);\n ReactDOM.render(\n React.createElement(rSimpleLocationSearchContainer, defaultProps),\n this.$el\n );\n },\n // error callback\n () => {\n const defaultProps = {\n destination: {\n // default central au\n lat: destination ? destination.lat : -23,\n lng: destination ? destination.lng : 133,\n distance: 20,\n },\n userLocationPos: {},\n api: this.parkinglocationApi,\n ctaText: this.ctaText,\n type: this.type,\n stayLongerText: this.stayLongerText,\n stayLongerUrl: this.stayLongerUrl,\n // parkinZoomApi: this.parkinZoomApi,\n // showEntryExitTimes: this.showEntryExitTimes,\n country: this.country,\n zoom: this.zoom,\n pageid: this.pageid,\n carparkfeature: this.carparkfeature,\n mainTitle: this.mainTitle,\n ctatarget: this.ctatarget,\n\n states: this.states,\n bookonlineTitle: this.bookonlineTitle,\n bookonlinePlaceholder: this.bookonlinePlaceholder,\n bookonlineWheretofind: this.bookonlineWheretofind,\n bookonlineDesc: this.bookonlineDesc,\n autocompleteApi: this.autocompleteApi,\n // limitFilters: this.limitFilters,\n\n recommendedParkingFeature: this.recommendedParkingFeature,\n recommendedParkingApi: this.recommendedParkingApi,\n recommendedParkingCtaText: this.recommendedParkingCtaText,\n recommendedParkingBgColor: this.recommendedParkingBgColor,\n iconBookOnline: this.iconBookOnline,\n iconMonthlyParking: this.iconMonthlyParking,\n iconParkingCard: this.iconParkingCard,\n iconEvCharger: this.iconEvCharger,\n iconLabelBookOnline: this.iconLabelBookOnline,\n iconLabelMonthlyParking: this.iconLabelMonthlyParking,\n iconLabelParkingCard: this.iconLabelParkingCard,\n iconLabelEvCharger: this.iconLabelEvCharger,\n cpms: this.cpms,\n submitButtonLabel: this.submitButtonLabel,\n bookABayUrl: this.bookABayUrl,\n };\n\n const _location =\n queryString.parse(localStorage.getItem('userLocation')) || {};\n _location['lat'] = defaultProps.destination.lat;\n _location['lng'] = defaultProps.destination.lat;\n localStorage.setItem('userLocation', $.param(_location));\n\n this.updateQueryBinding(defaultProps.destination);\n ReactDOM.render(\n React.createElement(rSimpleLocationSearchContainer, defaultProps),\n this.$el\n );\n }\n );\n } else {\n console.err('Geolocation is not supported by this browser.');\n }\n }\n\n updateQueryBinding(location) {\n // window.history.replaceState('', '', utils.updateURLParameter(window.location.href, 'lat', location.lat));\n // window.history.replaceState('', '', utils.updateURLParameter(window.location.href, 'lng', location.lng));\n }\n // Add more functions like on above here\n}\n","// fetch with GET does not allow body data\nexport function getApi(url) {\n\treturn fetch(url, {\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t})\n\t\t.then((response) => response.json())\n\t\t.then((response) => Promise.resolve(response))\n\t\t.catch((error) => {\n\t\t\tPromise.reject(error);\n\t\t});\n}\n\n// fetch with POST and others (DELETE, etc.)\nexport function callApi(url, data = {}, method = 'POST', headers = {}) {\n\theaders['Content-Type'] = 'application/json';\n\n\treturn fetch(url, {\n\t\tmethod: method,\n\t\tbody: JSON.stringify(data),\n\t\theaders: new Headers(headers),\n\t\tcredentials: 'same-origin',\n\t})\n\t.then((response) => response && response.json())\n\t.then((response) => Promise.resolve(response))\n\t.catch((error) => Promise.reject(error));\n}\n\n\nexport function isSuccessful(data) {\n\treturn (data.status == 200 || data.status == 'ok' || data.status == 'SUCCESS' || data.successful == true);\n}\n","'use strict';\nlet strictUriEncode = require('strict-uri-encode');\nlet objectAssign = require('object-assign');\nlet decodeComponent = require('decode-uri-component');\n\nfunction encoderForArrayFormat(opts) {\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function(key, value, index) {\n\t\t\t\treturn value === null ? [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tindex,\n\t\t\t\t\t']',\n\t\t\t\t].join('') : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[',\n\t\t\t\t\tencode(index, opts),\n\t\t\t\t\t']=',\n\t\t\t\t\tencode(value, opts),\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function(key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'[]=',\n\t\t\t\t\tencode(value, opts),\n\t\t\t\t].join('');\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function(key, value) {\n\t\t\t\treturn value === null ? encode(key, opts) : [\n\t\t\t\t\tencode(key, opts),\n\t\t\t\t\t'=',\n\t\t\t\t\tencode(value, opts),\n\t\t\t\t].join('');\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(opts) {\n\tlet result;\n\n\tswitch (opts.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn function(key, value, accumulator) {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn function(key, value, accumulator) {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t} else if (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn function(key, value, accumulator) {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction encode(value, opts) {\n\tif (opts.encode) {\n\t\treturn opts.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t} else if (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input)).sort(function(a, b) {\n\t\t\treturn Number(a) - Number(b);\n\t\t}).map(function(key) {\n\t\t\treturn input[key];\n\t\t});\n\t}\n\n\treturn input;\n}\n\nfunction extract(str) {\n\tlet queryStart = str.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\treturn str.slice(queryStart + 1);\n}\n\nfunction parse(str, opts) {\n\topts = objectAssign({arrayFormat: 'none'}, opts);\n\n\tlet formatter = parserForArrayFormat(opts);\n\n\t// Create an object with no prototype\n\t// https://github.com/sindresorhus/query-string/issues/47\n\tlet ret = Object.create(null);\n\n\tif (typeof str !== 'string') {\n\t\treturn ret;\n\t}\n\n\tstr = str.trim().replace(/^[?#&]/, '');\n\n\tif (!str) {\n\t\treturn ret;\n\t}\n\n\tstr.split('&').forEach(function(param) {\n\t\tlet parts = param.replace(/\\+/g, ' ').split('=');\n\t\t// Firefox (pre 40) decodes `%3D` to `=`\n\t\t// https://github.com/sindresorhus/query-string/pull/37\n\t\tlet key = parts.shift();\n\t\tlet val = parts.length > 0 ? parts.join('=') : undefined;\n\n\t\t// missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tval = val === undefined ? null : decodeComponent(val);\n\n\t\tformatter(decodeComponent(key), val, ret);\n\t});\n\n\treturn Object.keys(ret).sort().reduce(function(result, key) {\n\t\tlet val = ret[key];\n\t\tif (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(val);\n\t\t} else {\n\t\t\tresult[key] = val;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = function(obj, opts) {\n\tlet defaults = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t};\n\n\topts = objectAssign(defaults, opts);\n\n\tif (opts.sort === false) {\n\t\topts.sort = function() {};\n\t}\n\n\tlet formatter = encoderForArrayFormat(opts);\n\n\treturn obj ? Object.keys(obj).sort(opts.sort).map(function(key) {\n\t\tlet val = obj[key];\n\n\t\tif (val === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (val === null) {\n\t\t\treturn encode(key, opts);\n\t\t}\n\n\t\tif (Array.isArray(val)) {\n\t\t\tlet result = [];\n\n\t\t\tval.slice().forEach(function(val2) {\n\t\t\t\tif (val2 === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresult.push(formatter(key, val2, result.length));\n\t\t\t});\n\n\t\t\treturn result.join('&');\n\t\t}\n\n\t\treturn encode(key, opts) + '=' + encode(val, opts);\n\t}).filter(function(x) {\n\t\treturn x.length > 0;\n\t}).join('&') : '';\n};\n\nexports.parseUrl = function(str, opts) {\n\treturn {\n\t\turl: str.split('?')[0] || '',\n\t\tquery: parse(extract(str), opts),\n\t};\n};\n","/* eslint-disable no-trailing-spaces */\n/* eslint no-console: [\"error\", { allow: [\"warn\", \"error\", \"info\"] }] */\n/* eslint no-invalid-this: 0 */\n/* eslint max-len: 0 */\n/* eslint comma-dangle: 0 */\nexport function pushPageView(dataGroup) {\n\twindow.dataLayer.push({\n\t\tevent: 'pageView',\n\t\tecommerce: {\n\t\t\t// index: CustomDimensionID is TBA,\n\t\t\t// dataGroup needs to be specified in BE\n\t\t\t// Body tag in HTML to include Visitor Groups via a custom data attribute - data-group=\"{VisitorGroup}\"\n\t\t\tindex: '123',\n\t\t\tvalue: dataGroup,\n\t\t},\n\t});\n}\n\nexport function pushFormSubmit(formID) {\n\twindow.dataLayer.push({\n\t\tevent: 'formSubmit',\n\t\tecommerce: {\n\t\t\tcategory: 'form',\n\t\t\taction: 'submit',\n\t\t\tlabel: formID,\n\t\t\tvalue: null\n\t\t},\n\t\teventCallback: function() {\n\t\t\t// may need callback logic in the future..\n\t\t\t// if (url) {\n\t\t\t// \twindow.location = url;\n\t\t\t// }\n\t\t\t// if (form) {\n\t\t\t// \t$(form).submit();\n\t\t\t// }\n\t\t}\n\t});\n}\n\nexport function pushCarparkSearch(arrivalDate, departureDate, location) {\n\tif (window.dataLayer) {\n\t\twindow.dataLayer.push({\n\t\t\tevent: 'formSubmit',\n\t\t\tecommerce: {\n\t\t\t\tarrivalDate,\n\t\t\t\tdepartureDate,\n\t\t\t\tlocation,\n\t\t\t}\n\t\t});\n\t}\n}\n// reference for GTM carpark tracking\n// export function cartCheckoutButton(products, form) {\n// \t// map props to what we need only\n// \tlet mappedProducts = products.map(function(product) {\n// \t\tlet obj = {\n// \t\t\tid: product.itemSkuNumber,\n// \t\t\tname: product.name,\n// \t\t\tbrand: product.brand,\n// \t\t\tcategory: product.categoryName,\n// \t\t\tprice: (product.lineItemDiscountTotal.amount) ? product.lineItemDiscountTotal.amount || 0 : product.price.amount || 0,\n// \t\t\tquantity: product.quantity || 1\n// \t\t};\n// \t\tif (obj.name || obj.id) return obj;\n// \t});\n// \tif (mappedProducts.length > 0) {\n// \t\twindow.dataLayer.push({\n// \t\t\tevent: 'checkout',\n// \t\t\tecommerce: {\n// \t\t\t\tcheckout: {\n// \t\t\t\t\tactionField: {\n// \t\t\t\t\t\tstep: 1,\n// \t\t\t\t\t\toption: 'Checkout'\n// \t\t\t\t\t},\n// \t\t\t\t\tproducts: mappedProducts\n// \t\t\t\t}\n// \t\t\t},\n// \t\t\teventCallback: function() {\n// \t\t\t\t$(form).submit();\n// \t\t\t}\n// \t\t});\n// \t}\n// }\n","'use strict';\nmodule.exports = function (str) {\n\treturn encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n\t\treturn '%' + c.charCodeAt(0).toString(16).toUpperCase();\n\t});\n};\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher) || [];\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","export default () => {\n let element = document.getElementById('google-api-key');\n return element.value;\n};\n","import React, {useState, useEffect} from 'react';\nimport {utils} from '../../../../global/js/utils.js';\nimport * as dataLayer from '../../../../global/js/dataLayer';\nimport _ from 'lodash';\nimport queryString from '../../../../global/js/query-string';\nimport PlacesAutocomplete, {\n\tgeocodeByAddress,\n\tgetLatLng,\n} from 'react-places-autocomplete';\n\nconst AddressSearchBar = (props) => {\n\tconst [searchTerm, setSearchTerm] = useState('');\n\tconst [activeInput, setActiveInput] = useState('');\n\tconst [loaded, setLoaded]= useState(false);\n\tconst _queryStr = props.queryToUpdate || 'address';\n\tconst [prevSuggestions, setPrevSuggestions] = useState([]);\n\tconst [canClear, setCanClear] = useState(false);\n\n\tuseEffect(() => {\n\t\tif(props.useCurrentLocation === true) {\n\t\t\tif(props.getAddress === undefined || props.getAddress === '') {\n\t\t\t\tcurrentLocation();\n\t\t\t}\n\t\t}\n\t}, []);\n\n\t// useEffect(()=>{\n\t\t// _.debounce(() => {\n\t\t// \tif(!!searchTerm) onSelect(searchTerm);\n\t\t// }, 150)\n\t// }, [searchTerm]);\n\n\tconst currentLocation = () => {\n\t\tif (navigator.geolocation) {\n\t\t\t// eslint-disable-next-line no-undef\n\t\t\tlet geocoder = new google.maps.Geocoder;\n\t\t\tnavigator.geolocation.getCurrentPosition((position) => {\n\t\t\t\tconst {latitude, longitude} = position.coords;\n\t\t\t\tgeocodeLatLng(geocoder, {lat: latitude, lng: longitude});\n\t\t\t});\n\t\t} else {\n\t\t\tconsole.err('Geolocation is not supported by this browser.');\n\t\t}\n\t};\n\n\tconst geocodeLatLng = (geocoder, latlng) => {\n\t\tgeocoder.geocode({'location': latlng}, function(results, status) {\n\t\t\tif (status === 'OK') {\n\t\t\t\tif (results[0]) {\n\t\t\t\t\tsetSearchTerm(results[0].formatted_address);\n\t\t\t\t\tprops.onSelect(results[0].formatted_address);\n\t\t\t\t\t// window.history.replaceState('', '', utils.updateURLParameter(window.location.href, _queryStr, results[0].formatted_address));\n\t\t\t\t\tconst _location = queryString.parse(localStorage.getItem('userLocation')) || {};\n\t\t\t\t\t_location[_queryStr] = results[0].formatted_address;\n\t\t\t\t\t_location['lat'] = latlng.lat;\n\t\t\t\t\t_location['lng'] = latlng.lng;\n\t\t\t\t\tlocalStorage.setItem('userLocation', $.param(_location));\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('Geocoder failed due to: ' + status);\n\t\t\t}\n\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tif(props.getAddress) {\n\t\t\tsetSearchTerm(props.getAddress);\n\t\t\tsetCanClear(true);\n\t\t}\n\t}, [props.getAddress]);\n\n\n\tconst onSelect = (address) =>{\n\t\tif(prevSuggestions.length < 1 || address.length <= 10) {\n\t\t\treturn;\n\t\t}\n\n\t\tif(address.includes('Australia') === false && address.includes('New Zealand') === false) {\n\t\t\treturn;\n\t\t}\n\t\t// the following is an effort to work around the hard coded URL F-UP string and to allow the parent a back door to handle the update itself\n\t\tif(props.onSelect) {\n\t\t\tprops.onSelect(address);\n\t\t}\n\t\thandleSelect(address);\n\n\t\t// apply GTM datalayer search\n\t\tconst parsedQuery = queryString.parse(location.search);\n\t\tconst arrivalDate = parsedQuery.entry;\n\t\tconst departureDate = parsedQuery.exit;\n\t\tdataLayer.pushCarparkSearch(arrivalDate, departureDate, address);\n\t};\n\n\t// refactor the shouldNotUpdateAddress out\n\tconst handleSelect = (address, shouldNotUpdateAddress) => {\n\t\tsetSearchTerm(address);\n\n\t\t// OMG 😕 WHY HARD CODE THE ADDRESS ON A GENERIC COMPONENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t// window.history.replaceState('', '', utils.updateURLParameter(window.location.href, _queryStr, address));\n\t\tlet _latLng;\n\t\tgeocodeByAddress(address)\n\t\t\t.then((results) => getLatLng(results[0]))\n\t\t\t.then((latLng) => {\n\t\t\t\tconsole.log('Success', latLng);\n\t\t\t\t_latLng = latLng;\n\t\t\t\t// window.history.replaceState('', '', utils.updateURLParameter(window.location.href, 'lat', latLng.lat));\n\t\t\t\t// window.history.replaceState('', '', utils.updateURLParameter(window.location.href, 'lng', latLng.lng));\n\n\t\t\t\tif(props.setUserLocation) props.setUserLocation(latLng);\n\t\t\t\t// if (!props.preventFetchingResults) {\n\t\t\t\tif(props.fetchParkings) {\n\t\t\t\t\tprops.fetchParkings(latLng);\n\t\t\t\t}\n\n\t\t\t\tif(props.fetchRecommendedParkings) {\n\t\t\t\t\tprops.fetchRecommendedParkings(latLng);\n\t\t\t\t}\n\t\t\t\t// }\n\t\t\t})\n\t\t\t.catch((error) => console.error('Error', error))\n\t\t\t.finally(()=>{\n\t\t\t\tconst _location = queryString.parse(localStorage.getItem('searchLocation')) || {};\n\t\t\t\t_location[_queryStr] = address;\n\t\t\t\tif (_latLng) {\n\t\t\t\t\t_location['lat'] = _latLng.lat;\n\t\t\t\t\t_location['lng'] = _latLng.lng;\n\t\t\t\t}\n\t\t\t\tlocalStorage.setItem('searchLocation', $.param(_location));\n\t\t\t\tlocalStorage.removeItem('useCurrentLocation');\n\t\t\t});\n\t};\n\n\tconst searchOptions = {\n\t\ttypes: [],\n\t\tcomponentRestrictions: {\n\t\t\tcountry: !props.country ? 'au' : props.country,\n\t\t\t// country: 'au'\n\t\t},\n\t};\n\n\tconst handleActiveInput = ((str) => {\n\t\tsetActiveInput(str);\n\t});\n\n\tconst clearInput = () => {\n\t\tsetSearchTerm('');\n\t\tsetCanClear(false);\n\t};\n\n\tconst renderFunc = ({getInputProps, getSuggestionItemProps, suggestions}) => {\n\t\t// console.log(suggestions);\n\t\t// if(suggestions.length > 0) {\n\t\t// \tsetPrevSuggestions(suggestions)\n\t\t// } else {\n\t\t// \tsetPrevSuggestions([])\n\t\t// }\n\t\tsetPrevSuggestions(suggestions);\n\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t{canClear && (
)}\n\t\t\t\t
\n\t\t\t\t
0) ? 'show-border' : ''}`}>\n\t\t\t\t\t{suggestions.map((suggestion, i) => (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{suggestion.formattedSuggestion.mainText}\n\t\t\t\t\t\t\t, {suggestion.formattedSuggestion.secondaryText}\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t))}\n\t\t\t\t\t{suggestions.length > 0 &&\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tSearch near my location\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\tconst onChange = (address) => {\n\t\tif(address) setCanClear(true);\n\t\tsetSearchTerm(address);\n\t};\n\n\treturn (\n\t\t
\n\t\t\t\t= 2}\n\t\t\t\t\t>\n\t\t\t\t\t{renderFunc}\n\t\t\t\t\n\t\t
\n\t);\n};\n\nexport default AddressSearchBar;\n","function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n }\n\n export default function distanceInKmBetweenEarthCoordinates(lat1, lon1, lat2, lon2) {\n let earthRadiusKm = 6371;\n\n let dLat = degreesToRadians(lat2-lat1);\n let dLon = degreesToRadians(lon2-lon1);\n\n lat1 = degreesToRadians(lat1);\n lat2 = degreesToRadians(lat2);\n\n let a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);\n\tlet c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\n return earthRadiusKm * c;\n }\n","module.exports = require(\"regenerator-runtime\");\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _promise = require(\"../core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new _promise2.default(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return _promise2.default.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n// This method of obtaining a reference to the global object needs to be\n// kept identical to the way it is obtained in runtime.js\nvar g = (function() { return this })() || Function(\"return this\")();\n\n// Use `getOwnPropertyNames` because not all browsers support calling\n// `hasOwnProperty` on the global `self` object in a worker. See #183.\nvar hadRuntime = g.regeneratorRuntime &&\n Object.getOwnPropertyNames(g).indexOf(\"regeneratorRuntime\") >= 0;\n\n// Save the old regeneratorRuntime in case it needs to be restored later.\nvar oldRuntime = hadRuntime && g.regeneratorRuntime;\n\n// Force reevalutation of runtime.js.\ng.regeneratorRuntime = undefined;\n\nmodule.exports = require(\"./runtime\");\n\nif (hadRuntime) {\n // Restore the original runtime.\n g.regeneratorRuntime = oldRuntime;\n} else {\n // Remove the global property added by runtime.js.\n try {\n delete g.regeneratorRuntime;\n } catch(e) {\n g.regeneratorRuntime = undefined;\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() { return this })() || Function(\"return this\")()\n);\n","import React, {useEffect, useState} from 'react';\nimport { getApi } from \"../../../../global/js/api\";\n\nconst WindowInfo = (props) => {\n\tconst [weatherData, setWeatherData] = useState({});\n\n\tuseEffect(() => {\n\t\t// console.log('weather update...', props.weatherGeo);\n\n\t\t(async () => {\n\t\t\tif(!!props.weatherGeo && !!props.weatherGeo.lat && !!props.weatherGeo.lng) {\n\t\t\t\ttry {\n\t\t\t\t\tlet url = '';\n\t\t\t\t\t// if (location.hostname === \"localhost\" || location.hostname === \"127.0.0.1\" || location.hostname === 'wilson-parking.surge.sh') {\n\t\t\t\t\tif (location.hostname === 'wilson-parking.surge.sh') {\n\t\t\t\t\t\turl = `http://www.mocky.io/v2/5d0adb142f00006900e3ed17`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\turl = `/api/v2/GetWeather/${props.weatherGeo.lat}/${props.weatherGeo.lng}`;\n\t\t\t\t\t}\n\t\t\t\t\tlet data = await getApi(url);\n\t\t\t\t\tif(data && data.weather) {\n\t\t\t\t\t\t// console.log(data.weather);\n\n\t\t\t\t\t\trenderResults(data);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t}, [props.weatherGeo]);\n\n\tconst formatDay = (index) => {\n\t\tlet arr = [\n\t\t\t'Monday',\n\t\t\t'Tuesday',\n\t\t\t'Wednesday',\n\t\t\t'Thursday',\n\t\t\t'Friday',\n\t\t\t'Saturday',\n\t\t\t'Sunday',\n\t\t];\n\n\t\treturn arr[index - 1];\n\t}\n\n\tconst formatMonth = (index) => {\n\t\tlet arr = [\n\t\t\t'January',\n\t\t\t'February',\n\t\t\t'March',\n\t\t\t'April',\n\t\t\t'May',\n\t\t\t'June',\n\t\t\t'July',\n\t\t\t'August',\n\t\t\t'September',\n\t\t\t'October',\n\t\t\t'November',\n\t\t\t'December',\n\t\t];\n\n\t\treturn arr[index];\n\t}\n\n\tconst renderResults = (data) => {\n\t\t// let imgUrlPrefix = 'http://openweathermap.org/img/w/';\n\t\tlet temp = data.main.temp - 273.15;\n\t\tlet imgCode = data.weather[0].icon;\n\t\tlet today = new Date();\n\t\tlet day = formatDay(today.getDay());\n\t\tlet month = formatMonth(today.getMonth());\n\t\tlet place = data.name;\n\t\tlet weather = data.weather[0].main;\n\n\t\tsetWeatherData({\n\t\t\ttemp,\n\t\t\timgCode,\n\t\t\ttoday,\n\t\t\tday,\n\t\t\tmonth,\n\t\t\tplace,\n\t\t\tweather\n\t\t});\n\t}\n\n\treturn (\n\t\t
\n\t\t\t{/*
\n\t\t\t
*/}\n\t\t\t{\n\t\t\t\t(!!weatherData.weather) &&\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t{weatherData.temp.toFixed(0)}° & {weatherData.weather} on {weatherData.day} {weatherData.today.getDate()} {weatherData.month} in {weatherData.place}\n\t\t\t\t
\n\t\t\t}\n\t\t
\n\n\t);\n};\n\nexport default WindowInfo;\n","import React, {useState, useEffect} from 'react';\nimport GoogleMapReact from 'google-map-react';\nimport PinMarker from './PinMarker.jsx';\nimport InfoWindow from './InfoWindow.jsx';\nimport WeatherInfo from './WeatherInfo.jsx';\nimport getGoogleApi from '../../../../global/helpers/getGoogleApiKey';\n\nconst MapViewBlock = (props) => {\n\tconst apiKey = getGoogleApi();\n\t// const zoom = props.zoom ? props.zoom : 13;\n\t// const [moveToTriggerSearch, setMoveToTriggerSearch] = useState(true);\n\n\tconst [rmap, setMap] = useState(null);\n\tconst [rmaps, setMaps] = useState(null);\n\tconst [directionsService, setDirectionsService] = useState({});\n\tconst [walkingDirectionsDisplay, setWalkingDirectionsDisplay] = useState({});\n\tconst [drivingDirectionsDisplay, setDrivingDirectionsDisplay] = useState({});\n\n\tconst [walkingTime, setWalkingTime] = useState('');\n\tconst [weatherGeo, setWeatherGeo] = useState({});\n\tconst [errorState, setErrorState] = useState(false);\n\tconst [carParkShowingDirections, setCarParkShowingDirections] = useState(null);\n\tconst [markerHeight, setMarkerHeight] = useState(48);\n\tconst [markers, setMarkers] = useState([]);\n\t// const handleMoveToTriggerSearch = () => {\n\t// \tsetMoveToTriggerSearch(!moveToTriggerSearch);\n\t// };\n\n\tuseEffect(() => {\n\t\tif (props.OnFilterList) {\n\t\t\t// eslint-disable-next-line new-cap\n\t\t\tprops.OnFilterList(rmap);\n\t\t}\n\t}, [rmap, props.carParks]);\n\n\tuseEffect(() => {\n\t\tif (rmap && rmaps && props.carParks) {\n\t\t\tsetMarkers(renderMarkers(rmap, rmaps));\n\t\t}\n\t}, [rmap, rmaps, props.carParks]);\n\n\tconst geocodeLatLng = (geocoder, location) => {\n\t\tlet latlng = {lat: location.lat, lng: location.lng};\n\n\t\tgeocoder.geocode({location: latlng}, (results, status) => {\n\t\t\tif (status === 'OK') {\n\t\t\t\tif (results[0]) {\n\t\t\t\t\tprops.handleCurrentAddress(results[0].formatted_address);\n\t\t\t\t} else {\n\t\t\t\t\twindow.alert('No results found');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twindow.alert('Geocoder failed due to: ' + status);\n\t\t\t}\n\t\t});\n\t};\n\n\tlet lineSymbol = {\n\t\tpath: 'M 0,-1 0,1',\n\t\tstrokeOpacity: 1,\n\t\tscale: 4,\n\t\tstrokeColor: 'red',\n\t};\n\n\tlet renderOptions = {\n\t\tpolylineOptions: {\n\t\t\tstrokeOpacity: 0,\n\t\t\ticons: [\n\t\t\t\t{\n\t\t\t\t\ticon: lineSymbol,\n\t\t\t\t\toffset: '0',\n\t\t\t\t\trepeat: '20px',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tpreserveViewport: true,\n\t};\n\n\tconst renderMarkers = (map, maps)=> {\n\t\tlet _markers = [];\n\t\tif (markers.length) setMapOnAll(null);\n\t\tprops.carParks.map((el, index) => {\n\t\t\tconst _icon = el.externalCarParkInfo ? el.externalCarParkInfo.pinUrl : '/assets/images/map/pin.png';\n\t\t\tconst marker = new maps.Marker({\n\t\t\t\tposition: new maps.LatLng(el.location.latitude, el.location.longitude),\n\t\t\t\ticon: {\n\t\t\t\t\turl: _icon,\n\t\t\t\t\tscaledSize: new maps.Size(36, 48),\n\t\t\t\t},\n\t\t\t\toptimized: true,\n\t\t\t\tmap: map,\n\t\t\t});\n\n\t\t\tmarker.addListener('click', (e)=>{\n\t\t\t\tsetTimeout(()=> {\n\t\t\t\t\tonPriceMarkerClick(e, el);\n\t\t\t\t}, 200);\n\t\t\t});\n\n\t\t\t_markers.push(marker);\n\t\t});\n\t\treturn _markers;\n\t};\n\n\tconst setMapOnAll = (map) => {\n\t\tfor (let i = 0; i < markers.length; i++) {\n\t\t\tmarkers[i].setMap(map);\n\t\t}\n\t};\n\n\tconst handleApiLoaded = (map, maps) => {\n\t\tif (maps) {\n\t\t\tlet _directionsService = new maps.DirectionsService();\n\n\t\t\tlet _walkingDirectionsDisplay = new maps.DirectionsRenderer(renderOptions);\n\t\t\tlet _drivingDirectionsDisplay = new maps.DirectionsRenderer();\n\n\t\t\tlet geocoder = new maps.Geocoder();\n\n\t\t\t// decode current address location\n\t\t\tif (props.currentLocation.coords !== undefined && props.currentLocation.coords) {\n\t\t\t\tlet location = {\n\t\t\t\t\tlat: props.currentLocation.coords.latitude,\n\t\t\t\t\tlng: props.currentLocation.coords.longitude,\n\t\t\t\t};\n\t\t\t\tgeocodeLatLng(geocoder, location);\n\t\t\t} else {\n\t\t\t\tprops.handleCurrentAddress('available, please enable location services.');\n\t\t\t}\n\n\t\t\t// if call render outside loaded API\n\t\t\t// provide top level const params\n\t\t\t// console.log(map, maps);\n\n\t\t\tsetMap(map);\n\t\t\tsetMaps(maps);\n\t\t\tsetDirectionsService(_directionsService);\n\n\t\t\tsetWalkingDirectionsDisplay(_walkingDirectionsDisplay);\n\t\t\tsetDrivingDirectionsDisplay(_drivingDirectionsDisplay);\n\n\t\t\t_walkingDirectionsDisplay.setMap(map);\n\t\t\tsetCarParkShowingDirections(props.activeCarPark);\n\n\t\t\t// console.log(map, maps);\n\n\t\t\t// if call render inside loaded API\n\t\t\t// calculateAndDisplayRoute(_directionsService, _directionsDisplay, [_start, _end]);\n\t\t}\n\t};\n\n\tconst calculateAndDisplayRoute = (directionsService, directionsDisplay, [start, end], mode) => {\n\t\tdirectionsDisplay.setMap(rmap);\n\n\t\tdirectionsService.route(\n\t\t\t{\n\t\t\t\torigin: start,\n\t\t\t\tdestination: end,\n\t\t\t\ttravelMode: mode,\n\t\t\t},\n\t\t\t(response, status) => {\n\t\t\t\tif (status === 'OK') {\n\t\t\t\t\tconsole.log(response);\n\n\t\t\t\t\tlet dist = response.routes[0].legs[0].distance.text;\n\t\t\t\t\tlet time = response.routes[0].legs[0].duration.text;\n\n\t\t\t\t\tsetWalkingTime(`${dist}, ${time} ${mode == 'WALKING' ? 'walk' : 'drive'}`);\n\n\t\t\t\t\tdirectionsDisplay.setDirections(response);\n\t\t\t\t} else {\n\t\t\t\t\tsetErrorState(true);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetErrorState(false);\n\t\t\t\t\t}, 3000);\n\t\t\t\t\t// window.alert('Directions request failed due to ' + status);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\tconst latLngToPixel = (mapLatLng) => {\n\t\tlet projection = rmap.getProjection();\n\t\tlet bounds = rmap.getBounds();\n\t\tlet topRight = projection.fromLatLngToPoint(bounds.getNorthEast());\n\t\tlet bottomLeft = projection.fromLatLngToPoint(bounds.getSouthWest());\n\t\tlet scale = Math.pow(2, rmap.getZoom());\n\t\tlet worldPoint = projection.fromLatLngToPoint(new rmaps.LatLng(mapLatLng.latitude, mapLatLng.longitude));\n\t\tconst position = {\n\t\t\tx: (worldPoint.x - bottomLeft.x) * scale,\n\t\t\ty: (worldPoint.y - topRight.y) * scale,\n\t\t};\n\t\treturn position;\n\t};\n\n\tconst pixelToLatLng = (mapLatLng) => {\n\t\tconst pos = latLngToPixel(mapLatLng);\n\t\tpos.y = pos.y - markerHeight - 11;\n\t\tlet ne = rmap.getBounds().getNorthEast();\n\t\tlet sw = rmap.getBounds().getSouthWest();\n\t\tlet projection = rmap.getProjection();\n\t\tlet topRight = projection.fromLatLngToPoint(ne);\n\t\tlet bottomLeft = projection.fromLatLngToPoint(sw);\n\t\tlet scale = Math.pow(2, rmap.getZoom());\n\t\tlet newLatlng = projection.fromPointToLatLng(new rmaps.Point(pos.x / scale + bottomLeft.x, pos.y / scale + topRight.y));\n\t\treturn {lat: newLatlng.lat(), lng: newLatlng.lng()};\n\t};\n\n\tconst onPriceMarkerClick = (event, marker) => {\n\t\tconst $target = event.domEvent? event.domEvent.target : event.target;\n\t\tif ($target) setMarkerHeight($target.offsetHeight);\n\t\tprops.handleClickMarker(marker);\n\t\t// center map by clicked marker.\n\t\trmap.panTo({\n\t\t\tlat: marker.location.latitude,\n\t\t\tlng: marker.location.longitude,\n\t\t});\n\t};\n\n\tconst showPath = (selectedCarPark) => {\n\t\tif (rmap !== {} && rmaps !== {}) {\n\t\t\tlet selectedCarParkLatLng = new rmaps.LatLng(selectedCarPark.latitude, selectedCarPark.longitude);\n\n\t\t\tlet destinationLatLng = new rmaps.LatLng(props.destination.lat, props.destination.lng);\n\n\t\t\tsetWeatherGeo({\n\t\t\t\tlat: selectedCarPark.latitude,\n\t\t\t\tlng: selectedCarPark.longitude,\n\t\t\t});\n\n\t\t\t// if user current location is available...\n\t\t\tif (props.currentLocation.coords !== undefined && props.currentLocation.coords) {\n\t\t\t\tlet currentPos_ = new rmaps.LatLng(\n\t\t\t\t\tprops.currentLocation.coords.latitude,\n\t\t\t\t\tprops.currentLocation.coords.longitude\n\t\t\t\t);\n\n\t\t\t\tcalculateAndDisplayRoute(\n\t\t\t\t\tdirectionsService,\n\t\t\t\t\tdrivingDirectionsDisplay,\n\t\t\t\t\t[currentPos_, selectedCarParkLatLng],\n\t\t\t\t\t'DRIVING'\n\t\t\t\t);\n\t\t\t\tcalculateAndDisplayRoute(\n\t\t\t\t\tdirectionsService,\n\t\t\t\t\twalkingDirectionsDisplay,\n\t\t\t\t\t[selectedCarParkLatLng, destinationLatLng],\n\t\t\t\t\t'WALKING'\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcalculateAndDisplayRoute(\n\t\t\t\t\tdirectionsService,\n\t\t\t\t\twalkingDirectionsDisplay,\n\t\t\t\t\t[selectedCarParkLatLng, destinationLatLng],\n\t\t\t\t\t'WALKING'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\trmap.setZoom(13);\n\t\t}\n\t};\n\n\t/**\n\t * might need in the future\n\t * to display the route on react map\n\t * component including driving and walking path\n\t */\n\t// const showCarParkPath = () => {\n\t// \tif (!!props.activeCarPark) {\n\t// \t\tshowPath(props.activeCarPark.location);\n\t// \t\tsetCarParkShowingDirections(props.activeCarPark)\n\t// \t} else {\n\t// \t\tif (drivingDirectionsDisplay.setDirections !== undefined) {\n\t// \t\t\tdrivingDirectionsDisplay.setMap(null);\n\t// \t\t\tdrivingDirectionsDisplay.setDirections(null);\n\t// \t\t\twalkingDirectionsDisplay.setMap(null);\n\t// \t\t\twalkingDirectionsDisplay.setDirections(null);\n\t// \t\t\tsetCarParkShowingDirections(null)\n\t// \t\t}\n\t// \t}\n\t// };\n\n\t// useEffect(() => {\n\t// \tconsole.log(props.zoom);\n\t// }, [props.zoom]);\n\n\tuseEffect(() => {\n\t\tif (props.mapData.center) {\n console.log('useEffect ~ props.mapData.center', props.mapData.center);\n\t\t\tsetWeatherGeo({\n\t\t\t\tlat: props.mapData.center.lat,\n\t\t\t\tlng: props.mapData.center.lng,\n\t\t\t});\n\t\t}\n\t}, [props.mapData.center]);\n\n\tfunction onMapChange(params) {\n\t\tconst {center, zoom, bounds, marginBounds} = params;\n\t\tif (props.onMapChange) {\n\t\t\t// props.onMapChange(center, zoom > 10 ? zoom : 10, bounds, marginBounds, rmap);\n\t\t\tprops.onMapChange(center, zoom, bounds, marginBounds, rmap);\n\t\t}\n\t\tif (props.OnFilterList) {\n\t\t\t// eslint-disable-next-line new-cap\n\t\t\tprops.OnFilterList(rmap);\n\t\t}\n\t}\n\n\tif (!props.mapData.center) return null;\n\treturn (\n\t\t// Important! Always set the container height explicitly\n\t\t
\n\t\t\t handleApiLoaded(map, maps)}\n\t\t\t\tclassName=\"googleMapReact\"\n\t\t\t\t// onChildClick={onChildClick}\n\t\t\t\tonChange={onMapChange}\n\t\t\t\tzoom={props.zoom}\n\t\t\t\tminZoom={1}\n\t\t\t\toptions={{gestureHandling: 'greedy', clickableIcons: false}}\n\t\t\t>\n\t\t\t\t{/* render the price markers */}\n\t\t\t\t{/* {props.carParks.map((el, index) => (\n\t\t\t\t\t{\n\t\t\t\t\t\t\tonPriceMarkerClick(event, el);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t// isWilsonOne={el.isWilsonOne}\n\t\t\t\t\t\t// center={props.mapData.center}\n\t\t\t\t\t\t// onChange={onMapChange}\n\t\t\t\t\t/>\n\t\t\t\t))} */}\n\n\t\t\t\t\n\n\t\t\t\t{!!props.activeCarPark && props.infoWindowData && props.infoWindowData.location && (\n\t\t\t\t\t 0? 'carpark-feature':''}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\n\t\t\t{/* popup weather infomation window */}\n\t\t\t\n\t\t\t{errorState && (\n\t\t\t\t
\n\t\t\t\t\t⚠️ Could not establish direction\n\t\t\t\t
\n\t\t\t)}\n\t\t
\n\t);\n};\n\nexport default MapViewBlock;\n","import React from 'react';\n\nconst PinMarker = (props) => {\n\treturn (\n\t\t
\n\t);\n};\n\nexport default PinMarker;\n","import React from 'react';\nimport getCarParkDistance from '../../../../global/helpers/getDistanceFomGeoPoints';\n\nconst InfoWindow = (props) => {\n\tif (props.name == undefined) {\n\t\treturn null;\n\t}\n\n\tconst getParkingUrl = () => {\n\t\tif ($('body').hasClass('en-NZ') && props.monthlyParkingServiceIsAvailable && props.cpms) {\n\t\t\treturn props.cpms.replace('{0}', props.cpmsCarparkCode || '');\n\t\t}\n\t\treturn props.url;\n\t};\n\n\tconst renderIcons = (services) => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{\n\t\t\t\t\tservices.indexOf('book a bay') > -1 &&\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
{props.iconLabelBookOnline || 'Book Online'}
\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tservices.indexOf('monthly') > -1 &&\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
{props.iconLabelMonthlyParking || 'Monthly Parking'}
\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tservices.indexOf('wilson one') > -1 &&\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
{props.iconLabelParkingCard || 'Parking Card'}
\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tservices.indexOf('ev charging') > -1 &&\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
{props.iconLabelEvCharger || 'EV Charging'}
\n\t\t\t\t\t
\n\t\t\t\t}\n\t\t\t
\n\t\t);\n\t};\n\n\tconst handleClick = (event) => {\n\t\tevent.stopPropagation();\n\t};\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
{props.name}
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
{props.location.address}
\n\t\t\t\t{props.walkingTime &&\n\t\t\t\t\t
{props.walkingTime}
\n\t\t\t\t}\n\t\t\t\t
{`${(getCarParkDistance(props.lat, props.lng, props.destination.lat, props.destination.lng)).toFixed(2)} km direct`}
\n\t\t\t\t{props.fromPrice &&\n\t\t\t\t
\n\t\t\t\t\tFrom\n\t\t\t\t\t{/* {props.rates[0] !== undefined && (\n\t\t\t\t\t\t${props.rates[0].rates[0].price}\n\t\t\t\t\t)} */}\n\t\t\t\t\t${props.fromPrice}\n\t\t\t\t
\n\t\t\t\t}\n\n\t\t\t\t{/* icon sets */}\n\t\t\t\t{ props.services &&\n\t\t\t\t\trenderIcons(props.services)\n\t\t\t\t}\n\t\t\t\t{/* button sets */}\n\t\t\t\t
\n\t\t\t\t\t{ props.type === 'monthly' && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{props.ctaText}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{ props.type === 'bookonline' && (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t// console.log(props.location.region.state.abbreviation);\n\t\t\t\t\t\t\tprops.setBookOnlinePark(props.name);\n\t\t\t\t\t\t\tprops.setBookOnlineState(props.location.region.state.abbreviation);\n\t\t\t\t\t\t\tprops.setCarParkCode(props.carParkNumber);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"btn btn-primary text book-btn w-33\">\n\t\t\t\t\t\t\t{props.ctaText}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{props.carParkFeature.includes('Book a Bay') && props.type != 'monthly' && props.type != 'bookonline' && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{props.ctaText}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t\n\t\t\t\t\t\tView Details\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tGet Directions\n\t\t\t\t\t\n\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default InfoWindow;\n","// todo remove the mock api url\n// ...\nimport TimePicker from 'rc-time-picker';\nimport React, { useEffect, useState } from 'react';\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\nimport OutsideAlerter from './OutsideAlerter.jsx';\n\nimport moment from 'moment';\nimport MomentLocaleUtils from 'react-day-picker/moment';\nimport { getApi, isSuccessful } from '../../../../global/js/api';\n\n// autocompleteApi={props.autocompleteApi}\n// states={props.states}\n// bookonlineTitle={props.bookonlineTitle}\n// bookonlineDesc={props.bookonlineDesc}\nconst momentDateFormat = 'DD/MM/YYYY';\n\n// https://bookabay.wilsonparking.com.au/public/flow.htm?&entryDD=29&entryMMYY=1220&entryHHMM=2100\n/**\n *\n * @param {string} props.autocompleteApi\n * @param {array} props.states\n * @param {string} props.bookonlineTitle\n * @param {html} props.bookonlineDesc\n */\nconst BookOnlineBlock = (props) => {\n const [entryDate, setEntryDate] = useState('');\n const [exitDate, setExitDate] = useState('');\n const [entryTime, setEntryTime] = useState(null);\n const [exitTime, setExitTime] = useState(null);\n\n // for auto-complete search\n // const [keyword, setKeyword] = useState(props.bookOnlinePark);\n const [activeIndex, setActiveIndex] = useState(0);\n const [results, setResults] = useState([]);\n const [openResult, setOpenResult] = useState(false);\n\n // typing will trigger api\n const [callApi, setCallApi] = useState(false);\n\n const [canBookState, setCanBookState] = useState(false);\n const [showPromoCode, setShowPromoCode] = useState(false);\n const [promoCode, setPromoCode] = useState('');\n\n const format = 'HH:mm';\n\n // this is onchange func for search car parking input\n useEffect(() => {\n console.log(props.bookOnlinePark);\n if (props.bookOnlinePark.length < 3) {\n setOpenResult(false);\n return;\n }\n\n const timer = setTimeout(() => {\n if (callApi) {\n fetchSearch(props.bookOnlinePark);\n }\n }, 500);\n\n return () => clearTimeout(timer);\n }, [props.bookOnlinePark]);\n\n // this is onchange func for search car parking input\n useEffect(() => {\n if (canBook() == true) {\n setCanBookState(true);\n } else {\n setCanBookState(false);\n return;\n }\n }, [\n props.bookOnlineState,\n props.carParkCode,\n props.bookOnlinePark,\n entryDate,\n exitDate,\n entryTime,\n exitTime,\n ]);\n\n const canBook = () => {\n if (\n entryDate !== null &&\n exitDate !== null &&\n entryTime !== null &&\n exitTime !== null &&\n entryDate !== '' &&\n exitDate !== '' &&\n entryTime !== '' &&\n exitTime !== '' &&\n // carparkcode is number\n props.carParkCode > 0 &&\n props.bookOnlineState.length > 0 &&\n props.bookOnlinePark.length > 0\n ) {\n return true;\n }\n return false;\n };\n\n const updateCarParkCode = (url, carParkCodeValue) => {\n const urlObj = new URL(url);\n if (urlObj.searchParams.has('carParkCode')) {\n urlObj.searchParams.set('carParkCode', carParkCodeValue);\n } else {\n urlObj.searchParams.append('carParkCode', carParkCodeValue);\n }\n return urlObj.toString();\n };\n\n const bookNow = () => {\n // ('0' + MyDate.getDate()).slice(-2)\n let entryMMYY = moment(entryDate).format('MMYY');\n let entryDD = ('0' + entryDate.getUTCDate()).slice(-2);\n let entryHHMM = `${entryTime.split(':')[0]}${entryTime.split(':')[1]}`;\n\n let exitMMYY = moment(exitDate).format('MMYY');\n let exitDD = ('0' + exitDate.getUTCDate()).slice(-2);\n let exitHHMM = `${exitTime.split(':')[0]}${exitTime.split(':')[1]}`;\n\n let url = updateCarParkCode(props.bookABayUrl, props.carParkCode);\n url =\n url + `&entryDD=${entryDD}&entryMMYY=${entryMMYY}&entryHHMM=${entryHHMM}`;\n url = url + `&exitDD=${exitDD}&exitMMYY=${exitMMYY}&exitHHMM=${exitHHMM}`;\n url = url + `&state=${props.bookOnlineState}`;\n\n if (promoCode.length > 0) {\n url = url + `&voucherCode=${promoCode}`;\n }\n\n console.log(url);\n window.open(url, '_blank');\n };\n\n const setParkingScrollToAnchor = (el) => {\n let $target = $(`.simpleLocationSearchBar`);\n let delta = 0;\n let deltaAttr = $('.siteHeader').attr('data-sticky');\n if (typeof deltaAttr !== 'undefined' && deltaAttr !== 'false') {\n delta = $('.siteHeader').height();\n }\n let offsetHeader = $target.offset().top - delta * 2 - 16;\n console.log('offset', $target.offset().top);\n if ($target.length) {\n $('html, body').stop().animate(\n {\n scrollTop: offsetHeader,\n },\n 1000\n );\n }\n };\n\n // this is func handling keyboard key\n const handleKey = (e) => {\n switch (e.key) {\n case 'Escape':\n setOpenResult(false);\n break;\n\n case 'Enter':\n setOpenResult(false);\n if (results[activeIndex]) {\n props.setBookOnlinePark(results[activeIndex].name);\n props.setBookOnlineState(results[activeIndex].state);\n }\n break;\n\n case 'ArrowUp':\n if (activeIndex - 1 >= 0) setActiveIndex(activeIndex - 1);\n break;\n\n case 'ArrowDown':\n if (activeIndex + 1 <= results.length - 1) {\n setActiveIndex(activeIndex + 1);\n }\n break;\n\n default:\n break;\n }\n };\n\n const fetchSearch = (keyword) => {\n setCallApi(false);\n\n let apiUrL = `${props.autocompleteApi}?keyword=${keyword}&state=${props.bookOnlineState}`;\n\n getApi(apiUrL).then((data) => {\n if (isSuccessful(data)) {\n console.log(data);\n let res = data.hits;\n if (res.length > 0) {\n setOpenResult(true);\n setResults(res);\n } else {\n console.log(res);\n return;\n }\n }\n });\n };\n\n return (\n
\n
\n

{props.bookonlineTitle}

\n
\n
\n
\n \n props.setBookOnlineState(e.target.value)}\n className='form-control'\n name='stateSelect'\n id=''\n >\n {props.states &&\n props.states.map((e, i) => (\n \n ))}\n \n
\n
\n \n {/* This is auto complete search for car park */}\n {\n setCallApi(true);\n props.setBookOnlinePark(e.target.value);\n }}\n onKeyDown={(e) => handleKey(e)}\n className='form-control'\n name='carpark'\n id='carpark'\n placeholder={props.bookonlinePlaceholder}\n value={props.bookOnlinePark}\n required=''\n >\n\n {results.length > 0 && openResult && (\n
\n \n
\n
    \n {results.map((e, i) => (\n {\n setOpenResult(false);\n props.setBookOnlinePark(e.name);\n props.setBookOnlineState(e.state);\n props.setCarParkCode(e.carParkCode);\n }}\n >\n {e.name}\n \n ))}\n
\n
\n
\n
\n )}\n\n \n {props.bookonlineWheretofind}\n \n
\n
\n
\n {/* entry date */}\n
\n \n \n {\n if (day) {\n setEntryDate(day);\n setExitDate('');\n }\n }}\n />\n
\n {/* entry time */}\n
\n \n {\n if (value) {\n value = value.format(format);\n setEntryTime(value);\n }\n }}\n use12Hours\n minuteStep={30}\n inputReadOnly\n />\n
\n {/* exit date */}\n
\n \n \n {\n if (day) {\n setExitDate(day);\n }\n }}\n />\n {props.stayLongerText}\n
\n {/* exit time */}\n
\n \n {\n if (value) {\n value = value.format(format);\n setExitTime(value);\n }\n }}\n use12Hours\n minuteStep={30}\n inputReadOnly\n />\n
\n
\n
\n {!showPromoCode && (\n
setShowPromoCode(true)}>\n \n \n I have a promo code\n \n
\n )}\n\n {showPromoCode && (\n
\n \n {\n setPromoCode(e.target.value);\n }}\n className='form-control promocode-input'\n placeholder=''\n value={promoCode}\n required=''\n />\n
\n )}\n\n
\n \n {props.submitButtonLabel}\n \n
\n
\n
\n \n );\n};\n\nexport default BookOnlineBlock;\n","import React, { useRef, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * Hook that alerts clicks outside of the passed ref\n */\nfunction useOutsideAlerter(ref, setOpenResult) {\n useEffect(() => {\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event) {\n if (ref.current && !ref.current.contains(event.target)) {\n\t\tconsole.log('oooooooooooutside');\n\t\tsetOpenResult(false)\n\t } else {\n\t\t console.log('iiinside');\n\t }\n }\n // Bind the event listener\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n // Unbind the event listener on clean up\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n}\n\n/**\n * Component that alerts if you click outside of it\n */\nfunction OutsideAlerter(props) {\n const wrapperRef = useRef(null);\n useOutsideAlerter(wrapperRef, props.setOpenResult);\n\n return
{props.children}
;\n}\n\nOutsideAlerter.propTypes = {\n children: PropTypes.element.isRequired\n};\n\nexport default OutsideAlerter;\n","/**\n * TODO\n * drag search\n */\n\nimport queryString from 'global/js/query-string.js';\nimport React, { useEffect, useState } from 'react';\nimport { getApi } from '../../../../global/js/api';\nimport { utils } from '../../../../global/js/utils.js';\nimport BookOnlineBlock from '../../bookOnlineBlock/js/BookOnlineBlock.jsx';\nimport MapViewBlock from '../../mapViewBlock/js/MapViewBlock.jsx';\nimport MonthlyRecommendedParking from '../../MonthlyRecommendedParking/js/MonthlyRecommendedParking.jsx';\nimport SimpleLocationSearchBar from './SimpleLocationSearchBar.jsx';\nimport SimpleLocationSearchResult from './SimpleLocationSearchResult.jsx';\n\nconst SimpleLocationSearchContainer = (props) => {\n const [carParks, setCarParks] = useState([]);\n const [activeCarPark, setActiveCarPark] = useState(null);\n const [loadingHook, setLoadingHook] = useState(false);\n\n // book online\n const [bookOnlinePark, setBookOnlinePark] = useState('');\n const [bookOnlineState, setBookOnlineState] = useState('');\n const [carParkCode, setCarParkCode] = useState('');\n\n // top search bar\n const [sort, setSort] = useState([]);\n const [currentSort, setCurrentSort] = useState('');\n\n // recommended car parking\n const [parkingLocation, setParkingLocation] = useState(\n props.userLocation || null\n );\n\n const [filters, setFilters] = useState([]);\n\n // contains geolocation for Google map api\n // type is pos returning Google geo json\n const [currentLocation, setCurrentLocation] = useState(props.userLocationPos);\n\n // just for string address text\n const [currentAddress, setCurrentAddress] = useState('');\n\n const [destination, setDestination] = useState(props.destination);\n const [mapData, setMapData] = useState({\n center: {\n lat: props.destination.lat,\n lng: props.destination.lng,\n },\n distance: props.destination.distance,\n });\n\n const [zoom, setZoom] = useState(props.zoom || 12);\n\n // for mobile device view exchange\n const [viewBtnText, setViewBtnText] = useState('List View');\n const [mapViewClass, setMapViewClass] = useState('');\n\n /**\n * initial loading the component\n */\n useEffect(() => {\n fetchParkings();\n }, []);\n\n /**\n * @carParkFeature car park selected filters value\n * @inputDest address search bar address data\n * @carParkFeature selected car park feature array\n */\n const getSearchQuery = (inputDest) => {\n const parsedQuery = queryString.parse(location.search);\n // const lat = parsedQuery.lat;\n // const lng = parsedQuery.lng;\n const sort = parsedQuery.sort;\n const carParkFeature = parsedQuery.carParkFeature;\n\n return `pageid=${props.pageid}&latitude=${inputDest.lat}&longitude=${\n inputDest.lng\n }&carParkFeature=${carParkFeature}&sort=${sort}&distance=${\n inputDest.distance === undefined ? 20 : inputDest.distance\n }`;\n };\n\n const getMinViewScreenToDistance = (realZoom, realLat) => {\n // let tempZoom = realZoom? realZoom : zoom;\n // let tempLat = realLat ? realLat : mapData.center.lat;\n\n // // const zoomMeterPerPixels = [ 21282, 16355, 10064, 5540, 2909, 1485, 752, 378, 190, 95, 48, 24, 12, 6, 3, 1.48, 0.74, 0.37, 0.19 ];\n // // const zoomMeterPerPixel = zoomMeterPerPixels[tempZoom];\n // const mapContainer = document.getElementById('mapContainer');\n // const visibleScreenPixels = 0.5 * Math.max(mapContainer.clientWidth, mapContainer.clientHeight == 0 ? 672 : mapContainer.clientHeight);\n\n // // const distance = visibleScreenPixels * zoomMeterPerPixel;\n\n // const distance = visibleScreenPixels * 156543.03392 * Math.cos(tempLat * Math.PI / 180) / Math.pow(2, tempZoom);\n\n // // console.log(distance, tempZoom, tempLat);\n\n // return distance / 1000;\n return 20;\n };\n\n const fetchRecommendedParkings = (inputDest) => {\n // console.log('fetchRecommendedParkings', inputDest);\n setParkingLocation({\n lat: inputDest.lat,\n lng: inputDest.lng,\n });\n };\n\n /**\n * re-rendering carpark api call\n */\n const fetchParkings = (inputDest, updateDestination = true) => {\n console.log('fetchParkings', inputDest);\n let apiUrl = '';\n\n // if address search bar update address :)\n if (inputDest) {\n setMapData({\n center: {\n lat: inputDest.lat,\n lng: inputDest.lng,\n },\n distance: inputDest.distance\n ? inputDest.distance\n : getMinViewScreenToDistance(),\n });\n\n if (updateDestination === true) {\n setDestination({\n lat: inputDest.lat,\n lng: inputDest.lng,\n // distance: destination.distance\n distance: inputDest.distance\n ? inputDest.distance\n : getMinViewScreenToDistance(),\n });\n }\n\n apiUrl = `${props.api}?${getSearchQuery(inputDest)}`;\n } else {\n // if address search bar not update address\n // just update filter or sort\n // then just use current mapCenter from State\n const parsedQuery = utils.getLocationFromStorage();\n if (parsedQuery) {\n apiUrl = `${props.api}?${getSearchQuery(parsedQuery)}`;\n } else {\n let tempRadius = getMinViewScreenToDistance();\n let tempDest = {\n lat: mapData.center.lat,\n lng: mapData.center.lng,\n distance: tempRadius,\n };\n apiUrl = `${props.api}?${getSearchQuery(tempDest)}`;\n }\n }\n\n setLoadingHook(true);\n // reset car parks every time call api\n setCarParks([]);\n getApi(apiUrl).then((data) => {\n console.log(data);\n\n // set all data hooks\n setCarParks(data.carParks);\n setSort(data.sort);\n setFilters(data.filters);\n updateFiltersQuery(data.filters);\n\n setLoadingHook(false);\n });\n };\n\n /**\n * updating the filters hook when\n * updating the checkobxes\n * @param {name, bool} filter\n */\n const updateFilters = (filter) => {\n console.log('updateFilters', filter, filters);\n filters.map((el) => {\n if (el.key === filter.key) {\n el.filtered = filter.filtered;\n }\n return el;\n });\n setFilters(JSON.parse(JSON.stringify(filters)));\n };\n\n const applyFilters = () => {\n updateFiltersQuery(filters);\n fetchParkings();\n };\n\n const updateFiltersQuery = (filters) => {\n // get carParkFeature array & query binding\n let carParkFeature = filters\n .filter((el) => {\n return el.filtered === true;\n })\n .map((el) => el.key);\n window.history.replaceState(\n '',\n '',\n utils.updateURLParameter(\n window.location.href,\n 'carParkFeature',\n carParkFeature\n )\n );\n };\n\n /**\n * when car park result sort is\n * updating trigger api call\n */\n const applySort = (sortkey) => {\n console.log('applySort', sortkey);\n window.history.replaceState(\n '',\n '',\n utils.updateURLParameter(window.location.href, 'sort', sortkey)\n );\n setCurrentSort(sortkey);\n\n // update the sort\n // call carpark fetch api\n fetchParkings();\n };\n\n /**\n * these 3 functions for handling click event\n * for marker, left carpark result to set\n * current selected active car park in the result\n * and in the map view block\n *\n * @function handleActiveCarPark\n * @function handleClickMarker\n * @function selectCarPark\n *\n */\n const handleActiveCarPark = (carPark) => {\n selectCarPark(carPark);\n };\n\n const handleClickMarker = (carPark) => {\n selectCarPark(carPark);\n };\n\n const selectCarPark = (carPark) => {\n if (carPark) {\n setActiveCarPark(carPark);\n }\n };\n\n const handleCurrentAddress = (address) => {\n console.log('handleCurrentAddress', address);\n setCurrentAddress(address);\n };\n\n /**\n * exchange list view / map view in mobile device\n * */\n const handleViewChange = (text) => {\n let newBtnText = text == 'List View' ? 'Map View' : 'List View';\n setViewBtnText(newBtnText);\n if (newBtnText === 'List View') {\n setMapViewClass('visible');\n }\n if (newBtnText === 'Map View') {\n setMapViewClass('invisible');\n }\n };\n\n const handleMapChanged = (center, zoom, bounds, marginBounds) => {\n // const maxDistance = getDistanceFomGeoPoints(bounds.nw.lat, bounds.nw.lng, bounds.ne.lat, bounds.ne.lng);\n // const radius = maxDistance / 2;\n\n // if (Number.isNaN(radius)) {\n // \treturn;\n // }\n let radius = getMinViewScreenToDistance(zoom, center.lat);\n // console.log('handleMapChanged!', zoom, radius);\n\n setZoom(zoom);\n\n // dont need update map center data, will do in the api fetching...\n // call carpark api but\n // not update destination\n // fetchParkings({\n // \tlat: center.lat,\n // \tlng: center.lng,\n // \tdistance: radius,\n // }, false);\n\n fetchRecommendedParkings({\n lat: center.lat,\n lng: center.lng,\n });\n };\n\n const updateCarParkCode = (url, carParkCodeValue) => {\n const urlObj = new URL(url);\n if (urlObj.searchParams.has('carParkCode')) {\n urlObj.searchParams.set('carParkCode', carParkCodeValue);\n } else {\n urlObj.searchParams.append('carParkCode', carParkCodeValue);\n }\n return urlObj.toString();\n };\n\n const formatBookUrl = (carParkNumber) => {\n // let url = `https://bookabay.wilsonparking.com.au/public/flow.htm?_flowId=makeBooking-flow&carParkCode=${carParkNumber}`;\n return updateCarParkCode(props.bookABayUrl, carParkNumber);\n };\n\n return (\n
\n {props.type == 'bookonline' && (\n \n )}\n\n {props.recommendedParkingFeature && (\n \n \n
\n )}\n\n \n
\n
\n {/* Three types defined:\n\t\t\t\t\t\t1. monthly parking page \"monthly\"\n\t\t\t\t\t\t2. find a park page \"findapark\"\n\t\t\t\t\t\t3. book online page \"bookonline\"\n\t\t\t\t\t*/}\n \n
\n \n setActiveCarPark(null)}\n formatBookUrl={formatBookUrl}\n // OnFilterList={OnFilterList}\n setBookOnlinePark={setBookOnlinePark}\n setBookOnlineState={setBookOnlineState}\n setCarParkCode={setCarParkCode}\n iconBookOnline={props.iconBookOnline}\n iconMonthlyParking={props.iconMonthlyParking}\n iconParkingCard={props.iconParkingCard}\n iconEvCharger={props.iconEvCharger}\n iconLabelBookOnline={props.iconLabelBookOnline}\n iconLabelMonthlyParking={props.iconLabelMonthlyParking}\n iconLabelParkingCard={props.iconLabelParkingCard}\n iconLabelEvCharger={props.iconLabelEvCharger}\n cpms={props.cpms}\n />\n
\n
\n handleViewChange(viewBtnText)}\n >\n {viewBtnText}\n
\n \n
\n \n\n {/* loading spinner */}\n {\n
\n \n
\n }\n \n );\n};\n\nSimpleLocationSearchContainer.defaultProps = {\n recommendedParkingCtaText: 'Get a quote',\n recommendedParkingBgColor: 'blue',\n};\nexport default SimpleLocationSearchContainer;\n","\nimport React, {Component, useState, useEffect} from 'react';\nimport {getApi} from '../../../../global/js/api';\n\nconst MonthlyRecommendedParking = (props) => {\n\tconst [carParks, setCarParks] = useState([]);\n\tconst [place, setPlace] = useState('');\n\tconst [loadingHook, setLoadingHook] = useState(true);\n\n\tconst fetchData = (url) => {\n\t\tif(props.api === 'no') {\n\t\t\tsetLoadingHook(false);\n\t\t\treturn;\n\t\t}\n\n\t\tsetLoadingHook(true);\n\t\tgetApi(url).then((data) => {\n\t\t\tif(data && data.carParks && data.carParks.length > 0) {\n\t\t\t\tsetCarParks(data.carParks);\n\t\t\t\tsetLoadingHook(false);\n\t\t\t}\n\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tif(props.api === 'no') {\n\t\t\tsetLoadingHook(false);\n\t\t\treturn;\n\t\t}\n\n\t\tlet url = `${props.api}?`;\n\t\tif(props.blockid) {\n\t\t\turl += `blockid=${props.blockid}&`;\n\t\t}\n\n\t\tif(props.place) {\n\t\t\turl += `state=${place}&`;\n\t\t}\n\n\n\t\tif(props.useCurrentLocation === true) {\n\t\t\turl = url + `latitude=${props.userLocation.lat}&longitude=${props.userLocation.lng}`;\n\t\t\tfetchData(url);\n\t\t} else {\n\t\t\tsetPlace('NSW');\n\t\t}\n\t}, [props.blockid, props.place, props.useCurrentLocation]);\n\n\tuseEffect(() => {\n\t\tif(props.api === 'no') {\n\t\t\tsetLoadingHook(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif(!props.hasPills || place === '') {\n\t\t\treturn;\n\t\t}\n\n\t\tlet url = props.api;\n\n\t\tconsole.log(url, 'click');\n\t\tif(props.useCurrentLocation === true) {\n\t\t\turl = url + `?state=${place}&blockid=${props.blockid}` + `&latitude=${props.userLocation.lat}&longitude=${props.userLocation.lng}`;\n\t\t\tfetchData(url);\n\t\t} else {\n\t\t\turl = url + `?state=${place}&blockid=${props.blockid}`;\n\n\t\t\tfetchData(url);\n\t\t}\n\t}, [place]);\n\n\tconst getParkingUrl = (carPark) => {\n\t\tif ($('body').hasClass('en-NZ') && carPark.monthlyParkingServiceIsAvailable && props.cpms) {\n\t\t\treturn props.cpms.replace('{0}', carPark.cpmsCarparkCode || '');\n\t\t}\n\t\treturn carPark.url;\n\t};\n\n\tconst renderPropsCard = (el) => {\n\t\treturn (\n\t\t\t// collapse7 is the id of get a quote accordion item\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

{el.name}

\n\t\t\t\t\t\t
{el.status}
\n\t\t\t\t\t\t
{el.price}
\n\t\t\t\t\t\t{props.ctaText}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\tconst renderCard = (el) => {\n\t\treturn (\n\t\t\t// collapse7 is the id of get a quote accordion item\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

{el.name}

\n\t\t\t\t\t\t
{el.status}
\n\t\t\t\t\t\t
{el.price}
\n\t\t\t\t\t\t{props.ctaText}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\t// if(!carParks.length) return null;\n\treturn (\n\t\t
\n\t\t\t

{props.title}

\n\t\t\t{/* {\n\t\t\t\t!props.useCurrentLocation === true && */}\n\n\t\t\t{\n\t\t\t\tprops.hasPills &&\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tprops.states.map((state, i) =>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t}\n\n\t\t\t{/* } */}\n\n\t\t\t
\n\t\t\t\t{\n\t\t\t\t\tprops.carParks && props.carParks.length > 1 &&\n\t\t\t\t\tprops.carParks.map((el, i) => (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{renderPropsCard(el)}\n\t\t\t\t\t\t
\n\t\t\t\t\t))\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\t!props.carParks &&\n\t\t\t\t\tcarParks.map((el, i) => (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{renderCard(el)}\n\t\t\t\t\t\t
\n\t\t\t\t\t))\n\t\t\t\t}\n\t\t\t\t{/* loading spinner */}\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nMonthlyRecommendedParking.defaultProps = {\n\thasPills: true,\n};\n\nexport default MonthlyRecommendedParking;\n","import React, {Component, useState, useEffect} from 'react';\nimport AddressSearchBar from '../../addressSearchBar/js/AddressSearchBar.jsx';\nimport {utils} from '../../../../global/js/utils.js';\nimport queryString from 'global/js/query-string.js';\n\nconst SimpleLocationSearchBar = (props) => {\n\tconst [address, setAddress] = useState('');\n\t// const [filters, setFilters] = useState(props.filters);\n\tconst [userLocation, setUserLocation] = useState({lat: null, lng: null});\n\n\tconst [showMoreFiltersDialogue, setShowMoreFiltersDialogue] = useState(false);\n\n\tconst handleToggleFilters = () => {\n\t\tsetShowMoreFiltersDialogue(!showMoreFiltersDialogue);\n\t};\n\n\t// useEffect(() => {\n\t// \tif (userLocation.lat && userLocation.lng) {\n\t// \t\tconst { href } = window.location;\n\t// \t\tconsole.log(userLocation);\n\t// \t\twindow.history.replaceState(\"\", \"\", utils.updateURLParameter(href, \"lng\", userLocation.lng));\n\t// \t\twindow.history.replaceState(\"\", \"\", utils.updateURLParameter(href, \"lat\", userLocation.lat));\n\n\t// \t}\n\t// }, [userLocation]);\n\n\tuseEffect(() => {\n\t\tconst parsedQuery = utils.getLocationFromStorage();\n\t\tconst urlQueryAddress = parsedQuery.address;\n\t\t// const urlQueryCarParkFeature = parsedQuery.carParkFeature;\n\n\t\t// if (urlQueryCarParkFeature && urlQueryCarParkFeature != \"\") {\n\t\t\t// let featureArr = urlQueryCarParkFeature.split(\",\");\n\t\t\t// props.setSelectedMoreFilters(featureArr);\n\t\t// }\n\n\t\tif (urlQueryAddress && urlQueryAddress != '') {\n\t\t\tsetAddress(urlQueryAddress);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-undef\n\t\t\tlet geocoder = new google.maps.Geocoder();\n\t\t\tnavigator.geolocation.getCurrentPosition((position) => {\n\t\t\t\tconst {latitude, longitude} = position.coords;\n\t\t\t\tsetUserLocation({lat: latitude, lng: longitude});\n\t\t\t\tgeocodeLatLng(geocoder, {lat: latitude, lng: longitude});\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst geocodeLatLng = (geocoder, latlng) => {\n\t\tgeocoder.geocode({location: latlng}, function(results, status) {\n\t\t\tif (status === 'OK') {\n\t\t\t\tif (results[0]) {\n\t\t\t\t\tsetAddress(results[0].formatted_address);\n\t\t\t\t\t// window.history.replaceState(\n\t\t\t\t\t// \t'',\n\t\t\t\t\t// \t'',\n\t\t\t\t\t// \tutils.updateURLParameter(window.location.href, 'address', results[0].formatted_address)\n\t\t\t\t\t// );\n\t\t\t\t\tconst _location = queryString.parse(localStorage.getItem('userLocation')) || {};\n\t\t\t\t\t_location['address'] = results[0].formatted_address;\n\t\t\t\t\t_location['lat'] = latlng.lat;\n\t\t\t\t\t_location['lng'] = latlng.lng;\n\t\t\t\t\tlocalStorage.setItem('userLocation', $.param(_location));\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('Geocoder failed due to: ' + status);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * these 3 functions are for filters\n\t * @function handleFilterChange for filter checkbox event\n\t * @function applyFilters callback for carpark data api call\n\t * @function renderFilters render filters from props data\n\t */\n\n\tconst renderFilters = () => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{props.filters.map((filter, index) => (\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t))}\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t};\n\n\tconst handleFilterChange = (event, filter) =>\t{\n\t\tconsole.log(filter);\n\t\tif(event.target.checked != null) {\n\t\t\tlet oneFilter = {};\n\t\t\toneFilter = {\n\t\t\t\tname: filter.name,\n\t\t\t\tkey: filter.key,\n\t\t\t\tfiltered: event.target.checked,\n\t\t\t};\n\n\t\t\tconsole.log(oneFilter);\n\t\t\tprops.updateFilters(oneFilter);\n\t\t}\n\t};\n\n\tconst applyFilters = () => {\n\t\tsetShowMoreFiltersDialogue(false);\n\t\tprops.applyFilters();\n\t};\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t

{props.mainTitle}

\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tprops.carparkfeature &&\n\t\t\t\t\t\t\t\t\t handleToggleFilters()}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tCar park features\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tshowMoreFiltersDialogue && props.carparkfeature &&\n\t\t\t\t\t\t\t\t\trenderFilters()\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default SimpleLocationSearchBar;\n","import React, {useState, useEffect} from 'react';\nimport getCarParkDistance from '../../../../global/helpers/getDistanceFomGeoPoints';\n\nconst SearchResultCell = (props) => {\n\tconst previousSiblings = (elem) => {\n\t\t// create an empty array\n\t\tlet siblings = [];\n\n\t\t// loop through previous siblings until `null`\n\t\twhile (elem = elem.previousElementSibling) {\n\t\t\t// push sibling to array\n\t\t\tsiblings.push(elem);\n\t\t}\n\t\treturn siblings;\n\t};\n\n\tuseEffect(()=> {\n\t\tif (props.activeClass) {\n\t\t\tconst $container = document.querySelector('.simpleLocationSearchResultReact');\n\t\t\tconst $element = document.querySelector(`.searchResultCell.${props.activeClass}`);\n\t\t\tconst $sort = $container.querySelector('.d-flex');\n\t\t\tconst $previous = previousSiblings($element);\n\t\t\tconst offsetY = $previous.reduce((previousValue, currentValue)=> {\n\t\t\t\treturn previousValue + currentValue.offsetHeight + 8;\n\t\t\t}, $sort.offsetHeight + 16);\n\t\t\t$container.scroll(0, offsetY);\n\t\t}\n\t}, [props.activeClass]);\n\n\tconst getParkingUrl = () => {\n\t\tif ($('body').hasClass('en-NZ') && props.monthlyParkingServiceIsAvailable && props.cpms) {\n\t\t\treturn props.cpms.replace('{0}', props.cpmsCarparkCode || '');\n\t\t}\n\t\treturn props.url;\n\t};\n\n\treturn (\n\t\t props.callbackClick()}\n\t\t>\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{props.name}\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{/*
From
*/}\n\t\t\t\t\t{/* {props.rates[0] &&
${props.rates[0].rates[0].price}
} */}\n\t\t\t\t\t{props.fromText &&
{props.fromText}
}\n\t\t\t\t\t{props.fromPrice &&
${props.fromPrice}
}\n\t\t\t\t
\n\t\t\t
\n\t\t\t{props.location && props.location.address &&
{props.location.address}
}\n\t\t\t
{`${(props.distance).toFixed(2)} km`}
\n\t\t\t
\n\t\t\t\t{/* \n\t\t\t\t\tView details\n\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t{/* if it is Find a park page */}\n\t\t\t\t{props.carParkFeature.includes('Book a Bay') && props.type === 'findapark' && (\n\t\t\t\t\t\n\t\t\t\t\t\t{ props.ctaText && props.ctaText.length > 0 ? props.ctaText : 'Book now'}\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{/* if it is monthly parking page */}\n\t\t\t\t{/* collapse7 is the get a quote id */}\n\t\t\t\t{ props.type && props.type === 'monthly' && (\n\t\t\t\t\t\n\t\t\t\t\t\t{ props.ctaText && props.ctaText.length > 0 ? props.ctaText : 'Get a quote'}\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{/* {props.carParkFeature.includes(\"Book a Bay\") && (\n\t\t\t\t\t\n\t\t\t\t\t\tBook now\n\t\t\t\t\t\n\t\t\t\t)} */}\n\t\t\t\t{/* if it is bookonline parking page */}\n\t\t\t\t{ props.carParkFeature.includes('Book a Bay') && props.type && props.type === 'bookonline' && (\n\t\t\t\t\t {\n\t\t\t\t\t\t// console.log(props.location.region.state.abbreviation);\n\t\t\t\t\t\tprops.setBookOnlinePark(props.name);\n\t\t\t\t\t\tprops.setBookOnlineState(props.location.region.state.abbreviation);\n\t\t\t\t\t\tprops.setCarParkCode(props.carParkNumber);\n\t\t\t\t\t}} href={`#simpleLocationSearchContainer `} className=\"btn btn-outline-primary pointer fsp-14\">\n\t\t\t\t\t\t{ props.ctaText && props.ctaText.length > 0 ? props.ctaText : 'Book online'}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t
\n\t\t\t
\n\t\t\n\t);\n};\n\n/**\n *\n * @param {func} applySort\n * @param {array} sort\n */\n\nconst SimpleLocationSearchResult = (props) => {\n\tconst [toggleSort, setToggleSort] = useState(false);\n\n\tconst handleActiveCarPark = (parkingItem) => {\n\t\tprops.handleActiveCarPark(parkingItem);\n\t\tprops.setMapData({\n\t\t\tcenter: {\n\t\t\t\tlat: parkingItem.location.latitude,\n\t\t\t\tlng: parkingItem.location.longitude,\n\t\t\t},\n\t\t\tdistance: props.mapData.distance,\n\t\t});\n\t};\n\n\tconst augmentDistance = () => {\n\t\treturn props.carParks.map((carPark) => {\n\t\t\tconst distance = getCarParkDistance(\n\t\t\t\tcarPark.location.latitude,\n\t\t\t\tcarPark.location.longitude,\n\t\t\t\tprops.destination.lat,\n\t\t\t\tprops.destination.lng\n\t\t\t);\n\t\t\treturn {carPark, distance};\n\t\t});\n\t};\n\n\tconst renderSort = (sort) => {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{\n\t\t\t\t\tsort.map((el, i) => (\n\t\t\t\t\t
{\nprops.applySort(el.key);\n}}>{el.name}
\n\t\t\t\t\t))\n\t\t\t\t}\n\t\t\t
\n\t\t);\n\t};\n\n\treturn (\n\t\t
\n\t\t\t
\n\t\t\t\t
Showing {props.carParks && props.carParks.length} results in the area
\n\t\t\t\t
setToggleSort(!toggleSort)}>\n\t\t\t\t\t
\n\t\t\t\t\t\tSort\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t\ttoggleSort &&\n\t\t\t\t\t\trenderSort(props.sort)\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t{augmentDistance()\n\t\t\t\t\t.map((augmentedParkingItem) => (\n\t\t\t\t\t\t handleActiveCarPark(augmentedParkingItem.carPark)}\n\t\t\t\t\t\t\thighlightClass={augmentedParkingItem.carPark.featuredIndex && augmentedParkingItem.carPark.featuredIndex > 0? 'carpark-feature':''}\n\t\t\t\t\t\t\tactiveClass={augmentedParkingItem.carPark === props.activeCarPark ? 'isSelected' : ''}\n\t\t\t\t\t\t\tbookabayUrl={props.formatBookUrl(augmentedParkingItem.carPark.carParkNumber)}\n\t\t\t\t\t\t\tdestination={props.destination}\n\t\t\t\t\t\t\tdistance={augmentedParkingItem.distance}\n\t\t\t\t\t\t\tctaText={props.ctaText}\n\t\t\t\t\t\t\tctatarget={props.ctatarget}\n\t\t\t\t\t\t\ttype={props.type}\n\t\t\t\t\t\t\trecenter={props.setMapData}\n\t\t\t\t\t\t\tcpms={props.cpms}\n\n\t\t\t\t\t\t\t// book operation\n\t\t\t\t\t\t\tsetBookOnlinePark={props.setBookOnlinePark}\n\t\t\t\t\t\t\tsetBookOnlineState={props.setBookOnlineState}\n\t\t\t\t\t\t\tsetCarParkCode={props.setCarParkCode}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default SimpleLocationSearchResult;\n"],"sourceRoot":""}