{"version":3,"sources":["Components/Marker/marker.png","Components/Marker/active-marker.png","actions/types.js","utils/index.js","reducers/error.js","reducers/propertiesList.js","reducers/markers.js","reducers/activeItemId.js","reducers/filters.js","reducers/index.js","store/index.js","Components/PropertyList/index.js","Components/Property/index.js","constants/maps-styling.js","Components/Maps/index.js","constants/index.js","Components/Filters/index.js","Components/Marker/index.js","Components/Loader/index.js","constants/api.js","actions/index.js","Containers/MapsContainer/index.js","App.js","index.js"],"names":["module","exports","FETCH_PROPERTIES_LIST_REQUEST","FETCH_PROPERTIES_LIST_SUCCESS","FILTER_PROPERTIES_LIST","FETCH_MARKER_REQUEST","FETCH_MARKER_SUCCESS","SET_ACTIVE_MARKER","CLEAN_MARKERS","ON_API_ERROR","toMoney","num","arguments","length","undefined","options","symbol","decimal","thousand","precision","accounting","formatMoney","toNumber","unformat","createReducer","initialState","handlers","state","action","type","getGeocodeApiAddress","_ref","_ref$address","address","thoroughfare","locality","administrative_area","postal_code","country","concat","filterProperties","properties","filters","filter","property","propertyLocation","location","find","loc","depth","propertyLocationName","name","test","split","join","toLowerCase","appliedCity","isPropertyFit","field_dogs_allowed_value","dogs_allowed","field_cats_allowed_value","cats_allowed","field_unit_type_bedrooms_value","unit_types","some","unit","beds","field_unit_type_price_range_from","field_unit_type_price_range_to","to","priceMatch","item","from","numOfBeds","priceRanges","ut","reduce","acc","unitType","_unitType$price_range","price_range","Object","toConsumableArray","uniquePrices","Set","flatten","sort","a","b","p","range","isPriceMatch","neighborhoodsIds","tids","map","l","tid","isInNeighborhoods","intersection","errorReducer","error","defineProperty","payload","header","propertiesListReducer","isPropertiesFetching","filteredProperties","_createReducer","objectSpread","neighborhoods[]","appliedNeighborhoods","selectedBedroomNumber","_ref2","markers","markersReducer","markers_createReducer","fetching","nid","label","index","activeItemId","queryString","query","pairs","substr","i","pair","decodeURIComponent","neighField","keys","k","parseQuery","window","search","neighborhoods","pathname","pop","appliedFilters","filtersReducer","locations","forEach","propertyLoc","push","apply","value","uniqBy","combineReducers","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","middleware","applyMiddleware","thunk","store","createStore","reducer","PropertyList","props","_this","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","scrollComponentIntoView","propertyRef","isInViewport","document","body","scrollIntoView","documentElement","style","behavior","scrollTo","offsetTop","elem","bounding","getBoundingClientRect","bottom","innerWidth","height","top","left","innerHeight","clientHeight","right","clientWidth","onPropertiesScrolled","e","activeProperty","refsCollection","current","nib","parseInt","substring","onPropertySelected","propertyList","React","createRef","debounce","addEventListener","lists","removeEventListener","_this2","duration","start","scrollTop","change","currentTime","animateScroll","t","c","val","requestAnimationFrame","_this3","_this$props","react_default","createElement","className","ref","src_Components_Property","assign","key","uniqueId","isActive","el","onClick","closeMap","Component","defaultProps","Property","contact_form","preventDefault","trigger","target","_window$location","protocol","host","baseURL","pricing","static_pricing_text","pt","slice","link","hasPricingText","classNames","property-active","incentive_text","src","property_image_url","alt","href","url","title","line","email","data-email","data-property","onEmailClick","phone","has_virtual_tour","PureComponent","active","exampleMapStyles","elementType","stylers","color","visibility","featureType","Map","withScriptjs","withGoogleMap","activeMarkers","marker","lib","styles","scrollwheel","zoomControl","streetViewControl","fullscreenControl","mapTypeControl","defaultZoom","center","defaultCenter","id","Components_Marker","onMarkerClicked","bedroomOptions","GOOGLE_MAP_URL","Filters","updateURL","newURL","history","pushState","path","handleSubmit","_this$state","selectedNeigborhood","cats","dogs","handleFromChange","setState","handleToChange","handleBedroomChange","selectedOption","handleNeigborhoodChange","openMobileMenu","querySelector","click","toggleFilters","prevState","isFiltersShown","onCatsChanged","onDogsChanged","_props$filters$applie","appliedNeighborhoodsIds","opt","includes","prevProps","prevNeighborhoods","react_select_esm","classNamePrefix","components","Option","checked","isSelected","onChange","MultiValueLabel","values","closeMenuOnSelect","placeholder","isMulti","hideSelectedOptions","backspaceRemovesValue","isSearchable","_this$state2","formClasses","filters--form-visible","catsClasses","dogsClasses","xmlns","viewBox","d","fill","onSubmit","size","renderNeigborhoodSelect","htmlFor","Marker","anchor","google","maps","Point","zIndex","MarkerWithLabel","labelClass","iconClass","icon","activeMarkerIcon","markerIcon","Size","position","labelAnchor","Loader","Halogenium","API_GEOCODE","API_FETCH_PROPERTIES","fetchMarker","_callee3","_ref3","geoCodeAddress","_ref5","data","regenerator_default","wrap","_context3","prev","next","axios","get","sent","results","geometry","abrupt","stop","MapsContainer","onSetActiveMarker","classList","remove","reload","_this$props$filters","onFetchProperties","prevProperties","clearMarkers","onFetchMarkers","isEqual","coordinates","_this$props2","react","src_Components_Filters","onFilterProperties","Components_Maps","loadingElement","containerElement","mapElement","googleMapURL","src_Components_PropertyList","Components_Loader","renderBody","connect","dispatch","asyncToGenerator","mark","_callee","_context","types","t0","_x","fetchProperties","list","_list$reduce","_item$coordinates","latitude","longitude","existingMarkers","lat","lng","items","_ref4","_callee2","geoCodedMarkers","_context2","P","concurrency","_x3","fetchMarkers","setActiveMarker","App","es","src_Containers_MapsContainer","ReactDOM","render","src_App","getElementById"],"mappings":"2EAAAA,EAAAC,QAAA,wqCCAAD,EAAAC,QAAA,y7CCAaC,EAAgC,gCAChCC,EAAgC,gCAChCC,EAAyB,yBAEzBC,EAAuB,uBACvBC,EAAuB,uBACvBC,EAAoB,oBACpBC,EAAgB,gBAEhBC,EAAe,6ECLrB,SAASC,IAA6B,IAArBC,EAAqBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAf,EACtBG,EAAU,CACdC,OAFyCJ,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAL,IAGpCK,QAAS,IACTC,SAAU,IACVC,UAAW,GAEb,OAAOC,IAAWC,YAAYV,EAAKI,GAG9B,SAASO,EAASX,GACvB,OAAOS,IAAWG,SAASZ,GAGtB,SAASa,EAAcC,EAAcC,GAC1C,OAAO,WAA+C,IAA9BC,EAA8Bf,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAtBa,EAA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ZG9iZSBJbWFnZVJlYWR5ccllPAAAAS9QTFRFcXFx8PDwSEhIUlJS7u7ukZGRHR0dubm5Tk5OW1tbHx8fT09Pbm5uRkZGLy8vYWFhKioqBAQE6+vrjo6O1NTUAwMDBwcHg4OD5+fn8vLysrKyY2NjqKio39/faGho9vb2kpKSS0tLFhYWh4eHVVVVrq6uXV1dKCgovb297+/vt7e3tbW1WlpasLCwc3NzwMDA+fn529vb2NjYbW1t9PT0AgICfX19LS0tcHBwPj4+MTExiIiIMjIyxsbGv7+/rKysHBwcAQEB6enpOjo6FRUVNzc3lpaWr6+vdHR0BgYGlJSU0NDQqampRUVFKysrzMzMEhISiYmJEBAQ9fX12tratra2+/v7Li4u4eHh6urqSUlJuLi45OTk09PTl5eXZ2dnu7u7ra2tPT09AAAA////CdGCaQAAAGV0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAZaNKDAAABUklEQVR42ozVxXbDMBAF0LHdJG2aNtg0UGZmppSZmWn0/99QQ1LLFkzeSkfnrqTREzA+mbeeRDL5dVN5DmwDt949tKLo5vpiPSdF9+U88jGnRfSJQo5D6NFCSS7neJRJoTTpLR8tbKMqm/9oTWmwrVBFCdRk2UNnqE3WRa16tGPY6AiJdNnol0InM9CAZCZhkEZTsESjIZigUSP00qgFXutBzTQyYZ5GA3BOI6jnMH+AHVAm3Q0sQh6TfcEGhcacebL0Zt8duis96vdmXDuai3ce+tYeUu1JDWtQsYY+1CbiP/MmlYlyXTCqQjG+VdrlZi/YT31S1BlEMZlZCTedKZpboQ4LInoQi1UY9pSkfYthNCLr8ZJ4aZKyB948KX4EFufQuwrlfHOq+lu421llasQ2qsVs6NCLh0pMh1iHY8pMj5z5izMKsTzO0mg8K2z9CTAA+ti3zsb6ZMcAAAAASUVORK5CYII=\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAA0CAMAAADVCGoxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASNQTFRF/qab/pOF//b0/o1+/+Th/Xpp/p6R/X1s/s/J/pmL/tHL/tPO/WJO/WJN/pGC/qWZ/snC//Px//Du/WRQ/rKn//f2/X9u/WFM/rqx/XJf/rmv/pGD/XNh/pyP/ox8//Tz/tXP//j3/9jT/WRP//v7/Xxr/+zq/o+A//38/r62/r61/9vX/svE/qCU/rWs/ot8/q6j/W1a/tbQ/qGU//Hv/rSq/+jl/+Tg/ryz/Xtp/szG/piL/tLM/YZ2//n5/qic/rWr/s7H/ruy/X1r/+fj//X0/+7s/+vo/YJy//n4/WtY/+nm/W5b/WpW/szF/qid/Yd3/9/b/Xln/YR0/pqN/XFf/tPN/s3H//Lw/o5//pWH/tfS/qSY/+Le/qaa/WBL////wCXNSAAAAGF0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AK6AbzEAAAFTSURBVHjajNVXW8IwFAbg0xYQGSIgMgTFvfeeqLj33nry/3+FpbU2bcbhu8qT571KTr4A45N9OczUarNzM2OBbeDWK1NGGZ1czO9HpGgtlkc+1pCIJlHIbQhNGCjJ5hGPslGUJvXpo8FnVGX6H/UqDaZzfyiDmoy66Bu1qTioQ4+Kpo1ekciyjXYpNDwCA0jmALZo1IAFGj3BNo26YJxG/fDeDuqjkQVfNPqAbhpBO4d5A+yMMqk9YCXymOwLNim005onQ28WnaG716NVd8a1o1k8d1Fde0jek3rQoIKH1tWm5D/zTpUpc11wrEJJvlV65OYx2E9XUnQaREmZ+Qk3nSWaa6EOcyJKiMUqDHtU0r6FMFqS9XhcvDRJ2QNvmoofgVU5dKJCEd9sqP4W7nbumBp5ZZ02dejNRXGmQ8x59TGmR635qzIKsTxe0ihREbZ+BRgA862bkmaw/jwAAAAASUVORK5CYII=\"","export const FETCH_PROPERTIES_LIST_REQUEST = 'FETCH_PROPERTIES_LIST_REQUEST';\nexport const FETCH_PROPERTIES_LIST_SUCCESS = 'FETCH_PROPERTIES_LIST_SUCCESS';\nexport const FILTER_PROPERTIES_LIST = 'FILTER_PROPERTIES_LIST';\n\nexport const FETCH_MARKER_REQUEST = 'FETCH_MARKER_REQUEST';\nexport const FETCH_MARKER_SUCCESS = 'FETCH_MARKER_SUCCESS';\nexport const SET_ACTIVE_MARKER = 'SET_ACTIVE_MARKER';\nexport const CLEAN_MARKERS = 'CLEAN_MARKERS';\n\nexport const ON_API_ERROR = 'ON_API_ERROR';\n","import accounting from 'accounting';\nimport flatten from 'lodash/flatten';\nimport intersection from 'lodash/intersection';\n\nexport function toMoney(num = 0, curr = '$') {\n const options = {\n symbol: curr,\n decimal: ',',\n thousand: ',',\n precision: 0,\n };\n return accounting.formatMoney(num, options);\n}\n\nexport function toNumber(num) {\n return accounting.unformat(num);\n}\n\nexport function createReducer(initialState, handlers) {\n return function reducer(state = initialState, action) {\n if (handlers[action.type]) {\n return handlers[action.type](state, action);\n }\n return state;\n };\n}\n\nexport function easeInOutQuad(t, b, c, d) {\n t /= d/2;\n if (t < 1) {\n return c/2*t*t + b\n }\n t--;\n return -c/2 * (t*(t-2) - 1) + b;\n}\n\nexport function parseQuery(queryString) {\n const query = {};\n const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');\n // eslint-disable-next-line\n for (let i = 0; i < pairs.length; i++) {\n const pair = pairs[i].split('=');\n if (!query[decodeURIComponent(pair[0])]) {\n query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '');\n } else {\n query[decodeURIComponent(pair[0])] = `${query[decodeURIComponent(pair[0])]},${decodeURIComponent(pair[1] || '')}`;\n }\n }\n\n const neighField = Object.keys(query).find(k => /neighborhoods\\[.*\\]/.test(k));\n\n if (query[neighField]) {\n query['neighborhoods[]'] = query[neighField];\n }\n\n return query;\n}\n\nexport function getGeocodeApiAddress({address: {thoroughfare, locality, administrative_area, postal_code, country}}) {\n return `${thoroughfare}, ${locality}, ${administrative_area} ${postal_code}, ${country}`;\n}\n\n\nfunction isPriceMatch(item, from, to, numOfBeds = 0) {\n const {unit_types} = item;\n const units = unit_types.filter((ut) => (\n +ut.beds >= numOfBeds\n ));\n\n const priceRanges = units.reduce((acc, unitType) => {\n const {price_range = {}} = unitType;\n return [...acc, [toNumber(price_range.from), toNumber(price_range.to)]]\n }, []);\n\n if (!priceRanges.length) {\n return false;\n }\n\n const uniquePrices =[...new Set(flatten(priceRanges))].sort((a, b) => a - b);\n\n\n if (to === 0) {\n return uniquePrices.some(p => p >= from);\n }\n\n if (from === 0) {\n return uniquePrices.some(p => p <= to);\n }\n\n return uniquePrices.some(p => (p >= from && p <= to))\n || priceRanges.some(range => from >= range[0] && to <= range[1]);\n}\n\nexport function filterProperties(properties, filters) {\n return properties.filter(property => {\n\n if (!property.address) {\n return false;\n }\n\n const propertyLocation = property.location.find(loc => loc.depth === 2);\n\n if (!propertyLocation) {\n return false;\n }\n\n let propertyLocationName = propertyLocation.name;\n\n if (/\\s/.test(propertyLocationName)) {\n propertyLocationName = propertyLocationName.split(' ').join('-');\n }\n\n\n if (propertyLocationName.toLowerCase() !== filters.appliedCity) {\n return false;\n }\n\n let isPropertyFit = true;\n\n if (toNumber(filters.field_dogs_allowed_value) === 1) {\n isPropertyFit = isPropertyFit && property.dogs_allowed;\n }\n\n if (toNumber(filters.field_cats_allowed_value) === 1) {\n isPropertyFit = isPropertyFit && property.cats_allowed;\n }\n\n if (filters.field_unit_type_bedrooms_value) {\n isPropertyFit = property.unit_types.some(unit => unit.beds >= filters.field_unit_type_bedrooms_value);\n }\n\n\n if (filters.field_unit_type_price_range_from || filters.field_unit_type_price_range_to) {\n const to = toNumber(filters.field_unit_type_price_range_from);\n const from = toNumber(filters.field_unit_type_price_range_to);\n const priceMatch = isPriceMatch(property, from, to, filters.field_unit_type_bedrooms_value);\n\n isPropertyFit = isPropertyFit && priceMatch;\n }\n\n if (filters['neighborhoods[]']) {\n const neighborhoodsIds = filters['neighborhoods[]'].split(',');\n const tids = property.location.filter(loc => loc.depth === 3).map(l => l.tid);\n\n const isInNeighborhoods = intersection(neighborhoodsIds, tids);\n isPropertyFit = isPropertyFit && isInNeighborhoods.length > 0;\n }\n\n return isPropertyFit;\n }\n );\n}\n","import {\n ON_API_ERROR\n} from '../actions/types';\n\nimport { createReducer } from '../utils';\n\nconst initialState = {\n error: null\n};\n\nconst errorReducer = createReducer(initialState, {\n [ON_API_ERROR]: (state, payload) => {\n const {error, header} = payload;\n return {error, header};\n }\n});\n\nexport default errorReducer;\n","import {\n FETCH_PROPERTIES_LIST_REQUEST,\n FETCH_PROPERTIES_LIST_SUCCESS,\n FILTER_PROPERTIES_LIST\n} from '../actions/types';\n\nimport { createReducer, filterProperties } from '../utils';\n\nconst initialState = {\n isPropertiesFetching: false,\n properties: [],\n filteredProperties: []\n};\n\nconst propertiesListReducer = createReducer(initialState, {\n [FETCH_PROPERTIES_LIST_REQUEST]: state => ({\n ...state,\n isPropertiesFetching: true\n }),\n [FETCH_PROPERTIES_LIST_SUCCESS]: (state, {properties, filters}) => {\n const urlFilters = {\n field_unit_type_price_range_from: filters.from,\n field_unit_type_price_range_to: filters.to,\n 'neighborhoods[]': filters.appliedNeighborhoods,\n field_unit_type_bedrooms_value: filters.selectedBedroomNumber,\n field_cats_allowed_value: filters.field_cats_allowed_value,\n field_dogs_allowed_value: filters.field_dogs_allowed_value,\n appliedCity: filters.appliedCity\n };\n\n return {\n isPropertiesFetching: false,\n properties,\n filteredProperties: filterProperties(properties, urlFilters)\n };\n },\n [FILTER_PROPERTIES_LIST]: (state, {filters}) => {\n return {\n ...state,\n filteredProperties: filterProperties(state.properties, filters)\n }\n }\n});\n\nexport default propertiesListReducer;\n","import {\n FETCH_MARKER_SUCCESS,\n FETCH_MARKER_REQUEST,\n CLEAN_MARKERS\n} from '../actions/types';\n\nimport { createReducer } from '../utils';\n\nconst initialState = {\n markers: []\n};\n\nconst markersReducer = createReducer(initialState, {\n [FETCH_MARKER_REQUEST]: () => ({fetching: true, markers: []}),\n [FETCH_MARKER_SUCCESS]: (state, {markers: fetchedMarkers}) => {\n const markers = fetchedMarkers.map(({location, nid, index: label}) => {\n return {\n location,\n nid,\n label\n }\n });\n\n return {\n ...state,\n fetching: false,\n markers\n };\n },\n [CLEAN_MARKERS]: () => initialState\n});\n\nexport default markersReducer;\n","import {\n SET_ACTIVE_MARKER\n} from '../actions/types';\n\nimport { createReducer } from '../utils';\n\nconst initialState = {\n activeItemId: null\n};\n\nconst activeItemId = createReducer(initialState, {\n [SET_ACTIVE_MARKER]: (state, { nid }) => {\n return { activeItemId: nid };\n }\n});\n\nexport default activeItemId;\n","import {\n FETCH_PROPERTIES_LIST_SUCCESS\n} from '../actions/types';\nimport uniqBy from 'lodash/uniqBy';\n\nimport { createReducer, parseQuery } from '../utils';\n\nconst {\n field_unit_type_bedrooms_value,\n field_unit_type_price_range_to,\n field_unit_type_price_range_from,\n field_cats_allowed_value,\n field_dogs_allowed_value,\n 'neighborhoods[]': appliedNeighborhoods\n} = parseQuery(window.location.search);\n\nconst appliedCity = window.location.pathname.split('/').pop();\n\nconst initialState = {\n neighborhoods: [],\n appliedCity,\n appliedFilters: {\n appliedNeighborhoods,\n selectedBedroomNumber: field_unit_type_bedrooms_value,\n to: field_unit_type_price_range_to,\n from: field_unit_type_price_range_from,\n field_cats_allowed_value,\n field_dogs_allowed_value\n }\n};\n\nconst filtersReducer = createReducer(initialState, {\n [FETCH_PROPERTIES_LIST_SUCCESS]: (state, {properties}) => {\n const locations = [];\n\n properties.forEach((property) => {\n let propertyLoc = property.location.find(loc => loc.depth === 2);\n let propertyLocationName = propertyLoc && propertyLoc.name;\n\n if (propertyLocationName && /\\s/.test(propertyLocationName)) {\n propertyLocationName = propertyLocationName.split(' ').join('-');\n }\n\n if ((propertyLocationName || '').toLowerCase() === initialState.appliedCity) {\n locations.push(...property.location.filter(item => item.depth === 3));\n }\n });\n\n const neighborhoods = locations.map(loc => ({\n value: loc.tid,\n label: loc.name\n })).sort((a, b) => {\n if (a.label < b.label) {\n return -1;\n }\n return 1;\n });\n return {\n ...state,\n neighborhoods: uniqBy(neighborhoods, 'label')\n }\n }\n});\n\nexport default filtersReducer;\n","import { combineReducers } from 'redux';\nimport error from './error';\nimport properties from './propertiesList';\nimport markers from './markers';\nimport activeItemId from './activeItemId';\nimport filters from './filters';\n\nexport default combineReducers({\n error,\n properties,\n markers,\n activeItemId,\n filters\n});\n","import {createStore, applyMiddleware, compose} from 'redux';\nimport logger from 'redux-logger';\nimport thunk from 'redux-thunk';\nimport reducer from '../reducers';\n\nconst {NODE_ENV} = process.env;\n\nconst initialState = {};\n\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\nconst middleware = [\n applyMiddleware(thunk)\n];\n\nif (NODE_ENV !== 'production') {\n middleware.push(applyMiddleware(logger));\n}\n\nconst _store = createStore(\n reducer,\n initialState,\n composeEnhancers(...middleware)\n);\n\nexport const store = _store;\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport uniqueId from 'lodash/uniqueId';\nimport debounce from 'lodash/debounce';\nimport {Property} from '../../Components';\nimport {easeInOutQuad} from '../../utils';\nimport './index.css';\n\nclass PropertyList extends Component {\n static propTypes = {\n lists: PropTypes.arrayOf(PropTypes.shape({})),\n onPropertySelected: PropTypes.func.isRequired,\n closeMap: PropTypes.func.isRequired,\n activeItemId: PropTypes.number\n };\n\n static defaultProps = {\n lists: []\n };\n\n constructor(props) {\n super(props);\n\n this.propertyList = React.createRef();\n this.onPropertiesScrolled = debounce(this.onPropertiesScrolled, 100);\n this.refsCollection = {};\n }\n\n componentDidMount() {\n this.propertyList.current.addEventListener('scroll', this.onPropertiesScrolled);\n this.propertyList.current.addEventListener('resize', this.onPropertiesScrolled);\n\n if (!this.props.activeProperty && this.props.lists.length) {\n this.props.onPropertySelected(this.props.lists[0].nid);\n }\n }\n\n componentWillUnmount() {\n this.propertyList.current.removeEventListener('scroll', this.onPropertiesScrolled);\n this.propertyList.current.removeEventListener('resize', this.onPropertiesScrolled);\n }\n\n scrollComponentIntoView = (propertyRef) => {\n if (this.isInViewport(propertyRef)) {\n return false;\n }\n\n if (document.body.scrollIntoView && 'scrollBehavior' in document.documentElement.style) {\n return propertyRef.scrollIntoView({ behavior: 'smooth' });\n }\n\n this.scrollTo(propertyRef.offsetTop);\n }\n\n scrollTo(to, duration = 150) {\n const start = this.propertyList.current.scrollTop;\n const change = to - start;\n let currentTime = 0;\n const increment = 20;\n\n const animateScroll = () => {\n currentTime += increment;\n const val = easeInOutQuad(currentTime, start, change, duration);\n this.propertyList.current.scrollTop = val;\n\n if (currentTime < duration) {\n window.requestAnimationFrame(animateScroll);\n }\n };\n animateScroll();\n }\n\n isInViewport = function(elem) {\n const bounding = elem.getBoundingClientRect();\n const bottom = window.innerWidth < 450 ? 30 : (bounding.height / 2) - 30;\n\n return (\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom - bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n };\n\n onPropertiesScrolled = (e) => {\n const activeProperty = Object.keys(this.refsCollection).find(property => (\n this.refsCollection[property] && this.isInViewport(this.refsCollection[property].property.current)\n ));\n\n if (activeProperty) {\n const nib = parseInt(activeProperty.substring(8), 10);\n this.props.onPropertySelected(nib);\n }\n }\n\n render() {\n const {\n lists,\n activeItemId\n } = this.props;\n\n return (\n
\n
\n {lists.map((item, index) => (\n this.refsCollection[`property${item.nid}`] = el}\n onPropertySelected={this.onPropertySelected}\n scrollComponentIntoView={this.scrollComponentIntoView}\n />\n ))\n }\n
\n
{\"Not finding what you're looking for?\"}
\n Revise search criteria\n
\n
\n
\n );\n }\n}\n\nexport default PropertyList;\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport uniqueId from 'lodash/uniqueId';\nimport classNames from 'classnames';\nimport './index.css';\n\nclass Property extends PureComponent {\n static propTypes = {\n index: PropTypes.number.isRequired,\n nid: PropTypes.number.isRequired,\n activeItemId: PropTypes.number,\n name: PropTypes.string.isRequired,\n static_pricing_text: PropTypes.string,\n incentive_text: PropTypes.string,\n email: PropTypes.string.isRequired,\n active: PropTypes.bool,\n has_virtual_tour: PropTypes.bool.isRequired,\n cats_allowed: PropTypes.bool.isRequired,\n dogs_allowed: PropTypes.bool.isRequired,\n scrollComponentIntoView: PropTypes.func.isRequired,\n url: PropTypes.string.isRequired,\n }\n\n static defaultProps = {\n active: false,\n incentive_text: '',\n static_pricing_text: '',\n activeItemId: null\n }\n\n constructor(props) {\n super(props);\n\n this.property = React.createRef();\n }\n\n componentDidMount() {\n if (this.props.activeItemId === this.props.nid) {\n this.props.scrollComponentIntoView(this.property.current);\n }\n }\n\n componentDidUpdate() {\n if (this.props.activeItemId === this.props.nid) {\n this.props.scrollComponentIntoView(this.property.current);\n }\n }\n\n onEmailClick(e) {\n if (window.contact_form) {\n e.preventDefault();\n window.contact_form.trigger({ target: e.target });\n return false;\n }\n }\n\n render() {\n const { protocol, host, pathname } = window.location;\n const baseURL = `${protocol}//${host}${pathname}?`;\n const pricing = (this.props.static_pricing_text || '')\n .split('\\n')\n .filter(pt => pt.length > 0);\n\n const location = this.props.location.slice(2).map(location => ({\n name: location.name,\n link: `${baseURL}neighborhoods[${location.tid}]=${location.tid}`\n }));\n const isActive = this.props.nid === this.props.activeItemId;\n const hasPricingText = pricing.length > 0;\n\n return (\n
\n {this.props.index}\n {this.props.incentive_text && {this.props.incentive_text}}\n
\n {this.props.name}/\n
\n

{this.props.name}

\n {location.map(loc => (\n
\n {loc.name}\n
\n ))}\n
\n {this.props.cats_allowed &&\n Cats\n }\n {this.props.dogs_allowed &&\n Dogs\n }\n
\n
\n
\n {hasPricingText &&\n
\n

Pricing

\n \n
\n }\n
\n Email\n {this.props.phone}\n Tap to Call\n {this.props.has_virtual_tour &&\n Take a Virtual Tour\n }\n
\n
\n );\n }\n}\n\nexport default Property;\n","export const exampleMapStyles = [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#f5f5f5\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#eeeeee\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#e5e5e5\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#ffffff\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#dadada\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"transit.line\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#e5e5e5\"\n }\n ]\n },\n {\n \"featureType\": \"transit.station\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#eeeeee\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#c9c9c9\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n }\n];\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport uniqueId from 'lodash/uniqueId';\nimport {\n withScriptjs,\n withGoogleMap,\n GoogleMap,\n} from \"react-google-maps\";\nimport { Marker } from '../';\nimport { exampleMapStyles } from '../../constants/maps-styling';\nimport './index.css';\n\nconst Map = withScriptjs(withGoogleMap((props) => {\n const activeMarkers = props.markers.find(marker => marker.nid === props.activeItemId) || props.markers[0];\n\n return (\n
\n \n {\n props.markers.map((marker) => {\n const id = uniqueId('marker_');\n return (\n props.onMarkerClicked(nid)}\n />\n );\n })\n }\n \n
\n );\n}));\n\nMap.propTypes = {\n markers: PropTypes.arrayOf(PropTypes.shape({\n address: PropTypes.string,\n location: PropTypes.shape({})\n })),\n onMarkerClicked: PropTypes.func.isRequired,\n activeItemId: PropTypes.number\n};\n\nMap.defaultProps = {\n markers: [],\n activeItemId: null\n};\n\nexport default Map;\n","export const bedroomOptions = [\n { value: '', label: 'Any # of Beds' },\n { value: '0', label: 'Studio +' },\n { value: '1', label: '1+ Beds' },\n { value: '2', label: '2+ Beds' },\n { value: '3', label: '3+ Beds' },\n { value: '4', label: '4+ Beds' }\n];\n\nexport const MAPS_API_KEY = 'AIzaSyBoXzUipdNM1hCE0eCibpep7GzM5mXhZV4';\nexport const GEOCODE_API_KEY = 'AIzaSyBoXzUipdNM1hCE0eCibpep7GzM5mXhZV4';\n\nexport const GOOGLE_MAP_URL = `https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=${MAPS_API_KEY}`;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Select, { components } from 'react-select';\nimport { bedroomOptions } from '../../constants';\nimport { toMoney, toNumber } from '../../utils';\nimport './index.css';\nimport './select.css';\n\nclass Filters extends Component {\n static propTypes = {\n closeMap: PropTypes.func.isRequired,\n filterProperties: PropTypes.func.isRequired,\n filters: PropTypes.shape({\n appliedFilters: PropTypes.shape({}),\n neighborhoods: PropTypes.arrayOf(PropTypes.shape({}))\n }).isRequired\n };\n\n constructor(props) {\n super(props);\n\n const {\n selectedBedroomNumber,\n to,\n from,\n field_cats_allowed_value,\n field_dogs_allowed_value,\n appliedNeighborhoods\n } = props.filters.appliedFilters;\n const { neighborhoods } = this.props.filters;\n const appliedNeighborhoodsIds = appliedNeighborhoods && appliedNeighborhoods.split(',');\n\n this.state = {\n selectedBedroomNumber: selectedBedroomNumber ?\n bedroomOptions.find(opt => opt.value === selectedBedroomNumber) :\n bedroomOptions[0],\n selectedNeigborhood: appliedNeighborhoodsIds ?\n neighborhoods.filter(item => appliedNeighborhoodsIds.includes(item.value)) :\n [],\n to: to || '',\n from: from || '',\n cats: field_cats_allowed_value || 'All',\n dogs: field_dogs_allowed_value || 'All',\n isFiltersShown: true\n }\n }\n\n componentDidUpdate(prevProps) {\n const { neighborhoods : prevNeighborhoods } = prevProps.filters;\n const { neighborhoods } = this.props.filters;\n const { appliedNeighborhoods } = this.props.filters.appliedFilters;\n\n if (!prevNeighborhoods.length && !this.state.selectedNeigborhood.length && appliedNeighborhoods) {\n const appliedNeighborhoodsIds = appliedNeighborhoods.split(',');\n this.setState({\n selectedNeigborhood: neighborhoods.filter(item => appliedNeighborhoodsIds.includes(item.value))\n });\n }\n }\n\n updateURL = (filters) => {\n const { protocol, host, pathname } = window.location;\n const query = Object.keys(filters).map(key => key + '=' + filters[key]).join('&');\n const newURL = `${protocol}//${host}${pathname}?${query}`;\n window.history.pushState({ path: newURL }, '', newURL);\n }\n\n handleSubmit = (e) => {\n e.preventDefault();\n const {\n from,\n to,\n selectedNeigborhood,\n selectedBedroomNumber,\n cats,\n dogs\n } = this.state;\n const { appliedCity } = this.props.filters;\n const neighborhoods = selectedNeigborhood.map(loc => loc.value).join(',');\n const filters = {\n field_unit_type_price_range_from: from,\n field_unit_type_price_range_to: to,\n field_unit_type_bedrooms_value: selectedBedroomNumber.value,\n field_cats_allowed_value: cats,\n field_dogs_allowed_value: dogs\n };\n\n if (neighborhoods) {\n filters['neighborhoods[]'] = neighborhoods;\n }\n\n this.updateURL(filters);\n this.props.filterProperties({ ...filters, appliedCity });\n }\n\n handleFromChange = (e) => {\n const value = toNumber(e.target.value);\n\n this.setState({\n from: value !== 0 ? `${toMoney(value)}` : ''\n });\n }\n\n handleToChange = (e) => {\n const value = toNumber(e.target.value);\n\n this.setState({\n to: value !== 0 ? `${toMoney(value)}` : ''\n });\n }\n\n handleBedroomChange = (selectedOption) => {\n this.setState({ selectedBedroomNumber: selectedOption });\n }\n\n handleNeigborhoodChange = (selectedOption) => {\n this.setState({ selectedNeigborhood: selectedOption });\n }\n\n openMobileMenu = () => {\n if (document.querySelector('.header .hamburger')) {\n document.querySelector('.header .hamburger').click();\n }\n }\n\n toggleFilters = () => {\n return this.setState(prevState => ({ isFiltersShown: !prevState.isFiltersShown }));\n }\n\n onCatsChanged = () => {\n this.setState(prevState => ({ cats: prevState.cats === 'All' ? 1 : 'All' }));\n }\n\n onDogsChanged = () => {\n this.setState(prevState => ({ dogs: prevState.dogs === 'All' ? 1 : 'All' }));\n }\n\n renderNeigborhoodSelect() {\n const { neighborhoods } = this.props.filters;\n const option = (props) => {\n return (\n \n {}}\n />\n \n \n );\n };\n const multiValueLabel = (props) => {\n const values = this.state.selectedNeigborhood;\n let label = '';\n\n if (values.length === 1) {\n label = values[0].label\n }\n\n if (values.length > 1) {\n label = `${values.length} selected`;\n }\n\n return (\n \n {label}\n \n );\n };\n\n return (\n \n );\n }\n\n render() {\n const { selectedBedroomNumber, from, to, isFiltersShown, cats, dogs } = this.state;\n const { neighborhoods } = this.props.filters;\n const formClasses = classNames('filters--form', {'filters--form-visible': isFiltersShown});\n const catsClasses = classNames(\n 'cats-allowed-custom-exposed-filter',\n {\n 'active': cats !== 'All'\n });\n const dogsClasses = classNames(\n 'dogs-allowed-custom-exposed-filter',\n {\n 'active': dogs !== 'All'\n });\n\n return (\n
\n
\n \n \n \n
APARTMENT HOMES
\n
\n \n
\n \n \n
\n \n \n
\n
\n \n
\n \n \n \n
\n
\n
\n \n {neighborhoods.length > 0 && this.renderNeigborhoodSelect()}\n
\n
\n \n \n \n \n \n \n \n
\n \n \n
\n
\n );\n }\n}\n\nexport default Filters;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { MarkerWithLabel } from 'react-google-maps/lib/components/addons/MarkerWithLabel';\nimport markerIcon from './marker.png';\nimport activeMarkerIcon from './active-marker.png';\n\nconst Marker = (props) => {\n const { location, nid, isActive, label, onMarkerClicked } = props;\n\n /* eslint-disable no-undef */\n const anchor = label > 9 ? new google.maps.Point(9, 36) : new google.maps.Point(4, 36);\n const zIndex = isActive ? 9999 + nid : nid;\n\n function onMarkerClick() {\n return onMarkerClicked(nid)\n }\n\n return (\n \n {label}\n \n );\n};\n\nMarker.propTypes = {\n nid: PropTypes.number.isRequired,\n label: PropTypes.number.isRequired,\n isActive: PropTypes.bool.isRequired,\n location: PropTypes.shape({\n lat: PropTypes.number,\n lng: PropTypes.number\n }).isRequired\n};\n\nexport default Marker;\n","import React from 'react';\nimport {FadeLoader} from 'halogenium';\n\nconst Loader = () => (\n
\n \n
\n);\n\nexport default Loader;\n","import { GEOCODE_API_KEY } from './index';\n\nexport const API_GEOCODE = `https://maps.googleapis.com/maps/api/geocode/json?key=${GEOCODE_API_KEY}`;\nexport const API_FETCH_PROPERTIES = '/pmc/property/mapfeed.json';\n","import * as types from './types';\nimport axios from 'axios';\nimport P from 'bluebird';\nimport {API_GEOCODE, API_FETCH_PROPERTIES} from '../constants/api';\nimport {getGeocodeApiAddress} from '../utils';\n\nexport function fetchProperties(filters) {\n return async (dispatch) => {\n dispatch({type: types.FETCH_PROPERTIES_LIST_REQUEST});\n try {\n const { data } = await axios.get(API_FETCH_PROPERTIES);\n const properties = data.map((i) => ({...i, geoCodeAddress: getGeocodeApiAddress(i)}));\n return dispatch({type: types.FETCH_PROPERTIES_LIST_SUCCESS, properties, filters});\n } catch(e) {\n return dispatch({type: types.ON_API_ERROR, e});\n }\n };\n}\n\nexport function filterProperties(filters) {\n return {\n type: types.FILTER_PROPERTIES_LIST,\n filters\n };\n}\n\n\nasync function fetchMarker({geoCodeAddress, nid, index}) {\n const {data} = await axios.get(`${API_GEOCODE}&address=${geoCodeAddress}`);\n const {geometry: {location}} = data.results[0];\n return {location, nid, index};\n}\nexport function fetchMarkers(list) {\n const {existingMarkers, items} = list.reduce((acc, item) => {\n const {coordinates = {}} = item;\n\n if (coordinates.latitude && coordinates.longitude) {\n acc.existingMarkers.push({\n location: {\n lat: +coordinates.latitude,\n lng: +coordinates.longitude\n },\n nid: item.nid,\n index: item.index\n })\n } else {\n acc.items.push(item);\n }\n\n return acc;\n }, {existingMarkers: [], items: []});\n\n return async (dispatch) => {\n dispatch({type: types.FETCH_MARKER_REQUEST});\n try {\n const geoCodedMarkers = await P.map(items, (item) => fetchMarker(item), {concurrency: 10});\n const markers = [...existingMarkers, ...geoCodedMarkers];\n return dispatch({type: types.FETCH_MARKER_SUCCESS, markers});\n } catch(e) {\n return dispatch({type: types.ON_API_ERROR, e});\n }\n };\n}\n\nexport function setActiveMarker(nid) {\n return {\n type: types.SET_ACTIVE_MARKER,\n nid\n };\n}\n\nexport function cleanMarkers() {\n return {\n type: types.CLEAN_MARKERS,\n };\n}\n","import React, { PureComponent, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport isEqual from 'lodash/isEqual';\nimport {\n Maps,\n Loader,\n Filters,\n PropertyList\n} from '../../Components';\nimport {\n fetchProperties,\n fetchMarkers,\n setActiveMarker,\n filterProperties,\n cleanMarkers\n} from '../../actions';\nimport { GOOGLE_MAP_URL } from '../../constants';\nimport './index.css';\n\nclass MapsContainer extends PureComponent {\n static propTypes = {\n onFetchMarkers: PropTypes.func.isRequired,\n onFilterProperties: PropTypes.func.isRequired,\n markers: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n properties: PropTypes.shape({\n isPropertiesFetching: PropTypes.bool.isRequired,\n filteredProperties: PropTypes.arrayOf(PropTypes.shape({}))\n }).isRequired,\n filters: PropTypes.shape({}),\n activeItemId: PropTypes.number\n }\n\n componentDidMount() {\n const { appliedFilters, appliedCity } = this.props.filters;\n this.props.onFetchProperties({...appliedFilters, appliedCity});\n }\n\n componentDidUpdate(prevProps) {\n const { properties:\n { filteredProperties: prevProperties }\n } = prevProps;\n const {\n properties: { filteredProperties: properties },\n clearMarkers,\n onFetchMarkers,\n } = this.props;\n\n if (!properties.length) {\n clearMarkers();\n }\n\n if (!isEqual(prevProperties, properties) && properties.length) {\n const list = properties.map((property, index) => {\n const {coordinates, nid, geoCodeAddress} = property;\n return {geoCodeAddress, nid: nid, index: index + 1, coordinates}\n });\n\n return onFetchMarkers(list);\n }\n }\n\n onMarkerClicked = (nid) => {\n this.props.onSetActiveMarker(nid);\n }\n\n closeMap = () => {\n if (document.querySelector('#pmc_map')) {\n document.querySelector('#pmc_map').classList.remove('active-map');\n }\n document.location.reload();\n }\n\n renderBody() {\n const {\n markers,\n properties: { filteredProperties: properties },\n activeItemId,\n filters\n } = this.props;\n\n return (\n \n \n {!markers.fetching && }\n containerElement={
}\n mapElement={
}\n googleMapURL={GOOGLE_MAP_URL}\n onMarkerClicked={this.onMarkerClicked}\n activeItemId={activeItemId}\n />}\n {properties.length > 0 ? :\n (
No results match your filter criteria.
)\n }\n \n );\n }\n\n render() {\n const { properties: { isPropertiesFetching } } = this.props;\n\n return (\n
\n {isPropertiesFetching ?\n :\n this.renderBody()\n }\n
\n );\n }\n};\n\nfunction mapStateToProps({markers, properties, activeItemId, filters}) {\n return {\n markers: markers.markers,\n activeItemId: activeItemId.activeItemId,\n properties,\n filters\n };\n}\n\nconst bindActions = dispatch => (\n {\n onFetchProperties: (filters) => dispatch(fetchProperties(filters)),\n onFetchMarkers: (address, nid, index) => dispatch(fetchMarkers(address, nid, index)),\n onSetActiveMarker: (nid) => dispatch(setActiveMarker(nid)),\n onFilterProperties: (filters) => dispatch(filterProperties(filters)),\n clearMarkers: () => dispatch(cleanMarkers()),\n dispatch\n }\n);\n\nexport default connect(mapStateToProps, bindActions)(MapsContainer);\n","import React from 'react';\nimport { Provider } from 'react-redux';\nimport { store } from './store';\nimport { MapsContainer } from './Containers';\nimport './index.css';\n\nconst App = () => (\n \n \n \n);\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\n\nReactDOM.render(, document.getElementById('pmc_map'));\n"],"sourceRoot":""}